From 6867a42fc7bf59e8180ed0ee5af0fb431b77f17e Mon Sep 17 00:00:00 2001 From: David Hall Date: Sat, 21 Dec 2019 21:08:13 -0700 Subject: [PATCH] More fixes and documentation for printing functions --- PInvoke/Opc/MsOpc.cs | 1153 +++- PInvoke/Printing/DocumentSource.cs | 1 + PInvoke/Printing/DocumentTarget.cs | 2 +- PInvoke/Printing/Vanara.PInvoke.Printing.csproj | 1 + PInvoke/Printing/WinSpool.Enums.cs | 1 + PInvoke/Printing/XpsObjectModel.cs | 7242 +++++++++++++++++++++-- 6 files changed, 7696 insertions(+), 704 deletions(-) diff --git a/PInvoke/Opc/MsOpc.cs b/PInvoke/Opc/MsOpc.cs index 2a414fda..867dddd7 100644 --- a/PInvoke/Opc/MsOpc.cs +++ b/PInvoke/Opc/MsOpc.cs @@ -23,9 +23,608 @@ namespace Vanara.PInvoke /// // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nn-msopc-iopcparturi [PInvokeData("msopc.h", MSDNShortId = "81123212-7a32-4833-b81f-8454a544327d")] - [ComImport, Guid("7D3BABE7-88B2-46BA-85CB-4203CB016C87"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), TypeLibType(TypeLibTypeFlags.FNonExtensible)] + [ComImport, Guid("7D3BABE7-88B2-46BA-85CB-4203CB016C87"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IOpcPartUri : IOpcUri { + /// Returns the specified Uniform Resource Identifier (URI) property value in a new BSTR. + /// + /// [in] + /// A value from the Uri_PROPERTY enumeration. + /// + /// + /// [out] + /// Address of a BSTR that receives the property value. + /// + /// + /// [in] + /// One of the following property-specific flags, or zero. + /// Uri_DISPLAY_NO_FRAGMENT (0x00000001) + /// Uri_PROPERTY_DISPLAY_URI: Exclude the fragment portion of the URI, if any. + /// Uri_PUNYCODE_IDN_HOST (0x00000002) + /// + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: If the URI is an IDN, always display + /// the hostname encoded as punycode. + /// + /// Uri_DISPLAY_IDN_HOST (0x00000004) + /// + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: Display the hostname in punycode or + /// Unicode as it would appear in the Uri_PROPERTY_DISPLAY_URI property. + /// + /// + /// + /// IUri::GetPropertyBSTR was introduced in Windows Internet Explorer 7. + /// + /// The uriProp parameter must be a string property. This method will fail if the specified property isn't a BSTR property. + /// + /// + /// The pbstrProperty parameter will be set to a new BSTR containing the value of the specified string property. The + /// caller should use SysFreeString to free the string. + /// + /// This method will return and set pbstrProperty to an empty string if the URI doesn't contain the specified property. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775026(v=vs.85) + // HRESULT GetPropertyBSTR( [in] Uri_PROPERTY uriProp, [out] BSTR *pbstrProperty, [in] DWORD dwFlags ); + new void GetPropertyBSTR([In] Uri_PROPERTY uriProp, [MarshalAs(UnmanagedType.BStr)] out string pbstrProperty, [In] Uri_DISPLAY dwFlags); + + /// + /// Returns the string length of the specified Uniform Resource Identifier (URI) property. Call this function if you want the + /// length but don't necessarily want to create a new BSTR. + /// + /// + /// [in] + /// A value from the Uri_PROPERTY enumeration. + /// + /// + /// [out] + /// + /// Address of a DWORD that is set to the length of the value of the string property excluding the NULL terminator. + /// + /// + /// + /// [in] + /// One of the following property-specific flags, or zero. + /// Uri_DISPLAY_NO_FRAGMENT (0x00000001) + /// Uri_PROPERTY_DISPLAY_URI: Exclude the fragment portion of the URI, if any. + /// Uri_PUNYCODE_IDN_HOST (0x00000002) + /// + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: If the URI is an IDN, always display + /// the hostname encoded as punycode. + /// + /// Uri_DISPLAY_IDN_HOST (0x00000004) + /// + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: Display the hostname in punycode or + /// Unicode as it would appear in the Uri_PROPERTY_DISPLAY_URI property. + /// + /// + /// + /// IUri::GetPropertyLength was introduced in Windows Internet Explorer 7. + /// + /// The uriProp parameter must be a string property. This method will fail if the specified property isn't a BSTR property. + /// + /// This method will return and set pcchProperty to if the URI doesn't contain the specified property. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775028(v=vs.85) + // HRESULT GetPropertyLength( [in] Uri_PROPERTY uriProp, [out] DWORD *pcchProperty, [in] DWORD dwFlags ); + new void GetPropertyLength([In] Uri_PROPERTY uriProp, out uint pcchProperty, [In] Uri_DISPLAY dwFlags); + + /// Returns the specified numeric Uniform Resource Identifier (URI) property value. + /// + /// [in] + /// A value from the Uri_PROPERTY enumeration. + /// + /// Address of a DWORD that is set to the value of the specified property. + /// Property-specific flags. Must be set to 0. + /// + /// IUri::GetPropertyDWORD was introduced in Windows Internet Explorer 7. + /// + /// The uriProp parameter must be a numeric property. This method will fail if the specified property isn't a DWORD property. + /// + /// This method will return and set pdwProperty to if the specified property doesn't exist in the URI. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775027(v=vs.85) + // HRESULT GetPropertyDWORD( [in] Uri_PROPERTY uriProp, [out] DWORD *pdwProperty, [in] DWORD dwFlags ); + new void GetPropertyDWORD([In] Uri_PROPERTY uriProp, out uint pdwProperty, [In] uint dwFlags); + + /// Determines if the specified property exists in the Uniform Resource Identifier (URI). + /// Address of a BOOL value. Set to TRUE if the specified property exists in the URI. + /// IUri::HasProperty was introduced in Windows Internet Explorer 7. + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775036(v=vs.85) + // HRESULT HasProperty( [in] Uri_PROPERTY uriProp, [out] BOOL *pfHasProperty ); + [return: MarshalAs(UnmanagedType.Bool)] + new bool HasProperty([In] Uri_PROPERTY uriProp); + + /// Returns the entire canonicalized Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// IUri::GetAbsoluteUri was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_ABSOLUTE_URI property. + /// + /// This property is not defined for relative URIs. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775013%28v%3dvs.85%29 + // HRESULT GetAbsoluteUri( [out] BSTR *pbstrAbsoluteUri ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetAbsoluteUri(); + + /// Returns the user name, password, domain, and port. + /// Address of a string that receives the property value. + /// + /// IUri::GetAuthority was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_AUTHORITY property. + /// + /// + /// If user name and password are not specified, the separator characters (: and @) are removed. The trailing colon is also + /// removed if the port number is not specified or is the default for the protocol scheme. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775014(v=vs.85) + // HRESULT GetAuthority( [out] BSTR *pbstrAuthority ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetAuthority(); + + /// Returns a Uniform Resource Identifier (URI) that can be used for display purposes. + /// Address of a string that receives the property value. + /// + /// IUri::GetDisplayUri was introduced in Windows Internet Explorer 7. + /// + /// The display URI combines protocol scheme, fully qualified domain name, port number (if not the default for the scheme), full + /// resource path, query string, and fragment. + /// + /// + /// Note The display URI may have additional formatting applied to it, such that the string produced by + /// IUri::GetDisplayUri isn't necessarily a valid URI. For this reason, and since the userinfo is not present, the + /// display URI should be used for viewing only; it should not be used for edit by the user, or as a form of transfer for URIs + /// inside or between applications. + /// + /// + /// If the scheme is known (for example, http, ftp, or file) then the display URI will hide credentials. However, if the URI + /// uses an unknown scheme and supplies user name and password, the display URI will also contain the user name and password. + /// + /// + /// Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: + /// Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is + /// deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public." + /// + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_DISPLAY_URI property and no flags. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775015(v=vs.85) + // HRESULT GetDisplayUri( [out] BSTR *pbstrDisplayString ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetDisplayUri(); + + /// Returns the domain name (including top-level domain) only. + /// Address of a string that receives the property value. + /// + /// IUri::GetDomain was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_DOMAIN property. + /// + /// + /// If the URL contains only a plain hostname (for example, "http://example/") or a public suffix (for example, + /// "http://co.uk/"), then IUri::GetDomain returns NULL. Use IUri::GetHost instead. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775016(v=vs.85) + // HRESULT GetDomain( [out] BSTR *pbstrDomain ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetDomain(); + + /// Returns the file name extension of the resource. + /// Address of a string that receives the property value. + /// + /// IUri::GetExtension was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_EXTENSION property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775017(v=vs.85) + // HRESULT GetExtension( [out] BSTR *pbstrExtension ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetExtension(); + + /// Returns the text following a fragment marker (#), including the fragment marker itself. + /// Address of a string that receives the property value. + /// + /// IUri::GetFragment was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_FRAGMENT property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775018(v=vs.85) + // HRESULT GetFragment( [out] BSTR *pbstrFragment ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetFragment(); + + /// Returns the fully qualified domain name. + /// Address of a string that receives the property value. + /// + /// IUri::GetHost was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_HOST property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775019(v=vs.85) + // HRESULT GetHost( [out] BSTR *pbstrHost ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetHost(); + + /// Returns the password, as parsed from the Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// IUri::GetPassword was introduced in Windows Internet Explorer 7. + /// + /// Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: + /// Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is + /// deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public." + /// + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_PASSWORD property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775021(v=vs.85) + // HRESULT GetPassword( [out] BSTR *pbstrPassword ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetPassword(); + + /// Returns the path and resource name. + /// Address of a string that receives the property value. + /// + /// IUri::GetPath was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_PATH property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775022(v=vs.85) + // HRESULT GetPath( [out] BSTR *pbstrPath ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetPath(); + + /// Returns the path, resource name, and query string. + /// Address of a string that receives the property value. + /// + /// IUri::GetPathAndQuery was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_PATH_AND_QUERY property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775023(v=vs.85) + // HRESULT GetPathAndQuery( [out] BSTR *pbstrPathAndQuery ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetPathAndQuery(); + + /// Returns the query string. + /// Address of a string that receives the property value. + /// + /// IUri::GetQuery was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_QUERY property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775029(v=vs.85) + // HRESULT GetQuery( [out] BSTR *pbstrQuery ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetQuery(); + + /// Returns the entire original Uniform Resource Identifier (URI) input string. + /// Address of a string that receives the property value. + /// + /// IUri::GetRawUri was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_RAW_URI property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775030(v=vs.85) + // HRESULT GetRawUri( [out] BSTR *pbstrRawUri ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetRawUri(); + + /// Returns the protocol scheme name. + /// Address of a string that receives the property value. + /// + /// IUri::GetSchemeName was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_SCHEME_NAME property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775032(v=vs.85) + // HRESULT GetSchemeName( [out] BSTR *pbstrSchemeName ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetSchemeName(); + + /// Returns the user name and password, as parsed from the Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// IUri::GetUserInfo was introduced in Windows Internet Explorer 7. + /// + /// Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: + /// Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is + /// deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public." + /// + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_USER_INFO property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775033(v=vs.85) + // HRESULT GetUserInfo( [out] BSTR *pbstrUserInfo ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetUserInfo(); + + /// Returns the user name as parsed from the Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_USER_NAME property. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775034(v=vs.85) + // HRESULT GetUserName( [out] BSTR *pbstrUserName ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetUserName(); + + /// Returns a value from the Uri_HOST_TYPE enumeration. + /// Address of a DWORD that receives a value from the Uri_HOST_TYPE enumeration. + /// + /// IUri::GetHostType was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyDWORD with the + /// Uri_PROPERTY_HOST_TYPE property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775020(v=vs.85) + // HRESULT GetHostType( [out] DWORD *pdwHostType ); + new Uri_HOST_TYPE GetHostType(); + + /// Returns the port number. + /// Address of a DWORD that receives the port number value. + /// + /// IUri::GetPort was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyDWORD with the Uri_PROPERTY_PORT property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775024(v=vs.85) + // HRESULT GetPort( [out] DWORD *pdwPort ); + new uint GetPort(); + + /// Returns a value from the URL_SCHEME enumeration. + /// Address of a DWORD that receives a value from the URL_SCHEME enumeration. + /// + /// IUri::GetScheme was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyDWORD with the + /// Uri_PROPERTY_SCHEME property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775031(v=vs.85) + // HRESULT GetScheme( [out] DWORD *pdwScheme ); + new URL_SCHEME GetScheme(); + + /// This method is not implemented. + /// + new URLZONE GetZone(); + + /// Returns a bitmap of flags that indicate which Uniform Resource Identifier (URI) properties have been set. + /// + /// [out] + /// Address of a DWORD that receives a combination of the following flags: + /// Uri_HAS_ABSOLUTE_URI (0x00000000) + /// Uri_PROPERTY_ABSOLUTE_URI exists. + /// Uri_HAS_AUTHORITY (0x00000001) + /// Uri_PROPERTY_AUTHORITY exists. + /// Uri_HAS_DISPLAY_URI (0x00000002) + /// Uri_PROPERTY_DISPLAY_URI exists. + /// Uri_HAS_DOMAIN (0x00000004) + /// Uri_PROPERTY_DOMAIN exists. + /// Uri_HAS_EXTENSION (0x00000008) + /// Uri_PROPERTY_EXTENSION exists. + /// Uri_HAS_FRAGMENT (0x00000010) + /// Uri_PROPERTY_FRAGMENT exists. + /// Uri_HAS_HOST (0x00000020) + /// Uri_PROPERTY_HOST exists. + /// Uri_HAS_HOST_TYPE (0x00004000) + /// Uri_PROPERTY_HOST_TYPE exists. + /// Uri_HAS_PASSWORD (0x00000040) + /// Uri_PROPERTY_PASSWORD exists. + /// Uri_HAS_PATH (0x00000080) + /// Uri_PROPERTY_PATH exists. + /// Uri_HAS_PATH_AND_QUERY (0x00001000) + /// Uri_PROPERTY_PATH_AND_QUERY exists. + /// Uri_HAS_PORT (0x00008000) + /// Uri_PROPERTY_PORT exists. + /// Uri_HAS_QUERY (0x00000100) + /// Uri_PROPERTY_QUERY exists. + /// Uri_HAS_RAW_URI (0x00000200) + /// Uri_PROPERTY_RAW_URI exists. + /// Uri_HAS_SCHEME (0x00010000) + /// Uri_PROPERTY_SCHEME exists. + /// Uri_HAS_SCHEME_NAME (0x00000400) + /// Uri_PROPERTY_SCHEME_NAME exists. + /// Uri_HAS_USER_NAME (0x00000800) + /// Uri_PROPERTY_USER_NAME exists. + /// Uri_HAS_USER_INFO (0x00002000) + /// Uri_PROPERTY_USER_INFO exists. + /// Uri_HAS_ZONE (0x00020000) + /// Uri_PROPERTY_ZONE exists. + /// + /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. + /// IUri::GetProperties was introduced in Windows Internet Explorer 7. + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775025(v=vs.85) + // HRESULT GetProperties( [out] LPDWORD pdwFlags ); + new Uri_HAS GetProperties(); + + /// Compares the logical content of two IUri objects. + /// Address of a BOOL that is set to TRUE if the logical content of pUri is the same. + /// + /// IUri::IsEqual was introduced in Windows Internet Explorer 7. + /// The comparison is case-insensitive. Comparing an IUri to itself will always return TRUE. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775037(v=vs.85) + // HRESULT IsEqual( [in] IUri *pUri, [out] BOOL *pfEqual ); + [return: MarshalAs(UnmanagedType.Bool)] + new bool IsEqual([In] IUri pUri); + + /// + /// Gets the part name of the Relationships part that stores relationships that have the source URI represented by the current + /// OPC URI object. + /// + /// + /// A pointer to the IOpcPartUri interface of the part URI object that represents the part name of the Relationships part. The + /// source URI of the relationships stored in this Relationships part is represented by the current OPC URI object. + /// + /// + /// The following table shows Relationships part URIs for some OPC URIs. + /// + /// + /// OPC URI + /// Relationships Part Name + /// Return Value + /// + /// + /// /mydoc/images/picture.jpg + /// /mydoc/images/_rels/picture.jpg.rels + /// S_OK + /// + /// + /// / + /// /_rels/.rels + /// S_OK + /// + /// + /// /mydoc/images/_rels/picture.jpg.rels + /// Undefined + /// OPC_E_NONCONFORMING_URI + /// + /// + /// Support on Previous Windows Versions + /// + /// The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting + /// Started with the Packaging API, and Platform Update for Windows Vista. + /// + /// Thread Safety + /// Packaging objects are not thread-safe. + /// For more information, see the Getting Started with the Packaging API. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nf-msopc-iopcuri-getrelationshipsparturi HRESULT + // GetRelationshipsPartUri( IOpcPartUri **relationshipPartUri ); + new IOpcPartUri GetRelationshipsPartUri(); + + /// Forms a relative URI for a specified part, relative to the URI represented by the current OPC URI object. + /// + /// A pointer to the IOpcPartUri interface of the part URI object that represents the part name from which the relative URI is formed. + /// + /// A pointer to the IUri interface of the URI of the part, relative to the current OPC URI object. + /// + /// Example input and output: + /// + /// + /// Input IOpcPartUri represents + /// Current IOpcUri represents + /// Returned relative IUri represents + /// + /// + /// /mydoc/markup/page.xml + /// /mydoc/markup/picture.jpg + /// picture.jpg + /// + /// + /// /mydoc/markup/page.xml + /// /mydoc/picture.jpg + /// ../picture.jpg + /// + /// + /// /mydoc/markup/page.xml + /// /mydoc/images/pictures.jpg + /// ../images/pictures.jpg + /// + /// + /// Support on Previous Windows Versions + /// + /// The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting + /// Started with the Packaging API, and Platform Update for Windows Vista. + /// + /// Thread Safety + /// Packaging objects are not thread-safe. + /// For more information, see the Getting Started with the Packaging API. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nf-msopc-iopcuri-getrelativeuri HRESULT GetRelativeUri( IOpcPartUri + // *targetPartUri, IUri **relativeUri ); + new IUri GetRelativeUri([In] IOpcPartUri targetPartUri); + + /// + /// Forms the part name of the part that is referenced by the specified relative URI. The specified relative URI of the part is + /// resolved against the URI represented as the current OPC URI object. + /// + /// + /// A pointer to the IUri interface of the relative URI of the part. + /// + /// To form the part URI object that represents the part name, this input URI is resolved against the URI represented as the + /// current OPC URI object. Therefore, the input URI must be relative to the URI represented by the current OPC URI object. + /// + /// + /// This URI may include a fragment component; however, the fragment will be ignored and will not be included in the part name + /// to be formed. A fragment component is preceded by a '#', as described in RFC 3986: URI Generic Syntax. + /// + /// + /// + /// A pointer to the IOpcPartUri interface of the part URI object that represents the part name. + /// + /// The part URI object is formed by resolving the relative URI in relativeUri against the URI represented by the current OPC + /// URI object. + /// + /// + /// + /// Example input and output: + /// + /// + /// Input relative IUri + /// Current IOpcUri + /// Formed IOpcPartUri + /// + /// + /// picture.jpg + /// /mydoc/markup/page.xml + /// /mydoc/markup/picture.jpg + /// + /// + /// ../picture.jpg + /// /mydoc/markup/page.xml + /// /mydoc/picture.jpg + /// + /// + /// ../../images/picture.jpg + /// /mydoc/page.xml + /// /images/picture.jpg + /// + /// + /// + /// For information about how to use this method to help resolve a part name, see Resolving a Part Name from a Target URI. + /// + /// Support on Previous Windows Versions + /// + /// The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting + /// Started with the Packaging API, and Platform Update for Windows Vista. + /// + /// Thread Safety + /// Packaging objects are not thread-safe. + /// For more information, see the Getting Started with the Packaging API. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nf-msopc-iopcuri-combineparturi HRESULT CombinePartUri( IUri + // *relativeUri, IOpcPartUri **combinedUri ); + new IOpcPartUri CombinePartUri([In] IUri relativeUri); + /// /// Returns an integer that indicates whether the URIs represented by the current part URI object and a specified part URI /// object are equivalent. @@ -167,70 +766,458 @@ namespace Vanara.PInvoke /// // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nn-msopc-iopcuri [PInvokeData("msopc.h", MSDNShortId = "35ce7946-f7e7-4ac3-852f-e3fcca23d6d4")] - [ComImport, Guid("BC9C1B9B-D62C-49EB-AEF0-3B4E0B28EBED"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), TypeLibType(TypeLibTypeFlags.FNonExtensible)] + [ComImport, Guid("BC9C1B9B-D62C-49EB-AEF0-3B4E0B28EBED"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IOpcUri : IUri { - /// - /// Forms the part name of the part that is referenced by the specified relative URI. The specified relative URI of the part is - /// resolved against the URI represented as the current OPC URI object. - /// - /// - /// A pointer to the IUri interface of the relative URI of the part. + /// Returns the specified Uniform Resource Identifier (URI) property value in a new BSTR. + /// + /// [in] + /// A value from the Uri_PROPERTY enumeration. + /// + /// + /// [out] + /// Address of a BSTR that receives the property value. + /// + /// + /// [in] + /// One of the following property-specific flags, or zero. + /// Uri_DISPLAY_NO_FRAGMENT (0x00000001) + /// Uri_PROPERTY_DISPLAY_URI: Exclude the fragment portion of the URI, if any. + /// Uri_PUNYCODE_IDN_HOST (0x00000002) /// - /// To form the part URI object that represents the part name, this input URI is resolved against the URI represented as the - /// current OPC URI object. Therefore, the input URI must be relative to the URI represented by the current OPC URI object. + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: If the URI is an IDN, always display + /// the hostname encoded as punycode. /// + /// Uri_DISPLAY_IDN_HOST (0x00000004) /// - /// This URI may include a fragment component; however, the fragment will be ignored and will not be included in the part name - /// to be formed. A fragment component is preceded by a '#', as described in RFC 3986: URI Generic Syntax. + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: Display the hostname in punycode or + /// Unicode as it would appear in the Uri_PROPERTY_DISPLAY_URI property. /// /// - /// - /// A pointer to the IOpcPartUri interface of the part URI object that represents the part name. - /// - /// The part URI object is formed by resolving the relative URI in relativeUri against the URI represented by the current OPC - /// URI object. - /// - /// /// - /// Example input and output: - /// - /// - /// Input relative IUri - /// Current IOpcUri - /// Formed IOpcPartUri - /// - /// - /// picture.jpg - /// /mydoc/markup/page.xml - /// /mydoc/markup/picture.jpg - /// - /// - /// ../picture.jpg - /// /mydoc/markup/page.xml - /// /mydoc/picture.jpg - /// - /// - /// ../../images/picture.jpg - /// /mydoc/page.xml - /// /images/picture.jpg - /// - /// + /// IUri::GetPropertyBSTR was introduced in Windows Internet Explorer 7. /// - /// For information about how to use this method to help resolve a part name, see Resolving a Part Name from a Target URI. + /// The uriProp parameter must be a string property. This method will fail if the specified property isn't a BSTR property. /// - /// Support on Previous Windows Versions /// - /// The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting - /// Started with the Packaging API, and Platform Update for Windows Vista. + /// The pbstrProperty parameter will be set to a new BSTR containing the value of the specified string property. The + /// caller should use SysFreeString to free the string. /// - /// Thread Safety - /// Packaging objects are not thread-safe. - /// For more information, see the Getting Started with the Packaging API. + /// This method will return and set pbstrProperty to an empty string if the URI doesn't contain the specified property. /// - // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nf-msopc-iopcuri-combineparturi HRESULT CombinePartUri( IUri - // *relativeUri, IOpcPartUri **combinedUri ); - IOpcPartUri CombinePartUri([In] IUri relativeUri); + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775026(v=vs.85) + // HRESULT GetPropertyBSTR( [in] Uri_PROPERTY uriProp, [out] BSTR *pbstrProperty, [in] DWORD dwFlags ); + new void GetPropertyBSTR([In] Uri_PROPERTY uriProp, [MarshalAs(UnmanagedType.BStr)] out string pbstrProperty, [In] Uri_DISPLAY dwFlags); + + /// + /// Returns the string length of the specified Uniform Resource Identifier (URI) property. Call this function if you want the + /// length but don't necessarily want to create a new BSTR. + /// + /// + /// [in] + /// A value from the Uri_PROPERTY enumeration. + /// + /// + /// [out] + /// + /// Address of a DWORD that is set to the length of the value of the string property excluding the NULL terminator. + /// + /// + /// + /// [in] + /// One of the following property-specific flags, or zero. + /// Uri_DISPLAY_NO_FRAGMENT (0x00000001) + /// Uri_PROPERTY_DISPLAY_URI: Exclude the fragment portion of the URI, if any. + /// Uri_PUNYCODE_IDN_HOST (0x00000002) + /// + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: If the URI is an IDN, always display + /// the hostname encoded as punycode. + /// + /// Uri_DISPLAY_IDN_HOST (0x00000004) + /// + /// Uri_PROPERTY_ABSOLUTE_URI, Uri_PROPERTY_DOMAIN, Uri_PROPERTY_HOST: Display the hostname in punycode or + /// Unicode as it would appear in the Uri_PROPERTY_DISPLAY_URI property. + /// + /// + /// + /// IUri::GetPropertyLength was introduced in Windows Internet Explorer 7. + /// + /// The uriProp parameter must be a string property. This method will fail if the specified property isn't a BSTR property. + /// + /// This method will return and set pcchProperty to if the URI doesn't contain the specified property. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775028(v=vs.85) + // HRESULT GetPropertyLength( [in] Uri_PROPERTY uriProp, [out] DWORD *pcchProperty, [in] DWORD dwFlags ); + new void GetPropertyLength([In] Uri_PROPERTY uriProp, out uint pcchProperty, [In] Uri_DISPLAY dwFlags); + + /// Returns the specified numeric Uniform Resource Identifier (URI) property value. + /// + /// [in] + /// A value from the Uri_PROPERTY enumeration. + /// + /// Address of a DWORD that is set to the value of the specified property. + /// Property-specific flags. Must be set to 0. + /// + /// IUri::GetPropertyDWORD was introduced in Windows Internet Explorer 7. + /// + /// The uriProp parameter must be a numeric property. This method will fail if the specified property isn't a DWORD property. + /// + /// This method will return and set pdwProperty to if the specified property doesn't exist in the URI. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775027(v=vs.85) + // HRESULT GetPropertyDWORD( [in] Uri_PROPERTY uriProp, [out] DWORD *pdwProperty, [in] DWORD dwFlags ); + new void GetPropertyDWORD([In] Uri_PROPERTY uriProp, out uint pdwProperty, [In] uint dwFlags); + + /// Determines if the specified property exists in the Uniform Resource Identifier (URI). + /// Address of a BOOL value. Set to TRUE if the specified property exists in the URI. + /// IUri::HasProperty was introduced in Windows Internet Explorer 7. + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775036(v=vs.85) + // HRESULT HasProperty( [in] Uri_PROPERTY uriProp, [out] BOOL *pfHasProperty ); + [return: MarshalAs(UnmanagedType.Bool)] + new bool HasProperty([In] Uri_PROPERTY uriProp); + + /// Returns the entire canonicalized Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// IUri::GetAbsoluteUri was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_ABSOLUTE_URI property. + /// + /// This property is not defined for relative URIs. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775013%28v%3dvs.85%29 + // HRESULT GetAbsoluteUri( [out] BSTR *pbstrAbsoluteUri ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetAbsoluteUri(); + + /// Returns the user name, password, domain, and port. + /// Address of a string that receives the property value. + /// + /// IUri::GetAuthority was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_AUTHORITY property. + /// + /// + /// If user name and password are not specified, the separator characters (: and @) are removed. The trailing colon is also + /// removed if the port number is not specified or is the default for the protocol scheme. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775014(v=vs.85) + // HRESULT GetAuthority( [out] BSTR *pbstrAuthority ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetAuthority(); + + /// Returns a Uniform Resource Identifier (URI) that can be used for display purposes. + /// Address of a string that receives the property value. + /// + /// IUri::GetDisplayUri was introduced in Windows Internet Explorer 7. + /// + /// The display URI combines protocol scheme, fully qualified domain name, port number (if not the default for the scheme), full + /// resource path, query string, and fragment. + /// + /// + /// Note The display URI may have additional formatting applied to it, such that the string produced by + /// IUri::GetDisplayUri isn't necessarily a valid URI. For this reason, and since the userinfo is not present, the + /// display URI should be used for viewing only; it should not be used for edit by the user, or as a form of transfer for URIs + /// inside or between applications. + /// + /// + /// If the scheme is known (for example, http, ftp, or file) then the display URI will hide credentials. However, if the URI + /// uses an unknown scheme and supplies user name and password, the display URI will also contain the user name and password. + /// + /// + /// Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: + /// Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is + /// deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public." + /// + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_DISPLAY_URI property and no flags. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775015(v=vs.85) + // HRESULT GetDisplayUri( [out] BSTR *pbstrDisplayString ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetDisplayUri(); + + /// Returns the domain name (including top-level domain) only. + /// Address of a string that receives the property value. + /// + /// IUri::GetDomain was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_DOMAIN property. + /// + /// + /// If the URL contains only a plain hostname (for example, "http://example/") or a public suffix (for example, + /// "http://co.uk/"), then IUri::GetDomain returns NULL. Use IUri::GetHost instead. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775016(v=vs.85) + // HRESULT GetDomain( [out] BSTR *pbstrDomain ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetDomain(); + + /// Returns the file name extension of the resource. + /// Address of a string that receives the property value. + /// + /// IUri::GetExtension was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_EXTENSION property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775017(v=vs.85) + // HRESULT GetExtension( [out] BSTR *pbstrExtension ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetExtension(); + + /// Returns the text following a fragment marker (#), including the fragment marker itself. + /// Address of a string that receives the property value. + /// + /// IUri::GetFragment was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_FRAGMENT property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775018(v=vs.85) + // HRESULT GetFragment( [out] BSTR *pbstrFragment ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetFragment(); + + /// Returns the fully qualified domain name. + /// Address of a string that receives the property value. + /// + /// IUri::GetHost was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_HOST property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775019(v=vs.85) + // HRESULT GetHost( [out] BSTR *pbstrHost ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetHost(); + + /// Returns the password, as parsed from the Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// IUri::GetPassword was introduced in Windows Internet Explorer 7. + /// + /// Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: + /// Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is + /// deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public." + /// + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_PASSWORD property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775021(v=vs.85) + // HRESULT GetPassword( [out] BSTR *pbstrPassword ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetPassword(); + + /// Returns the path and resource name. + /// Address of a string that receives the property value. + /// + /// IUri::GetPath was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_PATH property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775022(v=vs.85) + // HRESULT GetPath( [out] BSTR *pbstrPath ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetPath(); + + /// Returns the path, resource name, and query string. + /// Address of a string that receives the property value. + /// + /// IUri::GetPathAndQuery was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_PATH_AND_QUERY property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775023(v=vs.85) + // HRESULT GetPathAndQuery( [out] BSTR *pbstrPathAndQuery ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetPathAndQuery(); + + /// Returns the query string. + /// Address of a string that receives the property value. + /// + /// IUri::GetQuery was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the Uri_PROPERTY_QUERY property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775029(v=vs.85) + // HRESULT GetQuery( [out] BSTR *pbstrQuery ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetQuery(); + + /// Returns the entire original Uniform Resource Identifier (URI) input string. + /// Address of a string that receives the property value. + /// + /// IUri::GetRawUri was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_RAW_URI property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775030(v=vs.85) + // HRESULT GetRawUri( [out] BSTR *pbstrRawUri ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetRawUri(); + + /// Returns the protocol scheme name. + /// Address of a string that receives the property value. + /// + /// IUri::GetSchemeName was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_SCHEME_NAME property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775032(v=vs.85) + // HRESULT GetSchemeName( [out] BSTR *pbstrSchemeName ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetSchemeName(); + + /// Returns the user name and password, as parsed from the Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// IUri::GetUserInfo was introduced in Windows Internet Explorer 7. + /// + /// Security Warning: Storing sensitive information as clear text in a URI is not recommended. According to RFC3986: + /// Uniform Resource Identifier (URI), Generic Syntax, Section 7.5, "A password appearing within the userinfo component is + /// deprecated and should be considered an error except in those rare cases where the 'password' parameter is intended to be public." + /// + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_USER_INFO property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775033(v=vs.85) + // HRESULT GetUserInfo( [out] BSTR *pbstrUserInfo ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetUserInfo(); + + /// Returns the user name as parsed from the Uniform Resource Identifier (URI). + /// Address of a string that receives the property value. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyBSTR with the + /// Uri_PROPERTY_USER_NAME property. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775034(v=vs.85) + // HRESULT GetUserName( [out] BSTR *pbstrUserName ); + [return: MarshalAs(UnmanagedType.BStr)] + new string GetUserName(); + + /// Returns a value from the Uri_HOST_TYPE enumeration. + /// Address of a DWORD that receives a value from the Uri_HOST_TYPE enumeration. + /// + /// IUri::GetHostType was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyDWORD with the + /// Uri_PROPERTY_HOST_TYPE property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775020(v=vs.85) + // HRESULT GetHostType( [out] DWORD *pdwHostType ); + new Uri_HOST_TYPE GetHostType(); + + /// Returns the port number. + /// Address of a DWORD that receives the port number value. + /// + /// IUri::GetPort was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyDWORD with the Uri_PROPERTY_PORT property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775024(v=vs.85) + // HRESULT GetPort( [out] DWORD *pdwPort ); + new uint GetPort(); + + /// Returns a value from the URL_SCHEME enumeration. + /// Address of a DWORD that receives a value from the URL_SCHEME enumeration. + /// + /// IUri::GetScheme was introduced in Windows Internet Explorer 7. + /// + /// This function is for convenience. It is the same as calling IUri::GetPropertyDWORD with the + /// Uri_PROPERTY_SCHEME property. + /// + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775031(v=vs.85) + // HRESULT GetScheme( [out] DWORD *pdwScheme ); + new URL_SCHEME GetScheme(); + + /// This method is not implemented. + /// + new URLZONE GetZone(); + + /// Returns a bitmap of flags that indicate which Uniform Resource Identifier (URI) properties have been set. + /// + /// [out] + /// Address of a DWORD that receives a combination of the following flags: + /// Uri_HAS_ABSOLUTE_URI (0x00000000) + /// Uri_PROPERTY_ABSOLUTE_URI exists. + /// Uri_HAS_AUTHORITY (0x00000001) + /// Uri_PROPERTY_AUTHORITY exists. + /// Uri_HAS_DISPLAY_URI (0x00000002) + /// Uri_PROPERTY_DISPLAY_URI exists. + /// Uri_HAS_DOMAIN (0x00000004) + /// Uri_PROPERTY_DOMAIN exists. + /// Uri_HAS_EXTENSION (0x00000008) + /// Uri_PROPERTY_EXTENSION exists. + /// Uri_HAS_FRAGMENT (0x00000010) + /// Uri_PROPERTY_FRAGMENT exists. + /// Uri_HAS_HOST (0x00000020) + /// Uri_PROPERTY_HOST exists. + /// Uri_HAS_HOST_TYPE (0x00004000) + /// Uri_PROPERTY_HOST_TYPE exists. + /// Uri_HAS_PASSWORD (0x00000040) + /// Uri_PROPERTY_PASSWORD exists. + /// Uri_HAS_PATH (0x00000080) + /// Uri_PROPERTY_PATH exists. + /// Uri_HAS_PATH_AND_QUERY (0x00001000) + /// Uri_PROPERTY_PATH_AND_QUERY exists. + /// Uri_HAS_PORT (0x00008000) + /// Uri_PROPERTY_PORT exists. + /// Uri_HAS_QUERY (0x00000100) + /// Uri_PROPERTY_QUERY exists. + /// Uri_HAS_RAW_URI (0x00000200) + /// Uri_PROPERTY_RAW_URI exists. + /// Uri_HAS_SCHEME (0x00010000) + /// Uri_PROPERTY_SCHEME exists. + /// Uri_HAS_SCHEME_NAME (0x00000400) + /// Uri_PROPERTY_SCHEME_NAME exists. + /// Uri_HAS_USER_NAME (0x00000800) + /// Uri_PROPERTY_USER_NAME exists. + /// Uri_HAS_USER_INFO (0x00002000) + /// Uri_PROPERTY_USER_INFO exists. + /// Uri_HAS_ZONE (0x00020000) + /// Uri_PROPERTY_ZONE exists. + /// + /// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. + /// IUri::GetProperties was introduced in Windows Internet Explorer 7. + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775025(v=vs.85) + // HRESULT GetProperties( [out] LPDWORD pdwFlags ); + new Uri_HAS GetProperties(); + + /// Compares the logical content of two IUri objects. + /// Address of a BOOL that is set to TRUE if the logical content of pUri is the same. + /// + /// IUri::IsEqual was introduced in Windows Internet Explorer 7. + /// The comparison is case-insensitive. Comparing an IUri to itself will always return TRUE. + /// + // https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775037(v=vs.85) + // HRESULT IsEqual( [in] IUri *pUri, [out] BOOL *pfEqual ); + [return: MarshalAs(UnmanagedType.Bool)] + new bool IsEqual([In] IUri pUri); /// /// Gets the part name of the Relationships part that stores relationships that have the source URI represented by the current @@ -318,6 +1305,68 @@ namespace Vanara.PInvoke // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nf-msopc-iopcuri-getrelativeuri HRESULT GetRelativeUri( IOpcPartUri // *targetPartUri, IUri **relativeUri ); IUri GetRelativeUri([In] IOpcPartUri targetPartUri); + + /// + /// Forms the part name of the part that is referenced by the specified relative URI. The specified relative URI of the part is + /// resolved against the URI represented as the current OPC URI object. + /// + /// + /// A pointer to the IUri interface of the relative URI of the part. + /// + /// To form the part URI object that represents the part name, this input URI is resolved against the URI represented as the + /// current OPC URI object. Therefore, the input URI must be relative to the URI represented by the current OPC URI object. + /// + /// + /// This URI may include a fragment component; however, the fragment will be ignored and will not be included in the part name + /// to be formed. A fragment component is preceded by a '#', as described in RFC 3986: URI Generic Syntax. + /// + /// + /// + /// A pointer to the IOpcPartUri interface of the part URI object that represents the part name. + /// + /// The part URI object is formed by resolving the relative URI in relativeUri against the URI represented by the current OPC + /// URI object. + /// + /// + /// + /// Example input and output: + /// + /// + /// Input relative IUri + /// Current IOpcUri + /// Formed IOpcPartUri + /// + /// + /// picture.jpg + /// /mydoc/markup/page.xml + /// /mydoc/markup/picture.jpg + /// + /// + /// ../picture.jpg + /// /mydoc/markup/page.xml + /// /mydoc/picture.jpg + /// + /// + /// ../../images/picture.jpg + /// /mydoc/page.xml + /// /images/picture.jpg + /// + /// + /// + /// For information about how to use this method to help resolve a part name, see Resolving a Part Name from a Target URI. + /// + /// Support on Previous Windows Versions + /// + /// The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting + /// Started with the Packaging API, and Platform Update for Windows Vista. + /// + /// Thread Safety + /// Packaging objects are not thread-safe. + /// For more information, see the Getting Started with the Packaging API. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/msopc/nf-msopc-iopcuri-combineparturi HRESULT CombinePartUri( IUri + // *relativeUri, IOpcPartUri **combinedUri ); + IOpcPartUri CombinePartUri([In] IUri relativeUri); } } } \ No newline at end of file diff --git a/PInvoke/Printing/DocumentSource.cs b/PInvoke/Printing/DocumentSource.cs index d9c4bb75..ccc29298 100644 --- a/PInvoke/Printing/DocumentSource.cs +++ b/PInvoke/Printing/DocumentSource.cs @@ -1,6 +1,7 @@ using System; using System.Runtime.InteropServices; using static Vanara.PInvoke.DocumentTarget; +using static Vanara.PInvoke.Ole32; namespace Vanara.PInvoke { diff --git a/PInvoke/Printing/DocumentTarget.cs b/PInvoke/Printing/DocumentTarget.cs index d42c07fa..1a87db06 100644 --- a/PInvoke/Printing/DocumentTarget.cs +++ b/PInvoke/Printing/DocumentTarget.cs @@ -36,7 +36,7 @@ namespace Vanara.PInvoke /// Represents the progress of the print job. // https://docs.microsoft.com/en-us/windows/win32/api/documenttarget/nn-documenttarget-iprintdocumentpackagestatusevent [PInvokeData("documenttarget.h", MSDNShortId = "A2178E6A-04AD-4024-A083-5C76A5F60743")] - [ComImport, Guid("ED90C8AD-5C34-4D05-A1EC-0E8A9B3AD7AF"), TypeLibType(TypeLibTypeFlags.FDual | TypeLibTypeFlags.FNonExtensible | TypeLibTypeFlags.FDispatchable)] + [ComImport, Guid("ED90C8AD-5C34-4D05-A1EC-0E8A9B3AD7AF")] public interface IPrintDocumentPackageStatusEvent { /// Updates the status of the package when the print job in progress raises an event, or the job completes. diff --git a/PInvoke/Printing/Vanara.PInvoke.Printing.csproj b/PInvoke/Printing/Vanara.PInvoke.Printing.csproj index 75da99a1..e6df6474 100644 --- a/PInvoke/Printing/Vanara.PInvoke.Printing.csproj +++ b/PInvoke/Printing/Vanara.PInvoke.Printing.csproj @@ -54,6 +54,7 @@ HPTPROVIDER, ADDJOB_INFO_1, CORE_PRINTER_DRIVER, DATATYPES_INFO_1, DOC_INFO_1, D + diff --git a/PInvoke/Printing/WinSpool.Enums.cs b/PInvoke/Printing/WinSpool.Enums.cs index 3e0cc558..e910d123 100644 --- a/PInvoke/Printing/WinSpool.Enums.cs +++ b/PInvoke/Printing/WinSpool.Enums.cs @@ -1,5 +1,6 @@ using System; using Vanara.InteropServices; +using static Vanara.PInvoke.Gdi32; namespace Vanara.PInvoke { diff --git a/PInvoke/Printing/XpsObjectModel.cs b/PInvoke/Printing/XpsObjectModel.cs index f8531c41..82f8b5c8 100644 --- a/PInvoke/Printing/XpsObjectModel.cs +++ b/PInvoke/Printing/XpsObjectModel.cs @@ -439,6 +439,19 @@ namespace Vanara.PInvoke [ComImport, Guid("56A3F80C-EA4C-4187-A57B-A2A473B2B42B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMBrush : IXpsOMShareable { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + /// Gets the opacity of the brush. /// /// The opacity value of the brush. @@ -466,14 +479,688 @@ namespace Vanara.PInvoke [ComImport, Guid("221D1452-331E-47C6-87E9-6CCEFB9B5BA3"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMCanvas : IXpsOMVisual { - /// Makes a deep copy of the interface. + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. /// - /// A pointer to the copy of the interface. + /// A pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// /// - /// The owner of the new interface is NULL. - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-clone - // HRESULT Clone( IXpsOMCanvas **canvas ); - IXpsOMCanvas Clone(); + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. A NULL pointer releases the previously assigned transform. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetTransformLocal([In] IXpsOMMatrixTransform matrixTransform); + + /// Gets the lookup key name of the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. + /// + /// The lookup key name for the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the lookup key name of a shared matrix transform in a resource dictionary. + /// + /// The lookup key name of the matrix transform in the dictionary. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the matrixTransform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform that gets retrieved—with a lookup key that matches the key that is set by SetTransformLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets a pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. If the clip geometry has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the geometry. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometry + // HRESULT GetClipGeometry( IXpsOMGeometry **clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMGeometry GetClipGeometry(); + + /// Gets a pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. If a clip geometry lookup key has been set, or if a local clip geometry has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// NULL pointer. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylocal + // HRESULT GetClipGeometryLocal( IXpsOMGeometry **clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMGeometry GetClipGeometryLocal(); + + /// Sets the local, unshared clipping region for the visual. + /// A pointer to the IXpsOMGeometry interface to be set as the local, unshared clipping region for the visual. A NULL pointer releases the previously assigned geometry interface. + /// + /// After you call SetClipGeometryLocal, the clip geometry lookup key is released and GetClipGeometryLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal (this method) + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylocal + // HRESULT SetClipGeometryLocal( IXpsOMGeometry *clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetClipGeometryLocal([In] IXpsOMGeometry clipGeometry); + + /// Gets the lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. + /// + /// The lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. If a lookup key for the clip geometry has not been set, or if a local clip geometry has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Lookup key string that is returned in key + /// + /// + /// SetClipGeometryLocal + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylookup + // HRESULT GetClipGeometryLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetClipGeometryLookup(); + + /// Sets the lookup key name of a shared clip geometry in a resource dictionary. + /// The lookup key name of the clip geometry in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetClipGeometryLookup, the local clip geometry is released and GetClipGeometryLocal returns a NULL pointer in the clipGeometry parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup (this method) + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylookup + // HRESULT SetClipGeometryLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetClipGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the opacity value of this visual. + /// The opacity value. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + [MethodImpl(MethodImplOptions.InternalCall)] + new float GetOpacity(); + + /// Sets the opacity value of the visual. + /// + /// The opacity value to be set for the visual. + /// The range of allowed values for this parameter is 0.0 to 1.0; with 0.0 the visual is completely transparent, and with 1.0 it is completely opaque. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacity([In] float opacity); + + /// Gets a pointer to the IXpsOMBrush interface of the visual's opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush has not been set for this visual, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrush + // HRESULT GetOpacityMaskBrush( IXpsOMBrush **opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMBrush GetOpacityMaskBrush(); + + /// Gets the local, unshared opacity mask brush for the visual. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush lookup key has been set, or if a local opacity mask brush has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// NULL pointer. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlocal + // HRESULT GetOpacityMaskBrushLocal( IXpsOMBrush **opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMBrush GetOpacityMaskBrushLocal(); + + /// + /// Sets the IXpsOMBrush interface pointer as the local, unshared opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface to be set as the local, unshared opacity mask brush. A NULL pointer clears the previously assigned opacity mask brush. + /// + /// After you call SetOpacityMaskBrushLocal, the opacity mask brush lookup key is released and GetOpacityMaskBrushLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal (this method) + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlocal + // HRESULT SetOpacityMaskBrushLocal( IXpsOMBrush *opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacityMaskBrushLocal([In] IXpsOMBrush opacityMaskBrush); + + /// Gets the name of the lookup key of the shared opacity mask brush in a resource dictionary. + /// + /// The name of the lookup key of the shared opacity mask brush in a resource dictionary. If the lookup key of an opacity mask brush has not been set, or if a local opacity mask brush has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetOpacityMaskBrushLocal + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlookup + // HRESULT GetOpacityMaskBrushLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetOpacityMaskBrushLookup(); + + /// + /// Sets the lookup key name of a shared opacity mask brush in a resource dictionary. + /// + /// The lookup key name of the opacity mask brush in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetOpacityMaskBrushLookup, the local opacity mask brush is released and GetOpacityMaskBrushLocal returns a NULL pointer in the opacityMaskBrush parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup (this method) + /// The shared opacity mask brush that gets retrieved—with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlookup + // HRESULT SetOpacityMaskBrushLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacityMaskBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the Name property of the visual. + /// The Name property string. If the Name property has not been set, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getname + // HRESULT GetName( LPWSTR *name ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetName(); + + /// + /// Sets the Name property of the visual. + /// + /// The name of the visual. A NULL pointer clears the Name property. + /// + /// Names must be unique. + /// Clearing the Name property by passing a NULL pointer in name sets the IsHyperlinkTarget property to FALSE. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setname + // HRESULT SetName( LPCWSTR name ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); + + /// Gets a value that indicates whether the visual is the target of a hyperlink. + /// + /// The Boolean value that indicates whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getishyperlinktarget + // HRESULT GetIsHyperlinkTarget( BOOL *isHyperlink ); + [MethodImpl(MethodImplOptions.InternalCall)] + [return: MarshalAs(UnmanagedType.Bool)] + new bool GetIsHyperlinkTarget(); + + /// + /// Specifies whether the visual is the target of a hyperlink. + /// + /// The Boolean value that specifies whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + /// The visual must be named before it can be set as the target of a hyperlink. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setishyperlinktarget + // HRESULT SetIsHyperlinkTarget( BOOL isHyperlink ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetIsHyperlinkTarget([In, MarshalAs(UnmanagedType.Bool)] bool isHyperlink); + + /// Gets a pointer to the IUri interface to which this visual object links. + /// A pointer to the IUri interface that contains the destination URI for the link. If a URI has not been set for this object, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gethyperlinknavigateuri + // HRESULT GetHyperlinkNavigateUri( IUri **hyperlinkUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IUri GetHyperlinkNavigateUri(); + + /// + /// Sets the destination URI of the visual's hyperlink. + /// + /// The IUri interface that contains the destination URI of the visual's hyperlink. + /// + /// Setting an object's URI makes the object a hyperlink. When activated or clicked, the object will navigate to the destination that is specified by the URI in hyperlinkUri. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-sethyperlinknavigateuri + // HRESULT SetHyperlinkNavigateUri( IUri *hyperlinkUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetHyperlinkNavigateUri([In] IUri hyperlinkUri); + + /// Gets the Language property of the visual and of its contents. + /// The language string that specifies the language of the page. If a language has not been set, a NULL pointer is returned. + /// + /// The Language property that is set by this method specifies the language of the resource content. + /// Internet Engineering Task Force (IETF) RFC 3066 specifies the recommended encoding for the Language property. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getlanguage + // HRESULT GetLanguage( LPWSTR *language ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetLanguage(); + + /// + /// Sets the Language property of the visual. + /// + /// The language string that specifies the language of the visual and of its contents. A NULL pointer clears the Language property. + /// + /// The recommended encoding for the Language property is specified in Internet Engineering Task Force (IETF) RFC 3066r. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setlanguage + // HRESULT SetLanguage( LPCWSTR language ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); + + /// Gets a pointer to an IXpsOMVisualCollection interface that contains a collection of the visual objects in the canvas. + /// The collection of the visual objects in the canvas. If no visual objects are attached to the canvas, an empty collection is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getvisuals + // HRESULT GetVisuals( IXpsOMVisualCollection **visuals ); + IXpsOMVisualCollection GetVisuals(); + + /// Gets a Boolean value that determines whether the edges of the objects in the canvas are to be rendered using the aliased edge mode. + /// + /// The Boolean value that determines whether the objects in the canvas are to be rendered using the aliased edge mode. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The edges of objects in the canvas are to be rendered without anti-aliasing using the aliased edge mode. This includes any objects in the canvas that have useAliasedEdgeMode set to FALSE. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute having a value of Aliased. + /// + /// + /// FALSE + /// The edges of objects in the canvas are to be rendered in the default manner. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute being absent. + /// + /// + /// + /// The property that is returned by this method corresponds to the RenderOptions.EdgeMode attribute of the Canvas element in the document markup. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getusealiasededgemode + // HRESULT GetUseAliasedEdgeMode( BOOL *useAliasedEdgeMode ); + [return: MarshalAs(UnmanagedType.Bool)] + bool GetUseAliasedEdgeMode(); + + /// + /// Sets the value that determines whether the edges of objects in this canvas will be rendered using the aliased edge mode. + /// + /// The Boolean value that determines whether the edges of child objects in this canvas will be rendered using the aliased edge mode. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The edges of objects in the canvas are to be rendered without anti-aliasing using the aliased edge mode. This includes any objects that have this value set to FALSE. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute having the value of Aliased. + /// + /// + /// FALSE + /// The edges of objects in the canvas are to be rendered in the default manner. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute being absent. + /// + /// + /// + /// This property corresponds to the RenderOptions.EdgeMode attribute of the Canvas element in the document markup. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setusealiasededgemode + // HRESULT SetUseAliasedEdgeMode( BOOL useAliasedEdgeMode ); + void SetUseAliasedEdgeMode([MarshalAs(UnmanagedType.Bool)] bool useAliasedEdgeMode); + + /// Gets a short textual description of the object's contents. This text is used by accessibility clients to describe the object. + /// The short textual description of the object's contents. If this description is not set, a NULL pointer is returned. + /// + /// The property returned by this method corresponds to the AutomationProperties.Name attribute of the Canvas element in the document markup. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getaccessibilityshortdescription + // HRESULT GetAccessibilityShortDescription( LPWSTR *shortDescription ); + SafeCoTaskMemString GetAccessibilityShortDescription(); + + /// Sets the short textual description of the object's contents. This text is used by accessibility clients to describe the object. + /// The short textual description of the object's contents. A NULL pointer clears the previously assigned text. + /// The property that is set by this method corresponds to the AutomationProperties.HelpText attribute of the Canvas element in the document markup. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setaccessibilityshortdescription + // HRESULT SetAccessibilityShortDescription( LPCWSTR shortDescription ); + void SetAccessibilityShortDescription([In, MarshalAs(UnmanagedType.LPWStr)] string shortDescription); /// Gets the long (detailed) textual description of the object's contents. This text is used by accessibility clients to describe the object. /// The long (detailed) textual description of the object's contents. A NULL pointer is returned if this text has not been set. @@ -484,14 +1171,12 @@ namespace Vanara.PInvoke // HRESULT GetAccessibilityLongDescription( LPWSTR *longDescription ); SafeCoTaskMemString GetAccessibilityLongDescription(); - /// Gets a short textual description of the object's contents. This text is used by accessibility clients to describe the object. - /// The short textual description of the object's contents. If this description is not set, a NULL pointer is returned. - /// - /// The property returned by this method corresponds to the AutomationProperties.Name attribute of the Canvas element in the document markup. - /// - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getaccessibilityshortdescription - // HRESULT GetAccessibilityShortDescription( LPWSTR *shortDescription ); - SafeCoTaskMemString GetAccessibilityShortDescription(); + /// Sets the long (detailed) textual description of the object's contents. This text is used by accessibility clients to describe the object. + /// The long (detailed) textual description of the object's contents. A NULL pointer clears the previously assigned value. + /// The property that is set by this method corresponds to the AutomationProperties.HelpText attribute of the Canvas element in the document markup. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setaccessibilitylongdescription + // HRESULT SetAccessibilityLongDescription( LPCWSTR longDescription ); + void SetAccessibilityLongDescription([In, MarshalAs(UnmanagedType.LPWStr)] string longDescription); /// Gets a pointer to the resolved IXpsOMDictionary interface of the dictionary associated with the canvas. /// @@ -554,77 +1239,6 @@ namespace Vanara.PInvoke // HRESULT GetDictionaryLocal( IXpsOMDictionary **resourceDictionary ); IXpsOMDictionary GetDictionaryLocal(); - /// Gets a pointer to the IXpsOMRemoteDictionaryResource interface of the remote dictionary resource. - /// - /// The IXpsOMRemoteDictionaryResource interface pointer to the remote dictionary resource, if one has been set. If a remote dictionary resource has not been set or if a local dictionary resource has been set, a NULL pointer is returned. - /// - /// - /// Most recent method called - /// Object returned in remoteDictionaryResource - /// - /// - /// SetDictionaryLocal - /// NULL pointer. - /// - /// - /// SetDictionaryResource - /// The remote dictionary resource that is set by SetDictionaryResource. - /// - /// - /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. - /// NULL pointer. - /// - /// - /// - /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getdictionaryresource - // HRESULT GetDictionaryResource( IXpsOMRemoteDictionaryResource **remoteDictionaryResource ); - IXpsOMRemoteDictionaryResource GetDictionaryResource(); - - /// Gets a Boolean value that determines whether the edges of the objects in the canvas are to be rendered using the aliased edge mode. - /// - /// The Boolean value that determines whether the objects in the canvas are to be rendered using the aliased edge mode. - /// - /// - /// Value - /// Meaning - /// - /// - /// TRUE - /// The edges of objects in the canvas are to be rendered without anti-aliasing using the aliased edge mode. This includes any objects in the canvas that have useAliasedEdgeMode set to FALSE. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute having a value of Aliased. - /// - /// - /// FALSE - /// The edges of objects in the canvas are to be rendered in the default manner. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute being absent. - /// - /// - /// - /// The property that is returned by this method corresponds to the RenderOptions.EdgeMode attribute of the Canvas element in the document markup. - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getusealiasededgemode - // HRESULT GetUseAliasedEdgeMode( BOOL *useAliasedEdgeMode ); - [return: MarshalAs(UnmanagedType.Bool)] - bool GetUseAliasedEdgeMode(); - - /// Gets a pointer to an IXpsOMVisualCollection interface that contains a collection of the visual objects in the canvas. - /// The collection of the visual objects in the canvas. If no visual objects are attached to the canvas, an empty collection is returned. - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getvisuals - // HRESULT GetVisuals( IXpsOMVisualCollection **visuals ); - IXpsOMVisualCollection GetVisuals(); - - /// Sets the long (detailed) textual description of the object's contents. This text is used by accessibility clients to describe the object. - /// The long (detailed) textual description of the object's contents. A NULL pointer clears the previously assigned value. - /// The property that is set by this method corresponds to the AutomationProperties.HelpText attribute of the Canvas element in the document markup. - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setaccessibilitylongdescription - // HRESULT SetAccessibilityLongDescription( LPCWSTR longDescription ); - void SetAccessibilityLongDescription([In, MarshalAs(UnmanagedType.LPWStr)] string longDescription); - - /// Sets the short textual description of the object's contents. This text is used by accessibility clients to describe the object. - /// The short textual description of the object's contents. A NULL pointer clears the previously assigned text. - /// The property that is set by this method corresponds to the AutomationProperties.HelpText attribute of the Canvas element in the document markup. - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setaccessibilityshortdescription - // HRESULT SetAccessibilityShortDescription( LPCWSTR shortDescription ); - void SetAccessibilityShortDescription([In, MarshalAs(UnmanagedType.LPWStr)] string shortDescription); - /// /// Sets the IXpsOMDictionary interface pointer of the local, unshared dictionary. /// @@ -662,6 +1276,33 @@ namespace Vanara.PInvoke // HRESULT SetDictionaryLocal( IXpsOMDictionary *resourceDictionary ); void SetDictionaryLocal([In] IXpsOMDictionary resourceDictionary); + /// Gets a pointer to the IXpsOMRemoteDictionaryResource interface of the remote dictionary resource. + /// + /// The IXpsOMRemoteDictionaryResource interface pointer to the remote dictionary resource, if one has been set. If a remote dictionary resource has not been set or if a local dictionary resource has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object returned in remoteDictionaryResource + /// + /// + /// SetDictionaryLocal + /// NULL pointer. + /// + /// + /// SetDictionaryResource + /// The remote dictionary resource that is set by SetDictionaryResource. + /// + /// + /// Neither SetDictionaryLocal nor SetDictionaryResource has been called yet. + /// NULL pointer. + /// + /// + /// + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-getdictionaryresource + // HRESULT GetDictionaryResource( IXpsOMRemoteDictionaryResource **remoteDictionaryResource ); + IXpsOMRemoteDictionaryResource GetDictionaryResource(); + /// /// Sets the IXpsOMRemoteDictionaryResource interface pointer of the remote dictionary resource. /// @@ -699,10 +1340,1428 @@ namespace Vanara.PInvoke // HRESULT SetDictionaryResource( IXpsOMRemoteDictionaryResource *remoteDictionaryResource ); void SetDictionaryResource([In] IXpsOMRemoteDictionaryResource remoteDictionaryResource); + /// Makes a deep copy of the interface. + /// + /// A pointer to the copy of the interface. + /// + /// The owner of the new interface is NULL. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-clone + // HRESULT Clone( IXpsOMCanvas **canvas ); + IXpsOMCanvas Clone(); + } + + /// Provides an IStream interface to a color profile resource. + /// The code example that follows illustrates how to create an instance of this interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomcolorprofileresource + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "8a344300-c3fc-4225-bfa5-d5d33798a094")] + [ComImport, Guid("67BD7D69-1EEF-4BB1-B5E7-6F4F87BE8ABE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMColorProfileResource : IXpsOMResource + { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// Gets a new, read-only copy of the stream that is associated with this resource. + /// A new, read-only copy of the stream that is associated with this resource. + /// + /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has not been determined yet. This behavior is different from that of a standard IStream object. + /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of this method will depend on that of the stream's Clone method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresource-getstream + // HRESULT GetStream( IStream **stream ); + [MethodImpl(MethodImplOptions.InternalCall)] + IStream GetStream(); + /// - /// Sets the value that determines whether the edges of objects in this canvas will be rendered using the aliased edge mode. + /// Sets the read-only stream to be associated with this resource. /// - /// The Boolean value that determines whether the edges of child objects in this canvas will be rendered using the aliased edge mode. + /// The read-only stream to be associated with this resource. + /// The part name to be assigned to this resource. + /// + /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the stream interface's methods. + /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresource-setcontent + // HRESULT SetContent( IStream *sourceStream, IOpcPartUri *partName ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetContent([In] IStream sourceStream, [In] IOpcPartUri partName); + } + + /// A collection of IXpsOMColorProfileResource interface pointers. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomcolorprofileresourcecollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "cb9253f3-461e-47a3-820b-bb6bf5e30210")] + [ComImport, Guid("12759630-5FBA-4283-8F7D-CCA849809EDB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMColorProfileResourceCollection + { + /// Gets the number of IXpsOMColorProfileResource interface pointers in the collection. + /// The number of IXpsOMColorProfileResource interface pointers in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-getcount + // HRESULT GetCount( UINT32 *count ); + [MethodImpl(MethodImplOptions.InternalCall)] + uint GetCount(); + + /// Gets an IXpsOMColorProfileResource interface pointer from a specified location in the collection. + /// The zero-based index of the IXpsOMColorProfileResource interface pointer to be obtained. + /// The IXpsOMColorProfileResource interface pointer at the location specified by index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-getat + // HRESULT GetAt( UINT32 index, IXpsOMColorProfileResource **object ); + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMColorProfileResource GetAt([In] uint index); + + /// + /// Inserts an IXpsOMColorProfileResource interface pointer at a specified location in the collection. + /// + /// The zero-based index in the collection where the interface pointer that is passed in object is to be inserted. + /// The IXpsOMColorProfileResource interface pointer that is to be inserted in the location specified by index. + /// + /// At the location specified by index, this method inserts the IXpsOMColorProfileResource interface pointer that is passed in object. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-insertat + // HRESULT InsertAt( UINT32 index, IXpsOMColorProfileResource *object ); + [MethodImpl(MethodImplOptions.InternalCall)] + void InsertAt([In] uint index, [In] IXpsOMColorProfileResource @object); + + /// + /// Removes and releases an IXpsOMColorProfileResource interface pointer from a specified location in the collection. + /// + /// The zero-based index in the collection from which an IXpsOMColorProfileResource interface pointer is to be removed and released. + /// + /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-removeat + // HRESULT RemoveAt( UINT32 index ); + [MethodImpl(MethodImplOptions.InternalCall)] + void RemoveAt([In] uint index); + + /// + /// Replaces an IXpsOMColorProfileResource interface pointer at a specified location in the collection. + /// + /// The zero-based index in the collection where an IXpsOMColorProfileResource interface pointer is to be replaced. + /// The IXpsOMColorProfileResource interface pointer that will replace current contents at the location specified by index. + /// + /// At the location specified by index, this method releases the IXpsOMColorProfileResource interface referenced by the existing pointer, then writes the pointer that is passed in object. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-setat + // HRESULT SetAt( UINT32 index, IXpsOMColorProfileResource *object ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetAt([In] uint index, [In] IXpsOMColorProfileResource @object); + + /// Appends an IXpsOMColorProfileResource interface pointer to the end of the collection. + /// A pointer to the IXpsOMColorProfileResource interface that is to be appended to the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-append + // HRESULT Append( IXpsOMColorProfileResource *object ); + [MethodImpl(MethodImplOptions.InternalCall)] + void Append([In] IXpsOMColorProfileResource @object); + + /// Gets an IXpsOMColorProfileResource interface pointer from the collection by matching the interface's part name. + /// The part name of the IXpsOMColorProfileResource interface to be found in the collection. + /// A pointer to the IXpsOMColorProfileResource interface whose part name matches partName. If a matching interface is not found in the collection, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcolorprofileresourcecollection-getbypartname + // HRESULT GetByPartName( IOpcPartUri *partName, IXpsOMColorProfileResource **part ); + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMColorProfileResource GetByPartName([In] IOpcPartUri partName); + } + + /// + /// This interface provides access to the metadata that is stored in the Core Properties part of the XPS document. + /// The contents of the Core Properties part are described in the 1st edition, Part 2, "Open Packaging Conventions," of Standard ECMA-376, Office Open XML File Formats. + /// + /// The meaning and use of these properties is determined by the user or context. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomcoreproperties + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "705ec9c7-5aa9-4fc5-ad2c-441cb545d056")] + [ComImport, Guid("3340FE8F-4027-4AA1-8F5F-D35AE45FE597"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMCoreProperties : IXpsOMPart + { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + [return: MarshalAs(UnmanagedType.Interface)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// Gets a pointer to the IXpsOMPackage interface that contains the core properties. + /// A pointer to the IXpsOMPackage interface that contains the core properties. If the interface does not belong to a package, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getowner + // HRESULT GetOwner( IXpsOMPackage **package ); + IXpsOMPackage GetOwner(); + + /// Gets the category property. + /// The string that is read from the category property. + /// + /// The category property contains categorization of the content. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getcategory + // HRESULT GetCategory( LPWSTR *category ); + SafeCoTaskMemString GetCategory(); + + /// Sets the category property. + /// The string to be written to the category property. A NULL pointer clears the category property. + /// The category property contains a categorization of the content. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setcategory + // HRESULT SetCategory( LPCWSTR category ); + void SetCategory([In, MarshalAs(UnmanagedType.LPWStr)] string category); + + /// Gets the contentStatus property. + /// The string that is read from the contentStatus property. + /// + /// The contentStatus property stores the content's status. Examples of contentStatus values include Draft, Reviewed, and Final. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getcontentstatus + // HRESULT GetContentStatus( LPWSTR *contentStatus ); + SafeCoTaskMemString GetContentStatus(); + + /// Sets the contentStatus property. + /// The string to be written to the contentStatus property. A NULL pointer clears the contentStatus property. + /// The contentStatus property contains the status of the content. Examples of contentStatus values include Draft, Reviewed, and Final. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setcontentstatus + // HRESULT SetContentStatus( LPCWSTR contentStatus ); + void SetContentStatus([In, MarshalAs(UnmanagedType.LPWStr)] string contentStatus); + + /// Gets the contentType property. + /// The string that is read from the contentType property. + /// + /// The contentType property stores the type of content that is being represented, and it is generally defined by a specific use and intended audience. Examples of contentType values include Whitepaper, Security Bulletin, and Exam. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getcontenttype + // HRESULT GetContentType( LPWSTR *contentType ); + SafeCoTaskMemString GetContentType(); + + /// Sets the contentType property. + /// The string to be written to the contentType property. A NULL pointer clears the contentType property. + /// The contentType property contains the type of content that is being represented, which is generally defined by a specific use and intended audience. Examples of contentType values include Whitepaper, Security Bulletin, and Exam. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setcontenttype + // HRESULT SetContentType( LPCWSTR contentType ); + void SetContentType([In, MarshalAs(UnmanagedType.LPWStr)] string contentType); + + /// Gets the created property. + /// The date and time that are read from the created property. + /// The created property contains the date and time the package was created. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getcreated + // HRESULT GetCreated( SYSTEMTIME *created ); + SYSTEMTIME GetCreated(); + + /// Sets the created property. + /// The date and time the package was created. A NULL pointer clears the created property + /// The created property contains the date and time the package was created. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setcreated + // HRESULT SetCreated( const SYSTEMTIME *created ); + void SetCreated(in SYSTEMTIME created); + + /// Gets the creator property. + /// The string that is read from the creator property. + /// + /// The creator property describes the entity that is primarily responsible for making the content of the resource. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getcreator + // HRESULT GetCreator( LPWSTR *creator ); + SafeCoTaskMemString GetCreator(); + + /// Sets the creator property. + /// The string to be written to the creator property. A NULL pointer clears the creator property. + /// The creator property describes the entity that is primarily responsible for making the content of the resource. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setcreator + // HRESULT SetCreator( LPCWSTR creator ); + void SetCreator([In, MarshalAs(UnmanagedType.LPWStr)] string creator); + + /// Gets the description property. + /// The string that is read from the description property. + /// + /// The description property provides an explanation of the content. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getdescription + // HRESULT GetDescription( LPWSTR *description ); + SafeCoTaskMemString GetDescription(); + + /// Sets the description property. + /// The string to be written to the description property. A NULL pointer clears this property. + /// The description property explains the content. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setdescription + // HRESULT SetDescription( LPCWSTR description ); + void SetDescription([In, MarshalAs(UnmanagedType.LPWStr)] string description); + + /// Gets the identifier property. + /// The string that is read from the identifier property. + /// + /// The identifier property is an unambiguous reference to the resource within a user-defined or application-specific context. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getidentifier + // HRESULT GetIdentifier( LPWSTR *identifier ); + SafeCoTaskMemString GetIdentifier(); + + /// Sets the identifier property. + /// The string to be written to the identifier property. A NULL pointer clears the identifier property. + /// The identifier property is an unambiguous reference to the resource within a user-defined or application-specific context. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setidentifier + // HRESULT SetIdentifier( LPCWSTR identifier ); + void SetIdentifier([In, MarshalAs(UnmanagedType.LPWStr)] string identifier); + + /// Gets the keywords property. + /// The string that is read from the keywords property. + /// + /// The keywords property is a delimited set of keywords that are used to support searching and indexing. This is typically a list of terms that are not available in other properties. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getkeywords + // HRESULT GetKeywords( LPWSTR *keywords ); + SafeCoTaskMemString GetKeywords(); + + /// Sets the keywords property. + /// The string that contains the keywords to be written to the keywords property. A NULL pointer clears the keywords property. + /// The keywords property is a delimited set of keywords that are used to support searching and indexing. It is typically a list of terms that are not available elsewhere in the properties. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setkeywords + // HRESULT SetKeywords( LPCWSTR keywords ); + void SetKeywords([In, MarshalAs(UnmanagedType.LPWStr)] string keywords); + + /// Gets the language property. + /// The value that is read from the language property. + /// + /// The language property describes the language of the resource's intellectual content. + /// Internet Engineering Task Force (IETF) RFC 3066 describes the recommended encoding for this property. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getlanguage + // HRESULT GetLanguage( LPWSTR *language ); + SafeCoTaskMemString GetLanguage(); + + /// Sets the language property. + /// The string that contains the language value to be written to the language property. A NULL pointer clears the language property. + /// + /// The language property describes the language of the resource's intellectual content. + /// Internet Engineering Task Force (IETF) RFC 3066 describes the recommended encoding for this property. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setlanguage + // HRESULT SetLanguage( LPCWSTR language ); + void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); + + /// Gets the lastModifiedBy property. + /// The value that is read from the lastModifiedBy property. + /// + /// The lastModifiedBy property describes the user who performed the last modification. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getlastmodifiedby + // HRESULT GetLastModifiedBy( LPWSTR *lastModifiedBy ); + SafeCoTaskMemString GetLastModifiedBy(); + + /// Sets the lastModifiedBy property. + /// The string that contains the value to be written to the lastModifiedBy property. A NULL pointer clears the lastModifiedBy property. + /// The lastModifiedBy property describes the user who performs the last modification. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setlastmodifiedby + // HRESULT SetLastModifiedBy( LPCWSTR lastModifiedBy ); + void SetLastModifiedBy([In, MarshalAs(UnmanagedType.LPWStr)] string lastModifiedBy); + + /// Gets the lastPrinted property. + /// The date and time that are read from the lastPrinted property. + /// The lastPrinted property contains the date and time the package was last printed. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getlastprinted + // HRESULT GetLastPrinted( SYSTEMTIME *lastPrinted ); + SYSTEMTIME GetLastPrinted(); + + /// + /// Sets the lastPrinted property. + /// + /// The date and time the package was last printed. A NULL pointer clears the lastPrinted property. + /// + /// The lastPrinted property contains the date and time the package was last printed. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setlastprinted + // HRESULT SetLastPrinted( const SYSTEMTIME *lastPrinted ); + void SetLastPrinted(in SYSTEMTIME lastPrinted); + + /// Gets the modified property. + /// The date and time that are read from the modified property. + /// The modified property contains the date and time the package was last modified. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getmodified + // HRESULT GetModified( SYSTEMTIME *modified ); + SYSTEMTIME GetModified(); + + /// Sets the modified property. + /// The date and time the package was last changed. A NULL pointer clears the modified property. + /// The modified property contains the date and time the package was last changed. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setmodified + // HRESULT SetModified( const SYSTEMTIME *modified ); + void SetModified(in SYSTEMTIME modified); + + /// Gets the revision property. + /// The string that is read from the revision property. + /// + /// The revision property contains the resource's revision number. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getrevision + // HRESULT GetRevision( LPWSTR *revision ); + SafeCoTaskMemString GetRevision(); + + /// Sets the revision property. + /// The string to be written to the revision property. A NULL pointer clears the revision property. + /// The revision property contains the revision number of the resource. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setrevision + // HRESULT SetRevision( LPCWSTR revision ); + void SetRevision([In, MarshalAs(UnmanagedType.LPWStr)] string revision); + + /// + /// Gets the subject property. + /// + /// + /// The string that is read from the subject property. + /// + /// + /// The subject property contains the topic of the resource's content. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getsubject + // HRESULT GetSubject( LPWSTR *subject ); + SafeCoTaskMemString GetSubject(); + + /// + /// Sets the subject property. + /// + /// The string to be written to the subject property. A NULL pointer clears the subject property. + /// + /// The subject property contains the topic of the resource content. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setsubject + // HRESULT SetSubject( LPCWSTR subject ); + void SetSubject([In, MarshalAs(UnmanagedType.LPWStr)] string subject); + + /// + /// Gets the title property. + /// + /// + /// The string that is read from the title property. + /// + /// + /// The title property contains the resource's name. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-gettitle + // HRESULT GetTitle( LPWSTR *title ); + SafeCoTaskMemString GetTitle(); + + /// + /// Sets the title property. + /// + /// The string to be written to the title property. A NULL pointer clears the title property. + /// + /// The title property contains the name given to the resource. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-settitle + // HRESULT SetTitle( LPCWSTR title ); + void SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string title); + + /// + /// Gets the version property. + /// + /// + /// The string that is read from the version property. + /// + /// + /// The version property contains the resource's version number. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-getversion + // HRESULT GetVersion( LPWSTR *version ); + SafeCoTaskMemString GetVersion(); + + /// Sets the version property. + /// The string to be written to the version property. A NULL pointer clears the version property. + /// The version property contains the version number of the resource. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-setversion + // HRESULT SetVersion( LPCWSTR version ); + void SetVersion([In, MarshalAs(UnmanagedType.LPWStr)] string version); + + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + /// The owner of the interface returned in coreProperties is NULL. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcoreproperties-clone + // HRESULT Clone( IXpsOMCoreProperties **coreProperties ); + IXpsOMCoreProperties Clone(); + } + + /// A collection of XPS_DASH structures. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdashcollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "02a152a1-e117-42fb-8428-a2b28e6540a9")] + [ComImport, Guid("081613F4-74EB-48F2-83B3-37A9CE2D7DC6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMDashCollection + { + /// Gets the number of XPS_DASH structures in the collection. + /// The number of XPS_DASH structures in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-getcount + // HRESULT GetCount( UINT32 *count ); + uint GetCount(); + + /// Gets an XPS_DASH structure from a specified location in the collection. + /// The zero-based index in the collection where an XPS_DASH structure is to be obtained. + /// The XPS_DASH structure that is found at the location specified by index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-getat + // HRESULT GetAt( UINT32 index, XPS_DASH *dash ); + XPS_DASH GetAt([In] uint index); + + /// Inserts an XPS_DASH structure at a specified location in the collection. + /// The zero-based index in the collection where the structure that is referenced by dash is to be inserted. + /// A pointer to the XPS_DASH structure that is to be inserted at the location specified by index. + /// + /// At the location specified by index, this method inserts the XPS_DASH structure that is passed in dash. Prior to insertion, the structure in this and all subsequent locations is moved up by one index. + /// The figure that follows illustrates how the collection is changed by the InsertAt method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-insertat + // HRESULT InsertAt( UINT32 index, const XPS_DASH *dash ); + void InsertAt([In] uint index, in XPS_DASH dash); + + /// Removes and frees an XPS_DASH structure from a specified location in the collection. + /// The zero-based index in the collection from which an XPS_DASH structure is to be removed and freed. + /// + /// This method removes and frees the XPS_DASH structure referenced by the pointer at the location specified by index. After freeing the structure, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// The figure that follows illustrates how the collection is changed by the RemoveAt method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-removeat + // HRESULT RemoveAt( UINT32 index ); + void RemoveAt([In] uint index); + + /// + /// Replaces an XPS_DASH structure at a specified location in the collection. + /// + /// The zero-based index in the collection where an XPS_DASH structure is to be replaced. + /// A pointer to the XPS_DASH structure that will replace the current contents at the location specified by index. + /// + /// At the location specified by index, this method frees the existing XPS_DASH structure then replaces it with the structure that is passed in dash. + /// The figure that follows illustrates how the collection is changed by the SetAt method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-setat + // HRESULT SetAt( UINT32 index, const XPS_DASH *dash ); + void SetAt([In] uint index, in XPS_DASH dash); + + /// Appends an XPS_DASH structure to the end of the collection. + /// A pointer to the XPS_DASH structure that is to be appended to the collection. + /// The figure that follows illustrates how the collection is changed by the Append method. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdashcollection-append + // HRESULT Append( const XPS_DASH *dash ); + void Append(in XPS_DASH dash); + } + + /// The dictionary is used by an XPS package to share resources. + /// + /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. + /// A dictionary cannot contain duplicate interface pointers. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdictionary + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "f887e3d3-973c-4267-a785-6bc190c13082")] + [ComImport, Guid("897C86B8-8EAF-4AE3-BDDE-56419FCF4236"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMDictionary + { + /// Gets a pointer to the interface that contains the dictionary. + /// The IUnknown interface of the interface that contains the dictionary. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + object GetOwner(); + + /// Gets the number of entries in the dictionary. + /// The number of entries in the dictionary. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getcount + // HRESULT GetCount( UINT32 *count ); + uint GetCount(); + + /// Gets the IXpsOMShareable interface pointer and the key name string of the entry at a specified index in the dictionary. + /// The zero-based index of the dictionary entry that is to be obtained. + /// The key string that is found at the location specified by index. + /// The IXpsOMShareable interface pointer that is found at the location specified by index. + /// + /// The interface pointers that are stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getat + // HRESULT GetAt( UINT32 index, LPWSTR *key, IXpsOMShareable **entry ); + IXpsOMShareable GetAt([In] uint index, out SafeCoTaskMemString key); + + /// Gets the IXpsOMShareable interface pointer of the entry that contains the specified key. + /// The entry's key to be found in the dictionary. + /// The IXpsOMShareable interface pointer to the last entry in the dictionary which is to be searched for key. If beforeEntry is NULL or is an interface pointer to an entry that is not in the dictionary, the entire dictionary will be searched. + /// The interface pointer to the dictionary entry whose key matches key. + /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getbykey + // HRESULT GetByKey( LPCWSTR key, IXpsOMShareable *beforeEntry, IXpsOMShareable **entry ); + IXpsOMShareable GetByKey([In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable beforeEntry); + + /// Gets the index of an IXpsOMShareable interface from the dictionary. + /// The IXpsOMShareable interface pointer to be found in the dictionary. + /// The zero-based index of entry in the dictionary. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-getindex + // HRESULT GetIndex( IXpsOMShareable *entry, UINT32 *index ); + uint GetIndex([In] IXpsOMShareable entry); + + /// + /// Appends an IXpsOMShareable interface along with its key to the end of the dictionary. + /// + /// The key to be used for this entry. + /// The string referenced by key must be unique in the dictionary. + /// A pointer to the IXpsOMShareable interface that is to be appended to the dictionary. + /// A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not already in the dictionary. + /// + /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. + /// The figure that follows illustrates how the dictionary is changed by the Append method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-append + // HRESULT Append( LPCWSTR key, IXpsOMShareable *entry ); + void Append([In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable entry); + + /// + /// Inserts an IXpsOMShareable interface at a specified location in the dictionary and sets the key to identify the interface. + /// + /// The zero-based index in the dictionary where the IXpsOMShareable interface is to be inserted. + /// The key to be used to identify the IXpsOMShareable interface in the dictionary. + /// The string referenced by key must be unique in the dictionary. + /// The IXpsOMShareable interface pointer to be inserted at the location specified by index. + /// A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not already in the dictionary. + /// + /// The interface pointers stored in the dictionary will usually be pointers to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method. + /// At the location specified by index, this method inserts the IXpsOMShareable interface pointer and sets the key; the interface pointer and key are passed in value and key, respectively. Before value and key are inserted, the interface pointer and the key at this and all subsequent locations are moved up by one index. + /// The figure that follows illustrates how the dictionary is changed by the InsertAt method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-insertat + // HRESULT InsertAt( UINT32 index, LPCWSTR key, IXpsOMShareable *entry ); + void InsertAt([In] uint index, [In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable entry); + + /// + /// Removes and releases the entry from a specified location in the dictionary. + /// + /// The zero-based index in the dictionary from which an entry is to be removed and released. + /// + /// At the location specified by index, this method releases the interface referenced by the pointer. After releasing the interface, this method compacts the dictionary by reducing by 1 the index of each pointer subsequent to index. + /// The figure that follows illustrates how the dictionary is changed by the RemoveAt method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-removeat + // HRESULT RemoveAt( UINT32 index ); + void RemoveAt([In] uint index); + + /// + /// Replaces the entry at a specified location in the dictionary. + /// + /// The zero-based index in the dictionary in which an entry is to be replaced. + /// The key to be used for the new entry. + /// The string referenced by key must be unique in the dictionary. + /// The IXpsOMShareable interface pointer that will replace current contents at the location specified by index. + /// A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not already in the dictionary. + /// + /// At the location specified by index, this method releases the IXpsOMShareable interface referenced by the existing pointer, then replaces it with the interface pointer that is passed in entry and assigns it the key passed in key. + /// The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the GetType method. + /// The figure that follows illustrates how the dictionary is changed by the SetAt method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-setat + // HRESULT SetAt( UINT32 index, LPCWSTR key, IXpsOMShareable *entry ); + void SetAt([In] uint index, [In, MarshalAs(UnmanagedType.LPWStr)] string key, [In] IXpsOMShareable entry); + + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdictionary-clone + // HRESULT Clone( IXpsOMDictionary **dictionary ); + IXpsOMDictionary Clone(); + } + + /// + /// An ordered sequence of fixed pages and document-level resources that make up the document. + /// + /// + /// The code example that follows illustrates how to create an instance of this interface. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdocument + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "22d3c0a1-3ad5-4f48-9e1e-eaf3bd95b39f")] + [ComImport, Guid("2C2C94CB-AC5F-4254-8EE9-23948309D9F0"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMDocument : IXpsOMPart + { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + [return: MarshalAs(UnmanagedType.Interface)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// Gets a pointer to the IXpsOMDocumentSequence interface that contains the document. + /// A pointer to the IXpsOMDocumentSequence interface that contains the document. If the document does not belong to a document sequence, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-getowner + // HRESULT GetOwner( IXpsOMDocumentSequence **documentSequence ); + IXpsOMDocumentSequence GetOwner(); + + /// Gets the IXpsOMPageReferenceCollection interface of the document, which allows virtualized access to its pages. + /// A pointer to the IXpsOMPageReferenceCollection interface that contains a collection of page references for each page of the document. If there are no page references, the IXpsOMPageReferenceCollection returned in pageReferences will be empty and will have no elements. + /// + /// To get the pages of a document, first get the list of IXpsOMPageReference interfaces by calling GetPageReferences. Then, for each IXpsOMPageReference interface, load a page by calling GetPage. + /// If the document does not have any pages, the page reference collection returned in pageReferences will be empty. To get the number of page references in the collection, call its GetCount method. + /// For an example of how this method can be used in a program, see Navigate the XPS OM. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-getpagereferences + // HRESULT GetPageReferences( IXpsOMPageReferenceCollection **pageReferences ); + IXpsOMPageReferenceCollection GetPageReferences(); + + /// Gets the IXpsOMPrintTicketResource interface of the document-level print ticket. + /// A pointer to the IXpsOMPrintTicketResource interface of the document-level print ticket that is associated with the document. If no print ticket has been assigned, a NULL pointer will be returned. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-getprintticketresource + // HRESULT GetPrintTicketResource( IXpsOMPrintTicketResource **printTicketResource ); + IXpsOMPrintTicketResource GetPrintTicketResource(); + + /// Sets the IXpsOMPrintTicketResource interface for the document-level print ticket. + /// A pointer to the IXpsOMPrintTicketResource interface for the document-level print ticket to be assigned to the document. A NULL pointer releases any previously assigned print ticket resource. + /// If the document contains an IXpsOMPrintTicketResource interface when this method is called, that interface is released before the new IXpsOMPrintTicketResource interface, passed in printTicketResource, is set. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-setprintticketresource + // HRESULT SetPrintTicketResource( IXpsOMPrintTicketResource *printTicketResource ); + void SetPrintTicketResource([In] IXpsOMPrintTicketResource printTicketResource); + + /// Gets a pointer to the IXpsOMDocumentStructureResource interface of the resource that contains structural information about the document. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-getdocumentstructureresource + // HRESULT GetDocumentStructureResource( IXpsOMDocumentStructureResource **documentStructureResource ); + IXpsOMDocumentStructureResource GetDocumentStructureResource(); + + /// Sets the IXpsOMDocumentStructureResource interface for the document. + /// If the document contains an IXpsOMDocumentStructureResource interface when this method is called, that interface is released before the new IXpsOMDocumentStructureResource interface, which is passed in documentStructureResource, is set. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-setdocumentstructureresource + // HRESULT SetDocumentStructureResource( IXpsOMDocumentStructureResource *documentStructureResource ); + void SetDocumentStructureResource([In] IXpsOMDocumentStructureResource documentStructureResource); + + /// Gets a pointer to the IXpsOMSignatureBlockResourceCollection interface, which refers to a collection of the document's digital signature block resources. + /// A pointer to the IXpsOMSignatureBlockResourceCollection interface, which refers to a collection of the document's digital signature block resources. If the document does not contain any signature block resources, the IXpsOMSignatureBlockResourceCollection interface will be empty. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-getsignatureblockresources + // HRESULT GetSignatureBlockResources( IXpsOMSignatureBlockResourceCollection **signatureBlockResources ); + IXpsOMSignatureBlockResourceCollection GetSignatureBlockResources(); + + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + /// This method does not update any of the resource pointers in the copy. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocument-clone + // HRESULT Clone( IXpsOMDocument **document ); + IXpsOMDocument Clone(); + } + + /// A collection of IXpsOMDocument interface pointers. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdocumentcollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "4f3acae9-10a0-47ff-9170-a40abe230580")] + [ComImport, Guid("D1C87F0D-E947-4754-8A25-971478F7E83E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMDocumentCollection + { + /// Gets the number of IXpsOMDocument interface pointers in the collection. + /// The number of IXpsOMDocument interface pointers in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentcollection-getcount + // HRESULT GetCount( UINT32 *count ); + uint GetCount(); + + /// Gets an IXpsOMDocument interface pointer from a specified location in the collection. + /// The zero-based index of the IXpsOMDocument interface pointer to be obtained. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentcollection-getat + // HRESULT GetAt( UINT32 index, IXpsOMDocument **document ); + IXpsOMDocument GetAt([In] uint index); + + /// + /// Inserts an IXpsOMDocument interface pointer at a specified location in the collection. + /// + /// The zero-based index of the collection where the interface pointer that is passed in document is to be inserted. + /// The IXpsOMDocument interface pointer that is to be inserted at the location specified by index. + /// + /// At the location specified by index, this method inserts the IXpsOMDocument interface pointer that is passed in document. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentcollection-insertat + // HRESULT InsertAt( UINT32 index, IXpsOMDocument *document ); + void InsertAt([In] uint index, [In] IXpsOMDocument document); + + /// Removes and releases an IXpsOMDocument interface pointer from a specified location in the collection. + /// The zero-based index in the collection from which an IXpsOMDocument interface pointer is to be removed and released. + /// + /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentcollection-removeat + // HRESULT RemoveAt( UINT32 index ); + void RemoveAt([In] uint index); + + /// Replaces an IXpsOMDocument interface pointer at a specified location in the collection. + /// The zero-based index in the collection where an IXpsOMDocument interface pointer is to be replaced. + /// The IXpsOMDocument interface pointer that will replace current contents at the location specified by index. + /// + /// At the location specified by index, this method releases the IXpsOMDocument interface referenced by the existing pointer, then writes the pointer that is passed in document. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentcollection-setat + // HRESULT SetAt( UINT32 index, IXpsOMDocument *document ); + void SetAt([In] uint index, [In] IXpsOMDocument document); + + /// Appends an IXpsOMDocument interface to the end of the collection. + /// A pointer to the IXpsOMDocument interface that is to be appended to the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentcollection-append + // HRESULT Append( IXpsOMDocument *document ); + void Append([In] IXpsOMDocument document); + } + + /// The root object that has the XPS document content. + /// The code example that follows illustrates how to create an instance of this interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomdocumentsequence + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "472095a4-ecd8-406a-97c2-1a34b4e5184a")] + [ComImport, Guid("56492EB4-D8D5-425E-8256-4C2B64AD0264"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMDocumentSequence : IXpsOMPart + { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + [return: MarshalAs(UnmanagedType.Interface)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// Gets a pointer to the IXpsOMPackage interface that contains the document sequence. + /// A pointer to the IXpsOMPackage interface that contains the document sequence. If the document sequence does not belong to a package, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentsequence-getowner + // HRESULT GetOwner( IXpsOMPackage **package ); + IXpsOMPackage GetOwner(); + + /// Gets a pointer to the IXpsOMDocumentCollection interface, which contains the documents specified in the document sequence. + /// A pointer to the IXpsOMDocumentCollection interface, which contains the documents specified in the document sequence. If the sequence does not have any documents, the IXpsOMDocumentCollection interface will be empty. + /// If the document sequence does not have any documents, the document collection that is returned in documents will be empty. To get the number of documents in the collection, call the collection's GetCount method. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentsequence-getdocuments + // HRESULT GetDocuments( IXpsOMDocumentCollection **documents ); + IXpsOMDocumentCollection GetDocuments(); + + /// Gets the IXpsOMPrintTicketResource interface to the job-level print ticket that is assigned to the document sequence. + /// A pointer to the IXpsOMPrintTicketResource interface of the job-level print ticket that is assigned to the document sequence. If no IXpsOMPrintTicketResource interface has been assigned to the document sequence, a NULL pointer is returned. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentsequence-getprintticketresource + // HRESULT GetPrintTicketResource( IXpsOMPrintTicketResource **printTicketResource ); + IXpsOMPrintTicketResource GetPrintTicketResource(); + + /// Sets the job-level print ticket resource for the document sequence. + /// A pointer to the IXpsOMPrintTicketResource interface of the job-level print ticket that will be set for the document sequence. If the document sequence has a print ticket resource, a NULL pointer will release it. + /// If the document contains an IXpsOMPrintTicketResource interface when this method is called, that interface is released before the new IXpsOMPrintTicketResource interface, which is passed in printTicketResource, is set. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentsequence-setprintticketresource + // HRESULT SetPrintTicketResource( IXpsOMPrintTicketResource *printTicketResource ); + void SetPrintTicketResource([In] IXpsOMPrintTicketResource printTicketResource); + } + + [ComImport, Guid("85FEBC8A-6B63-48A9-AF07-7064E4ECFF30"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMDocumentStructureResource : IXpsOMResource + { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// + /// Gets a pointer to the IXpsOMDocument interface that contains the resource. + /// + /// A pointer to the IXpsOMDocument interface that contains the resource. If the resource is not part of a document, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentstructureresource-getowner + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMDocument GetOwner(); + + /// Gets a new, read-only copy of the stream that is associated with this resource. + /// A new, read-only copy of the stream that is associated with this resource. + /// + /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has not been determined yet. This behavior is different from that of a standard IStream object. + /// For more information about the content of DocumentStructure part, see the XML Paper Specification. + /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of this method will depend on that of the stream's Clone method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentstructureresource-getstream + // HRESULT GetStream( IStream **stream ); + [MethodImpl(MethodImplOptions.InternalCall)] + IStream GetStream(); + + /// + /// Sets the read-only stream to be associated with this resource. + /// + /// The read-only stream to be associated with this resource. + /// The part name to be assigned to this resource. + /// + /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the stream interface's methods. + /// For more information about the content of DocumentStructure part, see the XML Paper Specification. + /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomdocumentstructureresource-setcontent + // HRESULT SetContent( IStream *sourceStream, IOpcPartUri *partName ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetContent([In] IStream sourceStream, [In] IOpcPartUri partName); + } + + /// Provides an IStream interface to a font resource. + /// The code example that follows illustrates how to create an instance of this interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomfontresource + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "dd0ce1c0-1c04-46a8-9075-93de9b3e3062")] + [ComImport, Guid("A8C45708-47D9-4AF4-8D20-33B48C9B8485"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMFontResource : IXpsOMResource + { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// Gets a new, read-only copy of the stream that is associated with this resource. + /// A new, read-only copy of the stream that is associated with this resource. + /// + /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has not been determined yet. This behavior is different from that of a standard IStream object. + /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of this method will depend on that of the stream's Clone method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresource-getstream + // HRESULT GetStream( IStream **readerStream ); + [MethodImpl(MethodImplOptions.InternalCall)] + IStream GetStream(); + + /// Sets the read-only stream to be associated with this resource. + /// The read-only stream to be associated with this resource. + /// + /// The XPS_FONT_EMBEDDING value that describes how the resource is to be obfuscated. + /// + /// + /// Value + /// Meaning + /// + /// + /// XPS_FONT_EMBEDDING_NORMAL + /// Font resource is neither obfuscated nor restricted. + /// + /// + /// XPS_FONT_EMBEDDING_OBFUSCATED + /// Font resource is obfuscated but not restricted. + /// + /// + /// XPS_FONT_EMBEDDING_RESTRICTED + /// Font resource is both obfuscated and restricted. + /// + /// + /// + /// The part name to be assigned to this resource. + /// + /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the stream interface's methods. + /// The stream assigned to this resource should not be obfuscated. Obfuscation of the font resource takes place during serialization. + /// Providing an obfuscated font stream while setting the embeddingOption to XPS_FONT_EMBEDDING_OBFUSCATED will result in a font that is not obfuscated in the serialized XPS document. + /// partName resets the part name for this object and is checked against the value of embeddingOption for the proper obfuscation syntax. + /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresource-setcontent + // HRESULT SetContent( IStream *sourceStream, XPS_FONT_EMBEDDING embeddingOption, IOpcPartUri *partName ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetContent([In] IStream sourceStream, [In] XPS_FONT_EMBEDDING embeddingOption, [In] IOpcPartUri partName); + + /// Gets the embedding option that will be applied when the resource is serialized. + /// + /// The stream's embedding option. + /// The XPS_FONT_EMBEDDING value describes how the resource is obfuscated. The following possible values are returned in this parameter: + /// + /// + /// Value + /// Meaning + /// + /// + /// XPS_FONT_EMBEDDING_NORMAL + /// Font resource is neither obfuscated nor restricted. + /// + /// + /// XPS_FONT_EMBEDDING_OBFUSCATED + /// Font resource is obfuscated but not restricted. + /// + /// + /// XPS_FONT_EMBEDDING_RESTRICTED + /// Font resource is both obfuscated and restricted. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresource-getembeddingoption + // HRESULT GetEmbeddingOption( XPS_FONT_EMBEDDING *embeddingOption ); + [MethodImpl(MethodImplOptions.InternalCall)] + XPS_FONT_EMBEDDING GetEmbeddingOption(); + } + + /// A collection of IXpsOMFontResource interface pointers. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomfontresourcecollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "71153c4c-631b-4f7a-9dd5-8537dcaca150")] + [ComImport, Guid("70B4A6BB-88D4-4FA8-AAF9-6D9C596FDBAD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMFontResourceCollection + { + /// Gets the number of IXpsOMFontResource interface pointers in the collection. + /// The number of IXpsOMFontResource interface pointers in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-getcount + // HRESULT GetCount( UINT32 *count ); + [MethodImpl(MethodImplOptions.InternalCall)] + uint GetCount(); + + /// Gets an IXpsOMFontResource interface pointer from a specified location in the collection. + /// The zero-based index of the IXpsOMFontResource interface pointer to be obtained. + /// The IXpsOMFontResource interface pointer at the location specified by index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-getat + // HRESULT GetAt( UINT32 index, IXpsOMFontResource **value ); + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMFontResource GetAt([In] uint index); + + /// Replaces an IXpsOMFontResource interface pointer at a specified location in the collection. + /// The zero-based index in the collection where an IXpsOMFontResource interface pointer is to be replaced. + /// The IXpsOMFontResource interface pointer that will replace current contents at the location specified by index. + /// + /// At the location specified by index, this method releases the IXpsOMFontResource interface referenced by the existing pointer, then writes the pointer that is passed in value. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-setat + // HRESULT SetAt( UINT32 index, IXpsOMFontResource *value ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetAt([In] uint index, [In] IXpsOMFontResource value); + + /// Inserts an IXpsOMFontResource interface pointer at a specified location in the collection. + /// The zero-based index in the collection where the interface pointer that is passed in value is to be inserted. + /// The IXpsOMFontResource interface pointer that is to be inserted at the location specified by index. + /// + /// At the location specified by index, this method inserts the IXpsOMFontResource interface pointer that is passed in value. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-insertat + // HRESULT InsertAt( UINT32 index, IXpsOMFontResource *value ); + [MethodImpl(MethodImplOptions.InternalCall)] + void InsertAt([In] uint index, [In] IXpsOMFontResource value); + + /// Appends an IXpsOMFontResource interface to the end of the collection. + /// A pointer to the IXpsOMFontResource interface that is to be appended to the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-append + // HRESULT Append( IXpsOMFontResource *value ); + [MethodImpl(MethodImplOptions.InternalCall)] + void Append([In] IXpsOMFontResource value); + + /// Removes and releases an IXpsOMFontResource interface pointer from a specified location in the collection. + /// The zero-based index in the collection from which an IXpsOMFontResource interface pointer is to be removed and released. + /// + /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-removeat + // HRESULT RemoveAt( UINT32 index ); + [MethodImpl(MethodImplOptions.InternalCall)] + void RemoveAt([In] uint index); + + /// Gets an IXpsOMFontResource interface pointer from the collection by matching the interface's part name. + /// The part name of the IXpsOMFontResource interface to be found in the collection. + /// A pointer to the IXpsOMFontResource interface that has the matching part name. If a matching interface is not found in the collection, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomfontresourcecollection-getbypartname + // HRESULT GetByPartName( IOpcPartUri *partName, IXpsOMFontResource **part ); + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMFontResource GetByPartName([In] IOpcPartUri partName); + } + + /// Describes the shape of a path or of a clipping region. + /// The code example that follows illustrates how to create an instance of this interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgeometry + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "d3f74c1e-49ef-40ee-a2f4-b6d198b57624")] + [ComImport, Guid("64FCF3D7-4D58-44BA-AD73-A13AF6492072"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMGeometry : IXpsOMShareable + { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets a pointer to the geometry's IXpsOMGeometryFigureCollection interface, which contains the collection of figures that make up this geometry. + /// A pointer to the IXpsOMGeometryFigureCollection interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-getfigures + // HRESULT GetFigures( IXpsOMGeometryFigureCollection **figures ); + IXpsOMGeometryFigureCollection GetFigures(); + + /// Gets the XPS_FILL_RULE value that describes the fill rule to be used. + /// The XPS_FILL_RULE value that describes the fill rule to be used. + /// + /// For more information about how the file rule determines whether a point is inside the fill region, see XPS_FILL_RULE. + /// The value that is returned in fillRule corresponds to the FillRule attribute of the PathGeometry element in the document markup. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-getfillrule + // HRESULT GetFillRule( XPS_FILL_RULE *fillRule ); + XPS_FILL_RULE GetFillRule(); + + /// + /// Sets the XPS_FILL_RULE value that describes the fill rule to be used. + /// + /// The XPS_FILL_RULE value that describes the fill rule to be used. + /// + /// For more information about how the file rule determines whether a point is inside the fill region, see XPS_FILL_RULE. + /// In the document markup, this value corresponds to the FillRule attribute of the PathGeometry element. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-setfillrule + // HRESULT SetFillRule( XPS_FILL_RULE fillRule ); + void SetFillRule([In] XPS_FILL_RULE fillRule); + + /// Gets a pointer to the geometry's IXpsOMMatrixTransform interface, which contains the resolved matrix transform for the geometry. + /// + /// A pointer to the geometry's IXpsOMMatrixTransform interface, which contains the resolved matrix transform for the geometry. If a matrix transform has not been set, a NULL pointer will be returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **transform ); + IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared matrix transform for the geometry. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared matrix transform for the geometry. A NULL pointer is returned if a local matrix transform has not been set or a matrix transform lookup key has been set. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); + IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform for the geometry. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the lookup parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// Object that is returned in lookup by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); + void SetTransformLocal([In] IXpsOMMatrixTransform transform); + + /// Gets the lookup key for the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the geometry. The matrix transform is stored in a resource dictionary. + /// + /// The lookup key for the IXpsOMMatrixTransform interface in a resource dictionary. A NULL pointer is returned if a matrix transform lookup key has not been set or if a local matrix transform has been set. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in lookup + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *lookup ); + SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the lookup key name of a shared matrix transform in a resource dictionary. + /// + /// The key name of the shared matrix transform in the resource dictionary. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// Object that is returned in lookup by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform retrieved, with a lookup key that matches the key set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR lookup ); + void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string lookup); + + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometry-clone + // HRESULT Clone( IXpsOMGeometry **geometry ); + IXpsOMGeometry Clone(); + } + + /// Describes one portion of the path or clipping region that is specified by an IXpsOMGeometry interface. + /// + /// The IXpsOMGeometryFigure corresponds to the PathFigure element in XPS markup. + /// The code example that follows illustrates how to create an instance of this interface. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgeometryfigure + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "e76a14ce-cfc3-4a50-855e-f5779b9fc261")] + [ComImport, Guid("D410DC83-908C-443E-8947-B1795D3C165A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMGeometryFigure + { + /// Gets a pointer to the IXpsOMGeometry interface that contains the geometry figure. + /// A pointer to the IXpsOMGeometry interface that contains the geometry figure. If the interface is not assigned to a geometry, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getowner + // HRESULT GetOwner( IXpsOMGeometry **owner ); + IXpsOMGeometry GetOwner(); + + /// + /// Gets the segment data points for the geometry figure. + /// + /// The size of the array referenced by the segmentData parameter. + /// If the method returns successfully, dataCount will contain the number of elements returned in the array that is referenced by segmentData. + /// If segmentData is set to NULL when the method is called, dataCount must be set to zero. + /// If a NULL pointer is returned in segmentData, dataCount will contain the required buffer size as the number of elements. + /// The address of an array that has the same number of elements as specified in dataCount. This value can be set to NULL if the caller requires that the method return only the required buffer size in dataCount. + /// If the array is large enough, this method copies the segment data points into the array and returns, in dataCount, the number of data points that are copied. If segmentData is set to NULL or references a buffer that is not large enough, a NULL pointer will be returned, no data will be copied, and dataCount will contain the required buffer size specified as the number of elements. + /// + /// To determine the required size of the segment data array before calling this method, call GetSegmentDataCount. + /// A geometry segment is described by the start point, the segment type, and additional parameters whose values are determined by the segment type. The coordinates for the start point of the first segment are a property of the geometry figure and are set by calling SetStartPoint. The start point of each subsequent segment is the end point of the preceding segment. + /// The values in the array returned in the segmentData parameter will correspond with the XPS_SEGMENT_TYPE values in the array returned by the GetSegmentTypes method in the segmentTypes parameter. To read the segment data values correctly, you will need to know the type of each segment in the geometry figure. For example, if the first line segment has a segment type value of XPS_SEGMENT_TYPE_LINE, the first two data values in the segmentData array will be the x and y coordinates of the end point of that segment; if the next segment has a segment type value of XPS_SEGMENT_TYPE_BEZIER, the next six values in the segmentData array will describe the characteristics of that segment; and so on for each line segment in the geometry figure. + /// The table that follows describes the specific set of data values that are returned for each segment type. For an example of how to access this data in a program, see the code example that follows. + /// + /// + /// Segment type + /// Required data values + /// + /// + /// XPS_SEGMENT_TYPE_LINE + /// Two data values: x-coordinate of the segment line's end point. y-coordinate of the segment line's end point. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_LARGE_CLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_SMALL_CLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_LARGE_COUNTERCLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_SMALL_COUNTERCLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_BEZIER + /// Six data values: x-coordinate of the Bezier curve's first control point. y-coordinate of the Bezier curve's first control point. x-coordinate of the Bezier curve's second control point. y-coordinate of the Bezier curve's second control point. x-coordinate of the Bezier curve's end point. y-coordinate of the Bezier curve's end point. + /// + /// + /// XPS_SEGMENT_TYPE_QUADRATIC_BEZIER + /// Four data values: x-coordinate of the Quad Bezier curve's control point. y-coordinate of the Quad Bezier curve's control point. x-coordinate of the Quad Bezier curve's end point. y-coordinate of the Quad Bezier curve's end point. + /// + /// + /// The following code example accesses the different data points of each segment type in a geometry figure. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentdata + // HRESULT GetSegmentData( UINT32 *dataCount, FLOAT *segmentData ); + void GetSegmentData([In, Out] ref uint dataCount, [In, Out] float[] segmentData); + + /// Gets the types of segments in the figure. + /// + /// The size of the array that is referenced by segmentTypes (see below). This parameter must not be NULL. + /// If the method returns successfully, segmentCount will contain the number of elements that are returned in the array referenced by segmentTypes. + /// If segmentTypes is NULL when the method is called, segmentCount must be set to zero. + /// If a NULL pointer is returned in segmentTypes, the value of segmentCount will contain the required buffer size, specified as the number of elements. + /// + /// + /// An array of XPS_SEGMENT_TYPE values that has the same number of elements as specified in segmentCount. If the caller requires that only the specified buffer size be returned, set this value to NULL. + /// If the array is large enough, this method will copy the XPS_SEGMENT_TYPE values into the array and return, in segmentCount, the number of the copied values. If segmentTypes is NULL or references a buffer that is not large enough, a NULL pointer will be returned, no data will be copied, and segmentCount will contain the required buffer size, which is specified as the number of elements. + /// + /// For an example of how to use this method in a program, see the code example in GetSegmentData. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmenttypes + // HRESULT GetSegmentTypes( UINT32 *segmentCount, XPS_SEGMENT_TYPE *segmentTypes ); + void GetSegmentTypes([In, Out] ref uint segmentCount, [In, Out] XPS_SEGMENT_TYPE[] segmentTypes); + + /// + /// Gets stroke definitions for the figure's segments. + /// + /// The size of the array that is referenced by segmentStrokes. This parameter must not be NULL. + /// If the method returns successfully, segmentCount will contain the number of elements that are returned in the array referenced by segmentStrokes. + /// If segmentStrokes is NULL when the method is called, segmentCount must be set to zero. + /// If a NULL pointer is returned in segmentStrokes, the value of segmentCount will contain the required buffer size, specified as the number of elements. + /// An array that has the same number of elements as specified in segmentCount. If the caller requires that this method return only the required buffer size, set this value to NULL. + /// If the array is large enough, this method copies the segment stroke values into the array and returns, in segmentCount, the number of copied segment stroke values. If segmentData is NULL or references a buffer that is not large enough, a NULL pointer will be returned, no data will be copied, and segmentCount will contain the required buffer size that is specified as the number of elements. + /// The following table shows the possible values of an element in the array that is referenced by segmentStrokes. /// /// /// Value @@ -710,600 +2769,2681 @@ namespace Vanara.PInvoke /// /// /// TRUE - /// The edges of objects in the canvas are to be rendered without anti-aliasing using the aliased edge mode. This includes any objects that have this value set to FALSE. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute having the value of Aliased. + /// The segment is stroked. /// /// /// FALSE - /// The edges of objects in the canvas are to be rendered in the default manner. In the document markup, this corresponds to the RenderOptions.EdgeMode attribute being absent. + /// The segment is not stroked. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentstrokes + // HRESULT GetSegmentStrokes( UINT32 *segmentCount, BOOL *segmentStrokes ); + void GetSegmentStrokes([In, Out] ref uint segmentCount, [In, Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Bool)] bool[] segmentStrokes); + + /// + /// Sets the segment information and data points for segments in the figure. + /// + /// The number of segments. + /// This value is also the number of elements in the arrays that are referenced by segmentTypes and segmentStrokes. + /// The number of segment data points. + /// This value is also the number of elements in the array that is referenced by segmentData. + /// An array of XPS_SEGMENT_TYPE variables. The value of segmentCount specifies the number of elements in this array. + /// An array of segment data values. The value of segmentDataCount specifies the number of elements in this array. + /// An array of segment stroke values. The value of segmentCount specifies the number of elements in this array. + /// + /// A geometry segment is described by the start point, the segment type, and additional parameters whose values are determined by the segment type. The coordinates for the start point of the first segment are a property of the geometry figure and are set by calling SetStartPoint. The start point of each subsequent segment is the end point of the preceding segment. + /// The number of data values that define a line segment depends on the segment type. The table that follows describes the specific set of required data values that must be used for each segment type. The values in the segment data array that is passed in the segmentData parameter must correspond with the XPS_SEGMENT_TYPE values in the array that is passed in the segmentTypes parameter. For example, if the first line segment has a segment type value of XPS_SEGMENT_TYPE_LINE, the first two data values in the segmentData array will be the x and y coordinates of the end point of that segment; if the next segment has a segment type value of XPS_SEGMENT_TYPE_BEZIER, the next six values in the segmentData array will describe the characteristics of that segment; and so on for each line segment in the geometry figure. + /// + /// + /// Segment type + /// Required data values + /// + /// + /// XPS_SEGMENT_TYPE_LINE + /// Two data values: x-coordinate of the segment line's end point. y-coordinate of the segment line's end point. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_LARGE_CLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_SMALL_CLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_LARGE_COUNTERCLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_ARC_SMALL_COUNTERCLOCKWISE + /// Five data values: x-coordinate of the arc's end point. y-coordinate of the arc's end point. Length of the ellipse's radius along the x-axis. Length of the ellipse's radius along the y-axis. Rotation angle. + /// + /// + /// XPS_SEGMENT_TYPE_BEZIER + /// Six data values: x-coordinate of the Bezier curve's first control point. y-coordinate of the Bezier curve's first control point. x-coordinate of the Bezier curve's second control point. y-coordinate of the Bezier curve's second control point. x-coordinate of the Bezier curve's end point. y-coordinate of the Bezier curve's end point. + /// + /// + /// XPS_SEGMENT_TYPE_QUADRATIC_BEZIER + /// Four data values: x-coordinate of the Quad Bezier curve's control point. y-coordinate of the Quad Bezier curve's control point. x-coordinate of the Quad Bezier curve's end point. y-coordinate of the Quad Bezier curve's end point. + /// + /// + /// To get the segment types in the figure, call GetSegmentTypes. + /// The following code examples demonstrate one way to create and populate the buffers required by SetSegments. + /// In the first code example, the AddSegmentDataToArrays method takes the data points that describe a single segment and stores them in the three different data buffers required by the SetSegments method. The data buffers that are passed as arguments to AddSegmentDataToArrays are managed by the calling method as shown in the code example that follows AddSegmentDataToArrays. + /// In this code example, UpdateSegmentData creates the data buffers required by the SetSegments method and calls the AddSegmentDataToArrays method from the preceding code example to populate them with the segment data. After the buffers have been populated, SetSegments is called to add this data to the geometry figure. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setsegments + // HRESULT SetSegments( UINT32 segmentCount, UINT32 segmentDataCount, const XPS_SEGMENT_TYPE *segmentTypes, const FLOAT *segmentData, const BOOL *segmentStrokes ); + void SetSegments([In] uint segmentCount, [In] uint segmentDataCount, [In] XPS_SEGMENT_TYPE[] segmentTypes, [In] float[] segmentData, [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Bool)] bool[] segmentStrokes); + + /// Gets the starting point of the figure. + /// The coordinates of the starting point of the figure. + /// In the document markup, the value returned in startPoint corresponds to that of the StartPoint attribute of the PathFigure element. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getstartpoint + // HRESULT GetStartPoint( XPS_POINT *startPoint ); + XPS_POINT GetStartPoint(); + + /// + /// Sets the starting point of the figure. + /// + /// The coordinates of the starting point of the figure. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setstartpoint + // HRESULT SetStartPoint( const XPS_POINT *startPoint ); + void SetStartPoint(in XPS_POINT startPoint); + + /// Gets a value that indicates whether the figure is closed. + /// + /// The Boolean value that indicates whether the figure is closed. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The figure is closed. The line segment between the start and end points of the figure will be stroked to close the shape. + /// + /// + /// FALSE + /// The figure is open. No line segment will be stroked between the start and end points of the figure. + /// + /// + /// + /// + /// This value only applies if the PathFigure attribute is used in the Path element that specifies a stroke. + /// A closed figure adds a line segment between the start point and the end point of the figure to close the shape. + /// This value corresponds to that of the IsClosed element of the PathFigure element in the document markup. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getisclosed + // HRESULT GetIsClosed( BOOL *isClosed ); + [return: MarshalAs(UnmanagedType.Bool)] + bool GetIsClosed(); + + /// + /// Sets a value that indicates whether the figure is closed. + /// + /// The value to be set. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The figure is closed. A line segment between the start point and the last point defined in the figure will be stroked. + /// + /// + /// FALSE + /// The figure is open. There is no line segment between the start point and the last point defined in the figure. /// /// /// - /// This property corresponds to the RenderOptions.EdgeMode attribute of the Canvas element in the document markup. + /// This value only applies if the PathFigure attribute is used in the Path element that specifies a stroke. + /// A closed figure adds a line segment between the start point and the end point of the figure to close the shape. + /// This value corresponds to that of the IsClosed element of the PathFigure element in the document markup. /// - // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomcanvas-setusealiasededgemode - // HRESULT SetUseAliasedEdgeMode( BOOL useAliasedEdgeMode ); - void SetUseAliasedEdgeMode([MarshalAs(UnmanagedType.Bool)] bool useAliasedEdgeMode); - } - - [ComImport, Guid("67BD7D69-1EEF-4BB1-B5E7-6F4F87BE8ABE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMColorProfileResource : IXpsOMResource - { - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - new IOpcPartUri GetPartName(); - - [MethodImpl(MethodImplOptions.InternalCall)] - new void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IStream GetStream(); - - [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); - } - - [ComImport, Guid("12759630-5FBA-4283-8F7D-CCA849809EDB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMColorProfileResourceCollection - { - [MethodImpl(MethodImplOptions.InternalCall)] - uint GetCount(); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMColorProfileResource GetAt([In] uint index); - - [MethodImpl(MethodImplOptions.InternalCall)] - void InsertAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMColorProfileResource @object); - - [MethodImpl(MethodImplOptions.InternalCall)] - void RemoveAt([In] uint index); - - [MethodImpl(MethodImplOptions.InternalCall)] - void SetAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMColorProfileResource @object); - - [MethodImpl(MethodImplOptions.InternalCall)] - void Append([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMColorProfileResource @object); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMColorProfileResource GetByPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); - } - - [ComImport, Guid("3340FE8F-4027-4AA1-8F5F-D35AE45FE597"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMCoreProperties : IXpsOMPart - { - IXpsOMCoreProperties Clone(); - - string GetCategory(); - - string GetContentStatus(); - - string GetContentType(); - - SYSTEMTIME GetCreated(); - - string GetCreator(); - - string GetDescription(); - - string GetIdentifier(); - - string GetKeywords(); - - string GetLanguage(); - - string GetLastModifiedBy(); - - SYSTEMTIME GetLastPrinted(); - - SYSTEMTIME GetModified(); - - IXpsOMPackage GetOwner(); - - string GetRevision(); - - string GetSubject(); - - string GetTitle(); - - string GetVersion(); - - void SetCategory([In] string category); - - void SetContentStatus([In] string contentStatus); - - void SetContentType([In] string contentType); - - void SetCreated(in SYSTEMTIME created); - - void SetCreator([In] string creator); - - void SetDescription([In] string description); - - void SetIdentifier([In] string identifier); - - void SetKeywords([In] string keywords); - - void SetLanguage([In] string language); - - void SetLastModifiedBy([In] string lastModifiedBy); - - void SetLastPrinted(in SYSTEMTIME lastPrinted); - - void SetModified(in SYSTEMTIME modified); - - void SetRevision([In] string revision); - - void SetSubject([In] string subject); - - void SetTitle([In] string title); - - void SetVersion([In] string version); - } - - [ComImport, Guid("081613F4-74EB-48F2-83B3-37A9CE2D7DC6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMDashCollection - { - void Append([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_DASH")] ref XPS_DASH dash); - - XPS_DASH GetAt([In] uint index); - - uint GetCount(); - - void InsertAt([In] uint index, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_DASH")] ref XPS_DASH dash); - - void RemoveAt([In] uint index); - - void SetAt([In] uint index, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_DASH")] ref XPS_DASH dash); - } - - [ComImport, Guid("897C86B8-8EAF-4AE3-BDDE-56419FCF4236"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMDictionary - { - void Append([In] string key, [In] IXpsOMShareable entry); - - IXpsOMDictionary Clone(); - - IXpsOMShareable GetAt([In] uint index, out string key); - - IXpsOMShareable GetByKey([In] string key, [In] IXpsOMShareable beforeEntry); - - uint GetCount(); - - uint GetIndex([In] IXpsOMShareable entry); - - object GetOwner(); - - void InsertAt([In] uint index, [In] string key, [In] IXpsOMShareable entry); - - void RemoveAt([In] uint index); - - void SetAt([In] uint index, [In] string key, [In] IXpsOMShareable entry); - } - - [ComImport, Guid("2C2C94CB-AC5F-4254-8EE9-23948309D9F0"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMDocument : IXpsOMPart - { - IXpsOMDocument Clone(); - - IXpsOMDocumentStructureResource GetDocumentStructureResource(); - - IXpsOMDocumentSequence GetOwner(); - - IXpsOMPageReferenceCollection GetPageReferences(); - - IXpsOMPrintTicketResource GetPrintTicketResource(); - - IXpsOMSignatureBlockResourceCollection GetSignatureBlockResources(); - - void SetDocumentStructureResource([In] IXpsOMDocumentStructureResource documentStructureResource); - - void SetPrintTicketResource([In] IXpsOMPrintTicketResource printTicketResource); - } - - [ComImport, Guid("D1C87F0D-E947-4754-8A25-971478F7E83E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMDocumentCollection - { - void Append([In] IXpsOMDocument document); - - IXpsOMDocument GetAt([In] uint index); - - uint GetCount(); - - void InsertAt([In] uint index, [In] IXpsOMDocument document); - - void RemoveAt([In] uint index); - - void SetAt([In] uint index, [In] IXpsOMDocument document); - } - - [ComImport, Guid("56492EB4-D8D5-425E-8256-4C2B64AD0264"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMDocumentSequence : IXpsOMPart - { - IXpsOMDocumentCollection GetDocuments(); - - IXpsOMPackage GetOwner(); - - IXpsOMPrintTicketResource GetPrintTicketResource(); - - void SetPrintTicketResource([In] IXpsOMPrintTicketResource printTicketResource); - } - - [ComImport, Guid("85FEBC8A-6B63-48A9-AF07-7064E4ECFF30"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMDocumentStructureResource : IXpsOMResource - { - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - new IOpcPartUri GetPartName(); - - [MethodImpl(MethodImplOptions.InternalCall)] - new void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMDocument GetOwner(); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IStream GetStream(); - - [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); - } - - [ComImport, Guid("A8C45708-47D9-4AF4-8D20-33B48C9B8485"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMFontResource : IXpsOMResource - { - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IStream GetStream(); - - [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_FONT_EMBEDDING")] [In] XPS_FONT_EMBEDDING embeddingOption, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_FONT_EMBEDDING")] - XPS_FONT_EMBEDDING GetEmbeddingOption(); - } - - [ComImport, Guid("70B4A6BB-88D4-4FA8-AAF9-6D9C596FDBAD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMFontResourceCollection - { - [MethodImpl(MethodImplOptions.InternalCall)] - uint GetCount(); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMFontResource GetAt([In] uint index); - - [MethodImpl(MethodImplOptions.InternalCall)] - void SetAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMFontResource value); - - [MethodImpl(MethodImplOptions.InternalCall)] - void InsertAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMFontResource value); - - [MethodImpl(MethodImplOptions.InternalCall)] - void Append([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMFontResource value); - - [MethodImpl(MethodImplOptions.InternalCall)] - void RemoveAt([In] uint index); - - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMFontResource GetByPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); - } - - [ComImport, Guid("64FCF3D7-4D58-44BA-AD73-A13AF6492072"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMGeometry : IXpsOMShareable - { - IXpsOMGeometry Clone(); - - IXpsOMGeometryFigureCollection GetFigures(); - - XPS_FILL_RULE GetFillRule(); - - IXpsOMMatrixTransform GetTransform(); - - IXpsOMMatrixTransform GetTransformLocal(); - - string GetTransformLookup(); - - void SetFillRule([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_FILL_RULE")] XPS_FILL_RULE fillRule); - - void SetTransformLocal([In] IXpsOMMatrixTransform transform); - - void SetTransformLookup([In] string lookup); - } - - [ComImport, Guid("D410DC83-908C-443E-8947-B1795D3C165A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMGeometryFigure - { - IXpsOMGeometryFigure Clone(); - - int GetIsClosed(); - - int GetIsFilled(); - - IXpsOMGeometry GetOwner(); - + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setisclosed + // HRESULT SetIsClosed( BOOL isClosed ); + void SetIsClosed([In, MarshalAs(UnmanagedType.Bool)] bool isClosed); + + /// Gets a value that indicates whether the figure is filled. + /// + /// The Boolean value that indicates whether the figure is filled. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The figure is filled by a brush. + /// + /// + /// FALSE + /// The figure is not filled. + /// + /// + /// + /// This value corresponds to that of the IsFilled attribute of the PathFigure element in the document markup. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getisfilled + // HRESULT GetIsFilled( BOOL *isFilled ); + [return: MarshalAs(UnmanagedType.Bool)] + bool GetIsFilled(); + + /// + /// Sets a value that indicates whether the figure is filled. + /// + /// The value to be set. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The figure is filled by a brush. + /// + /// + /// FALSE + /// The figure is not filled. + /// + /// + /// + /// In the document markup, the value returned in isFilled corresponds to that of the IsFilled attribute of the PathFigure element. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-setisfilled + // HRESULT SetIsFilled( BOOL isFilled ); + void SetIsFilled([In, MarshalAs(UnmanagedType.Bool)] bool isFilled); + + /// Gets the number of segments in the figure. + /// The number of segments in the figure. + /// For an example of how to use this method in a program, see the code example in GetSegmentData. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentcount + // HRESULT GetSegmentCount( UINT32 *segmentCount ); uint GetSegmentCount(); - void GetSegmentData([In][Out] ref uint dataCount, [In][Out] ref float segmentData); - + /// Gets the number of segment data points in the figure. + /// The number of segment data points. segmentDataCount must not be NULL when the method is called. + /// + /// To get the segment data points, call GetSegmentData. + /// For an example of how to use this method in a program, see the code example in GetSegmentData. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentdatacount + // HRESULT GetSegmentDataCount( UINT32 *segmentDataCount ); uint GetSegmentDataCount(); + /// Gets the XPS_SEGMENT_STROKE_PATTERN value that indicates whether the segments in the figure are stroked. + /// The XPS_SEGMENT_STROKE_PATTERN value that indicates whether the segments in the figure are stroked. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-getsegmentstrokepattern + // HRESULT GetSegmentStrokePattern( XPS_SEGMENT_STROKE_PATTERN *segmentStrokePattern ); XPS_SEGMENT_STROKE_PATTERN GetSegmentStrokePattern(); - void GetSegmentStrokes([In][Out] ref uint segmentCount, [In][Out] ref int segmentStrokes); - - void GetSegmentTypes([In][Out] ref uint segmentCount, [In][Out][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SEGMENT_TYPE")] ref XPS_SEGMENT_TYPE segmentTypes); - - XPS_POINT GetStartPoint(); - - void SetIsClosed([In] int isClosed); - - void SetIsFilled([In] int isFilled); - - void SetSegments([In] uint segmentCount, [In] uint segmentDataCount, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SEGMENT_TYPE")] ref XPS_SEGMENT_TYPE segmentTypes, in float segmentData, in int segmentStrokes); - - void SetStartPoint([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] ref XPS_POINT startPoint); + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + /// The owner of the copy is NULL. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigure-clone + // HRESULT Clone( IXpsOMGeometryFigure **geometryFigure ); + IXpsOMGeometryFigure Clone(); } + /// A collection of IXpsOMGeometryFigure interface pointers. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgeometryfigurecollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "24ed79ff-9160-4e9b-b322-c538b30f113b")] [ComImport, Guid("FD48C3F3-A58E-4B5A-8826-1DE54ABE72B2"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGeometryFigureCollection { - void Append([In] IXpsOMGeometryFigure geometryFigure); - - IXpsOMGeometryFigure GetAt([In] uint index); - + /// Gets the number of IXpsOMGeometryFigure interface pointers in the collection. + /// The number of IXpsOMGeometryFigure interface pointers in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-getcount + // HRESULT GetCount( UINT32 *count ); uint GetCount(); + /// Gets an IXpsOMGeometryFigure interface pointer from a specified location in the collection. + /// The zero-based index of the IXpsOMGeometryFigure interface pointer to be obtained. + /// The IXpsOMGeometryFigure interface pointer at the location specified by index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-getat + // HRESULT GetAt( UINT32 index, IXpsOMGeometryFigure **geometryFigure ); + IXpsOMGeometryFigure GetAt([In] uint index); + + /// Inserts an IXpsOMGeometryFigure interface pointer at a specified location in the collection. + /// The zero-based index in the collection where the interface pointer that is passed in geometryFigure is to be inserted. + /// The IXpsOMGeometryFigure interface pointer that is to be inserted at the location specified by index. + /// + /// At the location specified by index, this method inserts the IXpsOMGeometryFigure interface pointer that is passed in geometryFigure. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-insertat + // HRESULT InsertAt( UINT32 index, IXpsOMGeometryFigure *geometryFigure ); void InsertAt([In] uint index, [In] IXpsOMGeometryFigure geometryFigure); + /// Removes and releases an IXpsOMGeometryFigure interface pointer from a specified location in the collection. + /// The zero-based index in the collection from which an IXpsOMGeometryFigure interface pointer is to be removed and released. + /// + /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-removeat + // HRESULT RemoveAt( UINT32 index ); void RemoveAt([In] uint index); + /// Replaces an IXpsOMGeometryFigure interface pointer at a specified location in the collection. + /// The zero-based index in the collection where an IXpsOMGeometryFigure interface pointer is to be replaced. + /// The IXpsOMGeometryFigure interface pointer that will replace current contents at the location specified by index. + /// + /// At the location specified by index, this method releases the IXpsOMGeometryFigure interface referenced by the existing pointer, then writes the pointer that is passed in geometryFigure. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-setat + // HRESULT SetAt( UINT32 index, IXpsOMGeometryFigure *geometryFigure ); void SetAt([In] uint index, [In] IXpsOMGeometryFigure geometryFigure); + + /// Appends an IXpsOMGeometryFigure interface to the end of the collection. + /// A pointer to the IXpsOMGeometryFigure interface that is to be appended to the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgeometryfigurecollection-append + // HRESULT Append( IXpsOMGeometryFigure *geometryFigure ); + void Append([In] IXpsOMGeometryFigure geometryFigure); } + /// + /// Describes the text that appears on a page. + /// The IXpsOMGlyphsEditor interface is used to modify the text that is described by this interface. + /// + /// The code example that follows illustrates how to create an instance of this interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomglyphs + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "6d2cda65-c719-46f2-97c9-8aee7b5f84b9")] [ComImport, Guid("819B3199-0A5A-4B64-BEC7-A9E17E780DE2"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGlyphs : IXpsOMVisual { - IXpsOMGlyphs Clone(); + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); - uint GetBidiLevel(); + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); - string GetDeviceFontName(); + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMMatrixTransform GetTransform(); - IXpsOMBrush GetFillBrush(); + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMMatrixTransform GetTransformLocal(); - IXpsOMBrush GetFillBrushLocal(); + /// + /// Sets the local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. A NULL pointer releases the previously assigned transform. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetTransformLocal([In] IXpsOMMatrixTransform matrixTransform); - string GetFillBrushLookup(); + /// Gets the lookup key name of the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. + /// + /// The lookup key name for the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetTransformLookup(); - short GetFontFaceIndex(); + /// + /// Sets the lookup key name of a shared matrix transform in a resource dictionary. + /// + /// The lookup key name of the matrix transform in the dictionary. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the matrixTransform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform that gets retrieved—with a lookup key that matches the key that is set by SetTransformLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); - float GetFontRenderingEmSize(); + /// Gets a pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. If the clip geometry has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the geometry. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometry + // HRESULT GetClipGeometry( IXpsOMGeometry **clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMGeometry GetClipGeometry(); - IXpsOMFontResource GetFontResource(); + /// Gets a pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. If a clip geometry lookup key has been set, or if a local clip geometry has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// NULL pointer. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylocal + // HRESULT GetClipGeometryLocal( IXpsOMGeometry **clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMGeometry GetClipGeometryLocal(); + /// Sets the local, unshared clipping region for the visual. + /// A pointer to the IXpsOMGeometry interface to be set as the local, unshared clipping region for the visual. A NULL pointer releases the previously assigned geometry interface. + /// + /// After you call SetClipGeometryLocal, the clip geometry lookup key is released and GetClipGeometryLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal (this method) + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylocal + // HRESULT SetClipGeometryLocal( IXpsOMGeometry *clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetClipGeometryLocal([In] IXpsOMGeometry clipGeometry); + + /// Gets the lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. + /// + /// The lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. If a lookup key for the clip geometry has not been set, or if a local clip geometry has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Lookup key string that is returned in key + /// + /// + /// SetClipGeometryLocal + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylookup + // HRESULT GetClipGeometryLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetClipGeometryLookup(); + + /// Sets the lookup key name of a shared clip geometry in a resource dictionary. + /// The lookup key name of the clip geometry in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetClipGeometryLookup, the local clip geometry is released and GetClipGeometryLocal returns a NULL pointer in the clipGeometry parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup (this method) + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylookup + // HRESULT SetClipGeometryLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetClipGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the opacity value of this visual. + /// The opacity value. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + [MethodImpl(MethodImplOptions.InternalCall)] + new float GetOpacity(); + + /// Sets the opacity value of the visual. + /// + /// The opacity value to be set for the visual. + /// The range of allowed values for this parameter is 0.0 to 1.0; with 0.0 the visual is completely transparent, and with 1.0 it is completely opaque. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacity([In] float opacity); + + /// Gets a pointer to the IXpsOMBrush interface of the visual's opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush has not been set for this visual, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrush + // HRESULT GetOpacityMaskBrush( IXpsOMBrush **opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMBrush GetOpacityMaskBrush(); + + /// Gets the local, unshared opacity mask brush for the visual. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush lookup key has been set, or if a local opacity mask brush has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// NULL pointer. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlocal + // HRESULT GetOpacityMaskBrushLocal( IXpsOMBrush **opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMBrush GetOpacityMaskBrushLocal(); + + /// + /// Sets the IXpsOMBrush interface pointer as the local, unshared opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface to be set as the local, unshared opacity mask brush. A NULL pointer clears the previously assigned opacity mask brush. + /// + /// After you call SetOpacityMaskBrushLocal, the opacity mask brush lookup key is released and GetOpacityMaskBrushLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal (this method) + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlocal + // HRESULT SetOpacityMaskBrushLocal( IXpsOMBrush *opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacityMaskBrushLocal([In] IXpsOMBrush opacityMaskBrush); + + /// Gets the name of the lookup key of the shared opacity mask brush in a resource dictionary. + /// + /// The name of the lookup key of the shared opacity mask brush in a resource dictionary. If the lookup key of an opacity mask brush has not been set, or if a local opacity mask brush has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetOpacityMaskBrushLocal + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlookup + // HRESULT GetOpacityMaskBrushLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetOpacityMaskBrushLookup(); + + /// + /// Sets the lookup key name of a shared opacity mask brush in a resource dictionary. + /// + /// The lookup key name of the opacity mask brush in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetOpacityMaskBrushLookup, the local opacity mask brush is released and GetOpacityMaskBrushLocal returns a NULL pointer in the opacityMaskBrush parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup (this method) + /// The shared opacity mask brush that gets retrieved—with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlookup + // HRESULT SetOpacityMaskBrushLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacityMaskBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the Name property of the visual. + /// The Name property string. If the Name property has not been set, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getname + // HRESULT GetName( LPWSTR *name ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetName(); + + /// + /// Sets the Name property of the visual. + /// + /// The name of the visual. A NULL pointer clears the Name property. + /// + /// Names must be unique. + /// Clearing the Name property by passing a NULL pointer in name sets the IsHyperlinkTarget property to FALSE. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setname + // HRESULT SetName( LPCWSTR name ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); + + /// Gets a value that indicates whether the visual is the target of a hyperlink. + /// + /// The Boolean value that indicates whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getishyperlinktarget + // HRESULT GetIsHyperlinkTarget( BOOL *isHyperlink ); + [MethodImpl(MethodImplOptions.InternalCall)] + [return: MarshalAs(UnmanagedType.Bool)] + new bool GetIsHyperlinkTarget(); + + /// + /// Specifies whether the visual is the target of a hyperlink. + /// + /// The Boolean value that specifies whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + /// The visual must be named before it can be set as the target of a hyperlink. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setishyperlinktarget + // HRESULT SetIsHyperlinkTarget( BOOL isHyperlink ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetIsHyperlinkTarget([In, MarshalAs(UnmanagedType.Bool)] bool isHyperlink); + + /// Gets a pointer to the IUri interface to which this visual object links. + /// A pointer to the IUri interface that contains the destination URI for the link. If a URI has not been set for this object, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gethyperlinknavigateuri + // HRESULT GetHyperlinkNavigateUri( IUri **hyperlinkUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IUri GetHyperlinkNavigateUri(); + + /// + /// Sets the destination URI of the visual's hyperlink. + /// + /// The IUri interface that contains the destination URI of the visual's hyperlink. + /// + /// Setting an object's URI makes the object a hyperlink. When activated or clicked, the object will navigate to the destination that is specified by the URI in hyperlinkUri. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-sethyperlinknavigateuri + // HRESULT SetHyperlinkNavigateUri( IUri *hyperlinkUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetHyperlinkNavigateUri([In] IUri hyperlinkUri); + + /// Gets the Language property of the visual and of its contents. + /// The language string that specifies the language of the page. If a language has not been set, a NULL pointer is returned. + /// + /// The Language property that is set by this method specifies the language of the resource content. + /// Internet Engineering Task Force (IETF) RFC 3066 specifies the recommended encoding for the Language property. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getlanguage + // HRESULT GetLanguage( LPWSTR *language ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetLanguage(); + + /// + /// Sets the Language property of the visual. + /// + /// The language string that specifies the language of the visual and of its contents. A NULL pointer clears the Language property. + /// + /// The recommended encoding for the Language property is specified in Internet Engineering Task Force (IETF) RFC 3066r. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setlanguage + // HRESULT SetLanguage( LPCWSTR language ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); + + /// Gets the text in unescaped UTF-16 scalar values. + /// The UTF-16 Unicode string of the text to be displayed. If the string is empty, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getunicodestring + // HRESULT GetUnicodeString( LPWSTR *unicodeString ); + SafeCoTaskMemString GetUnicodeString(); + + /// Gets the number of Glyph indices. + /// The number of glyph indices. + /// GetGlyphIndices gets the glyph indices. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphindexcount + // HRESULT GetGlyphIndexCount( UINT32 *indexCount ); uint GetGlyphIndexCount(); - void GetGlyphIndices([In][Out] ref uint indexCount, [In][Out][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_GLYPH_INDEX")] ref XPS_GLYPH_INDEX glyphIndices); + /// + /// Gets an array of XPS_GLYPH_INDEX structures that describe the specific glyph indices in the font. + /// + /// The number of XPS_GLYPH_INDEX structures that will fit in the array that is referenced by glyphIndices. When the method returns, indexCount will contain the number of XPS_GLYPH_INDEX structures that are returned in the array referenced by glyphIndices. + /// The address of an array of XPS_GLYPH_INDEX structures that receive the glyph indices. + /// + /// GetGlyphIndexCount gets the number of elements in the glyph index array. + /// The glyph indices override the default cmap mapping from the UnicodeString to the glyph index. The XPS_GLYPH_INDEX structure also contains advance width as well as vertical and horizontal offset information. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphindices + // HRESULT GetGlyphIndices( UINT32 *indexCount, XPS_GLYPH_INDEX *glyphIndices ); + void GetGlyphIndices(ref uint indexCount, [In, Out] XPS_GLYPH_INDEX[] glyphIndices); + /// Gets the number of glyph mappings. + /// The number of glyph mappings. + /// GetGlyphMappings gets the glyph mappings. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphmappingcount + // HRESULT GetGlyphMappingCount( UINT32 *glyphMappingCount ); uint GetGlyphMappingCount(); - void GetGlyphMappings([In][Out] ref uint glyphMappingCount, [In][Out][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_GLYPH_MAPPING")] ref XPS_GLYPH_MAPPING glyphMappings); - - IXpsOMGlyphsEditor GetGlyphsEditor(); - - int GetIsSideways(); - - XPS_POINT GetOrigin(); + /// + /// Gets an array of XPS_GLYPH_MAPPING structures that describe how to map UTF-16 scalar values to entries in the array of XPS_GLYPH_INDEX structures, which is returned by GetGlyphIndices. + /// + /// The number of XPS_GLYPH_MAPPING structures that will fit in the array referenced by glyphMappings. When the method returns, glyphMappingCount contains the number of values returned in the array referenced by glyphMappings. + /// An array of XPS_GLYPH_MAPPING structures that contain the glyph mapping values. + /// + /// GetGlyphMappingCount gets the number of glyph mappings. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphmappings + // HRESULT GetGlyphMappings( UINT32 *glyphMappingCount, XPS_GLYPH_MAPPING *glyphMappings ); + void GetGlyphMappings(ref uint glyphMappingCount, [In, Out] XPS_GLYPH_MAPPING[] glyphMappings); + /// Gets the number of prohibited caret stops. + /// The number of prohibited caret stops. + /// + /// GetProhibitedCaretStops gets the prohibited caret stops. + /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any unspecified index is a valid caret stop location. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getprohibitedcaretstopcount + // HRESULT GetProhibitedCaretStopCount( UINT32 *prohibitedCaretStopCount ); uint GetProhibitedCaretStopCount(); - void GetProhibitedCaretStops([In][Out] ref uint prohibitedCaretStopCount, out uint prohibitedCaretStops); + /// + /// Gets an array of prohibited caret stop locations. + /// + /// The number of prohibited caret stop locations that will fit in the array referenced by prohibitedCaretStops. When the method returns, prohibitedCaretStopCount will contain the number of values returned in the array referenced by prohibitedCaretStops. + /// An array of prohibited caret stop locations; if such are not defined, a NULL pointer is returned. + /// + /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any unspecified index is a valid caret stop location. + /// GetProhibitedCaretStopCount gets the number of prohibited caret stops. + /// A caret stop is the index of the UTF-16 code point in the UnicodeString property of the glyph. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getprohibitedcaretstops + // HRESULT GetProhibitedCaretStops( UINT32 *prohibitedCaretStopCount, UINT32 *prohibitedCaretStops ); + void GetProhibitedCaretStops(ref uint prohibitedCaretStopCount, [In, Out] uint[] prohibitedCaretStops); + /// Gets the level of bidirectional text. + /// + /// The level of bidirectional text. + /// Range: 0–61 + /// + /// + /// The bidirectional text level, or BidiLevel, specifies the nesting level of the Unicode bidirectional algorithm. Even values imply the left-to-right layout and odd values the right-to-left layout, which places the run origin on the right side of the first glyph. Advance widths that are positive will move to the left, allowing subsequent glyphs to be placed to the left of the previous glyph. + /// The range of allowed values for this property is between 0 and 61, inclusive, and the default value is 0. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getbidilevel + // HRESULT GetBidiLevel( UINT32 *bidiLevel ); + uint GetBidiLevel(); + + /// Gets a Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. + /// + /// The Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// Render the glyphs sideways to produce sideways text. + /// + /// + /// FALSE + /// Do not render the glyphs sideways to produce normal text. + /// + /// + /// + /// The default value for this property is FALSE. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getissideways + // HRESULT GetIsSideways( BOOL *isSideways ); + [return: MarshalAs(UnmanagedType.Bool)] + bool GetIsSideways(); + + /// Gets the name of the device font. + /// The string that contains the unescaped name of the device font. If the name has not been set, a NULL pointer will be returned. + /// + /// The device font name uniquely identifies a specific device font and is typically defined by a hardware vendor or font vendor. + /// The escaped version of the device font name is created when the object is serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getdevicefontname + // HRESULT GetDeviceFontName( LPWSTR *deviceFontName ); + SafeCoTaskMemString GetDeviceFontName(); + + /// Gets the style simulations that will be applied when rendering the glyphs. + /// The XPS_STYLE_SIMULATION value that describes the style simulations to be applied. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getstylesimulations + // HRESULT GetStyleSimulations( XPS_STYLE_SIMULATION *styleSimulations ); XPS_STYLE_SIMULATION GetStyleSimulations(); - string GetUnicodeString(); + /// + /// Sets the style simulations that will be applied when the glyphs are rendered. + /// + /// The XPS_STYLE_SIMULATION value that specifies the style simulation to be applied. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setstylesimulations + // HRESULT SetStyleSimulations( XPS_STYLE_SIMULATION styleSimulations ); + void SetStyleSimulations([In] XPS_STYLE_SIMULATION styleSimulations); - void SetFillBrushLocal([In] IXpsOMBrush fillBrush); + /// Gets the starting position of the text. + /// The XPS_POINT structure that receives the starting position of the text. + /// In the units of the effective coordinate space, the origin specifies the x and y coordinates of the first glyph in the run. The glyph is placed such that its baseline and the leading edge of its advance vector intersect with the point defined by origin.x and origin.y. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getorigin + // HRESULT GetOrigin( XPS_POINT *origin ); + XPS_POINT GetOrigin(); - void SetFillBrushLookup([In] string key); + /// + /// Sets the starting position of the text. + /// + /// The XPS_POINT structure that contains the coordinates to be set as the text's starting position. + /// + /// In the units of the effective coordinate space, the origin specifies the x and y coordinates of the first glyph in the run. The glyph is placed such that its baseline and the leading edge of its advance vector intersect with the point defined by origin.x and origin.y. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setorigin + // HRESULT SetOrigin( const XPS_POINT *origin ); + void SetOrigin(in XPS_POINT origin); - void SetFontFaceIndex([In] short fontFaceIndex); + /// Gets the font size. + /// The font size. + /// + /// The em size that is returned in fontRenderingEmSize specifies the font size in the drawing surface units. The drawing surface units are expressed as floating-point values in the effective coordinate space. + /// In new glyph objects, the default value of fontRenderingEmSize is 10.0. + /// If the value of fontRenderingEmSize is 0.0, no text is displayed. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfontrenderingemsize + // HRESULT GetFontRenderingEmSize( FLOAT *fontRenderingEmSize ); + float GetFontRenderingEmSize(); + /// + /// Sets the font size of the text. + /// + /// The font size. + /// + /// The em size returned in fontRenderingEmSize specifies the font size in drawing surface units. Drawing surface units are expressed as floating-point values in the units of the effective coordinate space. + /// In new glyph objects, the default value of fontRenderingEmSize is 10.0. + /// If the value of fontRenderingEmSize is 0.0, no text is displayed. + /// A value of 0.0 results in no visible text being displayed. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfontrenderingemsize + // HRESULT SetFontRenderingEmSize( FLOAT fontRenderingEmSize ); void SetFontRenderingEmSize([In] float fontRenderingEmSize); + /// Gets a pointer to the IXpsOMFontResource interface of the font resource object required for this text. + /// A pointer to the IXpsOMFontResource interface of the font resource. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfontresource + // HRESULT GetFontResource( IXpsOMFontResource **fontResource ); + IXpsOMFontResource GetFontResource(); + + /// + /// Sets the pointer to the IXpsOMFontResource interface of the font resource object that is required for this text. + /// + /// The pointer to the IXpsOMFontResource interface to be used. + /// + /// fontResource must not be a NULL pointer; a glyph object must have a font resource. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfontresource + // HRESULT SetFontResource( IXpsOMFontResource *fontResource ); void SetFontResource([In] IXpsOMFontResource fontResource); - void SetOrigin([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] ref XPS_POINT origin); + /// + /// Gets the index of the font face to be used. + /// This value is only used when GetFontResource returns an IXpsOMFontResource interface that represents a TrueType font collection. + /// + /// The index value of the font face. If the font face has not been set, –1 is returned. + /// + /// The font resource is obtained by calling the GetFontResource method. + /// If a font face has not been set or is not supported by the font, a value of –1 is returned in fontFaceIndex. When the glyph is loaded from an existing XPS document file, a fontFaceIndex value of –1 indicates that the FontUri attribute did not include a #index fragment. + /// In the following markup of a FixedPage, the FontUri attribute of the Glyphs element has a value of . In this case, GetFontFaceIndex would return a value of 1 in fontFaceIndex. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfontfaceindex + // HRESULT GetFontFaceIndex( SHORT *fontFaceIndex ); + short GetFontFaceIndex(); - void SetStyleSimulations([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_STYLE_SIMULATION")] XPS_STYLE_SIMULATION styleSimulations); + /// + /// Sets the index of the font face to be used. + /// This value is only used when GetFontResource returns an IXpsOMFontResource interface that represents a TrueType font collection. + /// + /// The index value of the font face to be used. + /// + /// The default value of the font face index property is –1, which means that a font index has not been set or the font resource is not a TrueType font collection. + /// If this value is specified and is not –1, "#<Index>" is appended to the Font URI during serialization. Here, <Index> is the value that is set by SetFontFaceIndex. + /// The following markup of a FixedPage shows the result of setting the fontFaceIndex to 1. Notice that the FontUri attribute of the Glyphs element has a value of , which includes the index of the font face. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfontfaceindex + // HRESULT SetFontFaceIndex( SHORT fontFaceIndex ); + void SetFontFaceIndex([In] short fontFaceIndex); + + /// Gets a pointer to the resolved IXpsOMBrush interface of the fill brush to be used for the text. + /// + /// A pointer to the resolved IXpsOMBrush interface of the fill brush to be used for the text. If a fill brush has not been set, a NULL pointer will be returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. + /// + /// + /// Most recent method called + /// Object that is returned in fillBrush + /// + /// + /// SetFillBrushLocal + /// The local brush that is set by SetFillBrushLocal. + /// + /// + /// SetFillBrushLookup + /// The shared brush retrieved, with a lookup key that matches the key that is set by SetFillBrushLookup, from the local or resource directory. + /// + /// + /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The fill brush is used to fill the shape of the rendered glyphs. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfillbrush + // HRESULT GetFillBrush( IXpsOMBrush **fillBrush ); + IXpsOMBrush GetFillBrush(); + + /// Gets a pointer to the local, unshared IXpsOMBrush interface of the fill brush to be used for the text. + /// + /// A pointer to the local, unshared IXpsOMBrush interface of the fill brush to be used for the text. If a fill brush lookup key has been set or if a local fill brush has not been set, a NULL pointer will be returned. + /// + /// + /// Most recent method called + /// Object that is returned in fillBrush + /// + /// + /// SetFillBrushLocal + /// The local brush that is set by SetFillBrushLocal. + /// + /// + /// SetFillBrushLookup + /// NULL pointer. + /// + /// + /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfillbrushlocal + // HRESULT GetFillBrushLocal( IXpsOMBrush **fillBrush ); + IXpsOMBrush GetFillBrushLocal(); + + /// + /// Sets the IXpsOMBrush interface pointer to a local, unshared fill brush. + /// + /// The IXpsOMBrush interface pointer to be set as the local, unshared fill brush. A NULL pointer releases any previously assigned brushes. + /// + /// After you call SetFillBrushLocal, the fill brush lookup key is released and GetFillBrushLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in fillBrush by GetFillBrush + /// Object that is returned in fillBrush by GetFillBrushLocal + /// String that is returned in key by GetFillBrushLookup + /// + /// + /// SetFillBrushLocal (this method) + /// The local brush that is set by SetFillBrushLocal. + /// The local brush that is set by SetFillBrushLocal. + /// NULL pointer. + /// + /// + /// SetFillBrushLookup + /// The shared brush that gets retrieved, with a lookup key matching the key that is set by SetFillBrushLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetFillBrushLookup. + /// + /// + /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfillbrushlocal + // HRESULT SetFillBrushLocal( IXpsOMBrush *fillBrush ); + void SetFillBrushLocal([In] IXpsOMBrush fillBrush); + + /// Gets the lookup key of the IXpsOMBrush interface that is stored in a resource dictionary and will be used as the fill brush. + /// + /// The lookup key for the brush that is stored in a resource dictionary and will be used as the fill brush. If a fill brush lookup key has not been set or if a local fill brush has been set, a NULL pointer will be returned. + /// + /// + /// Most recent method called + /// String that is returned in key + /// + /// + /// SetFillBrushLocal + /// NULL pointer. + /// + /// + /// SetFillBrushLookup + /// The lookup key that is set by SetFillBrushLookup. + /// + /// + /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getfillbrushlookup + // HRESULT GetFillBrushLookup( LPWSTR *key ); + SafeCoTaskMemString GetFillBrushLookup(); + + /// + /// Sets the lookup key name of a shared fill brush. + /// + /// A string variable that contains the key name of the fill brush that is stored in the resource dictionary and will be used as the shared fill brush. A NULL pointer clears any previously assigned key string. + /// + /// After you call SetFillBrushLookup, the local fill brush is released and GetFillBrushLocal returns a NULL pointer in the fillBrush parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in fillBrush by GetFillBrush + /// Object that is returned in fillBrush by GetFillBrushLocal + /// String that is returned in key by GetFillBrushLookup + /// + /// + /// SetFillBrushLocal + /// The local brush that is set by SetFillBrushLocal. + /// The local brush that is set by SetFillBrushLocal. + /// NULL pointer. + /// + /// + /// SetFillBrushLookup (this method) + /// The shared brush that gets retrieved, with a lookup key matching the key that is set by SetFillBrushLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetFillBrushLookup. + /// + /// + /// Neither SetFillBrushLocal nor SetFillBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-setfillbrushlookup + // HRESULT SetFillBrushLookup( LPCWSTR key ); + void SetFillBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets a pointer to the IXpsOMGlyphsEditor interface that will be used to edit the glyphs in the object. + /// A pointer to the IXpsOMGlyphsEditor interface. + /// An IXpsOMGlyphsEditor interface is required to edit the read-only properties of the IXpsOMGlyphs interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-getglyphseditor + // HRESULT GetGlyphsEditor( IXpsOMGlyphsEditor **editor ); + IXpsOMGlyphsEditor GetGlyphsEditor(); + + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + /// This method does not update any of the resource pointers in the copy of the interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphs-clone + // HRESULT Clone( IXpsOMGlyphs **glyphs ); + IXpsOMGlyphs Clone(); } + /// Allows batch modification of properties that affect the text content in an IXpsOMGlyphs interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomglyphseditor + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "5bdf2892-ce6f-4560-b638-e441166fc309")] [ComImport, Guid("A5AB8616-5B16-4B9F-9629-89B323ED7909"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGlyphsEditor { + /// + /// Performs cross-property validation and then copies the changes to the parent IXpsOMGlyphs interface. + /// + /// + /// The IXpsOMGlyphsEditor interface remains valid after this method is called, allowing for additional modifications to be made. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-applyedits + // HRESULT ApplyEdits(); void ApplyEdits(); - uint GetBidiLevel(); + /// Gets the text in unescaped UTF-16 scalar values. + /// The UTF-16 Unicode string. If the string is empty, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getunicodestring + // HRESULT GetUnicodeString( LPWSTR *unicodeString ); + SafeCoTaskMemString GetUnicodeString(); - string GetDeviceFontName(); + /// Sets the text in unescaped UTF-16 scalar values. + /// The address of a UTF-16 Unicode string. A NULL pointer clears the property. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setunicodestring + // HRESULT SetUnicodeString( LPCWSTR unicodeString ); + void SetUnicodeString([In, MarshalAs(UnmanagedType.LPWStr)] string unicodeString); + /// Gets the number of glyph indices. + /// The glyph index count. + /// To get the glyph indices, call GetGlyphIndices. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphindexcount + // HRESULT GetGlyphIndexCount( UINT32 *indexCount ); uint GetGlyphIndexCount(); - void GetGlyphIndices([In][Out] ref uint indexCount, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_GLYPH_INDEX")] out XPS_GLYPH_INDEX glyphIndices); + /// + /// Gets an array of XPS_GLYPH_INDEX structures that describe the specific glyph indices in the font. + /// + /// The number of elements that will fit in the array referenced by the glyphIndices parameter. When the method returns, indexCount will contain the number of XPS_GLYPH_INDEX structures that are returned in the array referenced by glyphIndices. + /// The XPS_GLYPH_INDEX structure array that receives the glyph indices. + /// + /// The glyph indices that are returned in glyphIndices override the default cmap mapping from the UnicodeString property to the glyph index. Each XPS_GLYPH_INDEX structure also contains advance width and vertical and horizontal offset information. + /// GetGlyphIndexCount gets the number of elements in the glyph index array. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphindices + // HRESULT GetGlyphIndices( UINT32 *indexCount, XPS_GLYPH_INDEX *glyphIndices ); + void GetGlyphIndices(ref uint indexCount, [In, Out] XPS_GLYPH_INDEX[] glyphIndices); + /// + /// Sets an XPS_GLYPH_INDEX structure array that describes which glyph indices are to be used in the font. + /// + /// The number of XPS_GLYPH_INDEX structures in the array that is referenced by glyphIndices. The value of 0 clears the property. + /// An array of XPS_GLYPH_INDEX structures that contain the glyph indices. If indexCount is 0, this parameter is ignored. + /// + /// The glyph indices that are passed in glyphIndices override the default cmap mapping from the UnicodeString property to the glyph index. Each XPS_GLYPH_INDEX structure also has advance width and vertical and horizontal offset information. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setglyphindices + // HRESULT SetGlyphIndices( UINT32 indexCount, const XPS_GLYPH_INDEX *glyphIndices ); + void SetGlyphIndices([In] uint indexCount, [In] XPS_GLYPH_INDEX[] glyphIndices); + + /// Gets the number of glyph mappings. + /// The number of glyph mappings. + /// To get the glyph mappings, call GetGlyphMappings. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphmappingcount + // HRESULT GetGlyphMappingCount( UINT32 *glyphMappingCount ); uint GetGlyphMappingCount(); - void GetGlyphMappings([In][Out] ref uint glyphMappingCount, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_GLYPH_MAPPING")] out XPS_GLYPH_MAPPING glyphMappings); + /// + /// Gets an array of XPS_GLYPH_MAPPING structures that describe how to map UTF-16 scalar values to entries in the array of XPS_GLYPH_INDEX structures, which is returned by GetGlyphIndices. + /// + /// The number of XPS_GLYPH_MAPPING structures that will fit in the array referenced by glyphMappings. When the method returns, glyphMappingCount will contain the number of values in that array. + /// An array of XPS_GLYPH_MAPPING structures that receives the glyph mapping values. + /// + /// GetGlyphMappingCount gets the number of glyph mappings. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getglyphmappings + // HRESULT GetGlyphMappings( UINT32 *glyphMappingCount, XPS_GLYPH_MAPPING *glyphMappings ); + void GetGlyphMappings(ref uint glyphMappingCount, [In, Out] XPS_GLYPH_MAPPING[] glyphMappings); - int GetIsSideways(); + /// + /// Sets an array of XPS_GLYPH_MAPPING structures that describe how to map the UTF-16 scalar values in the UnicodeString property to entries in the array of XPS_GLYPH_INDEX structures. + /// + /// The number of XPS_GLYPH_MAPPING structures in the array that is referenced by glyphMappings. A value of 0 clears the property. + /// An XPS_GLYPH_MAPPING structure array that contains the glyph mapping values. If glyphMappingCount is 0, this parameter is ignored and can be set to NULL. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setglyphmappings + // HRESULT SetGlyphMappings( UINT32 glyphMappingCount, const XPS_GLYPH_MAPPING *glyphMappings ); + void SetGlyphMappings([In] uint glyphMappingCount, [In] XPS_GLYPH_MAPPING[] glyphMappings); + /// Gets the number of prohibited caret stops. + /// The number of prohibited caret stops. + /// + /// To get the prohibited caret stops, call GetProhibitedCaretStops. + /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any unspecified index is a valid caret stop location. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getprohibitedcaretstopcount + // HRESULT GetProhibitedCaretStopCount( UINT32 *prohibitedCaretStopCount ); uint GetProhibitedCaretStopCount(); - void GetProhibitedCaretStops([In][Out] ref uint count, out uint prohibitedCaretStops); + /// + /// Gets an array of prohibited caret stop locations. + /// + /// The number of prohibited caret stop values that will fit in the array that is referenced by the prohibitedCaretStops parameter. When the method returns, prohibitedCaretStopCount will contain the number of values in that array. + /// An array of glyph mapping values. If no prohibited caret stops have been defined, a NULL pointer is returned. + /// + /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any unspecified index is a valid caret stop location. + /// GetProhibitedCaretStopCount gets the number of prohibited caret stops. + /// A caret stop is the index of the UTF-16 code point in the UnicodeString property of the glyph. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getprohibitedcaretstops + // HRESULT GetProhibitedCaretStops( UINT32 *count, UINT32 *prohibitedCaretStops ); + void GetProhibitedCaretStops(ref uint count, [In, Out] uint[] prohibitedCaretStops); - string GetUnicodeString(); + /// + /// Sets an array of prohibited caret stop locations. + /// + /// The number of prohibited caret stop locations in the array that is referenced by prohibitedCaretStops. A value of 0 clears the property. + /// The array of prohibited caret stop locations to be set. If count is 0, this parameter is ignored and can be set to NULL. + /// + /// Each caret stop index corresponds to the scalar values of a UTF-16 UnicodeString property. Index 0 represents the location just before the first UTF-16 scalar value of UnicodeString; index 1 represents the location between the first and second UTF-16 scalar values, and so on. There is an additional index at the end of UnicodeString. Any unspecified index is a valid caret stop location. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setprohibitedcaretstops + // HRESULT SetProhibitedCaretStops( UINT32 count, const UINT32 *prohibitedCaretStops ); + void SetProhibitedCaretStops([In] uint count, [In] uint[] prohibitedCaretStops); + /// Gets the bidirectional text level of the parent IXpsOMGlyphs interface. + /// + /// The bidirectional text level. + /// Range: 0–61 + /// + /// + /// The BidiLevel property specifies the bidirectional nesting level of the Unicode algorithm. Even values imply the left-to-right layout and odd values the right-to-left layout. Right-to-left layout places the run origin at the right side of the first glyph. Advance widths that are positive will move to the left, allowing subsequent glyphs to be placed to the left of the previous glyph. + /// The range of allowed values for this property is between 0 and 61, inclusive, and the default value is 0. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getbidilevel + // HRESULT GetBidiLevel( UINT32 *bidiLevel ); + uint GetBidiLevel(); + + /// + /// Sets the level of bidirectional text. + /// + /// The level of bidirectional text. + /// Range: 0–61 + /// + /// The BidiLevel property specifies the bidirectional nesting level of the Unicode algorithm. Even values imply the left-to-right layout and odd values the right-to-left layout. Right-to-left layout places the run origin on the right side of the first glyph. Advance widths that are positive will move to the left, allowing subsequent glyphs to be placed to the left of the previous glyph. + /// The range of allowed values for this property is between 0 and 61, inclusive, and the default value is 0. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setbidilevel + // HRESULT SetBidiLevel( UINT32 bidiLevel ); void SetBidiLevel([In] uint bidiLevel); - void SetDeviceFontName([In] string deviceFontName); + /// Gets a Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. + /// + /// The Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// Rotate the glyphs sideways. Produces sideways text. + /// + /// + /// FALSE + /// Do not rotate the glyphs sideways. Produces normal text. + /// + /// + /// + /// The default value for this property is false. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getissideways + // HRESULT GetIsSideways( BOOL *isSideways ); + [return: MarshalAs(UnmanagedType.Bool)] + bool GetIsSideways(); - void SetGlyphIndices([In] uint indexCount, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_GLYPH_INDEX")] ref XPS_GLYPH_INDEX glyphIndices); + /// + /// Sets the value that indicates whether the text is to be rendered with the glyphs rotated sideways. + /// + /// The Boolean value that indicates whether the text is to be rendered with the glyphs rotated sideways. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// Rotate the glyphs sideways. Produces sideways text. + /// + /// + /// FALSE + /// Do not rotate the glyphs sideways. Produces normal text. + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setissideways + // HRESULT SetIsSideways( BOOL isSideways ); + void SetIsSideways([In, MarshalAs(UnmanagedType.Bool)] bool isSideways); - void SetGlyphMappings([In] uint glyphMappingCount, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_GLYPH_MAPPING")] ref XPS_GLYPH_MAPPING glyphMappings); + /// Gets the name of the device font. + /// The name of the device font; if not specified, a NULL pointer will be returned. + /// + /// The device font name is created as an escaped name when the object is serialized. + /// The device font name uniquely identifies a specific device font and is typically defined by a hardware or font vendor. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-getdevicefontname + // HRESULT GetDeviceFontName( LPWSTR *deviceFontName ); + SafeCoTaskMemString GetDeviceFontName(); - void SetIsSideways([In] int isSideways); - - void SetProhibitedCaretStops([In] uint count, in uint prohibitedCaretStops); - - void SetUnicodeString([In] string unicodeString); + /// + /// Sets the name of the device font. + /// + /// A pointer to the string that contains the name of the device font in its unescaped form. A NULL pointer clears the property. + /// + /// The device font name that is passed in deviceFontName can be set in its unescaped form; it will be converted to its escaped form when the document is serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomglyphseditor-setdevicefontname + // HRESULT SetDeviceFontName( LPCWSTR deviceFontName ); + void SetDeviceFontName([In, MarshalAs(UnmanagedType.LPWStr)] string deviceFontName); } + /// + /// This interface describes a gradient that is made up of gradient stops. Classes that inherit from IXpsOMGradientBrush specify different ways of interpreting gradient stops. + /// IXpsOMGradientBrush is the base interface for the IXpsOMLinearGradientBrush and IXpsOMRadialGradientBrush interfaces. + /// + /// + /// The methods of this interface define the basic parameters of a gradient. The gradient type, which can be linear or radial, determines how these parameters are applied. + /// As shown in the figure that follows, the start and end points of a linear gradient mark the end points of the gradient path. The gradient path is the straight line that connects the start and end points. The gradient region of a linear gradient consists of the area between the start and end points, including those points, and extends in both directions at a right angle to the gradient path. The spread area is the area outside the gradient region. + /// Gradient stops define the color at specific locations along the gradient path; the color is interpolated along the gradient path between the gradient stops, as shown in the following illustration. + /// As shown in the figure that follows, the gradient region of a radial gradient is the area enclosed by the ellipse that is described by the center point and the x and y radii that extend from the center point. The spread area is the area outside of that ellipse. The gradient path is a radial line that sweeps the entire gradient region from the gradient origin to the ellipse that bounds the gradient region. In the following illustration, the gradient path is not shown. + /// The spread method describes how the spread area is filled. Implementation of the spread method depends on the gradient type (linear or radial). The following illustration shows several examples of how the spread area can be filled. For information about different spread methods, see XPS_SPREAD_METHOD. + /// The transform determines how the resulting gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgradientbrush + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "d381b813-5368-4ffe-a9a1-0f5027ae9d80")] [ComImport, Guid("EDB59622-61A2-42C3-BACE-ACF2286C06BF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGradientBrush : IXpsOMBrush { - XPS_COLOR_INTERPOLATION GetColorInterpolationMode(); + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets the opacity of the brush. + /// + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + new float GetOpacity(); + + /// Sets the opacity of the brush. + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + new void SetOpacity([In] float opacity); + + /// Gets a pointer to an IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces that define the gradient. + /// A pointer to the IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces. + /// + /// Gradient stops, which are described in the XPS OM by an IXpsOMGradientStop interface, are used to define the color at a specific location along a gradient path; the color is interpolated between the gradient stops. The illustration that follows shows the gradient path and gradient stops of a linear gradient. + /// The illustration that follows shows the gradient stops of a radial gradient. In this example, the gradient region is the area enclosed by the outer ellipse, and the radial gradient is using the XPS_SPREAD_METHOD_REFLECT spread method to fill the space outside of the gradient region. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getgradientstops + // HRESULT GetGradientStops( IXpsOMGradientStopCollection **gradientStops ); IXpsOMGradientStopCollection GetGradientStops(); - XPS_SPREAD_METHOD GetSpreadMethod(); - + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If the transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has been most recently called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform that is retrieved, with a lookup key that matches the key set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransform(); + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the brush. If the transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has been most recently called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransformLocal(); - string GetTransformLookup(); - - void SetColorInterpolationMode([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR_INTERPOLATION")] XPS_COLOR_INTERPOLATION colorInterpolationMode); - - void SetSpreadMethod([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SPREAD_METHOD")] XPS_SPREAD_METHOD spreadMethod); - + /// + /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform that is to be used for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface of the local, unshared matrix transform that is to be used for the brush. A NULL pointer releases any previously set interface. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// The transform passed in transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); void SetTransformLocal([In] IXpsOMMatrixTransform transform); - void SetTransformLookup([In] string key); + /// + /// Gets the name of the lookup key of the shared matrix transform interface that is to be used for the brush. + /// The key name identifies a shared resource in a resource dictionary. + /// + /// + /// The name of the lookup key of the shared matrix transform interface that is to be used for the brush. If the lookup key name has not been set or if the local matrix transform has been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has been most recently called to set the lookup key or the transform. + /// + /// + /// Most recent method called + /// String that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// + /// This method does not return an IXpsOMMatrixTransform interface pointer; to retrieve this pointer from the dictionary, call IXpsOMDictionary::GetByKey. + /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the name of the lookup key of a shared matrix transform that is to be used for the brush. + /// The key name identifies a shared resource in a resource dictionary. + /// + /// The name of the lookup key of the matrix transform that is to be used for the brush. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// The transform referenced by key determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the XPS_SPREAD_METHOD value, which describes how the area outside of the gradient region will be rendered. + /// The XPS_SPREAD_METHOD value that describes how the area outside of the gradient region will be rendered. The gradient region is defined by the linear-gradient brush or radial-gradient brush that inherits this interface. + /// For more information about different types of spread methods, see XPS_SPREAD_METHOD. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getspreadmethod + // HRESULT GetSpreadMethod( XPS_SPREAD_METHOD *spreadMethod ); + XPS_SPREAD_METHOD GetSpreadMethod(); + + /// + /// Sets the XPS_SPREAD_METHOD value, which describes how the area outside of the gradient region is to be rendered. The gradient region is defined by the start and end points of the gradient. + /// + /// The XPS_SPREAD_METHOD value that describes how the area outside of the gradient region is to be rendered. The gradient region is defined by the linear-gradient brush or radial-gradient brush that inherits this interface. + /// + /// For more information about different types of spread methods, see XPS_SPREAD_METHOD. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-setspreadmethod + // HRESULT SetSpreadMethod( XPS_SPREAD_METHOD spreadMethod ); + void SetSpreadMethod([In] XPS_SPREAD_METHOD spreadMethod); + + /// Gets the gamma function to be used for color interpolation. + /// The XPS_COLOR_INTERPOLATION value that describes the gamma function to be used for color interpolation. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getcolorinterpolationmode + // HRESULT GetColorInterpolationMode( XPS_COLOR_INTERPOLATION *colorInterpolationMode ); + XPS_COLOR_INTERPOLATION GetColorInterpolationMode(); + + /// + /// Sets the XPS_COLOR_INTERPOLATION value, which describes the gamma function to be used for color interpolation. + /// + /// The XPS_COLOR_INTERPOLATION value, which describes the gamma function to be used for color interpolation. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-setcolorinterpolationmode + // HRESULT SetColorInterpolationMode( XPS_COLOR_INTERPOLATION colorInterpolationMode ); + void SetColorInterpolationMode([In] XPS_COLOR_INTERPOLATION colorInterpolationMode); } + /// Represents a single color and location within a gradient. + /// + /// A gradient stop is a specific color that is defined for a location within the gradient region. The color of the gradient changes between the gradient stops of the gradient. The area and absolute location of the gradient is defined by the gradient interface. The offset is a relative location within the gradient region and is measured between 0.0 and 1.0. An offset of 0.0 is the beginning of the gradient and 1.0 is the end. Gradient stops can be defined for any offset within the range, including the end points. This interface describes one and only one stop in a gradient. + /// The gradient path is the straight line that connects the start point and the end point of a linear gradient. The gradient region of a linear gradient consists of the area between the start point and the end point, including those points, and extends in both directions at a right angle to the gradient path. The spread area is the area outside the gradient region. + /// Gradient stops define the color at a specific location along the gradient path; the color is interpolated along the gradient path between the gradient stops. In the example that follows, the gradient region fills the image, so there is no spread area. + /// For gradient stops used in linear-gradient brushes, the offset value of 0.0 corresponds to the start point of the gradient path, and the offset value of 1.0 corresponds to the end point. To determine the location of a gradient stop between these two points, intermediate offset values are interpolated between them. The following illustration shows two intermediate gradient stops, one at an offset of 0.25 and another at 0.75. + /// For gradient stops used in radial-gradient brushes, the offset value of 0.0 corresponds to the gradient origin location, and the offset value of 1.0 corresponds to the circumference of the ellipse that bounds the gradient. Offsets between 0.0 and 1.0 define an ellipse that is interpolated between the gradient origin and the bounding ellipse. The illustration that follows has one intermediate gradient stop at an offset of 0.50 (Gradient stop 1). The gradient is using the XPS_SPREAD_METHOD_REFLECT spread method to fill the space outside of the gradient region. + /// The calculations that are used to render a gradient are described in the XML Paper Specification. + /// The code example that follows illustrates how to create an instance of this interface. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgradientstop + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "e115d806-70c1-4c6a-810e-e6a058628b44")] [ComImport, Guid("5CF4F5CC-3969-49B5-A70A-5550B618FE49"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGradientStop { - IXpsOMGradientStop Clone(); - - IXpsOMColorProfileResource GetColor([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR")] out XPS_COLOR color); - - float GetOffset(); - + /// Gets a pointer to the IXpsOMGradientBrush interface that contains the gradient stop. + /// A pointer to the IXpsOMGradientBrush interface that contains the gradient stop. If the gradient stop is not assigned to a gradient brush, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-getowner + // HRESULT GetOwner( IXpsOMGradientBrush **owner ); IXpsOMGradientBrush GetOwner(); - void SetColor([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR")] ref XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile); + /// Gets the offset value of the gradient stop. + /// The offset value of the gradient stop, expressed as a fraction of the gradient path. + /// The valid range of values returned in offset is 0.0–1.0. 0.0 is the start point of the gradient, 1.0 is the end point, and a value between 0.0 and 1.0 is a location that is linearly interpolated between the start point and the end point. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-getoffset + // HRESULT GetOffset( FLOAT *offset ); + float GetOffset(); + /// + /// Sets the offset location of the gradient stop. + /// + /// The offset value that describes the location of the gradient stop as a fraction of the gradient path. + /// The valid range of this parameter is 0.0 <= offset <= 1.0. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-setoffset + // HRESULT SetOffset( FLOAT offset ); void SetOffset([In] float offset); + + /// Gets the color value and color profile of the gradient stop. + /// The color value of the gradient stop. + /// A pointer to the IXpsOMColorProfileResource interface that contains the color profile to be used. If no color profile resource has been set, a NULL pointer is returned. See remarks. + /// A color profile is only returned when the color type of color is XPS_COLOR_TYPE_CONTEXT. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-getcolor + // HRESULT GetColor( XPS_COLOR *color, IXpsOMColorProfileResource **colorProfile ); + IXpsOMColorProfileResource GetColor( out XPS_COLOR color); + + /// + /// Sets the color value and color profile of the gradient stop. + /// + /// The color value to be set at the gradient stop. + /// If the value of the colorType field in the XPS_COLOR structure that is passed in this parameter is XPS_COLOR_TYPE_CONTEXT, a valid color profile must be provided in the colorProfile parameter. + /// The color profile to be used with color. + /// A color profile is required when the value of the colorType field in the XPS_COLOR structure that is passed in the color parameter is XPS_COLOR_TYPE_CONTEXT. If the value of the colorType field is not XPS_COLOR_TYPE_CONTEXT, this parameter must be set to NULL. + /// + /// A color profile is only required when the color type of color is XPS_COLOR_TYPE_CONTEXT. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-setcolor + // HRESULT SetColor( const XPS_COLOR *color, IXpsOMColorProfileResource *colorProfile ); + void SetColor(in XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile); + + /// Makes a deep copy of the IXpsOMGradientStop interface. + /// A pointer to the copy of the interface. + /// + /// The owner of the new interface is NULL. + /// This method does not update any of the resource pointers in the IXpsOMGradientStop interface returned in gradientStop. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstop-clone + // HRESULT Clone( IXpsOMGradientStop **gradientStop ); + IXpsOMGradientStop Clone(); } + /// A collection of IXpsOMGradientStop interface pointers. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomgradientstopcollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "1f51f818-e9bb-4d88-9795-4e6890d24b8c")] [ComImport, Guid("C9174C3A-3CD3-4319-BDA4-11A39392CEEF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMGradientStopCollection { - void Append([In] IXpsOMGradientStop stop); - - IXpsOMGradientStop GetAt([In] uint index); - + /// Gets the number of IXpsOMGradientStop interface pointers in the collection. + /// The number of IXpsOMGradientStop interface pointers in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-getcount + // HRESULT GetCount( UINT32 *count ); uint GetCount(); + /// Gets an IXpsOMGradientStop interface pointer from a specified location in the collection. + /// The zero-based index of the IXpsOMGradientStop interface pointer to be obtained. + /// The IXpsOMGradientStop interface pointer at the location specified by index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-getat + // HRESULT GetAt( UINT32 index, IXpsOMGradientStop **stop ); + IXpsOMGradientStop GetAt([In] uint index); + + /// + /// Inserts an IXpsOMGradientStop interface pointer at a specified location in the collection. + /// + /// The zero-based index in the collection where the interface pointer that is passed in stop is to be inserted. + /// The IXpsOMGradientStop interface pointer to be inserted at the location specified by index. + /// + /// At the location specified by index, this method inserts the IXpsOMGradientStop interface pointer that is passed in stop. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-insertat + // HRESULT InsertAt( UINT32 index, IXpsOMGradientStop *stop ); void InsertAt([In] uint index, [In] IXpsOMGradientStop stop); + /// + /// Removes and releases an IXpsOMGradientStop interface pointer from a specified location in the collection. + /// + /// The zero-based index in the collection from which an IXpsOMGradientStop interface pointer is to be removed and released. + /// + /// This method releases the IXpsOMGradientStop interface referenced by the pointer at the location specified by index. After releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-removeat + // HRESULT RemoveAt( UINT32 index ); void RemoveAt([In] uint index); + /// Replaces an IXpsOMGradientStop interface pointer at a specified location in the collection. + /// The zero-based index in the collection where an IXpsOMGradientStop interface pointer is to be replaced. + /// The IXpsOMGradientStop interface pointer that will replace current contents at the location specified by index. + /// + /// At the location specified by index, this method releases the IXpsOMGradientStop interface referenced by the existing pointer, then writes the pointer that is passed in stop. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-setat + // HRESULT SetAt( UINT32 index, IXpsOMGradientStop *stop ); void SetAt([In] uint index, [In] IXpsOMGradientStop stop); + + /// Appends an IXpsOMGradientStop interface to the end of the collection. + /// A pointer to the IXpsOMGradientStop interface that is to be appended to the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientstopcollection-append + // HRESULT Append( IXpsOMGradientStop *stop ); + void Append([In] IXpsOMGradientStop stop); } + /// A brush that uses a raster image as a source. + /// + /// The image used by this brush is defined in a coordinate space that is specified by the image's resolution. The image type must be JPEG, PNG, TIFF 6.0, or HD Photo. + /// The code example that follows illustrates how to create an instance of this interface. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomimagebrush + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "f5478582-466b-496e-b7f3-42fb8caa6814")] [ComImport, Guid("3DF0B466-D382-49EF-8550-DD94C80242E4"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMImageBrush : IXpsOMTileBrush { - IXpsOMImageBrush Clone(); + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); - IXpsOMColorProfileResource GetColorProfileResource(); + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + /// Gets the opacity of the brush. + /// + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + new float GetOpacity(); + + /// Sets the opacity of the brush. + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + new void SetOpacity([In] float opacity); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **transform ); + new IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. If a local matrix transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); + new IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. If a local transform has been set, a NULL pointer will release it. + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// String that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The transform that is set by SetTransformLocal. + /// The transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); + new void SetTransformLocal([In] IXpsOMMatrixTransform transform); + + /// Gets the lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush. + /// + /// The lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush. If a matrix transform lookup key has not been set or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + new SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the lookup key name of a shared matrix transform that will be used as the transform for this brush.The shared matrix transform that is referenced by the lookup key is stored in the resource dictionary. + /// + /// A string variable that contains the lookup key name of a shared matrix transform in the resource dictionary. If a lookup key has already been set, a NULL pointer will clear it. + /// + /// The transform is applied before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. The tile brush has only one transform, which can be local or remote. + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// String that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// The transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The transform which is retrieved—using a lookup key that matches the key that is set by SetTransformLookup— from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the portion of the source image to be used by the tile. + /// The XPS_RECT structure that describes the area of the source content to be used by the tile. + /// + /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. + /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The corresponding pixel coordinates in the source image are calculated as follows: + /// In the illustration that follows, the image on the left is an example of a source image, the image in the center shows the selected viewbox, and the image on the right shows the resulting brush. + /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in the viewbox parameter would be: + /// The preceding parameter values correspond to the source image as: + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewbox + // HRESULT GetViewbox( XPS_RECT *viewbox ); + new XPS_RECT GetViewbox(); + + /// + /// Sets the portion of the source content to be used as the tile image. + /// + /// An XPS_RECT structure that describes the portion of the source content to be used as the tile image. + /// + /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. + /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The corresponding pixel coordinates in the source image are calculated as follows: + /// In the illustration that follows, the image on the left is an example of a source image, while that on the right is the source image with the selected viewbox for the brush shown as a red rectangle. In this example, the part of the source image that is used as the content for the tile brush is the area within the red rectangle. The shaded area of the image is not used by the brush. + /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in the viewbox parameter would be: + /// The preceding parameter values correspond to the source image as: + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewbox + // HRESULT SetViewbox( const XPS_RECT *viewbox ); + new void SetViewbox(in XPS_RECT viewbox); + + /// Gets the portion of the destination geometry that is covered by a single tile. + /// The XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. + /// The viewport is the portion of the output area where the first tile is drawn. In the illustration, the viewport is outlined by the purple rectangle inside the red, dotted rectangle. The tile mode of the brush determines how the rest of the tiles are drawn in the output area. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewport + // HRESULT GetViewport( XPS_RECT *viewport ); + new XPS_RECT GetViewport(); + + /// + /// Sets the portion of the destination geometry that is covered by a single tile. + /// + /// An XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. + /// + /// The viewport is the portion of the output area where the tile is drawn. In the following illustration, the viewport is outlined by the blue rectangle inside the red, dotted rectangle. The tile mode of the brush determines how other tiles are drawn in the output area. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewport + // HRESULT SetViewport( const XPS_RECT *viewport ); + new void SetViewport(in XPS_RECT viewport); + + /// Gets the XPS_TILE_MODE value that describes the tile mode of the brush. + /// The XPS_TILE_MODE value that describes the tile mode of the brush. + /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. The following illustration shows examples of how the tile image appears in several tile modes. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettilemode + // HRESULT GetTileMode( XPS_TILE_MODE *tileMode ); + new XPS_TILE_MODE GetTileMode(); + + /// + /// Sets the XPS_TILE_MODE value that describes the tiling mode of the brush. + /// + /// The XPS_TILE_MODE value to be set. + /// + /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settilemode + // HRESULT SetTileMode( XPS_TILE_MODE tileMode ); + new void SetTileMode([In] XPS_TILE_MODE tileMode); + + /// Gets a pointer to the IXpsOMImageResource interface, which contains the image resource to be used as the source for the brush. + /// A pointer to the IXpsOMImageResource interface that contains the image resource to be used as the source for the brush. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-getimageresource + // HRESULT GetImageResource( IXpsOMImageResource **imageResource ); IXpsOMImageResource GetImageResource(); + /// + /// Sets a pointer to the IXpsOMImageResource interface that contains the image resource to be used as the source for the brush. + /// + /// The image resource to be used as the source for the brush. This parameter must not be a NULL pointer. + /// + /// The image resource must be of type JPEG, PNG, TIFF 6.0, or HD Photo. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-setimageresource + // HRESULT SetImageResource( IXpsOMImageResource *imageResource ); + void SetImageResource([In] IXpsOMImageResource imageResource); + + /// Gets a pointer to the IXpsOMColorProfileResource interface, which contains the color profile resource that is associated with the image. + /// A pointer to the IXpsOMColorProfileResource interface that contains the color profile resource that is associated with the image. If no color profile resource has been set, a NULL pointer is returned. + /// After loading and parsing the resource into the XPS OM, this method might return an error that applies to another resource. This occurs because all of the relationships are parsed when a resource is loaded. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-getcolorprofileresource + // HRESULT GetColorProfileResource( IXpsOMColorProfileResource **colorProfileResource ); + IXpsOMColorProfileResource GetColorProfileResource(); + + /// + /// Sets a pointer to the IXpsOMColorProfileResource interface, which contains the color profile resource that is associated with the image. + /// + /// The color profile resource that is associated with the image. A NULL pointer will release any previously set color profile resources. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-setcolorprofileresource + // HRESULT SetColorProfileResource( IXpsOMColorProfileResource *colorProfileResource ); void SetColorProfileResource([In] IXpsOMColorProfileResource colorProfileResource); - void SetImageResource([In] IXpsOMImageResource imageResource); + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + /// This method does not update any of the resource pointers in the copy. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimagebrush-clone + // HRESULT Clone( IXpsOMImageBrush **imageBrush ); + IXpsOMImageBrush Clone(); } + /// Provides an IStream interface to an image resource. + /// The code example that follows illustrates how to create an instance of this interface. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomimageresource + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "89a1530e-fa87-45bf-a1da-c8656ec09ba3")] [ComImport, Guid("3DB8417D-AE50-485E-9A44-D7758F78A23F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMImageResource : IXpsOMResource { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + + /// Gets a new, read-only copy of the stream that is associated with this resource. + /// A new, read-only copy of the stream that is associated with this resource. + /// + /// The IStream object returned by this method might return an error of E_PENDING, which indicates that the stream length has not been determined yet. This behavior is different from that of a standard IStream object. + /// This method calls the stream's Clone method to create the stream returned in stream. As a result, the performance of this method will depend on that of the stream's Clone method. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresource-getstream + // HRESULT GetStream( IStream **readerStream ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IStream GetStream(); + /// + /// Sets the read-only stream to be associated with this resource. + /// + /// The read-only stream to be associated with this resource. + /// The XPS_IMAGE_TYPE value that describes the type of image in the stream. + /// The part name to be assigned to this resource. + /// + /// The calling method should treat this stream as a single-threaded apartment (STA) model object and not re-enter any of the stream interface's methods. + /// Because GetStream gets a clone of the stream that is set by this method, the provided stream should have an efficient cloning method. A stream with an inefficient cloning method will reduce the performance of GetStream. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresource-setcontent + // HRESULT SetContent( IStream *sourceStream, XPS_IMAGE_TYPE imageType, IOpcPartUri *partName ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_IMAGE_TYPE")] [In] XPS_IMAGE_TYPE imageType, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); + void SetContent([In] IStream sourceStream, [In] XPS_IMAGE_TYPE imageType, [In] IOpcPartUri partName); + /// Gets the type of image resource. + /// The XPS_IMAGE_TYPE value that describes the image type in the stream. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresource-getimagetype + // HRESULT GetImageType( XPS_IMAGE_TYPE *imageType ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_IMAGE_TYPE")] XPS_IMAGE_TYPE GetImageType(); } + /// A collection of IXpsOMImageResource interface pointers. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomimageresourcecollection + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "aed8b23e-71fd-49e6-aae9-006a59e0111b")] [ComImport, Guid("7A4A1A71-9CDE-4B71-B33F-62DE843EABFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMImageResourceCollection { + /// Gets the number of IXpsOMImageResource interface pointers in the collection. + /// The number of IXpsOMImageResource interface pointers in the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-getcount + // HRESULT GetCount( UINT32 *count ); [MethodImpl(MethodImplOptions.InternalCall)] uint GetCount(); + /// Gets an IXpsOMImageResource interface pointer from a specified location in the collection. + /// The zero-based index of the IXpsOMImageResource interface pointer to be obtained. + /// The IXpsOMImageResource interface pointer at the location specified by index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-getat + // HRESULT GetAt( UINT32 index, IXpsOMImageResource **object ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IXpsOMImageResource GetAt([In] uint index); + /// + /// Inserts an IXpsOMImageResource interface pointer at a specified location in the collection. + /// + /// The zero-based index in the collection where the interface pointer that is passed in object is to be inserted. + /// The IXpsOMImageResource interface pointer that will be inserted at the location specified by index. + /// + /// At the location specified by index, this method inserts the IXpsOMImageResource interface pointer that is passed in object. Prior to the insertion, the pointer in this and all subsequent locations is moved up by one index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-insertat + // HRESULT InsertAt( UINT32 index, IXpsOMImageResource *object ); [MethodImpl(MethodImplOptions.InternalCall)] - void InsertAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource @object); + void InsertAt([In] uint index, [In] IXpsOMImageResource @object); + /// Removes and releases an IXpsOMImageResource interface pointer from a specified location in the collection. + /// The zero-based index in the collection from which an IXpsOMImageResource interface pointer is to be removed and released. + /// + /// This method releases the interface referenced by the pointer at the location specified by index. After releasing the interface, this method compacts the collection by reducing by 1 the index of each pointer subsequent to index. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-removeat + // HRESULT RemoveAt( UINT32 index ); [MethodImpl(MethodImplOptions.InternalCall)] void RemoveAt([In] uint index); + /// Replaces an IXpsOMImageResource interface pointer at a specified location in the collection. + /// The zero-based index in the collection where an IXpsOMImageResource interface pointer is to be replaced. + /// The IXpsOMImageResource interface pointer that will replace current contents at the location specified by index. + /// + /// At the location specified by index, this method releases the IXpsOMImageResource interface referenced by the existing pointer, then writes the pointer that is passed in object. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-setat + // HRESULT SetAt( UINT32 index, IXpsOMImageResource *object ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource @object); + void SetAt([In] uint index, [In] IXpsOMImageResource @object); + /// Appends an IXpsOMImageResource interface to the end of the collection. + /// A pointer to the IXpsOMImageResource interface that is to be appended to the collection. + /// For more information about the collection methods, see Working with XPS OM Collection Interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-append + // HRESULT Append( IXpsOMImageResource *object ); [MethodImpl(MethodImplOptions.InternalCall)] - void Append([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource @object); + void Append([In] IXpsOMImageResource @object); + /// Gets an IXpsOMImageResource interface pointer from the collection by matching the interface's part name. + /// The part name of the interface that is to be found in the collection. + /// The IXpsOMImageResource interface whose part name matches partName. If a matching interface is not found in the collection, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomimageresourcecollection-getbypartname + // HRESULT GetByPartName( IOpcPartUri *partName, IXpsOMImageResource **part ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMImageResource GetByPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); + IXpsOMImageResource GetByPartName([In] IOpcPartUri partName); } + /// Specifies a linear gradient, which is the color gradient along a vector. + /// + /// In the illustration that follows, the start and end points of a linear gradient are also the start and end points of the gradient path, which is the straight line that connects those points. + /// The gradient region of a linear gradient is the area between and including the start and end points and extending in both directions at a right angle to the gradient path. The spread area is the area of the geometry that lies outside the gradient region. + /// Gradient stops are used to define the color at specific locations along the gradient path. In the illustration, gradient stop 0 is located at the start point of the gradient path, and gradient stop 1 is at the end point. The XPS_SPREAD_METHOD_PAD spread method is used to fill the spread area. + /// The code example that follows illustrates how to create an instance of this interface. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomlineargradientbrush + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "739bf088-0f09-47c1-9b49-6c279395f15b")] [ComImport, Guid("005E279F-C30D-40FF-93EC-1950D3C528DB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMLinearGradientBrush : IXpsOMGradientBrush { - IXpsOMLinearGradientBrush Clone(); + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); - XPS_POINT GetEndPoint(); + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + /// Gets the opacity of the brush. + /// + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + new float GetOpacity(); + + /// Sets the opacity of the brush. + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + new void SetOpacity([In] float opacity); + + /// Gets a pointer to an IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces that define the gradient. + /// A pointer to the IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces. + /// + /// Gradient stops, which are described in the XPS OM by an IXpsOMGradientStop interface, are used to define the color at a specific location along a gradient path; the color is interpolated between the gradient stops. The illustration that follows shows the gradient path and gradient stops of a linear gradient. + /// The illustration that follows shows the gradient stops of a radial gradient. In this example, the gradient region is the area enclosed by the outer ellipse, and the radial gradient is using the XPS_SPREAD_METHOD_REFLECT spread method to fill the space outside of the gradient region. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getgradientstops + // HRESULT GetGradientStops( IXpsOMGradientStopCollection **gradientStops ); + new IXpsOMGradientStopCollection GetGradientStops(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If the transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has been most recently called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform that is retrieved, with a lookup key that matches the key set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **transform ); + new IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the brush. If the transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has been most recently called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); + new IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform that is to be used for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface of the local, unshared matrix transform that is to be used for the brush. A NULL pointer releases any previously set interface. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// The transform passed in transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); + new void SetTransformLocal([In] IXpsOMMatrixTransform transform); + + /// + /// Gets the name of the lookup key of the shared matrix transform interface that is to be used for the brush. + /// The key name identifies a shared resource in a resource dictionary. + /// + /// + /// The name of the lookup key of the shared matrix transform interface that is to be used for the brush. If the lookup key name has not been set or if the local matrix transform has been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has been most recently called to set the lookup key or the transform. + /// + /// + /// Most recent method called + /// String that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// + /// This method does not return an IXpsOMMatrixTransform interface pointer; to retrieve this pointer from the dictionary, call IXpsOMDictionary::GetByKey. + /// The transform determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the gradient brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + new SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the name of the lookup key of a shared matrix transform that is to be used for the brush. + /// The key name identifies a shared resource in a resource dictionary. + /// + /// The name of the lookup key of the matrix transform that is to be used for the brush. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// The transform referenced by key determines how the gradient is transformed. The visible part of the gradient that is ultimately rendered in the image is determined by the path, stroke, or glyph that is using the brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the XPS_SPREAD_METHOD value, which describes how the area outside of the gradient region will be rendered. + /// The XPS_SPREAD_METHOD value that describes how the area outside of the gradient region will be rendered. The gradient region is defined by the linear-gradient brush or radial-gradient brush that inherits this interface. + /// For more information about different types of spread methods, see XPS_SPREAD_METHOD. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getspreadmethod + // HRESULT GetSpreadMethod( XPS_SPREAD_METHOD *spreadMethod ); + new XPS_SPREAD_METHOD GetSpreadMethod(); + + /// + /// Sets the XPS_SPREAD_METHOD value, which describes how the area outside of the gradient region is to be rendered. The gradient region is defined by the start and end points of the gradient. + /// + /// The XPS_SPREAD_METHOD value that describes how the area outside of the gradient region is to be rendered. The gradient region is defined by the linear-gradient brush or radial-gradient brush that inherits this interface. + /// + /// For more information about different types of spread methods, see XPS_SPREAD_METHOD. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-setspreadmethod + // HRESULT SetSpreadMethod( XPS_SPREAD_METHOD spreadMethod ); + new void SetSpreadMethod([In] XPS_SPREAD_METHOD spreadMethod); + + /// Gets the gamma function to be used for color interpolation. + /// The XPS_COLOR_INTERPOLATION value that describes the gamma function to be used for color interpolation. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-getcolorinterpolationmode + // HRESULT GetColorInterpolationMode( XPS_COLOR_INTERPOLATION *colorInterpolationMode ); + new XPS_COLOR_INTERPOLATION GetColorInterpolationMode(); + + /// + /// Sets the XPS_COLOR_INTERPOLATION value, which describes the gamma function to be used for color interpolation. + /// + /// The XPS_COLOR_INTERPOLATION value, which describes the gamma function to be used for color interpolation. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomgradientbrush-setcolorinterpolationmode + // HRESULT SetColorInterpolationMode( XPS_COLOR_INTERPOLATION colorInterpolationMode ); + new void SetColorInterpolationMode([In] XPS_COLOR_INTERPOLATION colorInterpolationMode); + + /// Gets the start point of the gradient. + /// The x and y coordinates of the start point. + /// The coordinates are relative to the page and are expressed in the units of the transform that is in effect. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomlineargradientbrush-getstartpoint + // HRESULT GetStartPoint( XPS_POINT *startPoint ); XPS_POINT GetStartPoint(); - void SetEndPoint([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] ref XPS_POINT endPoint); + /// + /// Sets the start point of the gradient. + /// + /// The x and y coordinates of the start point. + /// + /// The coordinates are relative to the page and are expressed in the units of the transform that is in effect. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomlineargradientbrush-setstartpoint + // HRESULT SetStartPoint( const XPS_POINT *startPoint ); + void SetStartPoint(in XPS_POINT startPoint); - void SetStartPoint([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] ref XPS_POINT startPoint); + /// Gets the end point of the gradient. + /// The x and y coordinates of the end point. + /// The coordinates are relative to the page and are expressed in units of the transform that is in effect. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomlineargradientbrush-getendpoint + // HRESULT GetEndPoint( XPS_POINT *endPoint ); + XPS_POINT GetEndPoint(); + + /// + /// Sets the end point of the gradient. + /// + /// The x and y coordinates of the end point. + /// + /// The coordinates are relative to the page and are expressed in the units of the transform that is in effect. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomlineargradientbrush-setendpoint + // HRESULT SetEndPoint( const XPS_POINT *endPoint ); + void SetEndPoint(in XPS_POINT endPoint); + + /// Makes a deep copy of the interface. + /// A pointer to the copy of the interface. + /// This method does not update any of the resource pointers in the copy. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomlineargradientbrush-clone + // HRESULT Clone( IXpsOMLinearGradientBrush **linearGradientBrush ); + IXpsOMLinearGradientBrush Clone(); } [ComImport, Guid("B77330FF-BB37-4501-A93E-F1B1E50BFC46"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMMatrixTransform : IXpsOMShareable { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + IXpsOMMatrixTransform Clone(); XPS_MATRIX GetMatrix(); - void SetMatrix([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_MATRIX")] ref XPS_MATRIX matrix); + void SetMatrix(in XPS_MATRIX matrix); } [ComImport, Guid("4BDDF8EC-C915-421B-A166-D173D25653D2"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMNameCollection { - string GetAt([In] uint index); + SafeCoTaskMemString GetAt([In] uint index); uint GetCount(); } @@ -1317,7 +5457,7 @@ namespace Vanara.PInvoke [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPackage CreatePackageFromFile([MarshalAs(UnmanagedType.LPWStr)] [In] string fileName, [In] int reuseObjects); + IXpsOMPackage CreatePackageFromFile([In, MarshalAs(UnmanagedType.LPWStr)] string fileName, [In] int reuseObjects); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1325,23 +5465,23 @@ namespace Vanara.PInvoke [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMStoryFragmentsResource CreateStoryFragmentsResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMStoryFragmentsResource CreateStoryFragmentsResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMDocumentStructureResource CreateDocumentStructureResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMDocumentStructureResource CreateDocumentStructureResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMSignatureBlockResource CreateSignatureBlockResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMSignatureBlockResource CreateSignatureBlockResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMRemoteDictionaryResource CreateRemoteDictionaryResource([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMDictionary dictionary, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMRemoteDictionaryResource CreateRemoteDictionaryResource([In] IXpsOMDictionary dictionary, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMRemoteDictionaryResource CreateRemoteDictionaryResourceFromStream([MarshalAs(UnmanagedType.Interface)] [In] IStream dictionaryMarkupStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri dictionaryPartUri, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPartResources resources); + IXpsOMRemoteDictionaryResource CreateRemoteDictionaryResourceFromStream([MarshalAs(UnmanagedType.Interface)] [In] IStream dictionaryMarkupStream, [In] IOpcPartUri dictionaryPartUri, [In] IXpsOMPartResources resources); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1349,23 +5489,23 @@ namespace Vanara.PInvoke [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMDocumentSequence CreateDocumentSequence([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMDocumentSequence CreateDocumentSequence([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMDocument CreateDocument([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMDocument CreateDocument([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPageReference CreatePageReference([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SIZE")] in XPS_SIZE advisoryPageDimensions); + IXpsOMPageReference CreatePageReference( in XPS_SIZE advisoryPageDimensions); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPage CreatePage([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SIZE")] in XPS_SIZE pageDimensions, [MarshalAs(UnmanagedType.LPWStr)] [In] string language, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMPage CreatePage( in XPS_SIZE pageDimensions, [In, MarshalAs(UnmanagedType.LPWStr)] string language, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPage CreatePageFromStream([MarshalAs(UnmanagedType.Interface)] [In] IStream pageMarkupStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPartResources resources, [In] int reuseObjects); + IXpsOMPage CreatePageFromStream([MarshalAs(UnmanagedType.Interface)] [In] IStream pageMarkupStream, [In] IOpcPartUri partUri, [In] IXpsOMPartResources resources, [In] int reuseObjects); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1373,7 +5513,7 @@ namespace Vanara.PInvoke [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMGlyphs CreateGlyphs([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMFontResource fontResource); + IXpsOMGlyphs CreateGlyphs([In] IXpsOMFontResource fontResource); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1385,55 +5525,55 @@ namespace Vanara.PInvoke [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMGeometryFigure CreateGeometryFigure([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] in XPS_POINT startPoint); + IXpsOMGeometryFigure CreateGeometryFigure( in XPS_POINT startPoint); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMMatrixTransform CreateMatrixTransform([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_MATRIX")] in XPS_MATRIX matrix); + IXpsOMMatrixTransform CreateMatrixTransform( in XPS_MATRIX matrix); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMSolidColorBrush CreateSolidColorBrush([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR")] in XPS_COLOR color, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMColorProfileResource colorProfile); + IXpsOMSolidColorBrush CreateSolidColorBrush( in XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMColorProfileResource CreateColorProfileResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMColorProfileResource CreateColorProfileResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMImageBrush CreateImageBrush([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource image, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] in XPS_RECT viewbox, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] in XPS_RECT viewport); + IXpsOMImageBrush CreateImageBrush([In] IXpsOMImageResource image, in XPS_RECT viewbox, in XPS_RECT viewport); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMVisualBrush CreateVisualBrush([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] in XPS_RECT viewbox, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] in XPS_RECT viewport); + IXpsOMVisualBrush CreateVisualBrush( in XPS_RECT viewbox, in XPS_RECT viewport); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMImageResource CreateImageResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_IMAGE_TYPE")] [In] XPS_IMAGE_TYPE contentType, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMImageResource CreateImageResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] XPS_IMAGE_TYPE contentType, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPrintTicketResource CreatePrintTicketResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMPrintTicketResource CreatePrintTicketResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMFontResource CreateFontResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_FONT_EMBEDDING")] [In] XPS_FONT_EMBEDDING fontEmbedding, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri, [In] int isObfSourceStream); + IXpsOMFontResource CreateFontResource([MarshalAs(UnmanagedType.Interface)] [In] IStream acquiredStream, [In] XPS_FONT_EMBEDDING fontEmbedding, [In] IOpcPartUri partUri, [In] int isObfSourceStream); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMGradientStop CreateGradientStop([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR")] in XPS_COLOR color, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMColorProfileResource colorProfile, [In] float offset); + IXpsOMGradientStop CreateGradientStop( in XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile, [In] float offset); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMLinearGradientBrush CreateLinearGradientBrush([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMGradientStop gradStop1, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMGradientStop gradStop2, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] in XPS_POINT startPoint, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] in XPS_POINT endPoint); + IXpsOMLinearGradientBrush CreateLinearGradientBrush([In] IXpsOMGradientStop gradStop1, [In] IXpsOMGradientStop gradStop2, in XPS_POINT startPoint, in XPS_POINT endPoint); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMRadialGradientBrush CreateRadialGradientBrush([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMGradientStop gradStop1, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMGradientStop gradStop2, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] in XPS_POINT centerPoint, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] in XPS_POINT gradientOrigin, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SIZE")] in XPS_SIZE radiiSizes); + IXpsOMRadialGradientBrush CreateRadialGradientBrush([In] IXpsOMGradientStop gradStop1, [In] IXpsOMGradientStop gradStop2, in XPS_POINT centerPoint, in XPS_POINT gradientOrigin, in XPS_SIZE radiiSizes); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMCoreProperties CreateCoreProperties([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + IXpsOMCoreProperties CreateCoreProperties([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1445,19 +5585,19 @@ namespace Vanara.PInvoke [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPackageWriter CreatePackageWriterOnFile([MarshalAs(UnmanagedType.LPWStr)] [In] string fileName, [In] IntPtr securityAttributes, [In] uint flagsAndAttributes, [In] int optimizeMarkupSize, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_INTERLEAVING")] [In] XPS_INTERLEAVING interleaving, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri documentSequencePartName, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMCoreProperties coreProperties, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource packageThumbnail, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPrintTicketResource documentSequencePrintTicket, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri discardControlPartName); + IXpsOMPackageWriter CreatePackageWriterOnFile([In, MarshalAs(UnmanagedType.LPWStr)] string fileName, [In] IntPtr securityAttributes, [In] uint flagsAndAttributes, [In] int optimizeMarkupSize, [In] XPS_INTERLEAVING interleaving, [In] IOpcPartUri documentSequencePartName, [In] IXpsOMCoreProperties coreProperties, [In] IXpsOMImageResource packageThumbnail, [In] IXpsOMPrintTicketResource documentSequencePrintTicket, [In] IOpcPartUri discardControlPartName); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IXpsOMPackageWriter CreatePackageWriterOnStream([MarshalAs(UnmanagedType.Interface)] [In] ISequentialStream outputStream, [In] int optimizeMarkupSize, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_INTERLEAVING")] [In] XPS_INTERLEAVING interleaving, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri documentSequencePartName, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMCoreProperties coreProperties, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource packageThumbnail, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPrintTicketResource documentSequencePrintTicket, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri discardControlPartName); + IXpsOMPackageWriter CreatePackageWriterOnStream([MarshalAs(UnmanagedType.Interface)] [In] ISequentialStream outputStream, [In] int optimizeMarkupSize, [In] XPS_INTERLEAVING interleaving, [In] IOpcPartUri documentSequencePartName, [In] IXpsOMCoreProperties coreProperties, [In] IXpsOMImageResource packageThumbnail, [In] IXpsOMPrintTicketResource documentSequencePrintTicket, [In] IOpcPartUri discardControlPartName); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IOpcPartUri CreatePartUri([MarshalAs(UnmanagedType.LPWStr)] [In] string uri); + IOpcPartUri CreatePartUri([In, MarshalAs(UnmanagedType.LPWStr)] string uri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] - IStream CreateReadOnlyStreamOnFile([MarshalAs(UnmanagedType.LPWStr)] [In] string fileName); + IStream CreateReadOnlyStreamOnFile([In, MarshalAs(UnmanagedType.LPWStr)] string fileName); } [ComImport, Guid("18C3DF65-81E1-4674-91DC-FC452F5A416F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -1479,7 +5619,7 @@ namespace Vanara.PInvoke void SetThumbnailResource([In] IXpsOMImageResource imageResource); - void WriteToFile([In] string fileName, [In] SECURITY_ATTRIBUTES securityAttributes, [In] uint flagsAndAttributes, [In] int optimizeMarkupSize); + void WriteToFile([In, MarshalAs(UnmanagedType.LPWStr)] string fileName, [In] SECURITY_ATTRIBUTES securityAttributes, [In] uint flagsAndAttributes, [In] int optimizeMarkupSize); void WriteToStream([In] ISequentialStream stream, [In] int optimizeMarkupSize); } @@ -1489,13 +5629,13 @@ namespace Vanara.PInvoke public interface IXpsOMPackageWriter { [MethodImpl(MethodImplOptions.InternalCall)] - void StartNewDocument([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri documentPartName, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPrintTicketResource documentPrintTicket, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMDocumentStructureResource documentStructure, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMSignatureBlockResourceCollection signatureBlockResources, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPartUriCollection restrictedFonts); + void StartNewDocument([In] IOpcPartUri documentPartName, [In] IXpsOMPrintTicketResource documentPrintTicket, [In] IXpsOMDocumentStructureResource documentStructure, [In] IXpsOMSignatureBlockResourceCollection signatureBlockResources, [In] IXpsOMPartUriCollection restrictedFonts); [MethodImpl(MethodImplOptions.InternalCall)] - void AddPage([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPage page, [ComAliasName("MSXPS.XPS_SIZE")] in XPS_SIZE advisoryPageDimensions, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPartUriCollection discardableResourceParts, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMStoryFragmentsResource storyFragments, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPrintTicketResource pagePrintTicket, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource pageThumbnail); + void AddPage([In] IXpsOMPage page, [ComAliasName("MSXPS.XPS_SIZE")] in XPS_SIZE advisoryPageDimensions, [In] IXpsOMPartUriCollection discardableResourceParts, [In] IXpsOMStoryFragmentsResource storyFragments, [In] IXpsOMPrintTicketResource pagePrintTicket, [In] IXpsOMImageResource pageThumbnail); [MethodImpl(MethodImplOptions.InternalCall)] - void AddResource([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMResource resource); + void AddResource([In] IXpsOMResource resource); [MethodImpl(MethodImplOptions.InternalCall)] void Close(); @@ -1507,12 +5647,29 @@ namespace Vanara.PInvoke [ComImport, Guid("D3E18888-F120-4FEE-8C68-35296EAE91D4"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMPage : IXpsOMPart { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] new IOpcPartUri GetPartName(); + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - new void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + new void SetPartName([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1527,35 +5684,35 @@ namespace Vanara.PInvoke XPS_SIZE GetPageDimensions(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetPageDimensions([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SIZE")] in XPS_SIZE pageDimensions); + void SetPageDimensions( in XPS_SIZE pageDimensions); [MethodImpl(MethodImplOptions.InternalCall)] [return: ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] XPS_RECT GetContentBox(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetContentBox([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] in XPS_RECT contentBox); + void SetContentBox( in XPS_RECT contentBox); [MethodImpl(MethodImplOptions.InternalCall)] [return: ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] XPS_RECT GetBleedBox(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetBleedBox([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] in XPS_RECT bleedBox); + void SetBleedBox( in XPS_RECT bleedBox); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] - string GetLanguage(); + SafeCoTaskMemString GetLanguage(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetLanguage([MarshalAs(UnmanagedType.LPWStr)] [In] string language); + void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] - string GetName(); + SafeCoTaskMemString GetName(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetName([MarshalAs(UnmanagedType.LPWStr)] [In] string name); + void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); [MethodImpl(MethodImplOptions.InternalCall)] int GetIsHyperlinkTarget(); @@ -1572,21 +5729,21 @@ namespace Vanara.PInvoke IXpsOMDictionary GetDictionaryLocal(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetDictionaryLocal([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMDictionary resourceDictionary); + void SetDictionaryLocal([In] IXpsOMDictionary resourceDictionary); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] IXpsOMRemoteDictionaryResource GetDictionaryResource(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetDictionaryResource([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMRemoteDictionaryResource remoteDictionaryResource); + void SetDictionaryResource([In] IXpsOMRemoteDictionaryResource remoteDictionaryResource); [MethodImpl(MethodImplOptions.InternalCall)] void Write([MarshalAs(UnmanagedType.Interface)] [In] ISequentialStream stream, [In] int optimizeMarkupSize); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.LPWStr)] - string GenerateUnusedLookupKey([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_OBJECT_TYPE")] [In] XPS_OBJECT_TYPE type); + SafeCoTaskMemString GenerateUnusedLookupKey( [In] XPS_OBJECT_TYPE type); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1620,7 +5777,7 @@ namespace Vanara.PInvoke int IsPageLoaded(); - void SetAdvisoryPageDimensions([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SIZE")] ref XPS_SIZE pageDimensions); + void SetAdvisoryPageDimensions(in XPS_SIZE pageDimensions); void SetPage([In] IXpsOMPage page); @@ -1647,15 +5804,34 @@ namespace Vanara.PInvoke void SetAt([In] uint index, [In] IXpsOMPageReference pageReference); } + /// The base interface for all XPS document part interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsompart + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "71cd0155-6c95-42ca-bfc3-dffd43d95dc9")] [ComImport, Guid("74EB2F0B-A91E-4486-AFAC-0FABECA3DFC6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMPart { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IOpcPartUri GetPartName(); + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + void SetPartName([In] IOpcPartUri partUri); } [ComImport, Guid("F4CF7729-4864-4275-99B3-A8717163ECAF"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -1697,23 +5873,635 @@ namespace Vanara.PInvoke [ComImport, Guid("37D38BB6-3EE9-4110-9312-14B194163337"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMPath : IXpsOMVisual { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. A NULL pointer releases the previously assigned transform. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetTransformLocal([In] IXpsOMMatrixTransform matrixTransform); + + /// Gets the lookup key name of the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. + /// + /// The lookup key name for the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the lookup key name of a shared matrix transform in a resource dictionary. + /// + /// The lookup key name of the matrix transform in the dictionary. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the matrixTransform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform that gets retrieved—with a lookup key that matches the key that is set by SetTransformLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets a pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. If the clip geometry has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the geometry. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometry + // HRESULT GetClipGeometry( IXpsOMGeometry **clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMGeometry GetClipGeometry(); + + /// Gets a pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. If a clip geometry lookup key has been set, or if a local clip geometry has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// NULL pointer. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylocal + // HRESULT GetClipGeometryLocal( IXpsOMGeometry **clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMGeometry GetClipGeometryLocal(); + + /// Sets the local, unshared clipping region for the visual. + /// A pointer to the IXpsOMGeometry interface to be set as the local, unshared clipping region for the visual. A NULL pointer releases the previously assigned geometry interface. + /// + /// After you call SetClipGeometryLocal, the clip geometry lookup key is released and GetClipGeometryLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal (this method) + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylocal + // HRESULT SetClipGeometryLocal( IXpsOMGeometry *clipGeometry ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetClipGeometryLocal([In] IXpsOMGeometry clipGeometry); + + /// Gets the lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. + /// + /// The lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. If a lookup key for the clip geometry has not been set, or if a local clip geometry has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Lookup key string that is returned in key + /// + /// + /// SetClipGeometryLocal + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylookup + // HRESULT GetClipGeometryLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetClipGeometryLookup(); + + /// Sets the lookup key name of a shared clip geometry in a resource dictionary. + /// The lookup key name of the clip geometry in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetClipGeometryLookup, the local clip geometry is released and GetClipGeometryLocal returns a NULL pointer in the clipGeometry parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup (this method) + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylookup + // HRESULT SetClipGeometryLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetClipGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the opacity value of this visual. + /// The opacity value. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + [MethodImpl(MethodImplOptions.InternalCall)] + new float GetOpacity(); + + /// Sets the opacity value of the visual. + /// + /// The opacity value to be set for the visual. + /// The range of allowed values for this parameter is 0.0 to 1.0; with 0.0 the visual is completely transparent, and with 1.0 it is completely opaque. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacity([In] float opacity); + + /// Gets a pointer to the IXpsOMBrush interface of the visual's opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush has not been set for this visual, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrush + // HRESULT GetOpacityMaskBrush( IXpsOMBrush **opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMBrush GetOpacityMaskBrush(); + + /// Gets the local, unshared opacity mask brush for the visual. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush lookup key has been set, or if a local opacity mask brush has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// NULL pointer. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlocal + // HRESULT GetOpacityMaskBrushLocal( IXpsOMBrush **opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IXpsOMBrush GetOpacityMaskBrushLocal(); + + /// + /// Sets the IXpsOMBrush interface pointer as the local, unshared opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface to be set as the local, unshared opacity mask brush. A NULL pointer clears the previously assigned opacity mask brush. + /// + /// After you call SetOpacityMaskBrushLocal, the opacity mask brush lookup key is released and GetOpacityMaskBrushLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal (this method) + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlocal + // HRESULT SetOpacityMaskBrushLocal( IXpsOMBrush *opacityMaskBrush ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacityMaskBrushLocal([In] IXpsOMBrush opacityMaskBrush); + + /// Gets the name of the lookup key of the shared opacity mask brush in a resource dictionary. + /// + /// The name of the lookup key of the shared opacity mask brush in a resource dictionary. If the lookup key of an opacity mask brush has not been set, or if a local opacity mask brush has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetOpacityMaskBrushLocal + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlookup + // HRESULT GetOpacityMaskBrushLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetOpacityMaskBrushLookup(); + + /// + /// Sets the lookup key name of a shared opacity mask brush in a resource dictionary. + /// + /// The lookup key name of the opacity mask brush in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetOpacityMaskBrushLookup, the local opacity mask brush is released and GetOpacityMaskBrushLocal returns a NULL pointer in the opacityMaskBrush parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup (this method) + /// The shared opacity mask brush that gets retrieved—with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlookup + // HRESULT SetOpacityMaskBrushLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetOpacityMaskBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the Name property of the visual. + /// The Name property string. If the Name property has not been set, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getname + // HRESULT GetName( LPWSTR *name ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetName(); + + /// + /// Sets the Name property of the visual. + /// + /// The name of the visual. A NULL pointer clears the Name property. + /// + /// Names must be unique. + /// Clearing the Name property by passing a NULL pointer in name sets the IsHyperlinkTarget property to FALSE. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setname + // HRESULT SetName( LPCWSTR name ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); + + /// Gets a value that indicates whether the visual is the target of a hyperlink. + /// + /// The Boolean value that indicates whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getishyperlinktarget + // HRESULT GetIsHyperlinkTarget( BOOL *isHyperlink ); + [MethodImpl(MethodImplOptions.InternalCall)] + [return: MarshalAs(UnmanagedType.Bool)] + new bool GetIsHyperlinkTarget(); + + /// + /// Specifies whether the visual is the target of a hyperlink. + /// + /// The Boolean value that specifies whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + /// The visual must be named before it can be set as the target of a hyperlink. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setishyperlinktarget + // HRESULT SetIsHyperlinkTarget( BOOL isHyperlink ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetIsHyperlinkTarget([In, MarshalAs(UnmanagedType.Bool)] bool isHyperlink); + + /// Gets a pointer to the IUri interface to which this visual object links. + /// A pointer to the IUri interface that contains the destination URI for the link. If a URI has not been set for this object, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gethyperlinknavigateuri + // HRESULT GetHyperlinkNavigateUri( IUri **hyperlinkUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IUri GetHyperlinkNavigateUri(); + + /// + /// Sets the destination URI of the visual's hyperlink. + /// + /// The IUri interface that contains the destination URI of the visual's hyperlink. + /// + /// Setting an object's URI makes the object a hyperlink. When activated or clicked, the object will navigate to the destination that is specified by the URI in hyperlinkUri. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-sethyperlinknavigateuri + // HRESULT SetHyperlinkNavigateUri( IUri *hyperlinkUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetHyperlinkNavigateUri([In] IUri hyperlinkUri); + + /// Gets the Language property of the visual and of its contents. + /// The language string that specifies the language of the page. If a language has not been set, a NULL pointer is returned. + /// + /// The Language property that is set by this method specifies the language of the resource content. + /// Internet Engineering Task Force (IETF) RFC 3066 specifies the recommended encoding for the Language property. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getlanguage + // HRESULT GetLanguage( LPWSTR *language ); + [MethodImpl(MethodImplOptions.InternalCall)] + new SafeCoTaskMemString GetLanguage(); + + /// + /// Sets the Language property of the visual. + /// + /// The language string that specifies the language of the visual and of its contents. A NULL pointer clears the Language property. + /// + /// The recommended encoding for the Language property is specified in Internet Engineering Task Force (IETF) RFC 3066r. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setlanguage + // HRESULT SetLanguage( LPCWSTR language ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); + IXpsOMPath Clone(); - string GetAccessibilityLongDescription(); + SafeCoTaskMemString GetAccessibilityLongDescription(); - string GetAccessibilityShortDescription(); + SafeCoTaskMemString GetAccessibilityShortDescription(); IXpsOMBrush GetFillBrush(); IXpsOMBrush GetFillBrushLocal(); - string GetFillBrushLookup(); + SafeCoTaskMemString GetFillBrushLookup(); IXpsOMGeometry GetGeometry(); IXpsOMGeometry GetGeometryLocal(); - string GetGeometryLookup(); + SafeCoTaskMemString GetGeometryLookup(); int GetSnapsToPixels(); @@ -1721,7 +6509,7 @@ namespace Vanara.PInvoke IXpsOMBrush GetStrokeBrushLocal(); - string GetStrokeBrushLookup(); + SafeCoTaskMemString GetStrokeBrushLookup(); XPS_DASH_CAP GetStrokeDashCap(); @@ -1739,35 +6527,35 @@ namespace Vanara.PInvoke float GetStrokeThickness(); - void SetAccessibilityLongDescription([In] string longDescription); + void SetAccessibilityLongDescription([In, MarshalAs(UnmanagedType.LPWStr)] string longDescription); - void SetAccessibilityShortDescription([In] string shortDescription); + void SetAccessibilityShortDescription([In, MarshalAs(UnmanagedType.LPWStr)] string shortDescription); void SetFillBrushLocal([In] IXpsOMBrush brush); - void SetFillBrushLookup([In] string lookup); + void SetFillBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string lookup); void SetGeometryLocal([In] IXpsOMGeometry geometry); - void SetGeometryLookup([In] string lookup); + void SetGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string lookup); void SetSnapsToPixels([In] int snapsToPixels); void SetStrokeBrushLocal([In] IXpsOMBrush brush); - void SetStrokeBrushLookup([In] string lookup); + void SetStrokeBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string lookup); - void SetStrokeDashCap([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_DASH_CAP")] XPS_DASH_CAP strokeDashCap); + void SetStrokeDashCap([In] XPS_DASH_CAP strokeDashCap); void SetStrokeDashOffset([In] float strokeDashOffset); - void SetStrokeEndLineCap([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_LINE_CAP")] XPS_LINE_CAP strokeEndLineCap); + void SetStrokeEndLineCap([In] XPS_LINE_CAP strokeEndLineCap); - void SetStrokeLineJoin([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_LINE_JOIN")] XPS_LINE_JOIN strokeLineJoin); + void SetStrokeLineJoin([In] XPS_LINE_JOIN strokeLineJoin); void SetStrokeMiterLimit([In] float strokeMiterLimit); - void SetStrokeStartLineCap([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_LINE_CAP")] XPS_LINE_CAP strokeStartLineCap); + void SetStrokeStartLineCap([In] XPS_LINE_CAP strokeStartLineCap); void SetStrokeThickness([In] float strokeThickness); } @@ -1775,19 +6563,35 @@ namespace Vanara.PInvoke [ComImport, Guid("E7FF32D2-34AA-499B-BBE9-9CD4EE6C59F7"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMPrintTicketResource : IXpsOMResource { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] new IOpcPartUri GetPartName(); + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - new void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + new void SetPartName([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] IStream GetStream(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); + void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [In] IOpcPartUri partName); } [ComImport, Guid("75F207E5-08BF-413C-96B1-B82B4064176B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -1801,16 +6605,39 @@ namespace Vanara.PInvoke XPS_SIZE GetRadiiSizes(); - void SetCenter([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] ref XPS_POINT center); + void SetCenter(in XPS_POINT center); - void SetGradientOrigin([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_POINT")] ref XPS_POINT origin); + void SetGradientOrigin(in XPS_POINT origin); - void SetRadiiSizes([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_SIZE")] ref XPS_SIZE radiiSizes); + void SetRadiiSizes(in XPS_SIZE radiiSizes); } [ComImport, Guid("C9BD7CD4-E16A-4BF8-8C84-C950AF7A3061"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMRemoteDictionaryResource : IXpsOMResource { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); + IXpsOMDictionary GetDictionary(); void SetDictionary([In] IXpsOMDictionary dictionary); @@ -1834,28 +6661,81 @@ namespace Vanara.PInvoke void SetAt([In] uint index, [In] IXpsOMRemoteDictionaryResource @object); } + /// Used as the base interface for the resource interfaces of the XPS object model. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomresource + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "ed3d6ea0-efe5-4917-85fa-bd9ad1978b4e")] [ComImport, Guid("DA2AC0A2-73A2-4975-AD14-74097C3FF3A5"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMResource : IXpsOMPart { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new IOpcPartUri GetPartName(); + + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); + [MethodImpl(MethodImplOptions.InternalCall)] + new void SetPartName([In] IOpcPartUri partUri); } + /// The base interface for sharable interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomshareable + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "2071292f-b898-4ec8-99f7-294c8d820965")] [ComImport, Guid("7137398F-2FC1-454D-8C6A-2C3115A16ECE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMShareable { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] object GetOwner(); + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); XPS_OBJECT_TYPE GetType(); } [ComImport, Guid("4776AD35-2E04-4357-8743-EBF6C171A905"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMSignatureBlockResource : IXpsOMResource { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] new IOpcPartUri GetPartName(); + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - new void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + new void SetPartName([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1866,7 +6746,7 @@ namespace Vanara.PInvoke IStream GetStream(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); + void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [In] IOpcPartUri partName); } [ComImport, Guid("AB8F5D8E-351B-4D33-AAED-FA56F0022931"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -1890,22 +6770,70 @@ namespace Vanara.PInvoke [ComImport, Guid("A06F9F05-3BE9-4763-98A8-094FC672E488"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMSolidColorBrush : IXpsOMBrush { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets the opacity of the brush. + /// + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + new float GetOpacity(); + + /// Sets the opacity of the brush. + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + new void SetOpacity([In] float opacity); + IXpsOMSolidColorBrush Clone(); - IXpsOMColorProfileResource GetColor([ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR")] out XPS_COLOR color); + IXpsOMColorProfileResource GetColor( out XPS_COLOR color); - void SetColor([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_COLOR")] ref XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile); + void SetColor(in XPS_COLOR color, [In] IXpsOMColorProfileResource colorProfile); } [ComImport, Guid("C2B3CA09-0473-4282-87AE-1780863223F0"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMStoryFragmentsResource : IXpsOMResource { + /// Gets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the part name. If the part name has not been set (by the SetPartName + /// method), a NULL pointer is returned. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-getpartname HRESULT + // GetPartName( IOpcPartUri **partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] new IOpcPartUri GetPartName(); + /// Sets the name that will be used when the part is serialized. + /// + /// A pointer to the IOpcPartUri interface that contains the name of this part. This parameter cannot be NULL. + /// + /// + /// IXpsOMPackageWriter will generate an error if it encounters an XPS document part whose name is the same as that of a part it + /// has previously serialized. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsompart-setpartname HRESULT + // SetPartName( IOpcPartUri *partUri ); [MethodImpl(MethodImplOptions.InternalCall)] - new void SetPartName([MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partUri); + new void SetPartName([In] IOpcPartUri partUri); [MethodImpl(MethodImplOptions.InternalCall)] [return: MarshalAs(UnmanagedType.Interface)] @@ -1916,154 +6844,1177 @@ namespace Vanara.PInvoke IStream GetStream(); [MethodImpl(MethodImplOptions.InternalCall)] - void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri partName); + void SetContent([MarshalAs(UnmanagedType.Interface)] [In] IStream sourceStream, [In] IOpcPartUri partName); } - [ComImport, Guid("15B873D5-1971-41E8-83A3-6578403064C7"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [ComImport, Guid("15B873D5-1971-41E8-83A3-6578403064C7"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), CoClass(typeof(XpsOMThumbnailGenerator))] public interface IXpsOMThumbnailGenerator { - IXpsOMImageResource GenerateThumbnail([In] IXpsOMPage page, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_IMAGE_TYPE")] XPS_IMAGE_TYPE thumbnailType, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_THUMBNAIL_SIZE")] XPS_THUMBNAIL_SIZE thumbnailSize, [In] IOpcPartUri imageResourcePartName); + IXpsOMImageResource GenerateThumbnail([In] IXpsOMPage page, [In] XPS_IMAGE_TYPE thumbnailType, [In] XPS_THUMBNAIL_SIZE thumbnailSize, [In] IOpcPartUri imageResourcePartName); } + /// + /// A tile brush uses a visual image to paint a region by repeating the image. + /// This is the base interface of IXpsOMImageBrush and IXpsOMVisualBrush. + /// + /// + /// As shown in the illustration that follows, the tile brush takes a visual element, or a part of it, transforms the visual element to create a tile, places the tile in the viewport of the output area, and fills the output area as specified by the tile mode. + /// In the preceding illustration, the viewport is the area covered by the first tile in the output area. The viewport image is repeated throughout the output area as specified by the tile mode. The transform property determines how the output area is transformed after the viewport has been tiled in the output area. The part of the output area that is ultimately rendered as a visible image is determined by the path, stroke, or glyph that is using the tile brush. + /// A viewbox describes the portion of the source image that is used for the brush. The viewbox in the preceding illustration has the same size as the source image, so all of the source image is used for the brush. A viewbox can also be smaller than the original image. + /// In the illustration that follows, the brush is created by using a viewbox that includes only a portion of the original image or visual. + /// The next illustration shows the tile modes that are used to repeat the tile image to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomtilebrush + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "fc9e1925-0dbc-447b-9acc-e7f719df62d1")] [ComImport, Guid("0FC2328D-D722-4A54-B2EC-BE90218A789E"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMTileBrush : IXpsOMBrush { - XPS_TILE_MODE GetTileMode(); - - IXpsOMMatrixTransform GetTransform(); - - IXpsOMMatrixTransform GetTransformLocal(); - - string GetTransformLookup(); - - XPS_RECT GetViewbox(); - - XPS_RECT GetViewport(); - - void SetTileMode([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_TILE_MODE")] XPS_TILE_MODE tileMode); - - void SetTransformLocal([In] IXpsOMMatrixTransform transform); - - void SetTransformLookup([In] string key); - - void SetViewbox([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] ref XPS_RECT viewbox); - - void SetViewport([In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_RECT")] ref XPS_RECT viewport); - } - - [ComImport, Guid("BC3E7333-FB0B-4AF3-A819-0B4EAAD0D2FD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - public interface IXpsOMVisual : IXpsOMShareable - { - [MethodImpl(MethodImplOptions.InternalCall)] + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); [return: MarshalAs(UnmanagedType.IUnknown)] new object GetOwner(); - [MethodImpl(MethodImplOptions.InternalCall)] - [return: ComAliasName("MSXPS.XPS_OBJECT_TYPE")] + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); new XPS_OBJECT_TYPE GetType(); - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] + /// Gets the opacity of the brush. + /// + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + new float GetOpacity(); + + /// Sets the opacity of the brush. + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + new void SetOpacity([In] float opacity); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransform(); - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. If a local matrix transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); IXpsOMMatrixTransform GetTransformLocal(); - [MethodImpl(MethodImplOptions.InternalCall)] - void SetTransformLocal([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMMatrixTransform matrixTransform); + /// + /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. If a local transform has been set, a NULL pointer will release it. + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// String that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The transform that is set by SetTransformLocal. + /// The transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); + void SetTransformLocal([In] IXpsOMMatrixTransform transform); - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.LPWStr)] - string GetTransformLookup(); + /// Gets the lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush. + /// + /// The lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush. If a matrix transform lookup key has not been set or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + SafeCoTaskMemString GetTransformLookup(); - [MethodImpl(MethodImplOptions.InternalCall)] - void SetTransformLookup([MarshalAs(UnmanagedType.LPWStr)] [In] string key); + /// + /// Sets the lookup key name of a shared matrix transform that will be used as the transform for this brush.The shared matrix transform that is referenced by the lookup key is stored in the resource dictionary. + /// + /// A string variable that contains the lookup key name of a shared matrix transform in the resource dictionary. If a lookup key has already been set, a NULL pointer will clear it. + /// + /// The transform is applied before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. The tile brush has only one transform, which can be local or remote. + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// String that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// The transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The transform which is retrieved—using a lookup key that matches the key that is set by SetTransformLookup— from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + /// Gets the portion of the source image to be used by the tile. + /// The XPS_RECT structure that describes the area of the source content to be used by the tile. + /// + /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. + /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The corresponding pixel coordinates in the source image are calculated as follows: + /// In the illustration that follows, the image on the left is an example of a source image, the image in the center shows the selected viewbox, and the image on the right shows the resulting brush. + /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in the viewbox parameter would be: + /// The preceding parameter values correspond to the source image as: + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewbox + // HRESULT GetViewbox( XPS_RECT *viewbox ); + XPS_RECT GetViewbox(); + + /// + /// Sets the portion of the source content to be used as the tile image. + /// + /// An XPS_RECT structure that describes the portion of the source content to be used as the tile image. + /// + /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. + /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The corresponding pixel coordinates in the source image are calculated as follows: + /// In the illustration that follows, the image on the left is an example of a source image, while that on the right is the source image with the selected viewbox for the brush shown as a red rectangle. In this example, the part of the source image that is used as the content for the tile brush is the area within the red rectangle. The shaded area of the image is not used by the brush. + /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in the viewbox parameter would be: + /// The preceding parameter values correspond to the source image as: + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewbox + // HRESULT SetViewbox( const XPS_RECT *viewbox ); + void SetViewbox(in XPS_RECT viewbox); + + /// Gets the portion of the destination geometry that is covered by a single tile. + /// The XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. + /// The viewport is the portion of the output area where the first tile is drawn. In the illustration, the viewport is outlined by the purple rectangle inside the red, dotted rectangle. The tile mode of the brush determines how the rest of the tiles are drawn in the output area. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewport + // HRESULT GetViewport( XPS_RECT *viewport ); + XPS_RECT GetViewport(); + + /// + /// Sets the portion of the destination geometry that is covered by a single tile. + /// + /// An XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. + /// + /// The viewport is the portion of the output area where the tile is drawn. In the following illustration, the viewport is outlined by the blue rectangle inside the red, dotted rectangle. The tile mode of the brush determines how other tiles are drawn in the output area. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewport + // HRESULT SetViewport( const XPS_RECT *viewport ); + void SetViewport(in XPS_RECT viewport); + + /// Gets the XPS_TILE_MODE value that describes the tile mode of the brush. + /// The XPS_TILE_MODE value that describes the tile mode of the brush. + /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. The following illustration shows examples of how the tile image appears in several tile modes. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettilemode + // HRESULT GetTileMode( XPS_TILE_MODE *tileMode ); + XPS_TILE_MODE GetTileMode(); + + /// + /// Sets the XPS_TILE_MODE value that describes the tiling mode of the brush. + /// + /// The XPS_TILE_MODE value to be set. + /// + /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settilemode + // HRESULT SetTileMode( XPS_TILE_MODE tileMode ); + void SetTileMode([In] XPS_TILE_MODE tileMode); + } + + /// The base interface for path, canvas, and glyph interfaces. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nn-xpsobjectmodel-ixpsomvisual + [PInvokeData("xpsobjectmodel.h", MSDNShortId = "f2ec412c-aece-4b20-a721-e6c17615e56b")] + [ComImport, Guid("BC3E7333-FB0B-4AF3-A819-0B4EAAD0D2FD"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + public interface IXpsOMVisual : IXpsOMShareable + { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the visual's resolved matrix transform. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared, resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in matrixTransform + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. A NULL pointer releases the previously assigned transform. + /// + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The local transform that is set by SetTransformLocal. + /// The local transform set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The shared transform that gets retrieved, with a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *matrixTransform ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetTransformLocal([In] IXpsOMMatrixTransform matrixTransform); + + /// Gets the lookup key name of the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. + /// + /// The lookup key name for the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the visual. If a matrix transform lookup key has not been set, or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + [MethodImpl(MethodImplOptions.InternalCall)] + SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the lookup key name of a shared matrix transform in a resource dictionary. + /// + /// The lookup key name of the matrix transform in the dictionary. + /// + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the matrixTransform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in matrixTransform by GetTransformLocal + /// Object that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The local transform that is set by SetTransformLocal. + /// The local transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The shared transform that gets retrieved—with a lookup key that matches the key that is set by SetTransformLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + [MethodImpl(MethodImplOptions.InternalCall)] + void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets a pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the resolved geometry of the visual's clipping region. If the clip geometry has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the geometry. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometry + // HRESULT GetClipGeometry( IXpsOMGeometry **clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IXpsOMGeometry GetClipGeometry(); + /// Gets a pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. + /// + /// A pointer to the IXpsOMGeometry interface that contains the local, unshared geometry of the visual's clipping region. If a clip geometry lookup key has been set, or if a local clip geometry has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// + /// + /// SetClipGeometryLookup + /// NULL pointer. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylocal + // HRESULT GetClipGeometryLocal( IXpsOMGeometry **clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IXpsOMGeometry GetClipGeometryLocal(); + /// Sets the local, unshared clipping region for the visual. + /// A pointer to the IXpsOMGeometry interface to be set as the local, unshared clipping region for the visual. A NULL pointer releases the previously assigned geometry interface. + /// + /// After you call SetClipGeometryLocal, the clip geometry lookup key is released and GetClipGeometryLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal (this method) + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylocal + // HRESULT SetClipGeometryLocal( IXpsOMGeometry *clipGeometry ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetClipGeometryLocal([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMGeometry clipGeometry); + void SetClipGeometryLocal([In] IXpsOMGeometry clipGeometry); + /// Gets the lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. + /// + /// The lookup key for the IXpsOMGeometry interface in a resource dictionary that contains the visual's clipping region. If a lookup key for the clip geometry has not been set, or if a local clip geometry has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Lookup key string that is returned in key + /// + /// + /// SetClipGeometryLocal + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLocal nor SetClipGeometryLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getclipgeometrylookup + // HRESULT GetClipGeometryLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.LPWStr)] - string GetClipGeometryLookup(); + SafeCoTaskMemString GetClipGeometryLookup(); + /// Sets the lookup key name of a shared clip geometry in a resource dictionary. + /// The lookup key name of the clip geometry in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetClipGeometryLookup, the local clip geometry is released and GetClipGeometryLocal returns a NULL pointer in the clipGeometry parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in clipGeometry by GetClipGeometry + /// Object that is returned in clipGeometry by GetClipGeometryLocal + /// String that is returned in key by GetClipGeometryLookup + /// + /// + /// SetClipGeometryLocal + /// The local clip geometry that is set by SetClipGeometryLocal. + /// The local clip geometry that is set by SetClipGeometryLocal. + /// NULL pointer. + /// + /// + /// SetClipGeometryLookup (this method) + /// The shared clip geometry that gets retrieved, with a lookup key that matches the key that is set by SetClipGeometryLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetClipGeometryLookup. + /// + /// + /// Neither SetClipGeometryLookup nor SetClipGeometryLocal has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setclipgeometrylookup + // HRESULT SetClipGeometryLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetClipGeometryLookup([MarshalAs(UnmanagedType.LPWStr)] [In] string key); + void SetClipGeometryLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + /// Gets the opacity value of this visual. + /// The opacity value. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); [MethodImpl(MethodImplOptions.InternalCall)] float GetOpacity(); + /// Sets the opacity value of the visual. + /// + /// The opacity value to be set for the visual. + /// The range of allowed values for this parameter is 0.0 to 1.0; with 0.0 the visual is completely transparent, and with 1.0 it is completely opaque. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacity + // HRESULT SetOpacity( FLOAT opacity ); [MethodImpl(MethodImplOptions.InternalCall)] void SetOpacity([In] float opacity); + /// Gets a pointer to the IXpsOMBrush interface of the visual's opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush has not been set for this visual, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the brush. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrush + // HRESULT GetOpacityMaskBrush( IXpsOMBrush **opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IXpsOMBrush GetOpacityMaskBrush(); + /// Gets the local, unshared opacity mask brush for the visual. + /// + /// A pointer to the IXpsOMBrush interface of the visual's opacity mask brush. If an opacity mask brush lookup key has been set, or if a local opacity mask brush has not been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// + /// + /// SetOpacityMaskBrushLookup + /// NULL pointer. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlocal + // HRESULT GetOpacityMaskBrushLocal( IXpsOMBrush **opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IXpsOMBrush GetOpacityMaskBrushLocal(); + /// + /// Sets the IXpsOMBrush interface pointer as the local, unshared opacity mask brush. + /// + /// A pointer to the IXpsOMBrush interface to be set as the local, unshared opacity mask brush. A NULL pointer clears the previously assigned opacity mask brush. + /// + /// After you call SetOpacityMaskBrushLocal, the opacity mask brush lookup key is released and GetOpacityMaskBrushLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal (this method) + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The shared opacity mask brush that gets retrieved, with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlocal + // HRESULT SetOpacityMaskBrushLocal( IXpsOMBrush *opacityMaskBrush ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetOpacityMaskBrushLocal([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMBrush opacityMaskBrush); + void SetOpacityMaskBrushLocal([In] IXpsOMBrush opacityMaskBrush); + /// Gets the name of the lookup key of the shared opacity mask brush in a resource dictionary. + /// + /// The name of the lookup key of the shared opacity mask brush in a resource dictionary. If the lookup key of an opacity mask brush has not been set, or if a local opacity mask brush has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetOpacityMaskBrushLocal + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getopacitymaskbrushlookup + // HRESULT GetOpacityMaskBrushLookup( LPWSTR *key ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.LPWStr)] - string GetOpacityMaskBrushLookup(); + SafeCoTaskMemString GetOpacityMaskBrushLookup(); + /// + /// Sets the lookup key name of a shared opacity mask brush in a resource dictionary. + /// + /// The lookup key name of the opacity mask brush in the dictionary. A NULL pointer clears the previously assigned key name. + /// + /// After you call SetOpacityMaskBrushLookup, the local opacity mask brush is released and GetOpacityMaskBrushLocal returns a NULL pointer in the opacityMaskBrush parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrush + /// Object that is returned in opacityMaskBrush by GetOpacityMaskBrushLocal + /// String that is returned in key by GetOpacityMaskBrushLookup + /// + /// + /// SetOpacityMaskBrushLocal + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// The local opacity mask brush that is set by SetOpacityMaskBrushLocal. + /// NULL pointer. + /// + /// + /// SetOpacityMaskBrushLookup (this method) + /// The shared opacity mask brush that gets retrieved—with a lookup key that matches the key that is set by SetOpacityMaskBrushLookup—from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetOpacityMaskBrushLookup. + /// + /// + /// Neither SetOpacityMaskBrushLocal nor SetOpacityMaskBrushLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setopacitymaskbrushlookup + // HRESULT SetOpacityMaskBrushLookup( LPCWSTR key ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetOpacityMaskBrushLookup([MarshalAs(UnmanagedType.LPWStr)] [In] string key); + void SetOpacityMaskBrushLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + /// Gets the Name property of the visual. + /// The Name property string. If the Name property has not been set, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getname + // HRESULT GetName( LPWSTR *name ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.LPWStr)] - string GetName(); + SafeCoTaskMemString GetName(); + /// + /// Sets the Name property of the visual. + /// + /// The name of the visual. A NULL pointer clears the Name property. + /// + /// Names must be unique. + /// Clearing the Name property by passing a NULL pointer in name sets the IsHyperlinkTarget property to FALSE. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setname + // HRESULT SetName( LPCWSTR name ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetName([MarshalAs(UnmanagedType.LPWStr)] [In] string name); + void SetName([In, MarshalAs(UnmanagedType.LPWStr)] string name); + /// Gets a value that indicates whether the visual is the target of a hyperlink. + /// + /// The Boolean value that indicates whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getishyperlinktarget + // HRESULT GetIsHyperlinkTarget( BOOL *isHyperlink ); [MethodImpl(MethodImplOptions.InternalCall)] - int GetIsHyperlinkTarget(); + [return: MarshalAs(UnmanagedType.Bool)] + bool GetIsHyperlinkTarget(); + /// + /// Specifies whether the visual is the target of a hyperlink. + /// + /// The Boolean value that specifies whether the visual is the target of a hyperlink. + /// + /// + /// Value + /// Meaning + /// + /// + /// TRUE + /// The visual is the target of a hyperlink. + /// + /// + /// FALSE + /// The visual is not the target of a hyperlink. + /// + /// + /// + /// The visual must be named before it can be set as the target of a hyperlink. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setishyperlinktarget + // HRESULT SetIsHyperlinkTarget( BOOL isHyperlink ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetIsHyperlinkTarget([In] int isHyperlink); + void SetIsHyperlinkTarget([In, MarshalAs(UnmanagedType.Bool)] bool isHyperlink); + /// Gets a pointer to the IUri interface to which this visual object links. + /// A pointer to the IUri interface that contains the destination URI for the link. If a URI has not been set for this object, a NULL pointer is returned. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-gethyperlinknavigateuri + // HRESULT GetHyperlinkNavigateUri( IUri **hyperlinkUri ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] IUri GetHyperlinkNavigateUri(); + /// + /// Sets the destination URI of the visual's hyperlink. + /// + /// The IUri interface that contains the destination URI of the visual's hyperlink. + /// + /// Setting an object's URI makes the object a hyperlink. When activated or clicked, the object will navigate to the destination that is specified by the URI in hyperlinkUri. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-sethyperlinknavigateuri + // HRESULT SetHyperlinkNavigateUri( IUri *hyperlinkUri ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetHyperlinkNavigateUri([MarshalAs(UnmanagedType.Interface)] [In] IUri hyperlinkUri); + void SetHyperlinkNavigateUri([In] IUri hyperlinkUri); + /// Gets the Language property of the visual and of its contents. + /// The language string that specifies the language of the page. If a language has not been set, a NULL pointer is returned. + /// + /// The Language property that is set by this method specifies the language of the resource content. + /// Internet Engineering Task Force (IETF) RFC 3066 specifies the recommended encoding for the Language property. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-getlanguage + // HRESULT GetLanguage( LPWSTR *language ); [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.LPWStr)] - string GetLanguage(); + SafeCoTaskMemString GetLanguage(); + /// + /// Sets the Language property of the visual. + /// + /// The language string that specifies the language of the visual and of its contents. A NULL pointer clears the Language property. + /// + /// The recommended encoding for the Language property is specified in Internet Engineering Task Force (IETF) RFC 3066r. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomvisual-setlanguage + // HRESULT SetLanguage( LPCWSTR language ); [MethodImpl(MethodImplOptions.InternalCall)] - void SetLanguage([MarshalAs(UnmanagedType.LPWStr)] [In] string language); + void SetLanguage([In, MarshalAs(UnmanagedType.LPWStr)] string language); } [ComImport, Guid("97E294AF-5B37-46B4-8057-874D2F64119B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IXpsOMVisualBrush : IXpsOMTileBrush { + /// Gets the IUnknown interface of the parent. + /// A pointer to the IUnknown interface of the parent. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-getowner + // HRESULT GetOwner( IUnknown **owner ); + [return: MarshalAs(UnmanagedType.IUnknown)] + new object GetOwner(); + + /// Gets the object type of the interface. + /// The XPS_OBJECT_TYPE value that describes the interface that is derived from IXpsOMShareable. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomshareable-gettype + // HRESULT GetType( XPS_OBJECT_TYPE *type ); + new XPS_OBJECT_TYPE GetType(); + + /// Gets the opacity of the brush. + /// + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-getopacity + // HRESULT GetOpacity( FLOAT *opacity ); + new float GetOpacity(); + + /// Sets the opacity of the brush. + /// The opacity value of the brush. + /// + /// opacity is expressed as a value between 0.0 and 1.0; 0.0 indicates that the brush is completely transparent, 0.5 that it is 50 percent opaque, and 1.0 that it is completely opaque. + /// If opacity is less than 0.0 or greater than 1.0, the method returns an error. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsombrush-setopacity + // HRESULT SetOpacity( FLOAT opacity ); + new void SetOpacity([In] float opacity); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush. If a matrix transform has not been set, a NULL pointer is returned. + /// The value that is returned in this parameter depends on which method has most recently been called to set the transform. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransform + // HRESULT GetTransform( IXpsOMMatrixTransform **transform ); + new IXpsOMMatrixTransform GetTransform(); + + /// Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. + /// + /// A pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush. If a local matrix transform has not been set or if a matrix transform lookup key has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in transform + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// + /// + /// SetTransformLookup + /// NULL pointer. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlocal + // HRESULT GetTransformLocal( IXpsOMMatrixTransform **transform ); + new IXpsOMMatrixTransform GetTransformLocal(); + + /// + /// Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform. + /// + /// A pointer to the IXpsOMMatrixTransform interface to be set as the local, unshared matrix transform. If a local transform has been set, a NULL pointer will release it. + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + /// After you call SetTransformLocal, the transform lookup key is released and GetTransformLookup returns a NULL pointer in the key parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// String that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal (this method) + /// The transform that is set by SetTransformLocal. + /// The transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The transform which is retrieved, using a lookup key that matches the key that is set by SetTransformLookup, from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlocal + // HRESULT SetTransformLocal( IXpsOMMatrixTransform *transform ); + new void SetTransformLocal([In] IXpsOMMatrixTransform transform); + + /// Gets the lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush. + /// + /// The lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush. If a matrix transform lookup key has not been set or if a local matrix transform has been set, a NULL pointer is returned. + /// + /// + /// Most recent method called + /// Object that is returned in key + /// + /// + /// SetTransformLocal + /// NULL pointer. + /// + /// + /// SetTransformLookup + /// The lookup key set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// + /// + /// + /// + /// The transform determines how the output area is transformed before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettransformlookup + // HRESULT GetTransformLookup( LPWSTR *key ); + new SafeCoTaskMemString GetTransformLookup(); + + /// + /// Sets the lookup key name of a shared matrix transform that will be used as the transform for this brush.The shared matrix transform that is referenced by the lookup key is stored in the resource dictionary. + /// + /// A string variable that contains the lookup key name of a shared matrix transform in the resource dictionary. If a lookup key has already been set, a NULL pointer will clear it. + /// + /// The transform is applied before the brush image is rendered in the path, stroke, or glyph that is using the tile brush. The tile brush has only one transform, which can be local or remote. + /// After you call SetTransformLookup, the local transform is released and GetTransformLocal returns a NULL pointer in the transform parameter. The table that follows explains the relationship between the local and lookup values of this property. + /// + /// + /// Most recent method called + /// Object that is returned in transform by GetTransform + /// Object that is returned in transform by GetTransformLocal + /// String that is returned in key by GetTransformLookup + /// + /// + /// SetTransformLocal + /// The transform that is set by SetTransformLocal. + /// The transform that is set by SetTransformLocal. + /// NULL pointer. + /// + /// + /// SetTransformLookup (this method) + /// The transform which is retrieved—using a lookup key that matches the key that is set by SetTransformLookup— from the resource directory. + /// NULL pointer. + /// The lookup key that is set by SetTransformLookup. + /// + /// + /// Neither SetTransformLocal nor SetTransformLookup has been called yet. + /// NULL pointer. + /// NULL pointer. + /// NULL pointer. + /// + /// + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settransformlookup + // HRESULT SetTransformLookup( LPCWSTR key ); + new void SetTransformLookup([In, MarshalAs(UnmanagedType.LPWStr)] string key); + + /// Gets the portion of the source image to be used by the tile. + /// The XPS_RECT structure that describes the area of the source content to be used by the tile. + /// + /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. + /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The corresponding pixel coordinates in the source image are calculated as follows: + /// In the illustration that follows, the image on the left is an example of a source image, the image in the center shows the selected viewbox, and the image on the right shows the resulting brush. + /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in the viewbox parameter would be: + /// The preceding parameter values correspond to the source image as: + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewbox + // HRESULT GetViewbox( XPS_RECT *viewbox ); + new XPS_RECT GetViewbox(); + + /// + /// Sets the portion of the source content to be used as the tile image. + /// + /// An XPS_RECT structure that describes the portion of the source content to be used as the tile image. + /// + /// The brush's viewbox specifies the portion of a source image or visual to be used as the tile image. + /// The coordinates of the brush's viewbox are relative to the source content, such that (0,0) specifies the upper-left corner of the source content. For images, dimensions specified by the brush's viewbox are expressed in the units of 1/96". The corresponding pixel coordinates in the source image are calculated as follows: + /// In the illustration that follows, the image on the left is an example of a source image, while that on the right is the source image with the selected viewbox for the brush shown as a red rectangle. In this example, the part of the source image that is used as the content for the tile brush is the area within the red rectangle. The shaded area of the image is not used by the brush. + /// If the source image resolution is 96 by 96 dots per inch and image dimensions are 96 by 96 pixels, the values of fields in the viewbox parameter would be: + /// The preceding parameter values correspond to the source image as: + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewbox + // HRESULT SetViewbox( const XPS_RECT *viewbox ); + new void SetViewbox(in XPS_RECT viewbox); + + /// Gets the portion of the destination geometry that is covered by a single tile. + /// The XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. + /// The viewport is the portion of the output area where the first tile is drawn. In the illustration, the viewport is outlined by the purple rectangle inside the red, dotted rectangle. The tile mode of the brush determines how the rest of the tiles are drawn in the output area. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-getviewport + // HRESULT GetViewport( XPS_RECT *viewport ); + new XPS_RECT GetViewport(); + + /// + /// Sets the portion of the destination geometry that is covered by a single tile. + /// + /// An XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile. + /// + /// The viewport is the portion of the output area where the tile is drawn. In the following illustration, the viewport is outlined by the blue rectangle inside the red, dotted rectangle. The tile mode of the brush determines how other tiles are drawn in the output area. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-setviewport + // HRESULT SetViewport( const XPS_RECT *viewport ); + new void SetViewport(in XPS_RECT viewport); + + /// Gets the XPS_TILE_MODE value that describes the tile mode of the brush. + /// The XPS_TILE_MODE value that describes the tile mode of the brush. + /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. The following illustration shows examples of how the tile image appears in several tile modes. + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-gettilemode + // HRESULT GetTileMode( XPS_TILE_MODE *tileMode ); + new XPS_TILE_MODE GetTileMode(); + + /// + /// Sets the XPS_TILE_MODE value that describes the tiling mode of the brush. + /// + /// The XPS_TILE_MODE value to be set. + /// + /// The tile mode determines how the tile image is repeated to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once. + /// + // https://docs.microsoft.com/en-us/windows/win32/api/xpsobjectmodel/nf-xpsobjectmodel-ixpsomtilebrush-settilemode + // HRESULT SetTileMode( XPS_TILE_MODE tileMode ); + new void SetTileMode([In] XPS_TILE_MODE tileMode); + IXpsOMVisualBrush Clone(); IXpsOMVisual GetVisual(); IXpsOMVisual GetVisualLocal(); - string GetVisualLookup(); + SafeCoTaskMemString GetVisualLookup(); void SetVisualLocal([In] IXpsOMVisual visual); - void SetVisualLookup([In] string lookup); + void SetVisualLookup([In, MarshalAs(UnmanagedType.LPWStr)] string lookup); } [ComImport, Guid("94D8ABDE-AB91-46A8-82B7-F5B05EF01A96"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] @@ -2077,22 +8028,16 @@ namespace Vanara.PInvoke IXpsOMVisual GetAt([In] uint index); [MethodImpl(MethodImplOptions.InternalCall)] - void InsertAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMVisual @object); + void InsertAt([In] uint index, [In] IXpsOMVisual @object); [MethodImpl(MethodImplOptions.InternalCall)] void RemoveAt([In] uint index); [MethodImpl(MethodImplOptions.InternalCall)] - void SetAt([In] uint index, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMVisual @object); + void SetAt([In] uint index, [In] IXpsOMVisual @object); [MethodImpl(MethodImplOptions.InternalCall)] - void Append([MarshalAs(UnmanagedType.Interface)] [In] IXpsOMVisual @object); - } - - [CoClass(typeof(XpsOMThumbnailGeneratorClass))] - [ComImport, Guid("15B873D5-1971-41E8-83A3-6578403064C7")] - public interface XpsOMThumbnailGenerator : IXpsOMThumbnailGenerator - { + void Append([In] IXpsOMVisual @object); } [StructLayout(LayoutKind.Sequential, Pack = 4)] @@ -2197,14 +8142,9 @@ namespace Vanara.PInvoke public byte blue; } - [ClassInterface(ClassInterfaceType.None)] - [ComImport, Guid("7E4A23E2-B969-4761-BE35-1A8CED58E323")] - [TypeLibType(TypeLibTypeFlags.FCanCreate)] - public class XpsOMThumbnailGeneratorClass : IXpsOMThumbnailGenerator, XpsOMThumbnailGenerator + [ClassInterface(ClassInterfaceType.None), ComImport, Guid("7E4A23E2-B969-4761-BE35-1A8CED58E323")] + public class XpsOMThumbnailGenerator { - [MethodImpl(MethodImplOptions.InternalCall)] - [return: MarshalAs(UnmanagedType.Interface)] - public virtual extern IXpsOMImageResource GenerateThumbnail([In] IXpsOMPage page, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_IMAGE_TYPE")] XPS_IMAGE_TYPE thumbnailType, [In][ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_THUMBNAIL_SIZE")] XPS_THUMBNAIL_SIZE thumbnailSize, [In] IOpcPartUri imageResourcePartName); } } } \ No newline at end of file