Moving back to trunk!

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-01-24 19:24:36 +00:00
commit 8d458998a1
332 changed files with 17647 additions and 9466 deletions

View file

@ -24,8 +24,9 @@ using System.Drawing;
using System.Globalization;
using System.Runtime.InteropServices;
using Greenshot.Helpers.IEInterop;
using GreenshotPlugin.Core;
using Greenshot.Plugin;
using IniFile;
namespace Greenshot.Helpers.IEInterop {
public class ElementContainer {
@ -37,6 +38,7 @@ namespace Greenshot.Helpers.IEInterop {
public class DocumentContainer {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(DocumentContainer));
private static CoreConfiguration configuration = IniConfig.GetIniSection<CoreConfiguration>();
private static readonly List<string> CAPTURE_TAGS = new List<string>();
private const int E_ACCESSDENIED = unchecked((int)0x80070005L);
private static Guid IID_IWebBrowserApp = new Guid("0002DF05-0000-0000-C000-000000000046");
private static Guid IID_IWebBrowser2 = new Guid("D30C1661-CDAF-11D0-8A3E-00C04FC9E26E");
@ -48,7 +50,7 @@ namespace Greenshot.Helpers.IEInterop {
private Point destinationLocation;
private Point startLocation = Point.Empty;
private Rectangle viewportRectangle = Rectangle.Empty;
private string name;
private string name = null;
private string url;
private bool isDTD;
private DocumentContainer parent;
@ -57,12 +59,37 @@ namespace Greenshot.Helpers.IEInterop {
private double zoomLevelY = 1;
private List<DocumentContainer> frames = new List<DocumentContainer>();
static DocumentContainer() {
CAPTURE_TAGS.Add("LABEL");
CAPTURE_TAGS.Add("DIV");
CAPTURE_TAGS.Add("IMG");
CAPTURE_TAGS.Add("INPUT");
CAPTURE_TAGS.Add("BUTTON");
CAPTURE_TAGS.Add("TD");
CAPTURE_TAGS.Add("TR");
CAPTURE_TAGS.Add("TH");
CAPTURE_TAGS.Add("TABLE");
CAPTURE_TAGS.Add("TBODY");
CAPTURE_TAGS.Add("SPAN");
CAPTURE_TAGS.Add("A");
CAPTURE_TAGS.Add("UL");
CAPTURE_TAGS.Add("LI");
CAPTURE_TAGS.Add("H1");
CAPTURE_TAGS.Add("H2");
CAPTURE_TAGS.Add("H3");
CAPTURE_TAGS.Add("H4");
CAPTURE_TAGS.Add("H5");
CAPTURE_TAGS.Add("FORM");
CAPTURE_TAGS.Add("FIELDSET");
}
private DocumentContainer(IHTMLWindow2 frameWindow, WindowDetails contentWindow, DocumentContainer parent) {
//IWebBrowser2 webBrowser2 = frame as IWebBrowser2;
//IHTMLDocument2 document2 = webBrowser2.Document as IHTMLDocument2;
IHTMLDocument2 document2 = GetDocumentFromWindow(frameWindow);
try {
LOG.DebugFormat("frameWindow.name {0}", frameWindow.name);
name = frameWindow.name;
} catch {
}
@ -89,7 +116,7 @@ namespace Greenshot.Helpers.IEInterop {
// element = element.offsetParent;
// } while (element != null);
// startLocation = new Point((int)x, (int)y);
Point contentWindowLocation = contentWindow.ClientRectangle.Location;
Point contentWindowLocation = contentWindow.WindowRectangle.Location;
int x = window3.screenLeft - contentWindowLocation.X;
int y = window3.screenTop - contentWindowLocation.Y;
startLocation = new Point(x, y);
@ -118,7 +145,7 @@ namespace Greenshot.Helpers.IEInterop {
} else {
isDTD = false;
}
Rectangle clientRectangle = contentWindow.ClientRectangle;
Rectangle clientRectangle = contentWindow.WindowRectangle;
try {
IHTMLWindow3 window3 = (IHTMLWindow3)document2.parentWindow;
IHTMLWindow2 window2 = (IHTMLWindow2)document2.parentWindow;
@ -164,8 +191,16 @@ namespace Greenshot.Helpers.IEInterop {
sourceLocation = new Point(ScaleX((int)startLocation.X), ScaleY((int)startLocation.Y));
destinationLocation = new Point(ScaleX((int)startLocation.X), ScaleY((int)startLocation.Y));
name = document2.title;
url = document2.url;
try {
if (name == null) {
name = document2.title;
}
} catch {
}
try {
url = document2.url;
} catch {
}
if (parent != null) {
return;
@ -321,6 +356,84 @@ namespace Greenshot.Helpers.IEInterop {
}
return elements;
}
/// <summary>
/// Create a CaptureElement for every element on the page, which can be used by the editor.
/// </summary>
/// <returns></returns>
public CaptureElement CreateCaptureElements(Size documentSize) {
LOG.DebugFormat("CreateCaptureElements for {0}", Name);
IHTMLElement baseElement = document3.documentElement as IHTMLElement;
IHTMLElement2 baseElement2 = baseElement as IHTMLElement2;
IHTMLRect htmlRect = baseElement2.getBoundingClientRect();
if (Size.Empty.Equals(documentSize)) {
documentSize = new Size(ScrollWidth, ScrollHeight);
}
Rectangle baseElementBounds = new Rectangle(DestinationLocation.X + htmlRect.left, DestinationLocation.Y + htmlRect.top, documentSize.Width, documentSize.Height);
if (baseElementBounds.Width <= 0 || baseElementBounds.Height <= 0) {
// not visisble
return null;
}
CaptureElement captureBaseElement = new CaptureElement(name, baseElementBounds);
foreach(IHTMLElement bodyElement in baseElement.children) {
if ("BODY".Equals(bodyElement.tagName)) {
captureBaseElement.Children.AddRange(RecurseElements(bodyElement));
}
}
return captureBaseElement;
}
/// <summary>
/// Recurse into the document tree
/// </summary>
/// <param name="parentElement">IHTMLElement we want to recurse into</param>
/// <returns>List of ICaptureElements with child elements</returns>
private List<ICaptureElement> RecurseElements(IHTMLElement parentElement) {
List<ICaptureElement> childElements = new List<ICaptureElement>();
foreach(IHTMLElement element in parentElement.children) {
string tagName = element.tagName;
// Skip elements we aren't interested in
if (!CAPTURE_TAGS.Contains(tagName)) {
continue;
}
ICaptureElement captureElement = new CaptureElement(tagName);
captureElement.Children.AddRange(RecurseElements(element));
// Get Bounds
IHTMLElement2 element2 = element as IHTMLElement2;
IHTMLRect htmlRect = element2.getBoundingClientRect();
int left = htmlRect.left;
int top = htmlRect.top;
int right = htmlRect.right;
int bottom = htmlRect.bottom;
// Offset
left += DestinationLocation.X;
top += DestinationLocation.Y;
right += DestinationLocation.X;
bottom += DestinationLocation.Y;
// Fit to floating children
foreach(ICaptureElement childElement in captureElement.Children) {
//left = Math.Min(left, childElement.Bounds.Left);
//top = Math.Min(top, childElement.Bounds.Top);
right = Math.Max(right, childElement.Bounds.Right);
bottom = Math.Max(bottom, childElement.Bounds.Bottom);
}
Rectangle bounds = new Rectangle(left, top, right-left, bottom-top);
if (bounds.Width > 0 && bounds.Height > 0) {
captureElement.Bounds = bounds;
childElements.Add(captureElement);
}
}
return childElements;
}
public Color BackgroundColor {
get {
@ -377,6 +490,7 @@ namespace Greenshot.Helpers.IEInterop {
public void setAttribute(string attribute, int value) {
setAttribute(attribute, value.ToString());
}
/// <summary>
/// Set/change an attribute on a document
/// </summary>

View file

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F1D8-98B5-11CF-BB82-00AA00BDCE0B"),

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
/// <summary><para><c>IHTMLDocument</c> interface.</para></summary>

View file

@ -20,53 +20,58 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
/// <summary><para><c>IHTMLDocument2</c> interface.</para></summary>
[Guid("332C4425-26CB-11D0-B483-00C04FD90119")]
[ComImport]
[TypeLibType(TypeLibTypeFlags.FDual)]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
public interface IHTMLDocument2 {
IHTMLElement body {
[DispId(1004)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
string title {
[DispId(1012)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
object frames {
[DispId(1019)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
string url {
[DispId(1025)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
/// <summary><para><c>IHTMLDocument2</c> interface.</para></summary>
[Guid("332C4425-26CB-11D0-B483-00C04FD90119")]
[ComImport]
[TypeLibType(TypeLibTypeFlags.FDual)]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
public interface IHTMLDocument2 {
IHTMLElement body {
[DispId(1004)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
string title {
[DispId(1012)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
object frames {
[DispId(1019)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
string url {
[DispId(1025)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
IHTMLWindow2 parentWindow {
[DispId(1034)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
IHTMLWindow2 parentWindow {
[DispId(1034)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
object bgColor {
[DispId(-501)]
get;
}
object bgColor {
[DispId(-501)]
get;
}
IHTMLSelectionObject selection {
[DispId(1017)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
IHTMLSelectionObject selection {
[DispId(1017)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
}
string designMode {
[DispId(1014)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[DispId(1014)]
set;
}
}
}

View file

@ -20,31 +20,28 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
/// <summary><para><c>IHTMLDocument3</c> interface.</para></summary>
[Guid("3050F485-98B5-11CF-BB82-00AA00BDCE0B")]
[ComImport]
[TypeLibType(TypeLibTypeFlags.FDual)]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
public interface IHTMLDocument3 {
IHTMLElement documentElement {
[DispId(1075)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
/// <summary><para><c>IHTMLDocument3</c> interface.</para></summary>
[Guid("3050F485-98B5-11CF-BB82-00AA00BDCE0B")]
[ComImport]
[TypeLibType(TypeLibTypeFlags.FDual)]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
public interface IHTMLDocument3 {
IHTMLElement documentElement {
[DispId(1075)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
[DispId(1086)]
[return: MarshalAs(UnmanagedType.IDispatch)]
IHTMLElementCollection getElementsByName([MarshalAs(UnmanagedType.BStr)] string v);
[DispId(1086)]
[return: MarshalAs(UnmanagedType.IDispatch)]
IHTMLElementCollection getElementsByName([MarshalAs(UnmanagedType.BStr)] string v);
[DispId(1088)]
IHTMLElement getElementById([MarshalAs(UnmanagedType.BStr)] string v);
[DispId(1088)]
IHTMLElement getElementById([MarshalAs(UnmanagedType.BStr)] string v);
[DispId(1087)]
IHTMLElementCollection getElementsByTagName([MarshalAs(UnmanagedType.BStr)] string v);
}
[DispId(1087)]
IHTMLElementCollection getElementsByTagName([MarshalAs(UnmanagedType.BStr)] string v);
}
}

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
[ComVisible(true), Guid("3050f69a-98b5-11cf-bb82-00aa00bdce0b"),

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
[ComImport, ComVisible(true), Guid("3050f80c-98b5-11cf-bb82-00aa00bdce0b"),

View file

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F1FF-98B5-11CF-BB82-00AA00BDCE0B"),
@ -109,5 +107,11 @@ namespace Greenshot.Helpers.IEInterop {
[DispId(-2147417093)]
void scrollIntoView(bool varargStart);
IHTMLElementCollection children {
[DispId(-2147417075)]
[return: MarshalAs(UnmanagedType.IDispatch)]
get;
}
}
}

View file

@ -19,17 +19,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F434-98B5-11CF-BB82-00AA00BDCE0B"),
TypeLibType(TypeLibTypeFlags.FDual),
InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
public interface IHTMLElement2 {
[DispId(-2147417067)]
[return: MarshalAs(UnmanagedType.IDispatch)]
IHTMLRect getBoundingClientRect();
[DispId(-2147417067)]
[return: MarshalAs(UnmanagedType.IDispatch)]
IHTMLRect getBoundingClientRect();
IHTMLCurrentStyle currentStyle {
[DispId(-2147417105)]
[return: MarshalAs(UnmanagedType.Interface)] //IHTMLCurrentStyle
get;
}
}
}

View file

@ -19,9 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
using System.Runtime.InteropServices;
namespace Greenshot.Helpers.IEInterop {
[ComImport(), ComVisible(true),

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
[ComImport(), ComVisible(true),

View file

@ -20,7 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F4A3-98B5-11CF-BB82-00AA00BDCE0B"),

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F35C-98B5-11CF-BB82-00AA00BDCE0B"),

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F84A-98B5-11CF-BB82-00AA00BDCE0B"),

View file

@ -20,7 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
// See: http://msdn.microsoft.com/en-us/library/aa768849%28v=vs.85%29.aspx

View file

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
[ComImport, Guid("3050F25E-98B5-11CF-BB82-00AA00BDCE0B"),
@ -994,493 +992,197 @@ namespace Greenshot.Helpers.IEInterop {
}
/// <summary><para><c>paddingRight</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>paddingRight</c> property was the following: <c>VARIANT paddingRight</c>;</para></remarks>
// IDL: VARIANT paddingRight;
// VB6: paddingRight As Any
object paddingRight
{
// IDL: HRESULT paddingRight ([out, retval] VARIANT* ReturnValue);
// VB6: Function paddingRight As Any
object paddingRight {
[DispId(-2147413099)]
get;
// IDL: HRESULT paddingRight (VARIANT value);
// VB6: Sub paddingRight (ByVal value As Any)
[DispId(-2147413099)]
set;
}
/// <summary><para><c>paddingTop</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>paddingTop</c> property was the following: <c>VARIANT paddingTop</c>;</para></remarks>
// IDL: VARIANT paddingTop;
// VB6: paddingTop As Any
object paddingTop
{
// IDL: HRESULT paddingTop ([out, retval] VARIANT* ReturnValue);
// VB6: Function paddingTop As Any
object paddingTop {
[DispId(-2147413100)]
get;
// IDL: HRESULT paddingTop (VARIANT value);
// VB6: Sub paddingTop (ByVal value As Any)
[DispId(-2147413100)]
set;
}
/// <summary><para><c>pageBreakAfter</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>pageBreakAfter</c> property was the following: <c>BSTR pageBreakAfter</c>;</para></remarks>
// IDL: BSTR pageBreakAfter;
// VB6: pageBreakAfter As String
string pageBreakAfter
{
// IDL: HRESULT pageBreakAfter ([out, retval] BSTR* ReturnValue);
// VB6: Function pageBreakAfter As String
string pageBreakAfter {
[DispId(-2147413034)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT pageBreakAfter (BSTR value);
// VB6: Sub pageBreakAfter (ByVal value As String)
[DispId(-2147413034)]
set;
}
/// <summary><para><c>pageBreakBefore</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>pageBreakBefore</c> property was the following: <c>BSTR pageBreakBefore</c>;</para></remarks>
// IDL: BSTR pageBreakBefore;
// VB6: pageBreakBefore As String
string pageBreakBefore
{
// IDL: HRESULT pageBreakBefore ([out, retval] BSTR* ReturnValue);
// VB6: Function pageBreakBefore As String
string pageBreakBefore {
[DispId(-2147413035)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT pageBreakBefore (BSTR value);
// VB6: Sub pageBreakBefore (ByVal value As String)
[DispId(-2147413035)]
set;
}
/// <summary><para><c>pixelHeight</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>pixelHeight</c> property was the following: <c>long pixelHeight</c>;</para></remarks>
// IDL: long pixelHeight;
// VB6: pixelHeight As Long
int pixelHeight
{
// IDL: HRESULT pixelHeight ([out, retval] long* ReturnValue);
// VB6: Function pixelHeight As Long
int pixelHeight {
[DispId(-2147414109)]
get;
// IDL: HRESULT pixelHeight (long value);
// VB6: Sub pixelHeight (ByVal value As Long)
[DispId(-2147414109)]
set;
}
/// <summary><para><c>pixelLeft</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>pixelLeft</c> property was the following: <c>long pixelLeft</c>;</para></remarks>
// IDL: long pixelLeft;
// VB6: pixelLeft As Long
int pixelLeft
{
// IDL: HRESULT pixelLeft ([out, retval] long* ReturnValue);
// VB6: Function pixelLeft As Long
int pixelLeft {
[DispId(-2147414111)]
get;
// IDL: HRESULT pixelLeft (long value);
// VB6: Sub pixelLeft (ByVal value As Long)
[DispId(-2147414111)]
set;
}
/// <summary><para><c>pixelTop</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>pixelTop</c> property was the following: <c>long pixelTop</c>;</para></remarks>
// IDL: long pixelTop;
// VB6: pixelTop As Long
int pixelTop
{
// IDL: HRESULT pixelTop ([out, retval] long* ReturnValue);
// VB6: Function pixelTop As Long
int pixelTop {
[DispId(-2147414112)]
get;
// IDL: HRESULT pixelTop (long value);
// VB6: Sub pixelTop (ByVal value As Long)
[DispId(-2147414112)]
set;
}
/// <summary><para><c>pixelWidth</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>pixelWidth</c> property was the following: <c>long pixelWidth</c>;</para></remarks>
// IDL: long pixelWidth;
// VB6: pixelWidth As Long
int pixelWidth
{
// IDL: HRESULT pixelWidth ([out, retval] long* ReturnValue);
// VB6: Function pixelWidth As Long
int pixelWidth {
[DispId(-2147414110)]
get;
// IDL: HRESULT pixelWidth (long value);
// VB6: Sub pixelWidth (ByVal value As Long)
[DispId(-2147414110)]
set;
}
/// <summary><para><c>posHeight</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>posHeight</c> property was the following: <c>float posHeight</c>;</para></remarks>
// IDL: float posHeight;
// VB6: posHeight As Single
float posHeight
{
// IDL: HRESULT posHeight ([out, retval] float* ReturnValue);
// VB6: Function posHeight As Single
float posHeight {
[DispId(-2147414105)]
get;
// IDL: HRESULT posHeight (float value);
// VB6: Sub posHeight (ByVal value As Single)
[DispId(-2147414105)]
set;
}
/// <summary><para><c>position</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>position</c> property was the following: <c>BSTR position</c>;</para></remarks>
// IDL: BSTR position;
// VB6: position As String
string position
{
// IDL: HRESULT position ([out, retval] BSTR* ReturnValue);
// VB6: Function position As String
string position {
[DispId(-2147413022)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
}
/// <summary><para><c>posLeft</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>posLeft</c> property was the following: <c>float posLeft</c>;</para></remarks>
// IDL: float posLeft;
// VB6: posLeft As Single
float posLeft
{
// IDL: HRESULT posLeft ([out, retval] float* ReturnValue);
// VB6: Function posLeft As Single
float posLeft {
[DispId(-2147414107)]
get;
// IDL: HRESULT posLeft (float value);
// VB6: Sub posLeft (ByVal value As Single)
[DispId(-2147414107)]
set;
}
/// <summary><para><c>posTop</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>posTop</c> property was the following: <c>float posTop</c>;</para></remarks>
// IDL: float posTop;
// VB6: posTop As Single
float posTop
{
// IDL: HRESULT posTop ([out, retval] float* ReturnValue);
// VB6: Function posTop As Single
float posTop {
[DispId(-2147414108)]
get;
// IDL: HRESULT posTop (float value);
// VB6: Sub posTop (ByVal value As Single)
[DispId(-2147414108)]
set;
}
/// <summary><para><c>posWidth</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>posWidth</c> property was the following: <c>float posWidth</c>;</para></remarks>
// IDL: float posWidth;
// VB6: posWidth As Single
float posWidth
{
// IDL: HRESULT posWidth ([out, retval] float* ReturnValue);
// VB6: Function posWidth As Single
float posWidth {
[DispId(-2147414106)]
get;
// IDL: HRESULT posWidth (float value);
// VB6: Sub posWidth (ByVal value As Single)
[DispId(-2147414106)]
set;
}
/// <summary><para><c>styleFloat</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>styleFloat</c> property was the following: <c>BSTR styleFloat</c>;</para></remarks>
// IDL: BSTR styleFloat;
// VB6: styleFloat As String
string styleFloat
{
// IDL: HRESULT styleFloat ([out, retval] BSTR* ReturnValue);
// VB6: Function styleFloat As String
string styleFloat {
[DispId(-2147413042)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT styleFloat (BSTR value);
// VB6: Sub styleFloat (ByVal value As String)
[DispId(-2147413042)]
set;
}
/// <summary><para><c>textAlign</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textAlign</c> property was the following: <c>BSTR textAlign</c>;</para></remarks>
// IDL: BSTR textAlign;
// VB6: textAlign As String
string textAlign
{
// IDL: HRESULT textAlign ([out, retval] BSTR* ReturnValue);
// VB6: Function textAlign As String
string textAlign {
[DispId(-2147418040)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT textAlign (BSTR value);
// VB6: Sub textAlign (ByVal value As String)
[DispId(-2147418040)]
set;
}
/// <summary><para><c>textDecoration</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textDecoration</c> property was the following: <c>BSTR textDecoration</c>;</para></remarks>
// IDL: BSTR textDecoration;
// VB6: textDecoration As String
string textDecoration
{
// IDL: HRESULT textDecoration ([out, retval] BSTR* ReturnValue);
// VB6: Function textDecoration As String
string textDecoration {
[DispId(-2147413077)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT textDecoration (BSTR value);
// VB6: Sub textDecoration (ByVal value As String)
[DispId(-2147413077)]
set;
}
/// <summary><para><c>textDecorationBlink</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textDecorationBlink</c> property was the following: <c>VARIANT_BOOL textDecorationBlink</c>;</para></remarks>
// IDL: VARIANT_BOOL textDecorationBlink;
// VB6: textDecorationBlink As Boolean
bool textDecorationBlink
{
// IDL: HRESULT textDecorationBlink ([out, retval] VARIANT_BOOL* ReturnValue);
// VB6: Function textDecorationBlink As Boolean
bool textDecorationBlink {
[DispId(-2147413090)]
[return: MarshalAs(UnmanagedType.VariantBool)]
get;
// IDL: HRESULT textDecorationBlink (VARIANT_BOOL value);
// VB6: Sub textDecorationBlink (ByVal value As Boolean)
[DispId(-2147413090)]
set;
}
/// <summary><para><c>textDecorationLineThrough</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textDecorationLineThrough</c> property was the following: <c>VARIANT_BOOL textDecorationLineThrough</c>;</para></remarks>
// IDL: VARIANT_BOOL textDecorationLineThrough;
// VB6: textDecorationLineThrough As Boolean
bool textDecorationLineThrough
{
// IDL: HRESULT textDecorationLineThrough ([out, retval] VARIANT_BOOL* ReturnValue);
// VB6: Function textDecorationLineThrough As Boolean
bool textDecorationLineThrough {
[DispId(-2147413092)]
[return: MarshalAs(UnmanagedType.VariantBool)]
get;
// IDL: HRESULT textDecorationLineThrough (VARIANT_BOOL value);
// VB6: Sub textDecorationLineThrough (ByVal value As Boolean)
[DispId(-2147413092)]
set;
}
/// <summary><para><c>textDecorationNone</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textDecorationNone</c> property was the following: <c>VARIANT_BOOL textDecorationNone</c>;</para></remarks>
// IDL: VARIANT_BOOL textDecorationNone;
// VB6: textDecorationNone As Boolean
bool textDecorationNone
{
// IDL: HRESULT textDecorationNone ([out, retval] VARIANT_BOOL* ReturnValue);
// VB6: Function textDecorationNone As Boolean
bool textDecorationNone {
[DispId(-2147413089)]
[return: MarshalAs(UnmanagedType.VariantBool)]
get;
// IDL: HRESULT textDecorationNone (VARIANT_BOOL value);
// VB6: Sub textDecorationNone (ByVal value As Boolean)
[DispId(-2147413089)]
set;
}
/// <summary><para><c>textDecorationOverline</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textDecorationOverline</c> property was the following: <c>VARIANT_BOOL textDecorationOverline</c>;</para></remarks>
// IDL: VARIANT_BOOL textDecorationOverline;
// VB6: textDecorationOverline As Boolean
bool textDecorationOverline
{
// IDL: HRESULT textDecorationOverline ([out, retval] VARIANT_BOOL* ReturnValue);
// VB6: Function textDecorationOverline As Boolean
bool textDecorationOverline {
[DispId(-2147413043)]
[return: MarshalAs(UnmanagedType.VariantBool)]
get;
// IDL: HRESULT textDecorationOverline (VARIANT_BOOL value);
// VB6: Sub textDecorationOverline (ByVal value As Boolean)
[DispId(-2147413043)]
set;
}
/// <summary><para><c>textDecorationUnderline</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textDecorationUnderline</c> property was the following: <c>VARIANT_BOOL textDecorationUnderline</c>;</para></remarks>
// IDL: VARIANT_BOOL textDecorationUnderline;
// VB6: textDecorationUnderline As Boolean
bool textDecorationUnderline
{
// IDL: HRESULT textDecorationUnderline ([out, retval] VARIANT_BOOL* ReturnValue);
// VB6: Function textDecorationUnderline As Boolean
bool textDecorationUnderline {
[DispId(-2147413091)]
[return: MarshalAs(UnmanagedType.VariantBool)]
get;
// IDL: HRESULT textDecorationUnderline (VARIANT_BOOL value);
// VB6: Sub textDecorationUnderline (ByVal value As Boolean)
[DispId(-2147413091)]
set;
}
/// <summary><para><c>textIndent</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textIndent</c> property was the following: <c>VARIANT textIndent</c>;</para></remarks>
// IDL: VARIANT textIndent;
// VB6: textIndent As Any
object textIndent
{
// IDL: HRESULT textIndent ([out, retval] VARIANT* ReturnValue);
// VB6: Function textIndent As Any
object textIndent {
[DispId(-2147413105)]
get;
// IDL: HRESULT textIndent (VARIANT value);
// VB6: Sub textIndent (ByVal value As Any)
[DispId(-2147413105)]
set;
}
/// <summary><para><c>textTransform</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>textTransform</c> property was the following: <c>BSTR textTransform</c>;</para></remarks>
// IDL: BSTR textTransform;
// VB6: textTransform As String
string textTransform
{
// IDL: HRESULT textTransform ([out, retval] BSTR* ReturnValue);
// VB6: Function textTransform As String
string textTransform {
[DispId(-2147413108)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT textTransform (BSTR value);
// VB6: Sub textTransform (ByVal value As String)
[DispId(-2147413108)]
set;
}
/// <summary><para><c>top</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>top</c> property was the following: <c>VARIANT top</c>;</para></remarks>
// IDL: VARIANT top;
// VB6: top As Any
object top
{
// IDL: HRESULT top ([out, retval] VARIANT* ReturnValue);
// VB6: Function top As Any
object top {
[DispId(-2147418108)]
get;
// IDL: HRESULT top (VARIANT value);
// VB6: Sub top (ByVal value As Any)
[DispId(-2147418108)]
set;
}
/// <summary><para><c>verticalAlign</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>verticalAlign</c> property was the following: <c>VARIANT verticalAlign</c>;</para></remarks>
// IDL: VARIANT verticalAlign;
// VB6: verticalAlign As Any
object verticalAlign
{
// IDL: HRESULT verticalAlign ([out, retval] VARIANT* ReturnValue);
// VB6: Function verticalAlign As Any
object verticalAlign {
[DispId(-2147413064)]
get;
// IDL: HRESULT verticalAlign (VARIANT value);
// VB6: Sub verticalAlign (ByVal value As Any)
[DispId(-2147413064)]
set;
}
/// <summary><para><c>visibility</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>visibility</c> property was the following: <c>BSTR visibility</c>;</para></remarks>
// IDL: BSTR visibility;
// VB6: visibility As String
string visibility
{
// IDL: HRESULT visibility ([out, retval] BSTR* ReturnValue);
// VB6: Function visibility As String
string visibility {
[DispId(-2147413032)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT visibility (BSTR value);
// VB6: Sub visibility (ByVal value As String)
[DispId(-2147413032)]
set;
}
/// <summary><para><c>whiteSpace</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>whiteSpace</c> property was the following: <c>BSTR whiteSpace</c>;</para></remarks>
// IDL: BSTR whiteSpace;
// VB6: whiteSpace As String
string whiteSpace
{
// IDL: HRESULT whiteSpace ([out, retval] BSTR* ReturnValue);
// VB6: Function whiteSpace As String
string whiteSpace {
[DispId(-2147413036)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
// IDL: HRESULT whiteSpace (BSTR value);
// VB6: Sub whiteSpace (ByVal value As String)
[DispId(-2147413036)]
set;
}
/// <summary><para><c>width</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>width</c> property was the following: <c>VARIANT width</c>;</para></remarks>
// IDL: VARIANT width;
// VB6: width As Any
object width
{
// IDL: HRESULT width ([out, retval] VARIANT* ReturnValue);
// VB6: Function width As Any
object width {
[DispId(-2147418107)]
get;
// IDL: HRESULT width (VARIANT value);
// VB6: Sub width (ByVal value As Any)
[DispId(-2147418107)]
set;
}
/// <summary><para><c>wordSpacing</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>wordSpacing</c> property was the following: <c>VARIANT wordSpacing</c>;</para></remarks>
// IDL: VARIANT wordSpacing;
// VB6: wordSpacing As Any
object wordSpacing
{
// IDL: HRESULT wordSpacing ([out, retval] VARIANT* ReturnValue);
// VB6: Function wordSpacing As Any
object wordSpacing {
[DispId(-2147413065)]
get;
// IDL: HRESULT wordSpacing (VARIANT value);
// VB6: Sub wordSpacing (ByVal value As Any)
[DispId(-2147413065)]
set;
}
/// <summary><para><c>zIndex</c> property of <c>IHTMLStyle</c> interface.</para></summary>
/// <remarks><para>An original IDL definition of <c>zIndex</c> property was the following: <c>VARIANT zIndex</c>;</para></remarks>
// IDL: VARIANT zIndex;
// VB6: zIndex As Any
object zIndex
{
// IDL: HRESULT zIndex ([out, retval] VARIANT* ReturnValue);
// VB6: Function zIndex As Any
object zIndex {
[DispId(-2147413021)]
get;
// IDL: HRESULT zIndex (VARIANT value);
// VB6: Sub zIndex (ByVal value As Any)
[DispId(-2147413021)]
set;
}
}
}

View file

@ -20,7 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
// See: http://msdn.microsoft.com/en-us/library/aa741548%28v=vs.85%29.aspx

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
[ComVisible(true), ComImport(), Guid("332c4427-26cb-11d0-b483-00c04fd90119"),

View file

@ -20,7 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
[ComVisible(true), ComImport(), Guid("3050f4ae-98b5-11cf-bb82-00aa00bdce0b"),

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
// Needed to get the Window handle from the IDocument2

View file

@ -20,7 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
namespace Greenshot.Helpers.IEInterop {
// This is the COM IServiceProvider interface, not System.IServiceProvider .Net interface!

View file

@ -20,8 +20,6 @@
*/
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Collections;
namespace Greenshot.Helpers.IEInterop {
// IWebBrowser: EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B