From 057a72cd9fa3cbbf98894bea78323e7e542a2441 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 2 May 2020 12:47:40 -0300 Subject: [PATCH 001/161] Windows compatibility Tweaks --- libdino/src/service/file_manager.vala | 4 ++-- libdino/src/service/util.vala | 21 ++++++++++++++++++++- main/src/ui/main_window.vala | 4 ++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala index 00abe517f..34e88dcc5 100644 --- a/libdino/src/service/file_manager.vala +++ b/libdino/src/service/file_manager.vala @@ -63,7 +63,7 @@ public class FileManager : StreamInteractionModule, Object { try { FileInfo file_info = file.query_info("*", FileQueryInfoFlags.NONE); file_transfer.file_name = file_info.get_display_name(); - file_transfer.mime_type = file_info.get_content_type(); + file_transfer.mime_type = Util.get_content_type(file_info); file_transfer.size = (int)file_info.get_size(); file_transfer.input_stream = yield file.read_async(); @@ -285,7 +285,7 @@ public class FileManager : StreamInteractionModule, Object { file_transfer.input_stream = yield file.read_async(); FileInfo file_info = file_transfer.get_file().query_info("*", FileQueryInfoFlags.NONE); - file_transfer.mime_type = file_info.get_content_type(); + file_transfer.mime_type = Util.get_content_type(file_info); file_transfer.state = FileTransfer.State.COMPLETE; } catch (Error e) { diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 4f9b94ce6..9fe3029cd 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -26,6 +26,25 @@ public class Util { } assert_not_reached(); } -} + + public static string get_content_type(FileInfo fileInfo) + { +//#if WIN32 + string fileName = fileInfo.get_name(); + int fileNameLength = fileName.length; + int extIndex = fileName.index_of("."); + if (extIndex < fileNameLength) + { + string extension = fileName.substring(extIndex, fileNameLength - extIndex); + string mime_type = ContentType.get_mime_type(extension); + if (mime_type != null && mime_type.length != 0) + { + return mime_type; + } + } +//#endif + return fileInfo.get_content_type(); + } +} } diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala index afa16645c..eea3a9454 100644 --- a/main/src/ui/main_window.vala +++ b/main/src/ui/main_window.vala @@ -55,6 +55,10 @@ public class MainWindow : Gtk.Window { } private void setup_unified() { + new Dino.Ui.ConversationSelector(); + new Dino.Ui.ConversationSummary.ConversationView(); + new Dino.Ui.ChatInput.View(); + new Dino.Ui.GlobalSearch(); Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui"); paned = (Paned) builder.get_object("paned"); box.add(paned); From 43f118bd4e0b8c6ec7746e2d794f3a629e24504b Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sat, 2 May 2020 22:03:20 +0200 Subject: [PATCH 002/161] Add experimental windows installer This nsis script should create a windows installer. Although the installer worked for the first tests you should handle it with care and consider it highly experimental --- windows-installer/README.md | 14 +++++++++ windows-installer/dino.nsi | 52 +++++++++++++++++++++++++++++++ windows-installer/input/logo.ico | Bin 0 -> 24838 bytes windows-installer/input/logo.svg | 1 + 4 files changed, 67 insertions(+) create mode 100644 windows-installer/README.md create mode 100644 windows-installer/dino.nsi create mode 100644 windows-installer/input/logo.ico create mode 100644 windows-installer/input/logo.svg diff --git a/windows-installer/README.md b/windows-installer/README.md new file mode 100644 index 000000000..5b74622c4 --- /dev/null +++ b/windows-installer/README.md @@ -0,0 +1,14 @@ +# Dino Windows Installer + +## Requirements + +To create the Dino windows installer you need this: +* nsis (e.g. `apt install nsis` on Debian) +* Dino compiled for windows in input directory +* logo.ico in input directory + * Download https://dino.im/img/logo.svg + * Convert it to ico (e.g. `onvert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick) + +## Create installer + +Simply run `makensis dino.nsi` diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi new file mode 100644 index 000000000..efaf6bf12 --- /dev/null +++ b/windows-installer/dino.nsi @@ -0,0 +1,52 @@ +Unicode True + +!define MUI_PRODUCT "Dino" +!define MUI_PRODUCT_NAME ${MUI_PRODUCT} +!define PRODUCT_WEBSITE "https://dino.im" +!define MUI_ICON "input/logo.ico" +!define ICON "input/logo.ico" + +# define installer name +OutFile "dino-installer.exe" + +BrandingText "Dino - Communication happyness" + +# set install directory +InstallDir $PROGRAMFILES64\dino + +# default section start +Section + +# Install binary and DLLs +SetOutPath $INSTDIR\bin +File input/*.dll input/dino.exe + +# Install the libs and shared files +SetOutPath $INSTDIR +File /r /x dino.exe /x plugins /x ./*.dll input/* + +# Install the plugins +SetOutPath $INSTDIR\lib\dino\plugins +File input/plugins/* + +# define uninstaller name +WriteUninstaller $INSTDIR\uninstaller.exe + +# Create a shortcut for startmenu +CreateShortcut "$SMPROGRAMS\dino.lnk" "$INSTDIR\bin\dino.exe" "" "$INSTDIR\logo.ico" + +# default section end +SectionEnd + +# Uninsaller section +Section "Uninstall" + +# Always delete uninstaller first +Delete $INSTDIR\uninstaller.exe + +# now delete installed file +Delete $INSTDIR\* + +# Delete the directory +RMDir /r $INSTDIR +SectionEnd diff --git a/windows-installer/input/logo.ico b/windows-installer/input/logo.ico new file mode 100644 index 0000000000000000000000000000000000000000..f6a111eedf65e4d3f3ccbbc9d113564ac07d9852 GIT binary patch literal 24838 zcmeHP2Y6i7m3|{leepcrAn}rr5D2j;!5>Q;2nKAhb@o4R=E);jWyTF>v-kV%+?n^@J@=e*?>+al zH-exN)PmJ2pp6pdsRf}%5QN}h$M4++L3kL~qM{tXAHZ{YW@C)<~V1PkELELzcooLuIW0Cl~Mazp{y8pq&Z|&UI{ASyHpEst?HT*2UFmlw~ z1=VYtTN58|oo;=1>;%&po6S?flX;iPX8@hqfO!Qr*aqw-aNc#z~S@m_DY;%?-F17acOw-^Z*s8m*RzQ!^f4zs=@&{uuYavNGI5_nK%; zr_@zk81+_0a&)648ia&oUCqMP(x(S7W?%hWuib|Jt2@kH<;8JtWTiycGvQ+IRnD>hfjS;8ntMZ=D z%Z!_k{$5y{f;~nXHf^r>G{fLI>cLC&<7+!^H&N3BpSJ=7q;&L?aYrkcqH==}9~(5j zWn9FiRhzA}^A3raANx>u+%D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7R|} zfcSmF(^ii^p5cDsc+nc|sm+4z1mL~bC6s-F79*6&4Rv-nTSr6u6qnPE#_{>TK|RDs literal 0 HcmV?d00001 diff --git a/windows-installer/input/logo.svg b/windows-installer/input/logo.svg new file mode 100644 index 000000000..b62f8c324 --- /dev/null +++ b/windows-installer/input/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file From 7d6b9e7f4cd066b4b59eddec09be3bcac5c6c656 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 3 May 2020 00:55:59 +0200 Subject: [PATCH 003/161] Prepare signing Collected some infos regarding signing a windows build. --- README.md | 58 ++++++++++++++++--------------------------------------- 1 file changed, 17 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 47168edfe..f7daf11e8 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,23 @@ -![Dino](https://dino.im/img/readme_header.svg) -======= +# Dino Windows Installer -![screenshots](https://dino.im/img/screenshot-main.png) +## Requirements -Installation ------------- -Have a look at the [prebuilt packages](https://github.com/dino/dino/wiki/Distribution-Packages). +To create the Dino windows installer you need this: +* nsis (e.g. `apt install nsis` on Debian) +* Dino compiled for windows in input directory +* logo.ico in input directory + * Download https://dino.im/img/logo.svg + * Convert it to ico (e.g. `convert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick) -Build ------ -Make sure to install all [dependencies](https://github.com/dino/dino/wiki/Build#dependencies). +## Create installer - ./configure - make - build/dino +Simply run `makensis dino.nsi` -Resources ---------- -- Check out the [Dino website](https://dino.im). -- Join our XMPP channel at `chat@dino.im`. -- The [wiki](https://github.com/dino/dino/wiki) provides additional information. +## ToDo -Contribute ----------- -- Pull requests are welcome. [These](https://github.com/dino/dino/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) might be good first issues. Please discuss bigger changes in our channel first. -- Look at [how to debug](https://github.com/dino/dino/wiki/Debugging) Dino before you report a bug. -- Help [translating](https://github.com/dino/dino/wiki/Translations) Dino into your language. -- Make a [donation](https://dino.im/#donate). - -License -------- - Dino - Modern Jabber/XMPP Client using GTK+/Vala - Copyright (C) 2016-2020 Dino contributors - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . +* Create a [good looking MUI Installer](https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html) +* Sign the installer + * Requires to [buy a certificate](https://comodosslstore.com/resources/free-code-signing-certificate/) + * Maybe there can be a [free one for open source programs](https://www.codenotary.io/with-codenotary-you-never-have-to-pay-for-code-signing-certificates-again/) - Not yet read thoroughly whether there is a catch. + * https://stackoverflow.com/questions/9527160/sign-nsis-installer-on-linux-box + * https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Signing_an_executable_with_Authenticode From 3ffec591a9fcd76cc3eb622538aaa52b8b242843 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 3 May 2020 00:59:42 +0200 Subject: [PATCH 004/161] Revert "Prepare signing" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I copied the files into the wrong folder… … it's late, sorry. This reverts commit 7d6b9e7f4cd066b4b59eddec09be3bcac5c6c656. --- README.md | 58 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f7daf11e8..47168edfe 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,47 @@ -# Dino Windows Installer +![Dino](https://dino.im/img/readme_header.svg) +======= -## Requirements +![screenshots](https://dino.im/img/screenshot-main.png) -To create the Dino windows installer you need this: -* nsis (e.g. `apt install nsis` on Debian) -* Dino compiled for windows in input directory -* logo.ico in input directory - * Download https://dino.im/img/logo.svg - * Convert it to ico (e.g. `convert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick) +Installation +------------ +Have a look at the [prebuilt packages](https://github.com/dino/dino/wiki/Distribution-Packages). -## Create installer +Build +----- +Make sure to install all [dependencies](https://github.com/dino/dino/wiki/Build#dependencies). -Simply run `makensis dino.nsi` + ./configure + make + build/dino -## ToDo +Resources +--------- +- Check out the [Dino website](https://dino.im). +- Join our XMPP channel at `chat@dino.im`. +- The [wiki](https://github.com/dino/dino/wiki) provides additional information. -* Create a [good looking MUI Installer](https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html) -* Sign the installer - * Requires to [buy a certificate](https://comodosslstore.com/resources/free-code-signing-certificate/) - * Maybe there can be a [free one for open source programs](https://www.codenotary.io/with-codenotary-you-never-have-to-pay-for-code-signing-certificates-again/) - Not yet read thoroughly whether there is a catch. - * https://stackoverflow.com/questions/9527160/sign-nsis-installer-on-linux-box - * https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Signing_an_executable_with_Authenticode +Contribute +---------- +- Pull requests are welcome. [These](https://github.com/dino/dino/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) might be good first issues. Please discuss bigger changes in our channel first. +- Look at [how to debug](https://github.com/dino/dino/wiki/Debugging) Dino before you report a bug. +- Help [translating](https://github.com/dino/dino/wiki/Translations) Dino into your language. +- Make a [donation](https://dino.im/#donate). + +License +------- + Dino - Modern Jabber/XMPP Client using GTK+/Vala + Copyright (C) 2016-2020 Dino contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . From 9779abe7019a829140ee311b53e2224c8af2aac1 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 3 May 2020 01:01:30 +0200 Subject: [PATCH 005/161] Prepare signing Collected some infos regarding signing a windows build. --- windows-installer/README.md | 11 ++++++++++- windows-installer/sign.sh | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 windows-installer/sign.sh diff --git a/windows-installer/README.md b/windows-installer/README.md index 5b74622c4..f7daf11e8 100644 --- a/windows-installer/README.md +++ b/windows-installer/README.md @@ -7,8 +7,17 @@ To create the Dino windows installer you need this: * Dino compiled for windows in input directory * logo.ico in input directory * Download https://dino.im/img/logo.svg - * Convert it to ico (e.g. `onvert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick) + * Convert it to ico (e.g. `convert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick) ## Create installer Simply run `makensis dino.nsi` + +## ToDo + +* Create a [good looking MUI Installer](https://nsis.sourceforge.io/Docs/Modern%20UI/Readme.html) +* Sign the installer + * Requires to [buy a certificate](https://comodosslstore.com/resources/free-code-signing-certificate/) + * Maybe there can be a [free one for open source programs](https://www.codenotary.io/with-codenotary-you-never-have-to-pay-for-code-signing-certificates-again/) - Not yet read thoroughly whether there is a catch. + * https://stackoverflow.com/questions/9527160/sign-nsis-installer-on-linux-box + * https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Signing_an_executable_with_Authenticode diff --git a/windows-installer/sign.sh b/windows-installer/sign.sh new file mode 100644 index 000000000..ad5532afd --- /dev/null +++ b/windows-installer/sign.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +signcode \ + -spc TODO.spc \ + -v TODO.pvk \ + -a sha1 -$ commercial \ + -n Dino \ + -i https://dino.im/ \ + -t http://timestamp.verisign.com/scripts/timstamp.dll \ + -tr 10 \ + dino-installer.exe From 246000ce6aab4cba71eaf280d01e13724ccac1dd Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 3 May 2020 01:26:59 +0200 Subject: [PATCH 006/161] Fix typo in Dino slogan --- windows-installer/dino.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index efaf6bf12..44c5a36c7 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -9,7 +9,7 @@ Unicode True # define installer name OutFile "dino-installer.exe" -BrandingText "Dino - Communication happyness" +BrandingText "Dino - Communicating happiness" # set install directory InstallDir $PROGRAMFILES64\dino From 70900cd73ef3e1fa042790d62c0b6c475ccd4207 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Tue, 5 May 2020 19:17:45 +0200 Subject: [PATCH 007/161] Add license to windows installer --- windows-installer/LICENSE | 674 ++++++++++++++++++++++++++++++++ windows-installer/LICENSE_SHORT | 15 + windows-installer/README.md | 1 + windows-installer/dino.nsi | 11 +- 4 files changed, 699 insertions(+), 2 deletions(-) create mode 100644 windows-installer/LICENSE create mode 100644 windows-installer/LICENSE_SHORT diff --git a/windows-installer/LICENSE b/windows-installer/LICENSE new file mode 100644 index 000000000..20d40b6bc --- /dev/null +++ b/windows-installer/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/windows-installer/LICENSE_SHORT b/windows-installer/LICENSE_SHORT new file mode 100644 index 000000000..31e69e40c --- /dev/null +++ b/windows-installer/LICENSE_SHORT @@ -0,0 +1,15 @@ +Dino - Modern Jabber/XMPP Client using GTK+/Vala +Copyright (C) 2016-2020 Dino contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/windows-installer/README.md b/windows-installer/README.md index f7daf11e8..824d64ffd 100644 --- a/windows-installer/README.md +++ b/windows-installer/README.md @@ -8,6 +8,7 @@ To create the Dino windows installer you need this: * logo.ico in input directory * Download https://dino.im/img/logo.svg * Convert it to ico (e.g. `convert -background transparent -define 'icon:auto-resize=16,24,32,64' logo.svg logo.ico` (requires imagemagick) +* Copy `LICENSE` and `LICENSE_SHORT` to the input directory ## Create installer diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 44c5a36c7..bb2afc940 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -2,14 +2,21 @@ Unicode True !define MUI_PRODUCT "Dino" !define MUI_PRODUCT_NAME ${MUI_PRODUCT} +!define MUI_BRANDINGTEXT ${MUI_PRODUCT} !define PRODUCT_WEBSITE "https://dino.im" !define MUI_ICON "input/logo.ico" !define ICON "input/logo.ico" +# Modern Interface +!include "MUI2.nsh" +!insertmacro "MUI_PAGE_LICENSE" "input/LICENSE_SHORT" +!insertmacro MUI_PAGE_INSTFILES + +Name ${MUI_PRODUCT} +BrandingText "Communicating happiness" + # define installer name OutFile "dino-installer.exe" - -BrandingText "Dino - Communicating happiness" # set install directory InstallDir $PROGRAMFILES64\dino From 48619ee84d39f483288727588afaf2d6b5872006 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Tue, 5 May 2020 22:20:49 +0200 Subject: [PATCH 008/161] Add startmenu folder with several items Added a startmenu folder with the following items: * Dino launcher * License * Link to Dino website * Uninstaller --- windows-installer/dino.nsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index bb2afc940..5ffafdfce 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -40,14 +40,21 @@ File input/plugins/* WriteUninstaller $INSTDIR\uninstaller.exe # Create a shortcut for startmenu -CreateShortcut "$SMPROGRAMS\dino.lnk" "$INSTDIR\bin\dino.exe" "" "$INSTDIR\logo.ico" +CreateDirectory "$SMPROGRAMS\Dino" +CreateShortcut "$SMPROGRAMS\Dino\Dino.lnk" "$INSTDIR\bin\dino.exe" "" "$INSTDIR\logo.ico" +CreateShortcut "$SMPROGRAMS\Dino\Uninstaller.lnk" "$INSTDIR\uninstaller.exe" +CreateShortcut "$SMPROGRAMS\Dino\License.lnk" "$INSTDIR\LICENSE" "" "notepad.exe" 0 +CreateShortcut "$SMPROGRAMS\Dino\Dino website.lnk" "https://dino.im" "" "$INSTDIR\logo.ico" # default section end SectionEnd # Uninsaller section Section "Uninstall" - + +# Delete startmenu folder +RMDir /r "$SMPROGRAMS\Dino" + # Always delete uninstaller first Delete $INSTDIR\uninstaller.exe From fd916bd6e6eb7564ca23444a05538d903b387a2c Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Tue, 19 May 2020 00:55:14 +0200 Subject: [PATCH 009/161] Prevent duplicated DLLs --- windows-installer/dino.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 5ffafdfce..f8ab5095d 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -30,7 +30,7 @@ File input/*.dll input/dino.exe # Install the libs and shared files SetOutPath $INSTDIR -File /r /x dino.exe /x plugins /x ./*.dll input/* +File /r input/lib input/share input/LICENSE # Install the plugins SetOutPath $INSTDIR\lib\dino\plugins From 9154edaee1220b79179be1159bdc518803d29335 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Tue, 19 May 2020 01:05:22 +0200 Subject: [PATCH 010/161] Add dino logo again The dino logo for the startmenu was accidentally no longer included since the last commit. --- windows-installer/dino.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index f8ab5095d..2720057e8 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -30,7 +30,7 @@ File input/*.dll input/dino.exe # Install the libs and shared files SetOutPath $INSTDIR -File /r input/lib input/share input/LICENSE +File /r input/lib input/share input/LICENSE input/logo.ico # Install the plugins SetOutPath $INSTDIR\lib\dino\plugins From 8adf6731e7d202ca08240d4ef03b791dc82573a8 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Tue, 19 May 2020 08:38:17 +0200 Subject: [PATCH 011/161] Simplify installer script The current build script already places the files in the right folder structure so the installer doesn't have to do it itself --- windows-installer/dino.nsi | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 2720057e8..4a0b85de8 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -24,18 +24,10 @@ InstallDir $PROGRAMFILES64\dino # default section start Section -# Install binary and DLLs -SetOutPath $INSTDIR\bin -File input/*.dll input/dino.exe - -# Install the libs and shared files +# Install all files SetOutPath $INSTDIR -File /r input/lib input/share input/LICENSE input/logo.ico +File /r input/* -# Install the plugins -SetOutPath $INSTDIR\lib\dino\plugins -File input/plugins/* - # define uninstaller name WriteUninstaller $INSTDIR\uninstaller.exe From 26a85ac1095696d7228f49c90f1f4aa01905e4ed Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 28 Jun 2020 07:13:52 +0200 Subject: [PATCH 012/161] Add german language. --- windows-installer/dino.nsi | 4 +++- windows-installer/english.nsh | 3 +++ windows-installer/german.nsh | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 windows-installer/english.nsh create mode 100644 windows-installer/german.nsh diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 4a0b85de8..5dd04108c 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -11,6 +11,8 @@ Unicode True !include "MUI2.nsh" !insertmacro "MUI_PAGE_LICENSE" "input/LICENSE_SHORT" !insertmacro MUI_PAGE_INSTFILES +!include "english.nsh" +!include "german.nsh" Name ${MUI_PRODUCT} BrandingText "Communicating happiness" @@ -20,7 +22,7 @@ OutFile "dino-installer.exe" # set install directory InstallDir $PROGRAMFILES64\dino - + # default section start Section diff --git a/windows-installer/english.nsh b/windows-installer/english.nsh new file mode 100644 index 000000000..90009fb25 --- /dev/null +++ b/windows-installer/english.nsh @@ -0,0 +1,3 @@ +!define MUI_TEXT_LICENSE_TITLE "Dino License" +!define MUI_TEXT_LICENSE_SUBTITLE "Please read the license short summary carefully" +!insertmacro MUI_LANGUAGE "English" diff --git a/windows-installer/german.nsh b/windows-installer/german.nsh new file mode 100644 index 000000000..e188e65ad --- /dev/null +++ b/windows-installer/german.nsh @@ -0,0 +1,3 @@ +!define MUI_TEXT_LICENSE_TITLE "Dino Lizenz" +!define MUI_TEXT_LICENSE_SUBTITLE "Bitte lese die Kurzzusammenfassung der Lizenz gründlich" +!insertmacro MUI_LANGUAGE "German" From e24aa9aabc4db5e038bf2934070cd2391928abb8 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Sun, 28 Jun 2020 09:00:03 +0200 Subject: [PATCH 013/161] Add option to install without OpenPGP plugin --- windows-installer/dino.nsi | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 5dd04108c..997ec69cf 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -6,10 +6,15 @@ Unicode True !define PRODUCT_WEBSITE "https://dino.im" !define MUI_ICON "input/logo.ico" !define ICON "input/logo.ico" +!define MUI_COMPONENTSPAGE_NODESC + +# Installation types +InstType "OpenPGP support" IT_PGP # Modern Interface !include "MUI2.nsh" -!insertmacro "MUI_PAGE_LICENSE" "input/LICENSE_SHORT" +!insertmacro MUI_PAGE_LICENSE "input/LICENSE_SHORT" +!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_INSTFILES !include "english.nsh" !include "german.nsh" @@ -23,12 +28,22 @@ OutFile "dino-installer.exe" # set install directory InstallDir $PROGRAMFILES64\dino -# default section start -Section - -# Install all files +Section + +# Install all files but openpgp.dll SetOutPath $INSTDIR -File /r input/* +File /r input/bin +File input/LICENSE +File input/logo.ico +File input/logo.svg +File /r input/share +SetOutPath $INSTDIR\lib +File /r input/lib/gio +File /r input/lib/gdk-pixbuf-2.0 +SetOutPath $INSTDIR\lib\dino\plugins +File input/lib/dino/plugins/http-files.dll +File input/lib/dino/plugins/omemo.dll +File input/lib/dino/plugins/win32-fonts.dll # define uninstaller name WriteUninstaller $INSTDIR\uninstaller.exe @@ -40,10 +55,15 @@ CreateShortcut "$SMPROGRAMS\Dino\Uninstaller.lnk" "$INSTDIR\uninstaller.exe" CreateShortcut "$SMPROGRAMS\Dino\License.lnk" "$INSTDIR\LICENSE" "" "notepad.exe" 0 CreateShortcut "$SMPROGRAMS\Dino\Dino website.lnk" "https://dino.im" "" "$INSTDIR\logo.ico" -# default section end +SectionEnd + +Section "OpenPGP support" +SectionInstType ${IT_PGP} +SetOutPath $INSTDIR/lib/dino/plugins +File input/lib/dino/plugins/openpgp.dll SectionEnd -# Uninsaller section +# Uninstaller section Section "Uninstall" # Delete startmenu folder From 2d73f97d34d3fffaa64c4b6ed1f089f87e87d874 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Fri, 10 Jul 2020 16:55:00 +0200 Subject: [PATCH 014/161] Removed compenent section This section was only introduced to be able to disable the OpenPGP plugin as Dino often crashed on Windows if OpenPGP was not installed but the plugin enabled. This is no more necessary as the OpenPGP plugin is now disabled by default. --- windows-installer/dino.nsi | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 997ec69cf..b493f3afb 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -14,7 +14,6 @@ InstType "OpenPGP support" IT_PGP # Modern Interface !include "MUI2.nsh" !insertmacro MUI_PAGE_LICENSE "input/LICENSE_SHORT" -!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_INSTFILES !include "english.nsh" !include "german.nsh" @@ -30,20 +29,9 @@ InstallDir $PROGRAMFILES64\dino Section -# Install all files but openpgp.dll +# Install all files SetOutPath $INSTDIR -File /r input/bin -File input/LICENSE -File input/logo.ico -File input/logo.svg -File /r input/share -SetOutPath $INSTDIR\lib -File /r input/lib/gio -File /r input/lib/gdk-pixbuf-2.0 -SetOutPath $INSTDIR\lib\dino\plugins -File input/lib/dino/plugins/http-files.dll -File input/lib/dino/plugins/omemo.dll -File input/lib/dino/plugins/win32-fonts.dll +File /r input/ # define uninstaller name WriteUninstaller $INSTDIR\uninstaller.exe @@ -57,12 +45,6 @@ CreateShortcut "$SMPROGRAMS\Dino\Dino website.lnk" "https://dino.im" "" "$INSTDI SectionEnd -Section "OpenPGP support" -SectionInstType ${IT_PGP} -SetOutPath $INSTDIR/lib/dino/plugins -File input/lib/dino/plugins/openpgp.dll -SectionEnd - # Uninstaller section Section "Uninstall" From 81721307ca2536017e3d0065fae92688998af3b8 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Fri, 10 Jul 2020 17:04:13 +0200 Subject: [PATCH 015/161] Remove installation type "OpenPGP" support This is no longer needed (see previous commit) but was forgotten to remove in the previous commit. --- windows-installer/dino.nsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index b493f3afb..d14093987 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -8,9 +8,6 @@ Unicode True !define ICON "input/logo.ico" !define MUI_COMPONENTSPAGE_NODESC -# Installation types -InstType "OpenPGP support" IT_PGP - # Modern Interface !include "MUI2.nsh" !insertmacro MUI_PAGE_LICENSE "input/LICENSE_SHORT" From d0d676e72db3d0f53f7ce6979bd6914eefcfa3cc Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Fri, 18 Sep 2020 16:51:41 +0200 Subject: [PATCH 016/161] Add compression to achieve smaller installer size. --- windows-installer/dino.nsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index d14093987..2cd779cd9 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -1,5 +1,7 @@ Unicode True +SetCompressor /SOLID lzma + !define MUI_PRODUCT "Dino" !define MUI_PRODUCT_NAME ${MUI_PRODUCT} !define MUI_BRANDINGTEXT ${MUI_PRODUCT} From a94acccd1d58046246f14ffe83f1ce267483d252 Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Thu, 29 Oct 2020 13:47:26 +0100 Subject: [PATCH 017/161] Add AppID (untested). --- windows-installer/dino.nsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 2cd779cd9..1f6b2c8bb 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -42,6 +42,9 @@ CreateShortcut "$SMPROGRAMS\Dino\Uninstaller.lnk" "$INSTDIR\uninstaller.exe" CreateShortcut "$SMPROGRAMS\Dino\License.lnk" "$INSTDIR\LICENSE" "" "notepad.exe" 0 CreateShortcut "$SMPROGRAMS\Dino\Dino website.lnk" "https://dino.im" "" "$INSTDIR\logo.ico" +# set application ID +ApplicationID::Set "$SMPROGRAMS\Dino\Dino.lnk" "Dino" + SectionEnd # Uninstaller section From 5d551360dfa1db5bfc20fc3ec628ec1b299d725f Mon Sep 17 00:00:00 2001 From: Martin Dosch Date: Fri, 6 Nov 2020 14:12:50 +0100 Subject: [PATCH 018/161] Fix syntax error for setting AppID. --- windows-installer/dino.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-installer/dino.nsi b/windows-installer/dino.nsi index 1f6b2c8bb..9c70f105f 100644 --- a/windows-installer/dino.nsi +++ b/windows-installer/dino.nsi @@ -43,7 +43,7 @@ CreateShortcut "$SMPROGRAMS\Dino\License.lnk" "$INSTDIR\LICENSE" "" "notepad.exe CreateShortcut "$SMPROGRAMS\Dino\Dino website.lnk" "https://dino.im" "" "$INSTDIR\logo.ico" # set application ID -ApplicationID::Set "$SMPROGRAMS\Dino\Dino.lnk" "Dino" +ApplicationID::Set "$SMPROGRAMS\Dino\Dino.lnk" "Dino" "true" SectionEnd From eb7cf3297cbcabf79e7aab8ae8fcfe4338ce902e Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 2 May 2020 12:47:40 -0300 Subject: [PATCH 019/161] Windows compatibility Tweaks --- libdino/src/service/file_manager.vala | 4 ++-- libdino/src/service/util.vala | 21 ++++++++++++++++++++- main/src/ui/main_window.vala | 4 ++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala index 19d51b44b..6a851241b 100644 --- a/libdino/src/service/file_manager.vala +++ b/libdino/src/service/file_manager.vala @@ -63,7 +63,7 @@ public class FileManager : StreamInteractionModule, Object { try { FileInfo file_info = file.query_info("*", FileQueryInfoFlags.NONE); file_transfer.file_name = file_info.get_display_name(); - file_transfer.mime_type = file_info.get_content_type(); + file_transfer.mime_type = Util.get_content_type(file_info); file_transfer.size = (int)file_info.get_size(); file_transfer.input_stream = yield file.read_async(); @@ -245,7 +245,7 @@ public class FileManager : StreamInteractionModule, Object { file_transfer.input_stream = yield file.read_async(); FileInfo file_info = file_transfer.get_file().query_info("*", FileQueryInfoFlags.NONE); - file_transfer.mime_type = file_info.get_content_type(); + file_transfer.mime_type = Util.get_content_type(file_info); file_transfer.state = FileTransfer.State.COMPLETE; } catch (Error e) { diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 4f9b94ce6..9fe3029cd 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -26,6 +26,25 @@ public class Util { } assert_not_reached(); } -} + + public static string get_content_type(FileInfo fileInfo) + { +//#if WIN32 + string fileName = fileInfo.get_name(); + int fileNameLength = fileName.length; + int extIndex = fileName.index_of("."); + if (extIndex < fileNameLength) + { + string extension = fileName.substring(extIndex, fileNameLength - extIndex); + string mime_type = ContentType.get_mime_type(extension); + if (mime_type != null && mime_type.length != 0) + { + return mime_type; + } + } +//#endif + return fileInfo.get_content_type(); + } +} } diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala index df24038ac..ca352b53a 100644 --- a/main/src/ui/main_window.vala +++ b/main/src/ui/main_window.vala @@ -54,6 +54,10 @@ public class MainWindow : Gtk.Window { } private void setup_unified() { + new Dino.Ui.ConversationSelector(); + new Dino.Ui.ConversationSummary.ConversationView(); + new Dino.Ui.ChatInput.View(); + new Dino.Ui.GlobalSearch(); Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui"); paned = (Paned) builder.get_object("paned"); box.add(paned); From 5f5b8fdfa0c1e8112be24839e7aa29732b73efa8 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 2 May 2020 19:42:43 -0300 Subject: [PATCH 020/161] fix build on newest MSYS2 --- cmake/PkgConfigWithFallback.cmake | 5 ++++- cmake/PkgConfigWithFallbackOnConfigScript.cmake | 5 ++++- main/src/ui/main_window.vala | 14 ++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/cmake/PkgConfigWithFallback.cmake b/cmake/PkgConfigWithFallback.cmake index 9124bb350..5522d830e 100644 --- a/cmake/PkgConfigWithFallback.cmake +++ b/cmake/PkgConfigWithFallback.cmake @@ -18,7 +18,10 @@ function(find_pkg_config_with_fallback name) find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) - unset(${name}_FOUND) + find_library(${name}_${lib}_LIBRARY ${lib} HINTS "C:/msys64/mingw64/x86_64-w64-mingw32/lib") + if(NOT ${name}_${lib}_LIBRARY) + unset(${name}_FOUND) + endif(NOT ${name}_${lib}_LIBRARY) endif(NOT ${name}_${lib}_LIBRARY) endforeach(lib) if(${name}_FOUND) diff --git a/cmake/PkgConfigWithFallbackOnConfigScript.cmake b/cmake/PkgConfigWithFallbackOnConfigScript.cmake index 4bc94a33f..c8d751ce7 100644 --- a/cmake/PkgConfigWithFallbackOnConfigScript.cmake +++ b/cmake/PkgConfigWithFallbackOnConfigScript.cmake @@ -18,7 +18,10 @@ function(find_pkg_config_with_fallback_on_config_script name) find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) - unset(${name}_FOUND) + find_library(${name}_${lib}_LIBRARY ${lib} HINTS "C:/msys64/mingw64/x86_64-w64-mingw32/lib") + if(NOT ${name}_${lib}_LIBRARY) + unset(${name}_FOUND) + endif(NOT ${name}_${lib}_LIBRARY) endif(NOT ${name}_${lib}_LIBRARY) endforeach(lib) if(${name}_FOUND) diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala index ca352b53a..e3284ad9e 100644 --- a/main/src/ui/main_window.vala +++ b/main/src/ui/main_window.vala @@ -54,10 +54,16 @@ public class MainWindow : Gtk.Window { } private void setup_unified() { - new Dino.Ui.ConversationSelector(); - new Dino.Ui.ConversationSummary.ConversationView(); - new Dino.Ui.ChatInput.View(); - new Dino.Ui.GlobalSearch(); + { + new Dino.Ui.ConversationSelector(); + new Dino.Ui.ConversationSummary.ConversationView(); + new Dino.Ui.ChatInput.View(); + new Dino.Ui.GlobalSearch(); + new Dino.Ui.ConversationView(); + new Dino.Ui.SizeRequestBox(); + new Dino.Ui.SizingBin(); + } + Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui"); paned = (Paned) builder.get_object("paned"); box.add(paned); From 1841b348f1c3a127c89961f4c438b96023169b60 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 2 May 2020 21:05:14 -0300 Subject: [PATCH 021/161] Do not search for the built-in libraries when compiling with MINGW --- cmake/PkgConfigWithFallback.cmake | 10 ++++++---- cmake/PkgConfigWithFallbackOnConfigScript.cmake | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cmake/PkgConfigWithFallback.cmake b/cmake/PkgConfigWithFallback.cmake index 5522d830e..71041710f 100644 --- a/cmake/PkgConfigWithFallback.cmake +++ b/cmake/PkgConfigWithFallback.cmake @@ -13,15 +13,17 @@ function(find_pkg_config_with_fallback name) # Found via pkg-config, using its result values set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND}) + if(MINGW) + list(FILTER ${name}_PKG_CONFIG_LIBRARIES EXCLUDE REGEX "(ole32)|(gdi32)|(imm32)|(shell32)|(winmm)|(dwmapi)|(setupapi)|(cfgmgr32)|(ws2_32)") + endif(MINGW) + # Try to find real file name of libraries foreach(lib ${${name}_PKG_CONFIG_LIBRARIES}) find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) - find_library(${name}_${lib}_LIBRARY ${lib} HINTS "C:/msys64/mingw64/x86_64-w64-mingw32/lib") - if(NOT ${name}_${lib}_LIBRARY) - unset(${name}_FOUND) - endif(NOT ${name}_${lib}_LIBRARY) + message(${name} ": " ${lib} " library not found") + unset(${name}_FOUND) endif(NOT ${name}_${lib}_LIBRARY) endforeach(lib) if(${name}_FOUND) diff --git a/cmake/PkgConfigWithFallbackOnConfigScript.cmake b/cmake/PkgConfigWithFallbackOnConfigScript.cmake index c8d751ce7..378ec0a15 100644 --- a/cmake/PkgConfigWithFallbackOnConfigScript.cmake +++ b/cmake/PkgConfigWithFallbackOnConfigScript.cmake @@ -13,15 +13,17 @@ function(find_pkg_config_with_fallback_on_config_script name) # Found via pkg-config, using it's result values set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND}) + if(MINGW) + list(FILTER ${name}_PKG_CONFIG_LIBRARIES EXCLUDE REGEX "(ole32)|(gdi32)|(imm32)|(shell32)|(winmm)|(dwmapi)|(setupapi)|(cfgmgr32)|(ws2_32)") + endif(MINGW) + # Try to find real file name of libraries foreach(lib ${${name}_PKG_CONFIG_LIBRARIES}) find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) - find_library(${name}_${lib}_LIBRARY ${lib} HINTS "C:/msys64/mingw64/x86_64-w64-mingw32/lib") - if(NOT ${name}_${lib}_LIBRARY) - unset(${name}_FOUND) - endif(NOT ${name}_${lib}_LIBRARY) + message(${name} ": " ${lib} " library not found") + unset(${name}_FOUND) endif(NOT ${name}_${lib}_LIBRARY) endforeach(lib) if(${name}_FOUND) From 0d384f83ae5b97bab4b6eae2b69c9c1847efc3fc Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Mon, 4 May 2020 18:10:05 -0300 Subject: [PATCH 022/161] Added _WIN32 define to VALAC on Windows --- CMakeLists.txt | 4 ++++ libdino/src/service/util.vala | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5516dbdbc..4b117f00b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,10 @@ if (NOT NO_DEBUG) set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} -g") endif (NOT NO_DEBUG) +if (WIN32) + set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --define=_WIN32") +endif(WIN32) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 9fe3029cd..bb7198d36 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -29,7 +29,7 @@ public class Util { public static string get_content_type(FileInfo fileInfo) { -//#if WIN32 +#if _WIN32 string fileName = fileInfo.get_name(); int fileNameLength = fileName.length; int extIndex = fileName.index_of("."); @@ -42,8 +42,7 @@ public class Util { return mime_type; } } -//#endif - +#endif return fileInfo.get_content_type(); } } From e2fd821bb4723f0e74c69672e76747c19ecebdaf Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Mon, 4 May 2020 18:16:17 -0300 Subject: [PATCH 023/161] Add missing _WIN32 --- main/src/ui/main_window.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala index e3284ad9e..d1f130fd2 100644 --- a/main/src/ui/main_window.vala +++ b/main/src/ui/main_window.vala @@ -54,6 +54,7 @@ public class MainWindow : Gtk.Window { } private void setup_unified() { +#if _WIN32 // WIN32 seems to not support exporting these symbols { new Dino.Ui.ConversationSelector(); new Dino.Ui.ConversationSummary.ConversationView(); @@ -63,7 +64,7 @@ public class MainWindow : Gtk.Window { new Dino.Ui.SizeRequestBox(); new Dino.Ui.SizingBin(); } - +#endif Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui"); paned = (Paned) builder.get_object("paned"); box.add(paned); From 281a84a14c79f3c878cca502dea973510322b4fe Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 6 May 2020 22:22:38 -0300 Subject: [PATCH 024/161] Add support for OpenPGP on Windows --- plugins/gpgme-vala/src/gpgme_helper.vala | 3 +++ plugins/gpgme-vala/vapi/gpgme_public.vapi | 3 +++ 2 files changed, 6 insertions(+) diff --git a/plugins/gpgme-vala/src/gpgme_helper.vala b/plugins/gpgme-vala/src/gpgme_helper.vala index f28bc6d6b..3f42bb51e 100644 --- a/plugins/gpgme-vala/src/gpgme_helper.vala +++ b/plugins/gpgme-vala/src/gpgme_helper.vala @@ -176,6 +176,9 @@ private static uint8[] get_uint8_from_data(Data data) { private static void initialize() { if (!initialized) { +#if _WIN32 + set_global_flag("w32-inst-dir", "C://Program Files (x86)//GnuPG//bin"); +#endif check_version(); initialized = true; } diff --git a/plugins/gpgme-vala/vapi/gpgme_public.vapi b/plugins/gpgme-vala/vapi/gpgme_public.vapi index bcf125696..5dbe023e2 100644 --- a/plugins/gpgme-vala/vapi/gpgme_public.vapi +++ b/plugins/gpgme-vala/vapi/gpgme_public.vapi @@ -4,6 +4,9 @@ namespace GPG { [CCode (cname = "gpgme_check_version")] public unowned string check_version(string? required_version = null); +[CCode (cname = "gpgme_set_global_flag")] +public int set_global_flag(string name, string value); + [Compact] [CCode (cname = "struct _gpgme_key", ref_function = "gpgme_key_ref_vapi", unref_function = "gpgme_key_unref_vapi", free_function = "gpgme_key_release")] public class Key { From 8cb15fc32563aa4946e3e4733e12b601fdb09c4a Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Thu, 7 May 2020 21:09:20 -0300 Subject: [PATCH 025/161] Use ShellExecute instead of AppInfo to open files on Windows --- libdino/src/service/util.vala | 18 ++++++++++++++++++ .../conversation_content_view/file_widget.vala | 2 +- .../ui/manage_accounts/add_account_dialog.vala | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index bb7198d36..6680cadec 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -3,6 +3,15 @@ using Dino.Entities; namespace Dino { public class Util { + #if _WIN32 + [CCode (cname = "ShellExecuteA")] + private static extern int ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd); + + private static int ShellExecute(string file) { + return ShellExecuteA(null, null, file, null, null, 0); + } + #endif + public static Message.Type get_message_type_for_conversation(Conversation conversation) { switch (conversation.type_) { case Conversation.Type.CHAT: @@ -26,6 +35,15 @@ public class Util { } assert_not_reached(); } + + public static void launch_default_for_uri(string file_uri) + { +#if _WIN32 + Dino.Util.ShellExecute(file_uri); +#else + AppInfo.launch_default_for_uri(file_uri, null); +#endif + } public static string get_content_type(FileInfo fileInfo) { diff --git a/main/src/ui/conversation_content_view/file_widget.vala b/main/src/ui/conversation_content_view/file_widget.vala index 7d77ba11f..92380c82a 100644 --- a/main/src/ui/conversation_content_view/file_widget.vala +++ b/main/src/ui/conversation_content_view/file_widget.vala @@ -165,7 +165,7 @@ public class FileDefaultWidgetController : Object { case FileTransfer.State.COMPLETE: if (event_button.button == 1) { try{ - AppInfo.launch_default_for_uri(file_uri, null); + Dino.Util.launch_default_for_uri(file_uri); } catch (Error err) { warning("Failed to open %s - %s", file_uri, err.message); } diff --git a/main/src/ui/manage_accounts/add_account_dialog.vala b/main/src/ui/manage_accounts/add_account_dialog.vala index 2f2bcb43f..33b7c129d 100644 --- a/main/src/ui/manage_accounts/add_account_dialog.vala +++ b/main/src/ui/manage_accounts/add_account_dialog.vala @@ -368,7 +368,7 @@ public class AddAccountDialog : Gtk.Dialog { // Button is opening a registration website if (form.oob != null) { try { - AppInfo.launch_default_for_uri(form.oob, null); + Dino.Util.launch_default_for_uri(form.oob); } catch (Error e) { } show_sign_in_jid(); return; From 25673ab145f3a544ceb6701020bedf2dbe1fdd73 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 9 May 2020 13:52:18 -0300 Subject: [PATCH 026/161] Use slight larger font on Windows so it matches Linux style Also fixes some fuzzy fonts. --- main/CMakeLists.txt | 1 + main/data/win32_larger_fonts.css | 3 +++ main/src/ui/application.vala | 6 ++++++ 3 files changed, 10 insertions(+) create mode 100644 main/data/win32_larger_fonts.css diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 4891abb0c..89034484e 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -87,6 +87,7 @@ set(RESOURCE_LIST unified_main_content.ui unified_window_placeholder.ui + win32_larger_fonts.css theme.css ) diff --git a/main/data/win32_larger_fonts.css b/main/data/win32_larger_fonts.css new file mode 100644 index 000000000..e8983b78c --- /dev/null +++ b/main/data/win32_larger_fonts.css @@ -0,0 +1,3 @@ +* { + font-size: 1.125rem; +} \ No newline at end of file diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 780c37fd7..6d4f74ff0 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -27,6 +27,12 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { Environment.set_application_name("Dino"); Window.set_default_icon_name("im.dino.Dino"); +#if _WIN32 + CssProvider larger_fonts = new CssProvider(); + larger_fonts.load_from_resource("/im/dino/Dino/win32_larger_fonts.css"); + StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), larger_fonts, STYLE_PROVIDER_PRIORITY_APPLICATION); +#endif + CssProvider provider = new CssProvider(); provider.load_from_resource("/im/dino/Dino/theme.css"); StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider, STYLE_PROVIDER_PRIORITY_APPLICATION); From 03f17b8f39e8e5289802bd83c2faacbd0db26f24 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 10 May 2020 07:26:54 -0300 Subject: [PATCH 027/161] Fixed some Windows not appearing when opening file --- libdino/src/application.vala | 3 +++ libdino/src/service/util.vala | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libdino/src/application.vala b/libdino/src/application.vala index f381c21db..4cb54a428 100644 --- a/libdino/src/application.vala +++ b/libdino/src/application.vala @@ -61,6 +61,9 @@ public interface Application : GLib.Application { }); shutdown.connect(() => { stream_interactor.connection_manager.make_offline_all(); +#if _WIN32 + Dino.Util.CoUninitialize(); +#endif }); open.connect((files, hint) => { if (files.length != 1) { diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 6680cadec..dbc98b2ab 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -7,8 +7,15 @@ public class Util { [CCode (cname = "ShellExecuteA")] private static extern int ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd); - private static int ShellExecute(string file) { - return ShellExecuteA(null, null, file, null, null, 0); + [CCode (cname = "CoInitialize")] + public static extern int CoInitialize(void* reserved); + + [CCode (cname = "CoUninitialize")] + public static extern void CoUninitialize(); + + private static int ShellExecute(string operation, string file) { + CoInitialize(null); + return ShellExecuteA(null, operation, file, null, null, 1); } #endif @@ -39,7 +46,7 @@ public class Util { public static void launch_default_for_uri(string file_uri) { #if _WIN32 - Dino.Util.ShellExecute(file_uri); + Dino.Util.ShellExecute("open", file_uri); #else AppInfo.launch_default_for_uri(file_uri, null); #endif From 16d0cc6fd9bcf7c0c849523d82e1e266bffa3d25 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Tue, 19 May 2020 07:29:43 -0300 Subject: [PATCH 028/161] Set alternate file stream for downloaded files. --- libdino/src/service/file_manager.vala | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libdino/src/service/file_manager.vala b/libdino/src/service/file_manager.vala index 6a851241b..cac278285 100644 --- a/libdino/src/service/file_manager.vala +++ b/libdino/src/service/file_manager.vala @@ -248,6 +248,13 @@ public class FileManager : StreamInteractionModule, Object { file_transfer.mime_type = Util.get_content_type(file_info); file_transfer.state = FileTransfer.State.COMPLETE; + +#if _WIN32 // Add Zone.Identifier so Windows knows this file was downloaded from the internet + var file_alternate_stream = File.new_for_path(Path.build_filename(get_storage_dir(), filename + ":Zone.Identifier")); + var os_alternate_stream = file_alternate_stream.create(FileCreateFlags.REPLACE_DESTINATION); + os_alternate_stream.write("[ZoneTransfer]\r\nZoneId=3".data); +#endif + } catch (Error e) { warning("Error downloading file: %s", e.message); file_transfer.state = FileTransfer.State.FAILED; From 1673ec348185e7cede4d2e77404129c08a45e692 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Tue, 19 May 2020 18:07:46 -0300 Subject: [PATCH 029/161] Added information and Dino icon to Windows executable --- main/CMakeLists.txt | 7 ++++++- main/dino-info.rc | 25 +++++++++++++++++++++++++ main/dino.ico | Bin 0 -> 100395 bytes 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 main/dino-info.rc create mode 100644 main/dino.ico diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 89034484e..7a4fec667 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -213,7 +213,12 @@ OPTIONS ) add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DDINO_VERSION=\"${PROJECT_VERSION}\") -add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c) +if(WIN32) + set(CMAKE_RC_COMPILE_OBJECT " --use-temp-file -O coff -i -o ") + add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c dino-info.rc) +else(WIN32) + add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c) +endif(WIN32) add_dependencies(dino ${GETTEXT_PACKAGE}-translations) target_include_directories(dino PRIVATE src) target_link_libraries(dino libdino ${MAIN_PACKAGES}) diff --git a/main/dino-info.rc b/main/dino-info.rc new file mode 100644 index 000000000..c0f8e01ed --- /dev/null +++ b/main/dino-info.rc @@ -0,0 +1,25 @@ +1 VERSIONINFO +FILEVERSION 0,1,0,0 +PRODUCTVERSION 0,1,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904E4" + BEGIN + VALUE "CompanyName", "Dino" + VALUE "FileDescription", "Dino - Modern XMPP (""Jabber"") Chat Client" + VALUE "FileVersion", "0.1.0-win" + VALUE "InternalName", "dino" + VALUE "LegalCopyright", "Dino" + VALUE "OriginalFilename", "dino.exe" + VALUE "ProductName", "Dino" + VALUE "ProductVersion", DINO_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1252 + END +END + +DINO_ICO ICON "./dino.ico" \ No newline at end of file diff --git a/main/dino.ico b/main/dino.ico new file mode 100644 index 0000000000000000000000000000000000000000..898e438766dcc25f69da186b00f74d73209c448c GIT binary patch literal 100395 zcmagFbyOTrum(CT?(XgcclV$P?(Xg$+}#NT3GTt2;O+!>cM0wuc>BBeo%8;A=iEJK zcc!Lis=KSd`l`C87XTmtcmNFz03XSKWDo$P0sw%A_rLNHBmjH@f62)HSN4Sl05n(t zU}gPZc?J#uVvztqRP=vkd}IL7#|8i+qyLqyz~>$m01z1Xzj7EU0BrIA|MU5;K15{z zFxCA3RZuBO%GGuOmgm2zqRVKq6mndGaA)oS0X!ErIaeMNGs7sDAPvN2@*?nQti&v zDL3*9k$%JCESYN?Ydt0mArkwi@u`-Z$s~iSKnkOl{_Ir_ZpJQ|D3OvJT-MKAD}|xN z1g|B+ep487UAgA{st*84LVH{qBj0$CT%g)Xn2Z;ED*+8C8(C3)Y;o0r1dRv*pXT3F zVDrM7cIf{-^KA=`z{U6_9|OIC?Wsr~T27T9e~~Z29R3O2BxZOMS%cb(bBlmvuEjV z>(~Y`lVpFnfs-X!sN3FBWqyz)Y;_aF-FrB((SK|>hloC-Dn6~xVA;q-B)h9X>-E;jBfNL%)3U?_5AlyD$Gci+e&I~=n0s*%?Hve`Mg z>D$_D{Ut1*ukqvSH=0fM_mi;8x3Q4NL%F+L<*X-r+M;@=QoeYY5?4~-7xUIpqe0DY zB)Crz)zzKPap9JhsM;1!3h{f#A3whOmCVAKfWZp@vXTlC)#66M|38ofI|+dIKakx1 zCiDaVkk$V|QYNZ6)zOO39d9^b)Z99`X=9N)n3I8GhMlOt`F*7%^DA@OF3m>ld&j<2 zgMs&{%~zh2ws-Ah>N)Oqz3)xLo)!@?>8IA9a)aonitl6F=GP1J!_ZcO&bu_? zkxz==*>v0Ge@B0qIBAoSR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DU{Pg$p~BkPWo8=7zHsu#FQQUE zjV=F`e=XTefxW<%;ptnNjN(=%U+4P2tF{v3wy;l$-T!M#TdQRazKQtnHf&4m!~B0| n|MyS--TZ&e{{K#ntncwEX$Ha*NC0>M?4kNxOQ}i$9{m3Rd7c`9 literal 0 HcmV?d00001 From 6d5ee03e9e044eb6ff5c58547aa6a20b205d96f6 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 20 May 2020 20:28:59 -0300 Subject: [PATCH 030/161] Set Windows executable version from PROJECT_VERSION --- main/CMakeLists.txt | 8 +++++++- main/dino-info.rc | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 7a4fec667..3027efd75 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -212,7 +212,13 @@ OPTIONS ${MAIN_EXTRA_OPTIONS} ) -add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DDINO_VERSION=\"${PROJECT_VERSION}\") +if (PROJECT_VERSION MATCHES "([0-9]+)[.]([0-9]+)[.]([0-9]+)") + set(DINO_NUMERIC_VERSION "${CMAKE_MATCH_1},${CMAKE_MATCH_2},${CMAKE_MATCH_3},0") +else() + set(DINO_NUMERIC_VERSION "0,0,0,0") +endif () + +add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DDINO_VERSION=\"${PROJECT_VERSION}\" -DDINO_NUMERIC_VERSION=${DINO_NUMERIC_VERSION}) if(WIN32) set(CMAKE_RC_COMPILE_OBJECT " --use-temp-file -O coff -i -o ") add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c dino-info.rc) diff --git a/main/dino-info.rc b/main/dino-info.rc index c0f8e01ed..eedec5a0d 100644 --- a/main/dino-info.rc +++ b/main/dino-info.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO -FILEVERSION 0,1,0,0 -PRODUCTVERSION 0,1,0,0 +FILEVERSION DINO_NUMERIC_VERSION +PRODUCTVERSION DINO_NUMERIC_VERSION BEGIN BLOCK "StringFileInfo" BEGIN @@ -8,7 +8,7 @@ BEGIN BEGIN VALUE "CompanyName", "Dino" VALUE "FileDescription", "Dino - Modern XMPP (""Jabber"") Chat Client" - VALUE "FileVersion", "0.1.0-win" + VALUE "FileVersion", DINO_VERSION VALUE "InternalName", "dino" VALUE "LegalCopyright", "Dino" VALUE "OriginalFilename", "dino.exe" From 823df3ed70ecc1ba512e0b9e3038f7c3c0aef679 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 20 May 2020 21:02:43 -0300 Subject: [PATCH 031/161] Add WIN32 fonts as a plugin --- CMakeLists.txt | 3 ++ main/CMakeLists.txt | 1 - main/src/ui/application.vala | 6 --- plugins/CMakeLists.txt | 4 ++ plugins/win32-fonts/CMakeLists.txt | 43 +++++++++++++++++++ .../win32-fonts/data/larger.css | 0 plugins/win32-fonts/src/plugin.vala | 16 +++++++ plugins/win32-fonts/src/register_plugin.vala | 3 ++ 8 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 plugins/win32-fonts/CMakeLists.txt rename main/data/win32_larger_fonts.css => plugins/win32-fonts/data/larger.css (100%) create mode 100644 plugins/win32-fonts/src/plugin.vala create mode 100644 plugins/win32-fonts/src/register_plugin.vala diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b117f00b..8a984fd86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ endif () # Prepare Plugins set(DEFAULT_PLUGINS omemo;openpgp;http-files;ice;rtp) +if (WIN32) + set(DEFAULT_PLUGINS ${DEFAULT_PLUGINS};win32-fonts) +endif (WIN32) foreach (plugin ${DEFAULT_PLUGINS}) if ("$CACHE{DINO_PLUGIN_ENABLED_${plugin}}" STREQUAL "") if (NOT DEFINED DINO_PLUGIN_ENABLED_${plugin}}) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 3027efd75..c9e2e6a09 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -87,7 +87,6 @@ set(RESOURCE_LIST unified_main_content.ui unified_window_placeholder.ui - win32_larger_fonts.css theme.css ) diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 6d4f74ff0..780c37fd7 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -27,12 +27,6 @@ public class Dino.Ui.Application : Gtk.Application, Dino.Application { Environment.set_application_name("Dino"); Window.set_default_icon_name("im.dino.Dino"); -#if _WIN32 - CssProvider larger_fonts = new CssProvider(); - larger_fonts.load_from_resource("/im/dino/Dino/win32_larger_fonts.css"); - StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), larger_fonts, STYLE_PROVIDER_PRIORITY_APPLICATION); -#endif - CssProvider provider = new CssProvider(); provider.load_from_resource("/im/dino/Dino/theme.css"); StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), provider, STYLE_PROVIDER_PRIORITY_APPLICATION); diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 8ff9e16f7..b31379469 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -23,3 +23,7 @@ endif(DINO_PLUGIN_ENABLED_omemo) if(DINO_PLUGIN_ENABLED_notification-sound) add_subdirectory(notification-sound) endif(DINO_PLUGIN_ENABLED_notification-sound) + +if(DINO_PLUGIN_ENABLED_win32-fonts) + add_subdirectory(win32-fonts) +endif(DINO_PLUGIN_ENABLED_win32-fonts) diff --git a/plugins/win32-fonts/CMakeLists.txt b/plugins/win32-fonts/CMakeLists.txt new file mode 100644 index 000000000..b5a80e52f --- /dev/null +++ b/plugins/win32-fonts/CMakeLists.txt @@ -0,0 +1,43 @@ +find_packages(WIN32_FONTS_PACKAGES REQUIRED + Gee + GLib + GModule + GObject + GTK3 +) + +set(RESOURCE_LIST + larger.css +) + +compile_gresources( + WIN32_FONTS_GRESOURCES_TARGET + WIN32_FONTS_GRESOURCES_XML + TARGET ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c + TYPE EMBED_C + RESOURCES ${RESOURCE_LIST} + PREFIX /im/dino/Dino/win32-fonts + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/data +) + +vala_precompile(WIN32_FONTS_VALA_C +SOURCES + src/plugin.vala + src/register_plugin.vala +CUSTOM_VAPIS + ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi + ${CMAKE_BINARY_DIR}/exports/dino.vapi + ${CMAKE_BINARY_DIR}/exports/qlite.vapi +PACKAGES + ${WIN32_FONTS_PACKAGES} +GRESOURCES + ${WIN32_FONTS_GRESOURCES_XML} +) + +add_definitions(${VALA_CFLAGS}) +add_library(win32-fonts SHARED ${WIN32_FONTS_VALA_C} ${WIN32_FONTS_GRESOURCES_TARGET}) +target_link_libraries(win32-fonts libdino ${WIN32_FONTS_PACKAGES}) +set_target_properties(win32-fonts PROPERTIES PREFIX "") +set_target_properties(win32-fonts PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) + +install(TARGETS win32-fonts ${PLUGIN_INSTALL}) diff --git a/main/data/win32_larger_fonts.css b/plugins/win32-fonts/data/larger.css similarity index 100% rename from main/data/win32_larger_fonts.css rename to plugins/win32-fonts/data/larger.css diff --git a/plugins/win32-fonts/src/plugin.vala b/plugins/win32-fonts/src/plugin.vala new file mode 100644 index 000000000..1d9d00bdc --- /dev/null +++ b/plugins/win32-fonts/src/plugin.vala @@ -0,0 +1,16 @@ +using Gtk; + +namespace Dino.Plugins.Win32Fonts { + +public class Plugin : RootInterface, Object { + + public void registered(Dino.Application app) { + CssProvider larger_fonts = new CssProvider(); + larger_fonts.load_from_resource("/im/dino/Dino/win32-fonts/larger.css"); + StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), larger_fonts, STYLE_PROVIDER_PRIORITY_APPLICATION); + } + + public void shutdown() { } +} + +} diff --git a/plugins/win32-fonts/src/register_plugin.vala b/plugins/win32-fonts/src/register_plugin.vala new file mode 100644 index 000000000..b0bfa3750 --- /dev/null +++ b/plugins/win32-fonts/src/register_plugin.vala @@ -0,0 +1,3 @@ +public Type register_plugin(Module module) { + return typeof (Dino.Plugins.Win32Fonts.Plugin); +} From 9022ac596b8c3710834a6c36a39e1c37cb88a32f Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 20 May 2020 21:28:58 -0300 Subject: [PATCH 032/161] Every call to CoInitialize() must be balanced with a call to CoUninitialize() --- libdino/src/application.vala | 3 --- libdino/src/service/util.vala | 11 +++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libdino/src/application.vala b/libdino/src/application.vala index 4cb54a428..f381c21db 100644 --- a/libdino/src/application.vala +++ b/libdino/src/application.vala @@ -61,9 +61,6 @@ public interface Application : GLib.Application { }); shutdown.connect(() => { stream_interactor.connection_manager.make_offline_all(); -#if _WIN32 - Dino.Util.CoUninitialize(); -#endif }); open.connect((files, hint) => { if (files.length != 1) { diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index dbc98b2ab..66cee1c42 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -8,14 +8,17 @@ public class Util { private static extern int ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd); [CCode (cname = "CoInitialize")] - public static extern int CoInitialize(void* reserved); + private static extern int CoInitialize(void* reserved); [CCode (cname = "CoUninitialize")] - public static extern void CoUninitialize(); + private static extern void CoUninitialize(); private static int ShellExecute(string operation, string file) { CoInitialize(null); - return ShellExecuteA(null, operation, file, null, null, 1); + var result = ShellExecuteA(null, operation, file, null, null, 1); + CoUninitialize(); + + return result; } #endif @@ -46,7 +49,7 @@ public class Util { public static void launch_default_for_uri(string file_uri) { #if _WIN32 - Dino.Util.ShellExecute("open", file_uri); + ShellExecute("open", file_uri); #else AppInfo.launch_default_for_uri(file_uri, null); #endif From e7fd7f4726e506feca5a0c20193c9c8cfdb81f53 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 20 May 2020 22:02:09 -0300 Subject: [PATCH 033/161] Add --export-all-symbols to Windows compilation --- main/CMakeLists.txt | 3 +++ main/src/ui/main_window.vala | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index c9e2e6a09..54bd5b779 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,3 +1,5 @@ + + set(GETTEXT_PACKAGE "dino") find_package(Gettext) include(${GETTEXT_USE_FILE}) @@ -219,6 +221,7 @@ endif () add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\" -DDINO_VERSION=\"${PROJECT_VERSION}\" -DDINO_NUMERIC_VERSION=${DINO_NUMERIC_VERSION}) if(WIN32) + add_link_options("-Wl,--export-all-symbols") set(CMAKE_RC_COMPILE_OBJECT " --use-temp-file -O coff -i -o ") add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET} src/emojichooser.c dino-info.rc) else(WIN32) diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala index d1f130fd2..df24038ac 100644 --- a/main/src/ui/main_window.vala +++ b/main/src/ui/main_window.vala @@ -54,17 +54,6 @@ public class MainWindow : Gtk.Window { } private void setup_unified() { -#if _WIN32 // WIN32 seems to not support exporting these symbols - { - new Dino.Ui.ConversationSelector(); - new Dino.Ui.ConversationSummary.ConversationView(); - new Dino.Ui.ChatInput.View(); - new Dino.Ui.GlobalSearch(); - new Dino.Ui.ConversationView(); - new Dino.Ui.SizeRequestBox(); - new Dino.Ui.SizingBin(); - } -#endif Builder builder = new Builder.from_resource("/im/dino/Dino/unified_main_content.ui"); paned = (Paned) builder.get_object("paned"); box.add(paned); From a6515ed826b7f367670138637d582be937c4c59e Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 20 May 2020 23:16:39 -0300 Subject: [PATCH 034/161] Add implicit link directories to package HINT path on MingW Instead of blacklisting those libraries --- cmake/PkgConfigWithFallback.cmake | 4 ++-- cmake/PkgConfigWithFallbackOnConfigScript.cmake | 4 ++-- main/CMakeLists.txt | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/PkgConfigWithFallback.cmake b/cmake/PkgConfigWithFallback.cmake index 71041710f..f2bfdf666 100644 --- a/cmake/PkgConfigWithFallback.cmake +++ b/cmake/PkgConfigWithFallback.cmake @@ -14,12 +14,12 @@ function(find_pkg_config_with_fallback name) set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND}) if(MINGW) - list(FILTER ${name}_PKG_CONFIG_LIBRARIES EXCLUDE REGEX "(ole32)|(gdi32)|(imm32)|(shell32)|(winmm)|(dwmapi)|(setupapi)|(cfgmgr32)|(ws2_32)") + set(MINGWLIBPATH ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) endif(MINGW) # Try to find real file name of libraries foreach(lib ${${name}_PKG_CONFIG_LIBRARIES}) - find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS}) + find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS} ${MINGWLIBPATH}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) message(${name} ": " ${lib} " library not found") diff --git a/cmake/PkgConfigWithFallbackOnConfigScript.cmake b/cmake/PkgConfigWithFallbackOnConfigScript.cmake index 378ec0a15..ca18d5bf4 100644 --- a/cmake/PkgConfigWithFallbackOnConfigScript.cmake +++ b/cmake/PkgConfigWithFallbackOnConfigScript.cmake @@ -14,12 +14,12 @@ function(find_pkg_config_with_fallback_on_config_script name) set(${name}_FOUND ${${name}_PKG_CONFIG_FOUND}) if(MINGW) - list(FILTER ${name}_PKG_CONFIG_LIBRARIES EXCLUDE REGEX "(ole32)|(gdi32)|(imm32)|(shell32)|(winmm)|(dwmapi)|(setupapi)|(cfgmgr32)|(ws2_32)") + set(MINGWLIBPATH ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) endif(MINGW) # Try to find real file name of libraries foreach(lib ${${name}_PKG_CONFIG_LIBRARIES}) - find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS}) + find_library(${name}_${lib}_LIBRARY ${lib} HINTS ${${name}_PKG_CONFIG_LIBRARY_DIRS} ${MINGWLIBPATH}) mark_as_advanced(${name}_${lib}_LIBRARY) if(NOT ${name}_${lib}_LIBRARY) message(${name} ": " ${lib} " library not found") diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 54bd5b779..1bb6fecc5 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -1,5 +1,3 @@ - - set(GETTEXT_PACKAGE "dino") find_package(Gettext) include(${GETTEXT_USE_FILE}) From 50b2a0dc0aab262a8a94bba3ad86d6a1b7174c75 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Thu, 21 May 2020 08:57:46 -0300 Subject: [PATCH 035/161] Do not hardcode GPG path on Windows --- plugins/gpgme-vala/src/gpgme_helper.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/gpgme-vala/src/gpgme_helper.vala b/plugins/gpgme-vala/src/gpgme_helper.vala index 3f42bb51e..ee4d0095f 100644 --- a/plugins/gpgme-vala/src/gpgme_helper.vala +++ b/plugins/gpgme-vala/src/gpgme_helper.vala @@ -177,7 +177,11 @@ private static uint8[] get_uint8_from_data(Data data) { private static void initialize() { if (!initialized) { #if _WIN32 - set_global_flag("w32-inst-dir", "C://Program Files (x86)//GnuPG//bin"); + string gpg = GLib.Environment.find_program_in_path("gpg.exe"); + if (gpg != null && gpg.length > 0) + { + set_global_flag("w32-inst-dir", GLib.Path.get_dirname(gpg)); + } #endif check_version(); initialized = true; From 24890ca38a4676cb2c8b19388837c021f8b27288 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 4 Oct 2020 06:40:26 -0300 Subject: [PATCH 036/161] Export all plugin symbols on Windows --- plugins/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index b31379469..ed7feb6ec 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,3 +1,7 @@ +if(WIN32) + add_link_options("-Wl,--export-all-symbols") +endif(WIN32) + if(DINO_PLUGIN_ENABLED_http-files) add_subdirectory(http-files) endif(DINO_PLUGIN_ENABLED_http-files) From 0b9bebd97e285836f89c580cf974d484dc729b61 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 4 Oct 2020 06:41:00 -0300 Subject: [PATCH 037/161] Use Dino.Util.get_content_type also on preview --- main/src/ui/conversation_content_view/file_image_widget.vala | 2 +- main/src/ui/file_send_overlay.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/ui/conversation_content_view/file_image_widget.vala b/main/src/ui/conversation_content_view/file_image_widget.vala index 8005f9967..f6ad84c75 100644 --- a/main/src/ui/conversation_content_view/file_image_widget.vala +++ b/main/src/ui/conversation_content_view/file_image_widget.vala @@ -46,7 +46,7 @@ public class FileImageWidget : EventBox { if (image == null) throw new Error(-1, 0, "Error loading image"); FileInfo file_info = file.query_info("*", FileQueryInfoFlags.NONE); - string? mime_type = file_info.get_content_type(); + string? mime_type = Dino.Util.get_content_type(file_info); file_default_widget = new FileDefaultWidget() { valign=Align.END, vexpand=false }; file_default_widget.stack_event_box.visible = false; diff --git a/main/src/ui/file_send_overlay.vala b/main/src/ui/file_send_overlay.vala index e92cf8360..f545129f7 100644 --- a/main/src/ui/file_send_overlay.vala +++ b/main/src/ui/file_send_overlay.vala @@ -50,7 +50,7 @@ public class FileSendOverlay : Gtk.EventBox { private async void load_file_widget(File file, FileInfo file_info) { string file_name = file_info.get_display_name(); - string mime_type = file_info.get_content_type(); + string mime_type = Dino.Util.get_content_type(file_info); bool is_image = false; From 4a3306b4799499a51d22fab066bbf5e8cc88d6a8 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Fri, 20 Nov 2020 08:04:47 -0300 Subject: [PATCH 038/161] Allow 32-bit linking Win32 apis are __stdcall --- libdino/src/service/util.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index 66cee1c42..c7af9243d 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -4,13 +4,13 @@ namespace Dino { public class Util { #if _WIN32 - [CCode (cname = "ShellExecuteA")] + [CCode (cname = "ShellExecuteA", cheader_filename = "windows.h")] private static extern int ShellExecuteA(int* hwnd, string operation, string file, string parameters, string directory, int showCmd); - [CCode (cname = "CoInitialize")] + [CCode (cname = "CoInitialize", cheader_filename = "windows.h")] private static extern int CoInitialize(void* reserved); - [CCode (cname = "CoUninitialize")] + [CCode (cname = "CoUninitialize", cheader_filename = "windows.h")] private static extern void CoUninitialize(); private static int ShellExecute(string operation, string file) { From 3dd19fad7167f1807b4e4d907950f3e1a6a1a7d7 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Fri, 4 Dec 2020 18:41:50 -0300 Subject: [PATCH 039/161] Use last_index_of instead of index_of --- libdino/src/service/util.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdino/src/service/util.vala b/libdino/src/service/util.vala index c7af9243d..59a087266 100644 --- a/libdino/src/service/util.vala +++ b/libdino/src/service/util.vala @@ -60,7 +60,7 @@ public class Util { #if _WIN32 string fileName = fileInfo.get_name(); int fileNameLength = fileName.length; - int extIndex = fileName.index_of("."); + int extIndex = fileName.last_index_of("."); if (extIndex < fileNameLength) { string extension = fileName.substring(extIndex, fileNameLength - extIndex); From 1d4bb774a5c0fe537d382538fd200ada9b89bc5a Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 24 Oct 2020 19:05:35 -0300 Subject: [PATCH 040/161] Initial notification support --- CMakeLists.txt | 2 +- plugins/CMakeLists.txt | 4 ++ plugins/windows-notification/CMakeLists.txt | 53 +++++++++++++++ plugins/windows-notification/src/plugin.vala | 65 +++++++++++++++++++ .../src/register_plugin.vala | 3 + plugins/windows-notification/src/wintoast.c | 49 ++++++++++++++ plugins/windows-notification/src/wintoast.h | 8 +++ 7 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 plugins/windows-notification/CMakeLists.txt create mode 100644 plugins/windows-notification/src/plugin.vala create mode 100644 plugins/windows-notification/src/register_plugin.vala create mode 100644 plugins/windows-notification/src/wintoast.c create mode 100644 plugins/windows-notification/src/wintoast.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a984fd86..74043f087 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ endif () # Prepare Plugins set(DEFAULT_PLUGINS omemo;openpgp;http-files;ice;rtp) if (WIN32) - set(DEFAULT_PLUGINS ${DEFAULT_PLUGINS};win32-fonts) + set(DEFAULT_PLUGINS ${DEFAULT_PLUGINS};win32-fonts;windows-notification) endif (WIN32) foreach (plugin ${DEFAULT_PLUGINS}) if ("$CACHE{DINO_PLUGIN_ENABLED_${plugin}}" STREQUAL "") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index ed7feb6ec..e5b7a4b85 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -28,6 +28,10 @@ if(DINO_PLUGIN_ENABLED_notification-sound) add_subdirectory(notification-sound) endif(DINO_PLUGIN_ENABLED_notification-sound) +if(DINO_PLUGIN_ENABLED_windows-notification) + add_subdirectory(windows-notification) +endif(DINO_PLUGIN_ENABLED_windows-notification) + if(DINO_PLUGIN_ENABLED_win32-fonts) add_subdirectory(win32-fonts) endif(DINO_PLUGIN_ENABLED_win32-fonts) diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt new file mode 100644 index 000000000..70b434f19 --- /dev/null +++ b/plugins/windows-notification/CMakeLists.txt @@ -0,0 +1,53 @@ +find_packages(WINDOWS_NOTIFICATION_PACKAGES REQUIRED + Gee + GLib + GModule + GObject + GTK3 +) + +vala_precompile(WINDOWS_NOTIFICATION_VALA_C +SOURCES + src/plugin.vala + src/register_plugin.vala +CUSTOM_VAPIS + ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi + ${CMAKE_BINARY_DIR}/exports/dino.vapi + ${CMAKE_BINARY_DIR}/exports/qlite.vapi + #${CMAKE_CURRENT_SOURCE_DIR}/vapi/openal.vapi +PACKAGES + ${WINDOWS_NOTIFICATION_PACKAGES} +) + +add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/exports/wintoast.h +COMMAND + cp ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.h ${CMAKE_BINARY_DIR}/exports/wintoast.h +DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.h +COMMENT + Copy header file wintoast.h +) + +add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/exports/wintoast.c +COMMAND + cp ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.c ${CMAKE_BINARY_DIR}/exports/wintoast.c +DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.c +COMMENT + Copy header file wintoast.c +) + +add_custom_target(wintoast +DEPENDS + ${CMAKE_BINARY_DIR}/exports/wintoast.h + ${CMAKE_BINARY_DIR}/exports/wintoast.c +) + +add_definitions(${VALA_CFLAGS}) +add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} src/wintoast.c) +target_link_libraries(windows-notification libdino ${WINDOWS_NOTIFICATION_PACKAGES}) +add_dependencies(windows-notification wintoast) +set_target_properties(windows-notification PROPERTIES PREFIX "") +set_target_properties(windows-notification PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) + +install(TARGETS windows-notification ${PLUGIN_INSTALL}) diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala new file mode 100644 index 000000000..43e76be0f --- /dev/null +++ b/plugins/windows-notification/src/plugin.vala @@ -0,0 +1,65 @@ +using Gee; +using Dino.Entities; + +namespace Dino.Plugins.WindowsNotification { +public class Plugin : RootInterface, Object { + + public Dino.Application app; + + // private class ConvData { + // public int ReadUpToId; + // public int Timestamp; + // } + // private int interval = 0; + // private HashMap conv_data = new HashMap(); + + [CCode (has_target = false)] + private delegate void notification_callback(void* conv); + + [CCode (cname = "init", cheader_filename = "wintoast.h")] + private static extern int init(notification_callback callback); + + [CCode (cname = "uninit", cheader_filename = "wintoast.h")] + private static extern void uninit(); + + [CCode (cname = "show_message", cheader_filename = "wintoast.h")] + private static extern int show_message(char* sender, char* message, char* imagePath, char* protocolName, void *conv); + + private void onclick_callback() { + // TODO: + // This callback should: + // * Open Dino + // * Open Conversation from notification + // * Go to line + // The callback will probably need to receive at least one parameter more. Not difficult to do. + } + + public void registered(Dino.Application app) { + this.app = app; + + init(onclick_callback); + + app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect((item, conversation) => { + if (item.type_ == "message") { + // key: conversation.id value: { conversation.read_up_to.id, last-time-notification-send } + // var conv = conv_data.get(conversation.id); + // if (conv.ReadUpToId == conversation.read_up_to.id) { + // if (now < conv.Timestamp + interval) { + // return; + // } + // } + var message_item = (MessageItem)item; + //var message = item.encryption == Encryption.NONE ? message_item.message.body : "*encrypted*"; + var message = message_item.message.body; + var sender = conversation.nickname != null ? conversation.nickname : conversation.counterpart.to_string(); + show_message(sender, message + "\n", "", "", this); + } + }); + } + + public void shutdown() { + uninit(); + } +} + +} diff --git a/plugins/windows-notification/src/register_plugin.vala b/plugins/windows-notification/src/register_plugin.vala new file mode 100644 index 000000000..5a8f70ac9 --- /dev/null +++ b/plugins/windows-notification/src/register_plugin.vala @@ -0,0 +1,3 @@ +public Type register_plugin(Module module) { + return typeof (Dino.Plugins.WindowsNotification.Plugin); +} diff --git a/plugins/windows-notification/src/wintoast.c b/plugins/windows-notification/src/wintoast.c new file mode 100644 index 000000000..f05aadddb --- /dev/null +++ b/plugins/windows-notification/src/wintoast.c @@ -0,0 +1,49 @@ +#include +#include + +#include "wintoast.h" + +void(*callback)(void*) = NULL; + +HMODULE library_handle = NULL; + +typedef void(*ClickCallbackType)(void*); +typedef int(*PidginWinToastLibInitType)(ClickCallbackType); +typedef int(*PidginWinToastLibShowMessageType)(const char*, const char*, const char*, const char*, void*); + +PidginWinToastLibInitType library_init = NULL; +PidginWinToastLibShowMessageType library_show_message = NULL; + +void init(ClickCallbackType notification_click_callback) { + printf("Inicializando\n"); + + callback = notification_click_callback; + library_handle = LoadLibrary("PidginWinToastLib.dll"); + if (library_handle) { + FARPROC function = GetProcAddress(library_handle, "pidginWinToastLibInit"); + if (function) { + library_init = (PidginWinToastLibInitType)function; + } + + function = GetProcAddress(library_handle, "pidginWinToastLibShowMessage"); + if (function) { + library_show_message = (PidginWinToastLibShowMessageType)function; + } + } + + if (library_init) { + library_init(notification_click_callback); + } +} + +void uninit() { + if (library_handle) { + FreeLibrary(library_handle); + } +} + +void show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv) { + if (library_show_message) { + library_show_message(sender, message, imagePath, protocolName, conv); + } +} \ No newline at end of file diff --git a/plugins/windows-notification/src/wintoast.h b/plugins/windows-notification/src/wintoast.h new file mode 100644 index 000000000..568d4bbc3 --- /dev/null +++ b/plugins/windows-notification/src/wintoast.h @@ -0,0 +1,8 @@ +#ifndef WINTOAST +#define WINTOAST 1 + +void init(void(*notification_click_callback)(void *conv)); +void uninit(); +void show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv); + +#endif \ No newline at end of file From 65a26bce53a985075d33d93b1f34e59a8c5b6a08 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 24 Oct 2020 19:30:57 -0300 Subject: [PATCH 041/161] Refactor windows-notification plugin --- plugins/windows-notification/src/plugin.vala | 23 +++++--- plugins/windows-notification/src/wintoast.c | 59 ++++++++++---------- plugins/windows-notification/src/wintoast.h | 11 +++- 3 files changed, 53 insertions(+), 40 deletions(-) diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala index 43e76be0f..ba275ef04 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/plugin.vala @@ -16,11 +16,14 @@ public class Plugin : RootInterface, Object { [CCode (has_target = false)] private delegate void notification_callback(void* conv); - [CCode (cname = "init", cheader_filename = "wintoast.h")] - private static extern int init(notification_callback callback); + [CCode (cname = "load_library", cheader_filename = "wintoast.h")] + private static extern int load_library(); - [CCode (cname = "uninit", cheader_filename = "wintoast.h")] - private static extern void uninit(); + [CCode (cname = "init_library", cheader_filename = "wintoast.h")] + private static extern int init_library(notification_callback callback); + + [CCode (cname = "uninit_library", cheader_filename = "wintoast.h")] + private static extern void uninit_library(); [CCode (cname = "show_message", cheader_filename = "wintoast.h")] private static extern int show_message(char* sender, char* message, char* imagePath, char* protocolName, void *conv); @@ -36,8 +39,10 @@ public class Plugin : RootInterface, Object { public void registered(Dino.Application app) { this.app = app; - - init(onclick_callback); + if (load_library() != 1 || + init_library(onclick_callback) != 1) { + return; + } app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect((item, conversation) => { if (item.type_ == "message") { @@ -52,13 +57,15 @@ public class Plugin : RootInterface, Object { //var message = item.encryption == Encryption.NONE ? message_item.message.body : "*encrypted*"; var message = message_item.message.body; var sender = conversation.nickname != null ? conversation.nickname : conversation.counterpart.to_string(); - show_message(sender, message + "\n", "", "", this); + if (show_message(sender, message, "", "", this) != 0) { + stderr.printf("Error sending notification."); + }; } }); } public void shutdown() { - uninit(); + uninit_library(); } } diff --git a/plugins/windows-notification/src/wintoast.c b/plugins/windows-notification/src/wintoast.c index f05aadddb..262d8ed3e 100644 --- a/plugins/windows-notification/src/wintoast.c +++ b/plugins/windows-notification/src/wintoast.c @@ -3,47 +3,48 @@ #include "wintoast.h" -void(*callback)(void*) = NULL; +static HMODULE library_handle = NULL; +static PidginWinToastLibInitType library_init = NULL; +static PidginWinToastLibShowMessageType library_show_message = NULL; -HMODULE library_handle = NULL; - -typedef void(*ClickCallbackType)(void*); -typedef int(*PidginWinToastLibInitType)(ClickCallbackType); -typedef int(*PidginWinToastLibShowMessageType)(const char*, const char*, const char*, const char*, void*); - -PidginWinToastLibInitType library_init = NULL; -PidginWinToastLibShowMessageType library_show_message = NULL; - -void init(ClickCallbackType notification_click_callback) { - printf("Inicializando\n"); - - callback = notification_click_callback; +int load_library() { library_handle = LoadLibrary("PidginWinToastLib.dll"); - if (library_handle) { - FARPROC function = GetProcAddress(library_handle, "pidginWinToastLibInit"); - if (function) { - library_init = (PidginWinToastLibInitType)function; - } - - function = GetProcAddress(library_handle, "pidginWinToastLibShowMessage"); - if (function) { - library_show_message = (PidginWinToastLibShowMessageType)function; - } + if (!library_handle) { + return FALSE; } + + FARPROC function = GetProcAddress(library_handle, "pidginWinToastLibInit"); + if (!function) { + return FALSE; + } + library_init = (PidginWinToastLibInitType)function; - if (library_init) { - library_init(notification_click_callback); + function = GetProcAddress(library_handle, "pidginWinToastLibShowMessage"); + if (!function) { + return FALSE; } + library_show_message = (PidginWinToastLibShowMessageType)function; + return TRUE; } -void uninit() { +int init_library(ClickCallbackType notification_click_callback) { + if (!library_init) { + return FALSE; + } + library_init(notification_click_callback); + return TRUE; +} + +void uninit_library() { if (library_handle) { FreeLibrary(library_handle); } } -void show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv) { +int show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv) { if (library_show_message) { - library_show_message(sender, message, imagePath, protocolName, conv); + return library_show_message(sender, message, imagePath, protocolName, conv); } + + return -1; } \ No newline at end of file diff --git a/plugins/windows-notification/src/wintoast.h b/plugins/windows-notification/src/wintoast.h index 568d4bbc3..73d2a436a 100644 --- a/plugins/windows-notification/src/wintoast.h +++ b/plugins/windows-notification/src/wintoast.h @@ -1,8 +1,13 @@ #ifndef WINTOAST #define WINTOAST 1 -void init(void(*notification_click_callback)(void *conv)); -void uninit(); -void show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv); +typedef void(*ClickCallbackType)(void*); +typedef int(*PidginWinToastLibInitType)(ClickCallbackType); +typedef int(*PidginWinToastLibShowMessageType)(const char*, const char*, const char*, const char*, void*); + +int load_library(); +int init_library(ClickCallbackType click_callback); +void uninit_library(); +int show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv); #endif \ No newline at end of file From 49978edebf41ffbb156691867cc02dfa2a527b93 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 24 Oct 2020 20:23:15 -0300 Subject: [PATCH 042/161] Clean up --- plugins/windows-notification/src/plugin.vala | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala index ba275ef04..9c3571d16 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/plugin.vala @@ -6,13 +6,6 @@ public class Plugin : RootInterface, Object { public Dino.Application app; - // private class ConvData { - // public int ReadUpToId; - // public int Timestamp; - // } - // private int interval = 0; - // private HashMap conv_data = new HashMap(); - [CCode (has_target = false)] private delegate void notification_callback(void* conv); @@ -46,18 +39,11 @@ public class Plugin : RootInterface, Object { app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect((item, conversation) => { if (item.type_ == "message") { - // key: conversation.id value: { conversation.read_up_to.id, last-time-notification-send } - // var conv = conv_data.get(conversation.id); - // if (conv.ReadUpToId == conversation.read_up_to.id) { - // if (now < conv.Timestamp + interval) { - // return; - // } - // } var message_item = (MessageItem)item; - //var message = item.encryption == Encryption.NONE ? message_item.message.body : "*encrypted*"; var message = message_item.message.body; var sender = conversation.nickname != null ? conversation.nickname : conversation.counterpart.to_string(); - if (show_message(sender, message, "", "", this) != 0) { + var avatar = null; + if (show_message(sender, message, avatar, null, this) != 0) { stderr.printf("Error sending notification."); }; } From d36de2b9ea243e39bce35211c61d969df9dba0f8 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 25 Oct 2020 08:07:31 -0300 Subject: [PATCH 043/161] Use code from Dino.Ui.Util --- libdino/src/service/avatar_manager.vala | 18 +++ plugins/windows-notification/CMakeLists.txt | 2 +- plugins/windows-notification/src/helper.vala | 113 +++++++++++++++++++ plugins/windows-notification/src/plugin.vala | 56 +++++++-- 4 files changed, 176 insertions(+), 13 deletions(-) create mode 100644 plugins/windows-notification/src/helper.vala diff --git a/libdino/src/service/avatar_manager.vala b/libdino/src/service/avatar_manager.vala index b308aa2b0..6b44b6ea7 100644 --- a/libdino/src/service/avatar_manager.vala +++ b/libdino/src/service/avatar_manager.vala @@ -256,6 +256,24 @@ public class AvatarManager : StreamInteractionModule, Object { return null; } } + + public string? get_avatar_filepath(Account account, Jid jid_) { + Jid jid = jid_; + if (!stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid_, account)) { + jid = jid_.bare_jid; + } + + string? hash = null; + if (user_avatars.has_key(jid)) { + hash = user_avatars[jid]; + } else if (vcard_avatars.has_key(jid)) { + hash = vcard_avatars[jid]; + } + + if (hash == null) return null; + + return Path.build_filename(folder, hash); + } } } diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index 70b434f19..d28fcaf72 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -10,11 +10,11 @@ vala_precompile(WINDOWS_NOTIFICATION_VALA_C SOURCES src/plugin.vala src/register_plugin.vala + src/helper.vala CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi ${CMAKE_BINARY_DIR}/exports/qlite.vapi - #${CMAKE_CURRENT_SOURCE_DIR}/vapi/openal.vapi PACKAGES ${WINDOWS_NOTIFICATION_PACKAGES} ) diff --git a/plugins/windows-notification/src/helper.vala b/plugins/windows-notification/src/helper.vala new file mode 100644 index 000000000..40b4bf2be --- /dev/null +++ b/plugins/windows-notification/src/helper.vala @@ -0,0 +1,113 @@ +using Gee; +using Gtk; + +using Dino.Entities; +using Xmpp; + +namespace Dino.Ui.Util { + +private static Jid get_relevant_jid(StreamInteractor stream_interactor, Account account, Jid jid, Conversation? conversation = null) { + Conversation conversation_ = conversation ?? stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid.bare_jid, account); + if (conversation_ != null && conversation_.type_ == Conversation.Type.GROUPCHAT) { + Jid? real_jid = stream_interactor.get_module(MucManager.IDENTITY).get_real_jid(jid, account); + if (real_jid != null) { + return real_jid.bare_jid; + } + } else { + return jid.bare_jid; + } + return jid; +} + +public static string get_conversation_display_name(StreamInteractor stream_interactor, Conversation conversation) { + if (conversation.type_ == Conversation.Type.CHAT) { + string? display_name = get_real_display_name(stream_interactor, conversation.account, conversation.counterpart); + if (display_name != null) return display_name; + return conversation.counterpart.to_string(); + } + if (conversation.type_ == Conversation.Type.GROUPCHAT) { + return get_groupchat_display_name(stream_interactor, conversation.account, conversation.counterpart); + } + if (conversation.type_ == Conversation.Type.GROUPCHAT_PM) { + return "%s from %s".printf(get_occupant_display_name(stream_interactor, conversation, conversation.counterpart), get_groupchat_display_name(stream_interactor, conversation.account, conversation.counterpart.bare_jid)); + } + return conversation.counterpart.to_string(); +} + +public static string get_participant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid participant, bool me_is_me = false) { + if (me_is_me) { + if (conversation.account.bare_jid.equals_bare(participant) || + (conversation.type_ == Conversation.Type.GROUPCHAT || conversation.type_ == Conversation.Type.GROUPCHAT_PM) && + conversation.nickname != null && participant.equals_bare(conversation.counterpart) && conversation.nickname == participant.resourcepart) { + return "Me"; + } + } + if (conversation.type_ == Conversation.Type.CHAT) { + return get_real_display_name(stream_interactor, conversation.account, participant, me_is_me) ?? participant.bare_jid.to_string(); + } + if ((conversation.type_ == Conversation.Type.GROUPCHAT || conversation.type_ == Conversation.Type.GROUPCHAT_PM) && conversation.counterpart.equals_bare(participant)) { + return get_occupant_display_name(stream_interactor, conversation, participant); + } + return participant.bare_jid.to_string(); +} + +private static string? get_real_display_name(StreamInteractor stream_interactor, Account account, Jid jid, bool me_is_me = false) { + if (jid.equals_bare(account.bare_jid)) { + if (me_is_me || account.alias == null || account.alias.length == 0) { + return "Me"; + } + return account.alias; + } + Roster.Item roster_item = stream_interactor.get_module(RosterManager.IDENTITY).get_roster_item(account, jid); + if (roster_item != null && roster_item.name != null && roster_item.name != "") { + return roster_item.name; + } + return null; +} + +private static string get_groupchat_display_name(StreamInteractor stream_interactor, Account account, Jid jid) { + MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY); + string room_name = muc_manager.get_room_name(account, jid); + if (room_name != null && room_name != jid.localpart) { + return room_name; + } + if (muc_manager.is_private_room(account, jid)) { + Gee.List? other_occupants = muc_manager.get_other_offline_members(jid, account); + if (other_occupants != null && other_occupants.size > 0) { + var builder = new StringBuilder (); + foreach(Jid occupant in other_occupants) { + if (builder.len != 0) { + builder.append(", "); + } + builder.append((get_real_display_name(stream_interactor, account, occupant) ?? occupant.localpart ?? occupant.domainpart).split(" ")[0]); + } + return builder.str; + } + } + return jid.to_string(); +} + +private static string get_occupant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid jid, bool me_is_me = false, bool muc_real_name = false) { + if (muc_real_name) { + MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY); + if (muc_manager.is_private_room(conversation.account, jid.bare_jid)) { + Jid? real_jid = muc_manager.get_real_jid(jid, conversation.account); + if (real_jid != null) { + string? display_name = get_real_display_name(stream_interactor, conversation.account, real_jid, me_is_me); + if (display_name != null) return display_name; + } + } + } + + // If it's us (jid=our real full JID), display our nick + if (conversation.type_ == Conversation.Type.GROUPCHAT_PM && conversation.account.bare_jid.equals_bare(jid)) { + var muc_conv = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(conversation.counterpart.bare_jid, conversation.account, Conversation.Type.GROUPCHAT); + if (muc_conv != null && muc_conv.nickname != null) { + return muc_conv.nickname; + } + } + + return jid.resourcepart ?? jid.to_string(); +} + +} diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala index 9c3571d16..90bb9ac23 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/plugin.vala @@ -4,7 +4,8 @@ using Dino.Entities; namespace Dino.Plugins.WindowsNotification { public class Plugin : RootInterface, Object { - public Dino.Application app; + private Dino.Application app; + private ulong signal_handler = 0; [CCode (has_target = false)] private delegate void notification_callback(void* conv); @@ -37,22 +38,53 @@ public class Plugin : RootInterface, Object { return; } - app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect((item, conversation) => { - if (item.type_ == "message") { - var message_item = (MessageItem)item; - var message = message_item.message.body; - var sender = conversation.nickname != null ? conversation.nickname : conversation.counterpart.to_string(); - var avatar = null; - if (show_message(sender, message, avatar, null, this) != 0) { - stderr.printf("Error sending notification."); - }; - } - }); + signal_handler = app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect(on_notify); } public void shutdown() { + if (signal_handler > 0) { + app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.disconnect(on_notify); + } uninit_library(); } + + private void on_notify(ContentItem content_item, Conversation conversation) { + string display_name = Dino.Ui.Util.get_conversation_display_name(app.stream_interactor, conversation); + string text = ""; + switch (content_item.type_) { + case MessageItem.TYPE: + var message_item = (content_item as MessageItem); + if (message_item != null) { + Message message = message_item.message; + if (message != null) { + text = message.body; + } + } + break; + case FileItem.TYPE: + FileItem file_item = content_item as FileItem; + if (file_item != null) { + FileTransfer transfer = file_item.file_transfer; + + bool file_is_image = transfer.mime_type != null && transfer.mime_type.has_prefix("image"); + if (transfer.direction == Message.DIRECTION_SENT) { + text = file_is_image ? "Image sent" : "File sent"; + } else { + text = file_is_image ? "Image received" : "File received"; + } + } + break; + } + if (app.stream_interactor.get_module(MucManager.IDENTITY).is_groupchat(conversation.counterpart, conversation.account)) { + string muc_occupant = Dino.Ui.Util.get_participant_display_name(app.stream_interactor, conversation, content_item.jid); + text = @"$muc_occupant: $text"; + } + var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); + var avatar = avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); + if (show_message(display_name, text, avatar, null, this) != 0) { + stderr.printf("Error sending notification."); + }; + } } } From 642ed6ab1b997ac307370083a6506d21ceba72c5 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 25 Oct 2020 09:06:23 -0300 Subject: [PATCH 044/161] Convert C code to Vala --- plugins/windows-notification/CMakeLists.txt | 26 +------ plugins/windows-notification/src/plugin.vala | 27 ++----- plugins/windows-notification/src/wintoast.c | 50 ------------- plugins/windows-notification/src/wintoast.h | 13 ---- .../windows-notification/src/wintoast.vala | 70 +++++++++++++++++++ 5 files changed, 76 insertions(+), 110 deletions(-) delete mode 100644 plugins/windows-notification/src/wintoast.c delete mode 100644 plugins/windows-notification/src/wintoast.h create mode 100644 plugins/windows-notification/src/wintoast.vala diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index d28fcaf72..3be2a506f 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -11,6 +11,7 @@ SOURCES src/plugin.vala src/register_plugin.vala src/helper.vala + src/wintoast.vala CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi @@ -19,34 +20,9 @@ PACKAGES ${WINDOWS_NOTIFICATION_PACKAGES} ) -add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/exports/wintoast.h -COMMAND - cp ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.h ${CMAKE_BINARY_DIR}/exports/wintoast.h -DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.h -COMMENT - Copy header file wintoast.h -) - -add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/exports/wintoast.c -COMMAND - cp ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.c ${CMAKE_BINARY_DIR}/exports/wintoast.c -DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoast.c -COMMENT - Copy header file wintoast.c -) - -add_custom_target(wintoast -DEPENDS - ${CMAKE_BINARY_DIR}/exports/wintoast.h - ${CMAKE_BINARY_DIR}/exports/wintoast.c -) - add_definitions(${VALA_CFLAGS}) add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} src/wintoast.c) target_link_libraries(windows-notification libdino ${WINDOWS_NOTIFICATION_PACKAGES}) -add_dependencies(windows-notification wintoast) set_target_properties(windows-notification PROPERTIES PREFIX "") set_target_properties(windows-notification PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala index 90bb9ac23..7dba54fa0 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/plugin.vala @@ -6,21 +6,7 @@ public class Plugin : RootInterface, Object { private Dino.Application app; private ulong signal_handler = 0; - - [CCode (has_target = false)] - private delegate void notification_callback(void* conv); - - [CCode (cname = "load_library", cheader_filename = "wintoast.h")] - private static extern int load_library(); - - [CCode (cname = "init_library", cheader_filename = "wintoast.h")] - private static extern int init_library(notification_callback callback); - - [CCode (cname = "uninit_library", cheader_filename = "wintoast.h")] - private static extern void uninit_library(); - - [CCode (cname = "show_message", cheader_filename = "wintoast.h")] - private static extern int show_message(char* sender, char* message, char* imagePath, char* protocolName, void *conv); + private WinToast toaster; private void onclick_callback() { // TODO: @@ -33,19 +19,16 @@ public class Plugin : RootInterface, Object { public void registered(Dino.Application app) { this.app = app; - if (load_library() != 1 || - init_library(onclick_callback) != 1) { - return; + this.toaster = new WinToast(onclick_callback); + if (toaster.valid) { + signal_handler = app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect(on_notify); } - - signal_handler = app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect(on_notify); } public void shutdown() { if (signal_handler > 0) { app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.disconnect(on_notify); } - uninit_library(); } private void on_notify(ContentItem content_item, Conversation conversation) { @@ -81,7 +64,7 @@ public class Plugin : RootInterface, Object { } var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); var avatar = avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); - if (show_message(display_name, text, avatar, null, this) != 0) { + if (!toaster.show_message(display_name, text, avatar, this)) { stderr.printf("Error sending notification."); }; } diff --git a/plugins/windows-notification/src/wintoast.c b/plugins/windows-notification/src/wintoast.c deleted file mode 100644 index 262d8ed3e..000000000 --- a/plugins/windows-notification/src/wintoast.c +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include - -#include "wintoast.h" - -static HMODULE library_handle = NULL; -static PidginWinToastLibInitType library_init = NULL; -static PidginWinToastLibShowMessageType library_show_message = NULL; - -int load_library() { - library_handle = LoadLibrary("PidginWinToastLib.dll"); - if (!library_handle) { - return FALSE; - } - - FARPROC function = GetProcAddress(library_handle, "pidginWinToastLibInit"); - if (!function) { - return FALSE; - } - library_init = (PidginWinToastLibInitType)function; - - function = GetProcAddress(library_handle, "pidginWinToastLibShowMessage"); - if (!function) { - return FALSE; - } - library_show_message = (PidginWinToastLibShowMessageType)function; - return TRUE; -} - -int init_library(ClickCallbackType notification_click_callback) { - if (!library_init) { - return FALSE; - } - library_init(notification_click_callback); - return TRUE; -} - -void uninit_library() { - if (library_handle) { - FreeLibrary(library_handle); - } -} - -int show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv) { - if (library_show_message) { - return library_show_message(sender, message, imagePath, protocolName, conv); - } - - return -1; -} \ No newline at end of file diff --git a/plugins/windows-notification/src/wintoast.h b/plugins/windows-notification/src/wintoast.h deleted file mode 100644 index 73d2a436a..000000000 --- a/plugins/windows-notification/src/wintoast.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef WINTOAST -#define WINTOAST 1 - -typedef void(*ClickCallbackType)(void*); -typedef int(*PidginWinToastLibInitType)(ClickCallbackType); -typedef int(*PidginWinToastLibShowMessageType)(const char*, const char*, const char*, const char*, void*); - -int load_library(); -int init_library(ClickCallbackType click_callback); -void uninit_library(); -int show_message(const char * sender, const char * message, const char * imagePath, const char * protocolName, void *conv); - -#endif \ No newline at end of file diff --git a/plugins/windows-notification/src/wintoast.vala b/plugins/windows-notification/src/wintoast.vala new file mode 100644 index 000000000..013fc50b0 --- /dev/null +++ b/plugins/windows-notification/src/wintoast.vala @@ -0,0 +1,70 @@ +namespace Dino.Plugins.WindowsNotification { + public class WinToast { + [CCode (has_target = false)] + private delegate void FunctionPointer(); + + [CCode (has_target = false)] + public delegate void NotificationCallback(void* conv); + + [CCode (has_target = false)] + private delegate int PidginWinToastLibInitType(NotificationCallback callback); + + [CCode (has_target = false)] + private delegate int PidginWinToastLibShowMessageType(char* sender, char* message, char* image_path, char* protocolName, void *conv); + + [CCode (cname = "LoadLibrary", cheader_filename = "libloaderapi.h")] + private static extern void* load_library(char* lib_name); + + [CCode (cname = "FreeLibrary", cheader_filename = "libloaderapi.h")] + private static extern int free_library(void* handle); + + [CCode (cname = "GetProcAddress", cheader_filename = "libloaderapi.h")] + private static extern FunctionPointer get_proc_address(void* lib_handle, char* func_name); + + private void* library_handle = null; + private PidginWinToastLibInitType library_init = null; + private PidginWinToastLibShowMessageType library_show_message = null; + + public bool valid { get; private set; } + + public WinToast(NotificationCallback callback) { + valid = load(); + if (valid) { + valid = library_init(callback) == 0; + } + } + + ~WinToast() { + if (library_handle != null) { + free_library(library_handle); + } + } + + public bool show_message(string sender, string message, string image_path, void *conv) { + if (valid && library_show_message != null) { + return library_show_message(sender, message, image_path, null, conv) == 0; + } + return false; + } + + private bool load() { + library_handle = load_library("PidginWinToastLib.dll"); + if (library_handle == null) { + return false; + } + + FunctionPointer function = get_proc_address(library_handle, "pidginWinToastLibInit"); + if (function == null) { + return false; + } + library_init = (PidginWinToastLibInitType)function; + + function = get_proc_address(library_handle, "pidginWinToastLibShowMessage"); + if (function == null) { + return false; + } + library_show_message = (PidginWinToastLibShowMessageType)function; + return true; + } + } +} \ No newline at end of file From 8553a7cd863a4232871d573d8d07bb4d0399c731 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 25 Oct 2020 11:09:46 -0300 Subject: [PATCH 045/161] Add callback support --- plugins/windows-notification/src/plugin.vala | 13 +++----- .../windows-notification/src/wintoast.vala | 30 +++++++++---------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala index 7dba54fa0..d72037582 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/plugin.vala @@ -8,18 +8,13 @@ public class Plugin : RootInterface, Object { private ulong signal_handler = 0; private WinToast toaster; - private void onclick_callback() { - // TODO: - // This callback should: - // * Open Dino - // * Open Conversation from notification - // * Go to line - // The callback will probably need to receive at least one parameter more. Not difficult to do. + private void onclick_callback(int conv_id) { + this.app.activate_action("open-conversation", conv_id); } public void registered(Dino.Application app) { this.app = app; - this.toaster = new WinToast(onclick_callback); + this.toaster = new WinToast(); if (toaster.valid) { signal_handler = app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect(on_notify); } @@ -64,7 +59,7 @@ public class Plugin : RootInterface, Object { } var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); var avatar = avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); - if (!toaster.show_message(display_name, text, avatar, this)) { + if (!toaster.show_message(display_name, text, avatar, conversation.id, this, onclick_callback)) { stderr.printf("Error sending notification."); }; } diff --git a/plugins/windows-notification/src/wintoast.vala b/plugins/windows-notification/src/wintoast.vala index 013fc50b0..35e77f3d9 100644 --- a/plugins/windows-notification/src/wintoast.vala +++ b/plugins/windows-notification/src/wintoast.vala @@ -3,14 +3,14 @@ namespace Dino.Plugins.WindowsNotification { [CCode (has_target = false)] private delegate void FunctionPointer(); - [CCode (has_target = false)] - public delegate void NotificationCallback(void* conv); + [CCode (has_target = true)] + public delegate void NotificationCallback(int conv_id); [CCode (has_target = false)] - private delegate int PidginWinToastLibInitType(NotificationCallback callback); + private delegate int DinoWinToastLibInitType(); [CCode (has_target = false)] - private delegate int PidginWinToastLibShowMessageType(char* sender, char* message, char* image_path, char* protocolName, void *conv); + private delegate int DinoWinToastLibShowMessageType(char* sender, char* message, char* image_path, int conv_id, void* class_obj, NotificationCallback callback); [CCode (cname = "LoadLibrary", cheader_filename = "libloaderapi.h")] private static extern void* load_library(char* lib_name); @@ -22,15 +22,15 @@ namespace Dino.Plugins.WindowsNotification { private static extern FunctionPointer get_proc_address(void* lib_handle, char* func_name); private void* library_handle = null; - private PidginWinToastLibInitType library_init = null; - private PidginWinToastLibShowMessageType library_show_message = null; + private DinoWinToastLibInitType library_init = null; + private DinoWinToastLibShowMessageType library_show_message = null; public bool valid { get; private set; } - public WinToast(NotificationCallback callback) { + public WinToast() { valid = load(); if (valid) { - valid = library_init(callback) == 0; + valid = library_init() == 0; } } @@ -40,30 +40,30 @@ namespace Dino.Plugins.WindowsNotification { } } - public bool show_message(string sender, string message, string image_path, void *conv) { + public bool show_message(string sender, string message, string image_path, int conv_id, void* class_obj, NotificationCallback callback) { if (valid && library_show_message != null) { - return library_show_message(sender, message, image_path, null, conv) == 0; + return library_show_message(sender, message, image_path, conv_id, class_obj, callback) == 0; } return false; } private bool load() { - library_handle = load_library("PidginWinToastLib.dll"); + library_handle = load_library("DinoWinToastLib.dll"); if (library_handle == null) { return false; } - FunctionPointer function = get_proc_address(library_handle, "pidginWinToastLibInit"); + FunctionPointer function = get_proc_address(library_handle, "dinoWinToastLibInit"); if (function == null) { return false; } - library_init = (PidginWinToastLibInitType)function; + library_init = (DinoWinToastLibInitType)function; - function = get_proc_address(library_handle, "pidginWinToastLibShowMessage"); + function = get_proc_address(library_handle, "dinoWinToastLibShowMessage"); if (function == null) { return false; } - library_show_message = (PidginWinToastLibShowMessageType)function; + library_show_message = (DinoWinToastLibShowMessageType)function; return true; } } From 198bce4a841e6b37ea3781523278d7757d210d56 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 25 Oct 2020 11:46:11 -0300 Subject: [PATCH 046/161] Allow null image_path --- plugins/windows-notification/src/wintoast.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/windows-notification/src/wintoast.vala b/plugins/windows-notification/src/wintoast.vala index 35e77f3d9..050d8d734 100644 --- a/plugins/windows-notification/src/wintoast.vala +++ b/plugins/windows-notification/src/wintoast.vala @@ -40,7 +40,7 @@ namespace Dino.Plugins.WindowsNotification { } } - public bool show_message(string sender, string message, string image_path, int conv_id, void* class_obj, NotificationCallback callback) { + public bool show_message(string sender, string message, string? image_path, int conv_id, void* class_obj, NotificationCallback callback) { if (valid && library_show_message != null) { return library_show_message(sender, message, image_path, conv_id, class_obj, callback) == 0; } From 5702b323c988aa2a390b0481f5bf029ac20a18e3 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 25 Oct 2020 12:52:49 -0300 Subject: [PATCH 047/161] Use dynamic linking instead of runtime loading Also made me notice that the signature of the function with the callback was wrong. Oops. --- plugins/windows-notification/CMakeLists.txt | 13 +++- .../src/DinoWinToastLib.h | 27 ++++++++ .../src/DinoWinToastLib.lib | Bin 0 -> 2196 bytes plugins/windows-notification/src/plugin.vala | 2 +- .../windows-notification/src/wintoast.vala | 61 +++--------------- 5 files changed, 47 insertions(+), 56 deletions(-) create mode 100644 plugins/windows-notification/src/DinoWinToastLib.h create mode 100644 plugins/windows-notification/src/DinoWinToastLib.lib diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index 3be2a506f..ee2115c1d 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -20,9 +20,18 @@ PACKAGES ${WINDOWS_NOTIFICATION_PACKAGES} ) +add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h" +COMMAND + cp "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib.h" "${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h" +DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib.h" +COMMENT + Copy header file DinoWinToastLib.h +) + add_definitions(${VALA_CFLAGS}) -add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} src/wintoast.c) -target_link_libraries(windows-notification libdino ${WINDOWS_NOTIFICATION_PACKAGES}) +add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} ${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h) +target_link_libraries(windows-notification libdino ${WINDOWS_NOTIFICATION_PACKAGES} "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib.lib") set_target_properties(windows-notification PROPERTIES PREFIX "") set_target_properties(windows-notification PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) diff --git a/plugins/windows-notification/src/DinoWinToastLib.h b/plugins/windows-notification/src/DinoWinToastLib.h new file mode 100644 index 000000000..b0fe9ace1 --- /dev/null +++ b/plugins/windows-notification/src/DinoWinToastLib.h @@ -0,0 +1,27 @@ +#pragma once + +#ifdef _WIN32 +#ifdef DINOWINTOASTLIB_EXPORTS +#define DINOWINTOASTLIB_API __declspec(dllexport) +#else +#define DINOWINTOASTLIB_API __declspec(dllimport) +#endif +#else +#define DINOWINTOASTLIB_API +#endif + +#ifdef __cplusplus +extern "C" { +#endif + int DINOWINTOASTLIB_API dinoWinToastLibInit(); +#ifdef __cplusplus +} // extern "C" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + int DINOWINTOASTLIB_API dinoWinToastLibShowMessage(const char* sender, const char* message, const char* imagePath, int conv_id, void(*click_callback)(int conv_id, void* callback_target), void* callback_target); +#ifdef __cplusplus +} // extern "C" +#endif \ No newline at end of file diff --git a/plugins/windows-notification/src/DinoWinToastLib.lib b/plugins/windows-notification/src/DinoWinToastLib.lib new file mode 100644 index 0000000000000000000000000000000000000000..bca01f66b55aa1414463d08817c5bd87ebd9c66d GIT binary patch literal 2196 zcmcIlOKTHR6#nvPQwNb?yU`*>sI-D6aq`fG$V5|UXp)vB#pN`~#Acw)v`s{Ccv2MN3)tb%nRt+Pj zT-RnAW@~Vft(zF5co(B70_o5TocjTF8km~_+JqW?@W6{H`0eVW{agX9;Tv+D83B_U z3ccoI&m}Sd*H}hLYK1nHfin*q+uMkA<{jdV`(Hv$bQo$J_;CNr^3Qn>@sbed5;kg; zcUucZM*=c5_$&p{YY4syn?|`+ULaOGg{X}as=tNoqh3SwSlA_n8f+IJf6|Wi8bZfJ z0^G$77BTCx(M8M#nH4{53*Z*!akO_kXIA&EruDWJS}HsWWi$CzG2hqSB#8s!O6h2i zg48nod~opwt!nM;QtU^29?!)^?@C%i#N;X=&;UF9y42X4b^HmNINQ)7bZin`4eOV< z5rzK_q=dws7Zqx+lmcUksZ7cwHSxTMNnU)YB>#T5gXNIjnPfOqowkQbF{xyRe3gRe znMv2mkjtF+Jql*%g*+*Gv1s=eMovQXpfAIw{i0&JD?LGAFZfa3}uw%t<-F>zn3wB~0x1nMe=1xuxGv Ujc;cW+N6grA!GR4?B-ti2hpIz Date: Fri, 20 Nov 2020 08:58:53 -0300 Subject: [PATCH 048/161] Added 32-bit wintoast linker library --- plugins/windows-notification/CMakeLists.txt | 9 ++++++++- ...WinToastLib.lib => DinoWinToastLib_AMD64.lib} | Bin .../src/DinoWinToastLib_x86.lib | Bin 0 -> 2198 bytes 3 files changed, 8 insertions(+), 1 deletion(-) rename plugins/windows-notification/src/{DinoWinToastLib.lib => DinoWinToastLib_AMD64.lib} (100%) create mode 100644 plugins/windows-notification/src/DinoWinToastLib_x86.lib diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index ee2115c1d..acaa36f0f 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -31,7 +31,14 @@ COMMENT add_definitions(${VALA_CFLAGS}) add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} ${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h) -target_link_libraries(windows-notification libdino ${WINDOWS_NOTIFICATION_PACKAGES} "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib.lib") + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(WINTOASTLIB "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib_AMD64.lib") +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(WINTOASTLIB "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib_x86.lib") +endif() + +target_link_libraries(windows-notification libdino ${WINDOWS_NOTIFICATION_PACKAGES} ${WINTOASTLIB}) set_target_properties(windows-notification PROPERTIES PREFIX "") set_target_properties(windows-notification PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/) diff --git a/plugins/windows-notification/src/DinoWinToastLib.lib b/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib similarity index 100% rename from plugins/windows-notification/src/DinoWinToastLib.lib rename to plugins/windows-notification/src/DinoWinToastLib_AMD64.lib diff --git a/plugins/windows-notification/src/DinoWinToastLib_x86.lib b/plugins/windows-notification/src/DinoWinToastLib_x86.lib new file mode 100644 index 0000000000000000000000000000000000000000..27e6a12a3ef22250ebcee14a62a41e8b3743abcd GIT binary patch literal 2198 zcmcIlPiqrF6#wleZDOz`w9-S1utLT5U=q`8&?1s(1VcAzNm4v+^Ur3X&9+UX;KeT> z_yvOBz)Md(R`B9Y1P_A!0R09YD)qhHon(`)Nki$dJ2UUin|W`3^LsP*o|X@)jc1{# z(qA4v>X(HSb2{;rq|@690SEx{5#T=uCRc&roc#wnG}O`cY;I${P|`Cmi!TbaA9J zyN;n_p0l$}qkUv!HLiA^=%S) zA}>H`Y4yTXGX(?i@P<^?+})$tkM||%;zGFPnOrzn83KY7V1?fh8f&xc&nGkqwjl+& zHfm49`X#QM!m9&mN8(0Ch3adi!AN3;#${4mee7bAj4Acwk1tlR9I`i)YSvJ%axrN| zXqh3Oh2XTzq#I?(RnGe^1@qsFd2IBaBwXnE(E0xE&nY>u58oTTA$h0@z?h<(hwkFa z!-UYY-7g_H?Tw&(6=d&I03!)HF2c#~o6T=BC$T1d`aOTPZ0$Da{h)c>1!HGMQX~f5 W*}`-2@bp`ZJWF)b4ts&U0{92XDZ~o^ literal 0 HcmV?d00001 From eae628758c1ba343ecd72eea979c81daafd404e6 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 25 Nov 2020 18:55:33 -0300 Subject: [PATCH 049/161] Use VAPI and generate template in-app --- plugins/windows-notification/CMakeLists.txt | 22 +++++- .../src/DinoWinToastDllExport.h | 11 +++ .../src/DinoWinToastLib.h | 23 ++----- .../src/DinoWinToastLib_AMD64.lib | Bin 2196 -> 5186 bytes .../src/DinoWinToastLib_x86.lib | Bin 2198 -> 5238 bytes .../src/DinoWinToastTemplate.h | 54 +++++++++++++++ .../windows-notification/src/wintoast.vala | 25 ++++--- .../vapi/DinoWinToastLib.vapi | 13 ++++ .../vapi/DinoWinToastTemplate.vapi | 65 ++++++++++++++++++ 9 files changed, 183 insertions(+), 30 deletions(-) create mode 100644 plugins/windows-notification/src/DinoWinToastDllExport.h create mode 100644 plugins/windows-notification/src/DinoWinToastTemplate.h create mode 100644 plugins/windows-notification/vapi/DinoWinToastLib.vapi create mode 100644 plugins/windows-notification/vapi/DinoWinToastTemplate.vapi diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index acaa36f0f..83b94dff1 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -16,6 +16,8 @@ CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi ${CMAKE_BINARY_DIR}/exports/qlite.vapi + ${CMAKE_CURRENT_SOURCE_DIR}/vapi/DinoWinToastLib.vapi + ${CMAKE_CURRENT_SOURCE_DIR}/vapi/DinoWinToastTemplate.vapi PACKAGES ${WINDOWS_NOTIFICATION_PACKAGES} ) @@ -29,8 +31,26 @@ COMMENT Copy header file DinoWinToastLib.h ) +add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/DinoWinToastTemplate.h" +COMMAND + cp "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastTemplate.h" "${CMAKE_BINARY_DIR}/exports/DinoWinToastTemplate.h" +DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastTemplate.h" +COMMENT + Copy header file DinoWinToastTemplate.h +) + +add_custom_command(OUTPUT "${CMAKE_BINARY_DIR}/exports/DinoWinToastDllExport.h" +COMMAND + cp "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastDllExport.h" "${CMAKE_BINARY_DIR}/exports/DinoWinToastDllExport.h" +DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastDllExport.h" +COMMENT + Copy header file DinoWinToastDllExport.h +) + add_definitions(${VALA_CFLAGS}) -add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} ${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h) +add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} ${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h ${CMAKE_BINARY_DIR}/exports/DinoWinToastTemplate.h ${CMAKE_BINARY_DIR}/exports/DinoWinToastDllExport.h) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(WINTOASTLIB "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib_AMD64.lib") diff --git a/plugins/windows-notification/src/DinoWinToastDllExport.h b/plugins/windows-notification/src/DinoWinToastDllExport.h new file mode 100644 index 000000000..ee777aaa3 --- /dev/null +++ b/plugins/windows-notification/src/DinoWinToastDllExport.h @@ -0,0 +1,11 @@ +#pragma once + +#ifdef _WIN32 +#ifdef DINOWINTOASTLIB_EXPORTS +#define DINOWINTOASTLIB_API __declspec(dllexport) +#else +#define DINOWINTOASTLIB_API __declspec(dllimport) +#endif +#else +#define DINOWINTOASTLIB_API +#endif \ No newline at end of file diff --git a/plugins/windows-notification/src/DinoWinToastLib.h b/plugins/windows-notification/src/DinoWinToastLib.h index b0fe9ace1..697236668 100644 --- a/plugins/windows-notification/src/DinoWinToastLib.h +++ b/plugins/windows-notification/src/DinoWinToastLib.h @@ -1,27 +1,14 @@ #pragma once -#ifdef _WIN32 -#ifdef DINOWINTOASTLIB_EXPORTS -#define DINOWINTOASTLIB_API __declspec(dllexport) -#else -#define DINOWINTOASTLIB_API __declspec(dllimport) -#endif -#else -#define DINOWINTOASTLIB_API -#endif - -#ifdef __cplusplus -extern "C" { -#endif - int DINOWINTOASTLIB_API dinoWinToastLibInit(); -#ifdef __cplusplus -} // extern "C" -#endif +#include "DinoWinToastDllExport.h" +#include "DinoWinToastTemplate.h" #ifdef __cplusplus extern "C" { #endif - int DINOWINTOASTLIB_API dinoWinToastLibShowMessage(const char* sender, const char* message, const char* imagePath, int conv_id, void(*click_callback)(int conv_id, void* callback_target), void* callback_target); + typedef void(*dinoWinToastLibNotificationCallback)(int conv_id, void* userdata); + DINOWINTOASTLIB_API int dinoWinToastLibInit(); + DINOWINTOASTLIB_API int dinoWinToastLibShowMessage(dino_wintoasttemplate templ, int conv_id, dinoWinToastLibNotificationCallback click_callback, void* callback_target); #ifdef __cplusplus } // extern "C" #endif \ No newline at end of file diff --git a/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib b/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib index bca01f66b55aa1414463d08817c5bd87ebd9c66d..c508e807a64cfa9d699c0eba5631c65dea718217 100644 GIT binary patch literal 5186 zcmcIoO>7%Q6n?gYlQ=(hlByCEBqIe;1mwqwoge|Sse`cU{3vnN<9d_bHY+7w%ibvE zL=RE90LPw6g-|b4sstQ3LF`!YL|n|EGoDF8SRFnA7Ns0J{62VnGuD+Ab~ zjNfx*5?hq9aYxSJQj+w6BV)I59AzTw$|1HWXK@i)5`=Vey#w2GG1G&c9hR8_z39JuhvIu*n0($}u3)^@NH z>~FPILTr_HF@EH>e3cMe^pWoy`i>Ti%U6-v()5iT}bYMP18EP0Pv zh#Srg0@Q{8?hFIm7zG$Wxrh8Qi84Os5XeCq;5NQzCjbsn4sc--$B>pF261=}`d|=7 zk!w;g07K9ZNf?Ha!0`mKz*BIHe^?wPb)-Bu!;_1@^mOocmkZr`OtzCCpTg8RQs_pt zn{?@xkT{|Y+4_HG7w0Pxne+am%R%Nj@jUaHcs4k{1bz~mAVtnYawR!Kd0q)L!ucam z$M-~_icepmclLA#$%IueSyskmYN=BDO+TgW?7*})@6l!snVNZHz;hGyA8yCs~L-(obW4g3DPtPJAwj$4S$=B z*dOcc=jzOp4lV*uC+CmQ_yziLAF>WmbbHjqVH1C!is(ZFGZi(GvbjYrlH%~|r`j(+ z+F%K?IFdAH%KPOaX^st2gxqHxx1~sWrV-MOzh6QyfyH{%)0>;ga;KMot6zNn_z`a4 zIA45vl03|@1EV~qJmjAO6j&b4vvJbmf>)GU;pfcZtwva4zIKn!HAqCf*AcedH=6PL@_8s!IiH) o!6ERJ5XyG*@&J`hPUk7-^e|C>_Y|tiY_cqGHB6N@$e@$F=8OO{Za5GC diff --git a/plugins/windows-notification/src/DinoWinToastLib_x86.lib b/plugins/windows-notification/src/DinoWinToastLib_x86.lib index 27e6a12a3ef22250ebcee14a62a41e8b3743abcd..d9a35cbb82ebd46e13b6f9e3493bbf743866fb35 100644 GIT binary patch literal 5238 zcmcInO>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rQ2nF0hPa4|42urn|)ZDL?x`NP1#X2rn3AqK(hbAVEFCL40cO%`Iz zW71cce1S*b!~~(06{vR;69dB^76t|@HU +#include "DinoWinToastDllExport.h" + +#ifdef __cplusplus +extern "C" { +#endif + typedef void* dino_wintoasttemplate; + + typedef enum { + System, + Short, + Long + } dino_wintoasttemplate_duration; + + typedef enum { + Default = 0, + Silent = 1, + Loop = 2 + } dino_wintoasttemplate_audiooption; + + typedef enum { + FirstLine = 0, + SecondLine, + ThirdLine + } dino_wintoasttemplate_textfield; + + typedef enum { + ImageAndText01 = 0, + ImageAndText02, + ImageAndText03, + ImageAndText04, + Text01, + Text02, + Text03, + Text04, + WinToastTemplateTypeCount + } dino_wintoasttemplate_wintoasttemplatetype; + + DINOWINTOASTLIB_API dino_wintoasttemplate dino_wintoasttemplate_new(dino_wintoasttemplate_wintoasttemplatetype templ); + DINOWINTOASTLIB_API void dino_wintoasttemplate_destroy(dino_wintoasttemplate templ); + + DINOWINTOASTLIB_API void dino_wintoasttemplate_setTextField(dino_wintoasttemplate templ, const char* txt, dino_wintoasttemplate_textfield pos); + DINOWINTOASTLIB_API void dino_wintoasttemplate_setImagePath(dino_wintoasttemplate templ, const char* imgPath); + DINOWINTOASTLIB_API void dino_wintoasttemplate_setAudioPath(dino_wintoasttemplate templ, const char* audioPath); + DINOWINTOASTLIB_API void dino_wintoasttemplate_setAttributionText(dino_wintoasttemplate templ, const char* attributionText); + DINOWINTOASTLIB_API void dino_wintoasttemplate_addAction(dino_wintoasttemplate templ, const char* label); + DINOWINTOASTLIB_API void dino_wintoasttemplate_setAudioOption(dino_wintoasttemplate templ, dino_wintoasttemplate_audiooption audioOption); + DINOWINTOASTLIB_API void dino_wintoasttemplate_setDuration(dino_wintoasttemplate templ, dino_wintoasttemplate_duration duration); + DINOWINTOASTLIB_API void dino_wintoasttemplate_setExpiration(dino_wintoasttemplate templ, int64_t millisecondsFromNow); +#ifdef __cplusplus +} // extern C +#endif \ No newline at end of file diff --git a/plugins/windows-notification/src/wintoast.vala b/plugins/windows-notification/src/wintoast.vala index 73c44d703..a4e1b6226 100644 --- a/plugins/windows-notification/src/wintoast.vala +++ b/plugins/windows-notification/src/wintoast.vala @@ -1,23 +1,26 @@ +using DinoWinToast; + namespace Dino.Plugins.WindowsNotification { public class WinToast { - [CCode (has_target = true)] - public delegate void NotificationCallback(int conv_id); - - [CCode (cname = "dinoWinToastLibInit", cheader_filename = "DinoWinToastLib.h")] - private static extern int DinoWinToastLibInit(); - - [CCode (cname = "dinoWinToastLibShowMessage", cheader_filename = "DinoWinToastLib.h")] - private static extern int DinoWinToastLibShowMessage(char* sender, char* message, char* image_path, int conv_id, NotificationCallback callback); - public bool valid { get; private set; } public WinToast() { - valid = DinoWinToastLibInit() == 0; + valid = Init() == 0; } public bool show_message(string sender, string message, string? image_path, int conv_id, NotificationCallback callback) { if (valid) { - return DinoWinToastLibShowMessage(sender, message, image_path, conv_id, callback) == 0; + DinoWinToastTemplate template; + if (image_path != null) { + template = new DinoWinToastTemplate(TemplateType.ImageAndText02); + template.setImagePath(image_path); + } else { + template = new DinoWinToastTemplate(TemplateType.Text02); + } + + template.setTextField(sender, TextField.FirstLine); + template.setTextField(message, TextField.SecondLine); + return DinoWinToast.ShowMessage(template, conv_id, callback) == 0; } return false; } diff --git a/plugins/windows-notification/vapi/DinoWinToastLib.vapi b/plugins/windows-notification/vapi/DinoWinToastLib.vapi new file mode 100644 index 000000000..a4c920578 --- /dev/null +++ b/plugins/windows-notification/vapi/DinoWinToastLib.vapi @@ -0,0 +1,13 @@ +[CCode (cheader_filename = "DinoWinToastLib.h")] +namespace DinoWinToast { + + [CCode (cname = "dinoWinToastLibNotificationCallback", has_target = true)] + public delegate void NotificationCallback(int conv_id); + + [CCode (cname = "dinoWinToastLibInit")] + public int Init(); + + [CCode (cname = "dinoWinToastLibShowMessage")] + public int ShowMessage(DinoWinToastTemplate templ, int conv_id, NotificationCallback callback); +} + diff --git a/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi b/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi new file mode 100644 index 000000000..59fc4740f --- /dev/null +++ b/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi @@ -0,0 +1,65 @@ +[CCode (cheader_filename = "DinoWinToastTemplate.h")] +namespace DinoWinToast { + [CCode (cname = "dino_wintoasttemplate_duration", cprefix = "")] + public enum Duration { + System, + Short, + Long + } + + [CCode (cname = "dino_wintoasttemplate_audiooption", cprefix = "")] + public enum AudioOption { + Default, + Silent, + Loop + } + + [CCode (cname = "dino_wintoasttemplate_textfield", cprefix = "")] + public enum TextField { + FirstLine, + SecondLine, + ThirdLine + } + + [CCode (cname = "dino_wintoasttemplate_wintoasttemplatetype", cprefix = "")] + public enum TemplateType { + ImageAndText01, + ImageAndText02, + ImageAndText03, + ImageAndText04, + Text01, + Text02, + Text03, + Text04, + WinToastTemplateTypeCount + } + + [CCode (cname="dino_wintoasttemplate", free_function = "dino_wintoasttemplate_destroy")] + [Compact] + public class DinoWinToastTemplate { + [CCode (cname = "dino_wintoasttemplate_new")] + public DinoWinToastTemplate(TemplateType type = TemplateType.ImageAndText02); + + [CCode (cname = "dino_wintoasttemplate_setTextField")] + public void setTextField(char* txt, TextField pos); + + [CCode (cname = "dino_wintoasttemplate_setImagePath")] + public void setImagePath(char* imgPath); + + [CCode (cname = "dino_wintoasttemplate_setAttributionText")] + public void setAttributionText(char* attributionText); + + [CCode (cname = "dino_wintoasttemplate_addAction")] + public void addAction(char* label); + + [CCode (cname = "dino_wintoasttemplate_setAudioOption")] + public void setAudioOption(AudioOption option); + + [CCode (cname = "dino_wintoasttemplate_setDuration")] + public void setDuration(Duration duration); + + [CCode (cname = "dino_wintoasttemplate_setExpiration")] + public void setExpiration(int64 millisecondsFromNow); + } +} + From 08f2391accd93fc348975eb4eed6dffb5782a574 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Wed, 25 Nov 2020 20:12:21 -0300 Subject: [PATCH 050/161] Initial plugin using new notification provider --- plugins/windows-notification/CMakeLists.txt | 11 +- plugins/windows-notification/src/helper.vala | 113 --------- plugins/windows-notification/src/plugin.vala | 56 +---- .../src/win_notification_provider.vala | 226 ++++++++++++++++++ .../windows-notification/src/wintoast.vala | 28 --- 5 files changed, 237 insertions(+), 197 deletions(-) delete mode 100644 plugins/windows-notification/src/helper.vala create mode 100644 plugins/windows-notification/src/win_notification_provider.vala delete mode 100644 plugins/windows-notification/src/wintoast.vala diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index 83b94dff1..eacc84052 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -1,3 +1,8 @@ +set(GETTEXT_PACKAGE "dino-windows-notifications") +find_package(Gettext) +include(${GETTEXT_USE_FILE}) +gettext_compile(${GETTEXT_PACKAGE} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../main/po TARGET_NAME ${GETTEXT_PACKAGE}-translations) + find_packages(WINDOWS_NOTIFICATION_PACKAGES REQUIRED Gee GLib @@ -10,8 +15,7 @@ vala_precompile(WINDOWS_NOTIFICATION_VALA_C SOURCES src/plugin.vala src/register_plugin.vala - src/helper.vala - src/wintoast.vala + src/win_notification_provider.vala CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/dino.vapi @@ -49,8 +53,9 @@ COMMENT Copy header file DinoWinToastDllExport.h ) -add_definitions(${VALA_CFLAGS}) +add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\") add_library(windows-notification SHARED ${WINDOWS_NOTIFICATION_VALA_C} ${CMAKE_BINARY_DIR}/exports/DinoWinToastLib.h ${CMAKE_BINARY_DIR}/exports/DinoWinToastTemplate.h ${CMAKE_BINARY_DIR}/exports/DinoWinToastDllExport.h) +add_dependencies(omemo ${GETTEXT_PACKAGE}-translations) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(WINTOASTLIB "${CMAKE_CURRENT_SOURCE_DIR}/src/DinoWinToastLib_AMD64.lib") diff --git a/plugins/windows-notification/src/helper.vala b/plugins/windows-notification/src/helper.vala deleted file mode 100644 index 40b4bf2be..000000000 --- a/plugins/windows-notification/src/helper.vala +++ /dev/null @@ -1,113 +0,0 @@ -using Gee; -using Gtk; - -using Dino.Entities; -using Xmpp; - -namespace Dino.Ui.Util { - -private static Jid get_relevant_jid(StreamInteractor stream_interactor, Account account, Jid jid, Conversation? conversation = null) { - Conversation conversation_ = conversation ?? stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid.bare_jid, account); - if (conversation_ != null && conversation_.type_ == Conversation.Type.GROUPCHAT) { - Jid? real_jid = stream_interactor.get_module(MucManager.IDENTITY).get_real_jid(jid, account); - if (real_jid != null) { - return real_jid.bare_jid; - } - } else { - return jid.bare_jid; - } - return jid; -} - -public static string get_conversation_display_name(StreamInteractor stream_interactor, Conversation conversation) { - if (conversation.type_ == Conversation.Type.CHAT) { - string? display_name = get_real_display_name(stream_interactor, conversation.account, conversation.counterpart); - if (display_name != null) return display_name; - return conversation.counterpart.to_string(); - } - if (conversation.type_ == Conversation.Type.GROUPCHAT) { - return get_groupchat_display_name(stream_interactor, conversation.account, conversation.counterpart); - } - if (conversation.type_ == Conversation.Type.GROUPCHAT_PM) { - return "%s from %s".printf(get_occupant_display_name(stream_interactor, conversation, conversation.counterpart), get_groupchat_display_name(stream_interactor, conversation.account, conversation.counterpart.bare_jid)); - } - return conversation.counterpart.to_string(); -} - -public static string get_participant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid participant, bool me_is_me = false) { - if (me_is_me) { - if (conversation.account.bare_jid.equals_bare(participant) || - (conversation.type_ == Conversation.Type.GROUPCHAT || conversation.type_ == Conversation.Type.GROUPCHAT_PM) && - conversation.nickname != null && participant.equals_bare(conversation.counterpart) && conversation.nickname == participant.resourcepart) { - return "Me"; - } - } - if (conversation.type_ == Conversation.Type.CHAT) { - return get_real_display_name(stream_interactor, conversation.account, participant, me_is_me) ?? participant.bare_jid.to_string(); - } - if ((conversation.type_ == Conversation.Type.GROUPCHAT || conversation.type_ == Conversation.Type.GROUPCHAT_PM) && conversation.counterpart.equals_bare(participant)) { - return get_occupant_display_name(stream_interactor, conversation, participant); - } - return participant.bare_jid.to_string(); -} - -private static string? get_real_display_name(StreamInteractor stream_interactor, Account account, Jid jid, bool me_is_me = false) { - if (jid.equals_bare(account.bare_jid)) { - if (me_is_me || account.alias == null || account.alias.length == 0) { - return "Me"; - } - return account.alias; - } - Roster.Item roster_item = stream_interactor.get_module(RosterManager.IDENTITY).get_roster_item(account, jid); - if (roster_item != null && roster_item.name != null && roster_item.name != "") { - return roster_item.name; - } - return null; -} - -private static string get_groupchat_display_name(StreamInteractor stream_interactor, Account account, Jid jid) { - MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY); - string room_name = muc_manager.get_room_name(account, jid); - if (room_name != null && room_name != jid.localpart) { - return room_name; - } - if (muc_manager.is_private_room(account, jid)) { - Gee.List? other_occupants = muc_manager.get_other_offline_members(jid, account); - if (other_occupants != null && other_occupants.size > 0) { - var builder = new StringBuilder (); - foreach(Jid occupant in other_occupants) { - if (builder.len != 0) { - builder.append(", "); - } - builder.append((get_real_display_name(stream_interactor, account, occupant) ?? occupant.localpart ?? occupant.domainpart).split(" ")[0]); - } - return builder.str; - } - } - return jid.to_string(); -} - -private static string get_occupant_display_name(StreamInteractor stream_interactor, Conversation conversation, Jid jid, bool me_is_me = false, bool muc_real_name = false) { - if (muc_real_name) { - MucManager muc_manager = stream_interactor.get_module(MucManager.IDENTITY); - if (muc_manager.is_private_room(conversation.account, jid.bare_jid)) { - Jid? real_jid = muc_manager.get_real_jid(jid, conversation.account); - if (real_jid != null) { - string? display_name = get_real_display_name(stream_interactor, conversation.account, real_jid, me_is_me); - if (display_name != null) return display_name; - } - } - } - - // If it's us (jid=our real full JID), display our nick - if (conversation.type_ == Conversation.Type.GROUPCHAT_PM && conversation.account.bare_jid.equals_bare(jid)) { - var muc_conv = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(conversation.counterpart.bare_jid, conversation.account, Conversation.Type.GROUPCHAT); - if (muc_conv != null && muc_conv.nickname != null) { - return muc_conv.nickname; - } - } - - return jid.resourcepart ?? jid.to_string(); -} - -} diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/plugin.vala index 428f462da..a0f335af0 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/plugin.vala @@ -4,64 +4,14 @@ using Dino.Entities; namespace Dino.Plugins.WindowsNotification { public class Plugin : RootInterface, Object { - private Dino.Application app; - private ulong signal_handler = 0; - private WinToast toaster; - - private void onclick_callback(int conv_id) { - this.app.activate_action("open-conversation", conv_id); - } - public void registered(Dino.Application app) { - this.app = app; - this.toaster = new WinToast(); - if (toaster.valid) { - signal_handler = app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect(on_notify); + var provider = WindowsNotificationProvider.try_create(app); + if (provider != null) { + app.stream_interactor.get_module(NotificationEvents.IDENTITY).register_notification_provider(provider); } } public void shutdown() { - if (signal_handler > 0) { - app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.disconnect(on_notify); - } - } - - private void on_notify(ContentItem content_item, Conversation conversation) { - string display_name = Dino.Ui.Util.get_conversation_display_name(app.stream_interactor, conversation); - string text = ""; - switch (content_item.type_) { - case MessageItem.TYPE: - var message_item = (content_item as MessageItem); - if (message_item != null) { - Message message = message_item.message; - if (message != null) { - text = message.body; - } - } - break; - case FileItem.TYPE: - FileItem file_item = content_item as FileItem; - if (file_item != null) { - FileTransfer transfer = file_item.file_transfer; - - bool file_is_image = transfer.mime_type != null && transfer.mime_type.has_prefix("image"); - if (transfer.direction == Message.DIRECTION_SENT) { - text = file_is_image ? "Image sent" : "File sent"; - } else { - text = file_is_image ? "Image received" : "File received"; - } - } - break; - } - if (app.stream_interactor.get_module(MucManager.IDENTITY).is_groupchat(conversation.counterpart, conversation.account)) { - string muc_occupant = Dino.Ui.Util.get_participant_display_name(app.stream_interactor, conversation, content_item.jid); - text = @"$muc_occupant: $text"; - } - var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); - var avatar = avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); - if (!toaster.show_message(display_name, text, avatar, conversation.id, onclick_callback)) { - stderr.printf("Error sending notification."); - }; } } diff --git a/plugins/windows-notification/src/win_notification_provider.vala b/plugins/windows-notification/src/win_notification_provider.vala new file mode 100644 index 000000000..9563ee88d --- /dev/null +++ b/plugins/windows-notification/src/win_notification_provider.vala @@ -0,0 +1,226 @@ +using Dino; +using Dino.Entities; +using DinoWinToast; +using Xmpp; + +namespace Dino.Plugins.WindowsNotification { + public class WindowsNotificationProvider : NotificationProvider, Object { + + // TODO: + // 1. Actions + // 2. Dismissed + + private StreamInteractor stream_interactor; + private Dino.Application app; + + private WindowsNotificationProvider(Dino.Application app) { + this.stream_interactor = app.stream_interactor; + this.app = app; + } + + public static WindowsNotificationProvider? try_create(Dino.Application app) { + var valid = Init() == 0; + if (valid) { + return new WindowsNotificationProvider(app); + } + warning("Unable to initialize Windows notification provider"); + return null; + } + + public double get_priority() { + return 2; + } + + public async void notify_message(Message message, Conversation conversation, string conversation_display_name, string? participant_display_name) { + yield notify_content_item(conversation, conversation_display_name, participant_display_name, message.body); + } + + public async void notify_file(FileTransfer file_transfer, Conversation conversation, bool is_image, string conversation_display_name, string? participant_display_name) { + string text = ""; + if (file_transfer.direction == Message.DIRECTION_SENT) { + text = is_image ? _("Image sent") : _("File sent"); + } else { + text = is_image ? _("Image received") : _("File received"); + } + + yield notify_content_item(conversation, conversation_display_name, participant_display_name, text); + } + + public async void notify_subscription_request(Conversation conversation) { + string summary = _("Subscription request"); + string body = Markup.escape_text(conversation.counterpart.to_string()); + + if (!show_message(summary, body, get_avatar(conversation), conversation.id, stub)) { // missing actions + warning("Failed showing subscription request notification"); + } + + // HashTable hash_table = new HashTable(null, null); + // hash_table["image-data"] = yield get_conversation_icon(conversation); + // string[] actions = new string[] {"default", "Open conversation", "accept", _("Accept"), "deny", _("Deny")}; + // try { + // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); + + // if (!conversation_notifications.has_key(conversation)) { + // conversation_notifications[conversation] = new ArrayList(); + // } + // conversation_notifications[conversation].add(notification_id); + + // add_action_listener(notification_id, "default", () => { + // GLib.Application.get_default().activate_action("open-conversation", new Variant.int32(conversation.id)); + // }); + // add_action_listener(notification_id, "accept", () => { + // GLib.Application.get_default().activate_action("accept-subscription", new Variant.int32(conversation.id)); + // }); + // add_action_listener(notification_id, "deny", () => { + // GLib.Application.get_default().activate_action("deny-subscription", new Variant.int32(conversation.id)); + // }); + // } catch (Error e) { + // warning("Failed showing subscription request notification: %s", e.message); + // } + } + + public async void notify_connection_error(Account account, ConnectionManager.ConnectionError error) { + string summary = _("Could not connect to %s").printf(account.bare_jid.domainpart); + string body = ""; + switch (error.source) { + case ConnectionManager.ConnectionError.Source.SASL: + body = _("Wrong password"); + break; + case ConnectionManager.ConnectionError.Source.TLS: + body = _("Invalid TLS certificate"); + break; + case ConnectionManager.ConnectionError.Source.STREAM_ERROR: + body = "Stream Error"; + break; + case ConnectionManager.ConnectionError.Source.CONNECTION: + body = "Connection"; + break; + } + + if (!show_message(summary, body, null, 0, stub)) { + warning("Failed showing connection error notification"); + } + } + + public async void notify_muc_invite(Account account, Jid room_jid, Jid from_jid, string inviter_display_name) { + Conversation direct_conversation = new Conversation(from_jid, account, Conversation.Type.CHAT); + + string display_room = room_jid.bare_jid.to_string(); + string summary = _("Invitation to %s").printf(display_room); + string body = _("%s invited you to %s").printf(inviter_display_name, display_room); + + Conversation group_conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(room_jid, account, Conversation.Type.GROUPCHAT); + if (!show_message(summary, body, get_avatar(direct_conversation), group_conversation.id, stub)) { // action not enabled yet + warning("Failed showing muc invite notification"); + } + + // HashTable hash_table = new HashTable(null, null); + // hash_table["image-data"] = yield get_conversation_icon(direct_conversation); + // string[] actions = new string[] {"default", "", "reject", _("Reject"), "accept", _("Accept")}; + + // try { + // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); + + // Conversation group_conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(room_jid, account, Conversation.Type.GROUPCHAT); + // add_action_listener(notification_id, "default", () => { + // GLib.Application.get_default().activate_action("open-muc-join", new Variant.int32(group_conversation.id)); + // }); + // add_action_listener(notification_id, "accept", () => { + // GLib.Application.get_default().activate_action("deny-invite", new Variant.int32(group_conversation.id)); + // }); + // add_action_listener(notification_id, "deny", () => { + // GLib.Application.get_default().activate_action("open-muc-join", new Variant.int32(group_conversation.id)); + // }); + // } catch (Error e) { + + // } + } + + public async void notify_voice_request(Conversation conversation, Jid from_jid) { + + string display_name = Dino.get_participant_display_name(stream_interactor, conversation, from_jid); + string display_room = Dino.get_conversation_display_name(stream_interactor, conversation, _("%s from %s")); + string summary = _("Permission request"); + string body = _("%s requests the permission to write in %s").printf(display_name, display_room); + + if (!show_message(summary, body, get_avatar(conversation), conversation.id, stub)) { // missing actions + warning("Failed showing voice request notification"); + } + + // HashTable hash_table = new HashTable(null, null); + // hash_table["image-data"] = yield get_conversation_icon(conversation); + // string[] actions = new string[] {"deny", _("Deny"), "accept", _("Accept")}; + + // try { + // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); + + // add_action_listener(notification_id, "accept", () => { + // GLib.Application.get_default().activate_action("deny-invite", new Variant.int32(conversation.id)); + // }); + // add_action_listener(notification_id, "deny", () => { + // GLib.Application.get_default().activate_action("open-muc-join", new Variant.int32(conversation.id)); + // }); + // } catch (Error e) { + // warning("Failed showing voice request notification: %s", e.message); + // } + } + + public async void retract_content_item_notifications() { + // if (content_notifications != null) { + // foreach (uint32 id in content_notifications.values) { + // try { + // dbus_notifications.close_notification(id); + // } catch (Error e) { } + // } + // content_notifications.clear(); + // } + } + + public async void retract_conversation_notifications(Conversation conversation) { + // if (content_notifications.has_key(conversation)) { + // try { + // dbus_notifications.close_notification(content_notifications[conversation]); + // } catch (Error e) { } + // } + // content_notifications.unset(conversation); + } + + private bool show_message(string sender, string message, string? image_path, int conv_id, NotificationCallback callback) { + DinoWinToastTemplate template; + if (image_path != null) { + template = new DinoWinToastTemplate(TemplateType.ImageAndText02); + template.setImagePath(image_path); + } else { + template = new DinoWinToastTemplate(TemplateType.Text02); + } + + template.setTextField(sender, TextField.FirstLine); + template.setTextField(message, TextField.SecondLine); + return ShowMessage(template, conv_id, callback) == 0; + } + + private async void notify_content_item(Conversation conversation, string conversation_display_name, string? participant_display_name, string body_) { + string body = body_; + if (participant_display_name != null) { + body = @"$participant_display_name: $body"; + } + + var avatar = get_avatar(conversation); + if (!show_message(conversation_display_name, body, avatar, conversation.id, onclick_callback)) { + warning("Failed showing content item notification"); + } + } + + private void onclick_callback(int conv_id) { + this.app.activate_action("open-conversation", conv_id); + } + + private void stub(int conv_id) { + } + + private string? get_avatar(Conversation conversation) { + var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); + return avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); + } + } +} \ No newline at end of file diff --git a/plugins/windows-notification/src/wintoast.vala b/plugins/windows-notification/src/wintoast.vala deleted file mode 100644 index a4e1b6226..000000000 --- a/plugins/windows-notification/src/wintoast.vala +++ /dev/null @@ -1,28 +0,0 @@ -using DinoWinToast; - -namespace Dino.Plugins.WindowsNotification { - public class WinToast { - public bool valid { get; private set; } - - public WinToast() { - valid = Init() == 0; - } - - public bool show_message(string sender, string message, string? image_path, int conv_id, NotificationCallback callback) { - if (valid) { - DinoWinToastTemplate template; - if (image_path != null) { - template = new DinoWinToastTemplate(TemplateType.ImageAndText02); - template.setImagePath(image_path); - } else { - template = new DinoWinToastTemplate(TemplateType.Text02); - } - - template.setTextField(sender, TextField.FirstLine); - template.setTextField(message, TextField.SecondLine); - return DinoWinToast.ShowMessage(template, conv_id, callback) == 0; - } - return false; - } - } -} \ No newline at end of file From d8bb9897a42209a7bb56951b8a7bc5807822e5c4 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Thu, 26 Nov 2020 18:50:03 -0300 Subject: [PATCH 051/161] Add support for custom actions on notification --- .../src/DinoWinToastLib.h | 37 ++++- .../src/DinoWinToastLib_AMD64.lib | Bin 5186 -> 6038 bytes .../src/DinoWinToastTemplate.h | 36 ++--- .../src/win_notification_provider.vala | 153 +++++++++++------- .../vapi/DinoWinToastLib.vapi | 42 ++++- .../vapi/DinoWinToastTemplate.vapi | 8 +- 6 files changed, 186 insertions(+), 90 deletions(-) diff --git a/plugins/windows-notification/src/DinoWinToastLib.h b/plugins/windows-notification/src/DinoWinToastLib.h index 697236668..c7c70933e 100644 --- a/plugins/windows-notification/src/DinoWinToastLib.h +++ b/plugins/windows-notification/src/DinoWinToastLib.h @@ -6,9 +6,40 @@ #ifdef __cplusplus extern "C" { #endif - typedef void(*dinoWinToastLibNotificationCallback)(int conv_id, void* userdata); - DINOWINTOASTLIB_API int dinoWinToastLibInit(); - DINOWINTOASTLIB_API int dinoWinToastLibShowMessage(dino_wintoasttemplate templ, int conv_id, dinoWinToastLibNotificationCallback click_callback, void* callback_target); + typedef enum { + Reason_Activated = 0, + Reason_ApplicationHidden, + Reason_TimedOut + } dinoWinToastLib_Notification_Reason; + + typedef void(*dinoWinToastLib_Notification_Callback_Simple)(void* userdata); + typedef void(*dinoWinToastLib_Notification_Callback_ActivatedWithActionIndex)(int action_id, void* userdata); + typedef void(*dinoWinToastLib_Notification_Callback_Dismissed)(dinoWinToastLib_Notification_Reason reason, void* userdata); + + typedef struct { + dinoWinToastLib_Notification_Callback_Simple activated; + void* activated_context; + void(*activated_free)(void*); + + dinoWinToastLib_Notification_Callback_ActivatedWithActionIndex activatedWithIndex; + void* activatedWithIndex_context; + void(*activatedWithIndex_free)(void*); + + dinoWinToastLib_Notification_Callback_Dismissed dismissed; + void* dismissed_context; + void(*dismissed_free)(void*); + + dinoWinToastLib_Notification_Callback_Simple failed; + void* failed_context; + void(*failed_free)(void*); + + } dinoWinToastLib_Notification_Callbacks; + + DINOWINTOASTLIB_API dinoWinToastLib_Notification_Callbacks* dinoWinToastLib_NewCallbacks(); + DINOWINTOASTLIB_API void dinoWinToastLib_DestroyCallbacks(dinoWinToastLib_Notification_Callbacks* callbacks); + + DINOWINTOASTLIB_API int dinoWinToastLib_Init(); + DINOWINTOASTLIB_API int dinoWinToastLib_ShowMessage(dino_wintoasttemplate templ, dinoWinToastLib_Notification_Callbacks* callbacks); #ifdef __cplusplus } // extern "C" #endif \ No newline at end of file diff --git a/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib b/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib index c508e807a64cfa9d699c0eba5631c65dea718217..190f4ca5c53352a1f21259efda2abe4cca8f076c 100644 GIT binary patch delta 1284 zcmaJ=OGs2<6h3zz&iwPZk9mopaof}wRO4i$13eZA74$$eQ<1J?&eYK0STmt6%2|}O z3hO`+QPiSM+u0gI5iJ5yoQ09tQfg7^B1l3z|GiQ(-pLE!z4v_Q@&EsK&i^+2_~2xG zJlYyn^{3wj0J{NPO90+5fS3YMN(STw01j!^fZRnkLFq6M+yKxqN?$^NayfjR2K5q>T? z^8fI1Ckj>-rv*1^&bs2XP_m3izsF?{aGqDq^cr1iy$X7Q_ffqyT&K&6?t+pMr&KhsKgba2VD6Z>j>JGku^f1^&P?07HOc0a^)&tOK#tK4FfGzS(DlBa_s7#M$bRsP{;&vCbITJ}r(+obw(D*`rvT zntAxSLT3U))Rrx}B5Mby-0}(*%Wh@1>|U%aR9B|U*F25JMY~xOehIaV^KW3UrKJER z4Oou=t1%$VZ1PwmjGpYxRZjqG{LUIci>b3wW{tN+00Jb4P!Qu4RD_`+1Q`)T2kJpi zP*T1`Tk@f1TYecZ2aVi}DEsn+lj)t-w!PzayTIbzbna+pl>35v4%&0sDx{tK|Gs5v2)Dp>nq#FRVnIx`FfI`=!dBh66tj?PB$&nulLwAq~i1Fr%4(%ylkAlnR80v z#o0f3t`PDoG(usTPt8m3-1}XJhE1E=f { + app.activate_action("open-conversation", conversation.id); + }; + + callbacks.activatedWithIndex = (index) => { + if (index == 0) { + app.activate_action("accept-subscription", conversation.id); + } else if (index == 1) { + app.activate_action("deny-subscription", conversation.id); + } + }; + + if (!ShowMessage(template, callbacks) == 0) { warning("Failed showing subscription request notification"); } - - // HashTable hash_table = new HashTable(null, null); - // hash_table["image-data"] = yield get_conversation_icon(conversation); - // string[] actions = new string[] {"default", "Open conversation", "accept", _("Accept"), "deny", _("Deny")}; - // try { - // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); - - // if (!conversation_notifications.has_key(conversation)) { - // conversation_notifications[conversation] = new ArrayList(); - // } - // conversation_notifications[conversation].add(notification_id); - - // add_action_listener(notification_id, "default", () => { - // GLib.Application.get_default().activate_action("open-conversation", new Variant.int32(conversation.id)); - // }); - // add_action_listener(notification_id, "accept", () => { - // GLib.Application.get_default().activate_action("accept-subscription", new Variant.int32(conversation.id)); - // }); - // add_action_listener(notification_id, "deny", () => { - // GLib.Application.get_default().activate_action("deny-subscription", new Variant.int32(conversation.id)); - // }); - // } catch (Error e) { - // warning("Failed showing subscription request notification: %s", e.message); - // } } public async void notify_connection_error(Account account, ConnectionManager.ConnectionError error) { @@ -97,7 +102,7 @@ namespace Dino.Plugins.WindowsNotification { break; } - if (!show_message(summary, body, null, 0, stub)) { + if (!show_message(summary, body, null, null)) { warning("Failed showing connection error notification"); } } @@ -109,15 +114,39 @@ namespace Dino.Plugins.WindowsNotification { string summary = _("Invitation to %s").printf(display_room); string body = _("%s invited you to %s").printf(inviter_display_name, display_room); + DinoWinToastTemplate template; + var image_path = get_avatar(conversation); + if (image_path != null) { + template = new DinoWinToastTemplate(TemplateType.ImageAndText02); + template.setImagePath(image_path); + } else { + template = new DinoWinToastTemplate(TemplateType.Text02); + } + + template.setTextField(summary, TextField.FirstLine); + template.setTextField(body, TextField.SecondLine); + + template.addAction(_("Accept")); + template.addAction(_("Deny")); + Conversation group_conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(room_jid, account, Conversation.Type.GROUPCHAT); - if (!show_message(summary, body, get_avatar(direct_conversation), group_conversation.id, stub)) { // action not enabled yet + var callbacks = new Callbacks(); + callbacks.activated = () => { + app.activate_action("open-muc-join", group_conversation.id); + }; + + callbacks.activatedWithIndex = (index) => { + if (index == 0) { + app.activate_action("deny-invite", group_conversation.id); + } else if (index == 1) { + app.activate_action("open-muc-join", group_conversation.id); + } + }; + + if (!ShowMessage(template, callbacks)) { warning("Failed showing muc invite notification"); } - // HashTable hash_table = new HashTable(null, null); - // hash_table["image-data"] = yield get_conversation_icon(direct_conversation); - // string[] actions = new string[] {"default", "", "reject", _("Reject"), "accept", _("Accept")}; - // try { // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); @@ -137,32 +166,38 @@ namespace Dino.Plugins.WindowsNotification { } public async void notify_voice_request(Conversation conversation, Jid from_jid) { - string display_name = Dino.get_participant_display_name(stream_interactor, conversation, from_jid); string display_room = Dino.get_conversation_display_name(stream_interactor, conversation, _("%s from %s")); string summary = _("Permission request"); string body = _("%s requests the permission to write in %s").printf(display_name, display_room); - if (!show_message(summary, body, get_avatar(conversation), conversation.id, stub)) { // missing actions + DinoWinToastTemplate template; + var image_path = get_avatar(conversation); + if (image_path != null) { + template = new DinoWinToastTemplate(TemplateType.ImageAndText02); + template.setImagePath(image_path); + } else { + template = new DinoWinToastTemplate(TemplateType.Text02); + } + + template.setTextField(summary, TextField.FirstLine); + template.setTextField(body, TextField.SecondLine); + + template.addAction(_("Accept")); + template.addAction(_("Deny")); + + var callbacks = new Callbacks(); + callbacks.activatedWithIndex = (index) => { + if (index == 0) { + app.activate_action("deny-invite", conversation.id); + } else if (index == 1) { + app.activate_action("open-muc-join", conversation.id); + } + }; + + if (!ShowMessage(template, callbacks) == 0) { warning("Failed showing voice request notification"); } - - // HashTable hash_table = new HashTable(null, null); - // hash_table["image-data"] = yield get_conversation_icon(conversation); - // string[] actions = new string[] {"deny", _("Deny"), "accept", _("Accept")}; - - // try { - // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); - - // add_action_listener(notification_id, "accept", () => { - // GLib.Application.get_default().activate_action("deny-invite", new Variant.int32(conversation.id)); - // }); - // add_action_listener(notification_id, "deny", () => { - // GLib.Application.get_default().activate_action("open-muc-join", new Variant.int32(conversation.id)); - // }); - // } catch (Error e) { - // warning("Failed showing voice request notification: %s", e.message); - // } } public async void retract_content_item_notifications() { @@ -185,7 +220,7 @@ namespace Dino.Plugins.WindowsNotification { // content_notifications.unset(conversation); } - private bool show_message(string sender, string message, string? image_path, int conv_id, NotificationCallback callback) { + private bool show_message(string sender, string message, string? image_path, Callbacks? callbacks = null) { DinoWinToastTemplate template; if (image_path != null) { template = new DinoWinToastTemplate(TemplateType.ImageAndText02); @@ -196,7 +231,10 @@ namespace Dino.Plugins.WindowsNotification { template.setTextField(sender, TextField.FirstLine); template.setTextField(message, TextField.SecondLine); - return ShowMessage(template, conv_id, callback) == 0; + if (callbacks != null) { + return ShowMessage(template, callbacks) == 0; + } + return ShowMessage(template, new Callbacks()) == 0; } private async void notify_content_item(Conversation conversation, string conversation_display_name, string? participant_display_name, string body_) { @@ -206,18 +244,13 @@ namespace Dino.Plugins.WindowsNotification { } var avatar = get_avatar(conversation); - if (!show_message(conversation_display_name, body, avatar, conversation.id, onclick_callback)) { + var callbacks = new Callbacks(); + callbacks.activated = () => app.activate_action("open-conversation", conversation.id); + if (!show_message(conversation_display_name, body, avatar, callbacks)) { warning("Failed showing content item notification"); } } - private void onclick_callback(int conv_id) { - this.app.activate_action("open-conversation", conv_id); - } - - private void stub(int conv_id) { - } - private string? get_avatar(Conversation conversation) { var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); return avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); diff --git a/plugins/windows-notification/vapi/DinoWinToastLib.vapi b/plugins/windows-notification/vapi/DinoWinToastLib.vapi index a4c920578..25077d46c 100644 --- a/plugins/windows-notification/vapi/DinoWinToastLib.vapi +++ b/plugins/windows-notification/vapi/DinoWinToastLib.vapi @@ -1,13 +1,45 @@ [CCode (cheader_filename = "DinoWinToastLib.h")] namespace DinoWinToast { - [CCode (cname = "dinoWinToastLibNotificationCallback", has_target = true)] - public delegate void NotificationCallback(int conv_id); + [CCode (cname = "dinoWinToastLib_Notification_Reason", cprefix = "Reason_")] + public enum Reason { + Activated, + ApplicationHidden, + TimedOut + } - [CCode (cname = "dinoWinToastLibInit")] + [CCode (cname = "dinoWinToastLib_Notification_Callback_Simple", has_target = true)] + public delegate void NotificationCallbackSimple(); + + [CCode (cname = "dinoWinToastLib_Notification_Callback_ActivatedWithActionIndex", has_target = true)] + public delegate void NotificationCallbackWithActionIndex(int actionId); + + [CCode (cname = "dinoWinToastLib_Notification_Callback_Dismissed", has_target = true)] + public delegate void NotificationCallbackDismissed(Reason reason); + + [CCode (cname = "dinoWinToastLib_Notification_Callbacks", free_function = "dinoWinToastLib_DestroyCallbacks")] + [Compact] + public class Callbacks { + [CCode (delegate_target_cname = "activated_context", destroy_notify_cname = "activated_free")] + public NotificationCallbackSimple activated; + + [CCode (delegate_target_cname = "activatedWithIndex_context", destroy_notify_cname = "activatedWithIndex_free")] + public NotificationCallbackWithActionIndex activatedWithIndex; + + [CCode (delegate_target_cname = "dismissed_context", destroy_notify_cname = "dismissed_free")] + public NotificationCallbackDismissed dismissed; + + [CCode (delegate_target_cname = "failed_context", destroy_notify_cname = "failed_free")] + public NotificationCallbackSimple failed; + + [CCode (cname = "dinoWinToastLib_NewCallbacks")] + public Callbacks(); + } + + [CCode (cname = "dinoWinToastLib_Init")] public int Init(); - [CCode (cname = "dinoWinToastLibShowMessage")] - public int ShowMessage(DinoWinToastTemplate templ, int conv_id, NotificationCallback callback); + [CCode (cname = "dinoWinToastLib_ShowMessage")] + public int ShowMessage(DinoWinToastTemplate templ, Callbacks callbacks); } diff --git a/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi b/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi index 59fc4740f..ca5b2fc73 100644 --- a/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi +++ b/plugins/windows-notification/vapi/DinoWinToastTemplate.vapi @@ -1,27 +1,27 @@ [CCode (cheader_filename = "DinoWinToastTemplate.h")] namespace DinoWinToast { - [CCode (cname = "dino_wintoasttemplate_duration", cprefix = "")] + [CCode (cname = "dino_wintoasttemplate_duration", cprefix = "Duration_")] public enum Duration { System, Short, Long } - [CCode (cname = "dino_wintoasttemplate_audiooption", cprefix = "")] + [CCode (cname = "dino_wintoasttemplate_audiooption", cprefix = "AudioOption_")] public enum AudioOption { Default, Silent, Loop } - [CCode (cname = "dino_wintoasttemplate_textfield", cprefix = "")] + [CCode (cname = "dino_wintoasttemplate_textfield", cprefix = "TextField_")] public enum TextField { FirstLine, SecondLine, ThirdLine } - [CCode (cname = "dino_wintoasttemplate_wintoasttemplatetype", cprefix = "")] + [CCode (cname = "dino_wintoasttemplate_wintoasttemplatetype", cprefix = "TemplateType_")] public enum TemplateType { ImageAndText01, ImageAndText02, From 5f2e636868d5699f0710b6887e53a012f1290635 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Thu, 26 Nov 2020 20:48:59 -0300 Subject: [PATCH 052/161] Add notification retraction --- .../src/DinoWinToastLib.h | 3 +- .../src/DinoWinToastLib_AMD64.lib | Bin 6038 -> 6068 bytes .../src/DinoWinToastLib_x86.lib | Bin 5238 -> 6132 bytes .../src/win_notification_provider.vala | 162 +++++++++++------- .../vapi/DinoWinToastLib.vapi | 5 +- 5 files changed, 109 insertions(+), 61 deletions(-) diff --git a/plugins/windows-notification/src/DinoWinToastLib.h b/plugins/windows-notification/src/DinoWinToastLib.h index c7c70933e..bb66ae51b 100644 --- a/plugins/windows-notification/src/DinoWinToastLib.h +++ b/plugins/windows-notification/src/DinoWinToastLib.h @@ -39,7 +39,8 @@ extern "C" { DINOWINTOASTLIB_API void dinoWinToastLib_DestroyCallbacks(dinoWinToastLib_Notification_Callbacks* callbacks); DINOWINTOASTLIB_API int dinoWinToastLib_Init(); - DINOWINTOASTLIB_API int dinoWinToastLib_ShowMessage(dino_wintoasttemplate templ, dinoWinToastLib_Notification_Callbacks* callbacks); + DINOWINTOASTLIB_API int64_t dinoWinToastLib_ShowMessage(dino_wintoasttemplate templ, dinoWinToastLib_Notification_Callbacks* callbacks); + DINOWINTOASTLIB_API int dinoWinToastLib_RemoveNotification(int64_t notification_id); #ifdef __cplusplus } // extern "C" #endif \ No newline at end of file diff --git a/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib b/plugins/windows-notification/src/DinoWinToastLib_AMD64.lib index 190f4ca5c53352a1f21259efda2abe4cca8f076c..cebd9481fb60aeac72bed91911fb9578a029d06e 100644 GIT binary patch delta 526 zcmZ|Lze~eV5C`yYT9cY$YkoF}723f;5Zj{SkEx5Bh=|}IX#I&%nm`TGLF(ckpdNH} zadV8g3a&c2x#-%h=+Hq2y=O!aG4RRbF85yUUbApjIGH}08q0k>l_Y>Xkn8}dGLUWn z`tG+^UYX`adRu^?eamD4!EQ#ZV?Z!!5tGjp>~th^!S&1;hACb!_@iLfh12_Bd||8V zA8gI}fxGQ)tOc&`Vbk^eCD&W@*Y<;1cYXD53C$}Gm8ENHcMq^sScy6DozddYhz8Ht z;X%tOpux@T>cA`WG@#YXc+F;jrVSihK#ezaOuh_`FE~H!aLl_(rVoNcLtA0v+w+-RKghME3-B;6Q&)V4}tmvJV40>M9n AApigX delta 455 zcmX|-J4*vW6ot=jb~n#WW_Rsi7x_a5=ou|xw=5DLAky~=taR|UN5E=n`8i>{a zW8lGtfFRcQU`5IaBkz%z04^nA8+lWdZ+;RQQ^d zhS2+XeH}z(jZ2=0UCJdTeVI z@*8n<|BEy=J)*WbLby?WF~vlxP3a7O2uP|8yRcu z-xW-EB6==4eT1eoi+lE_mB*ZD%S9r8T$jmqO$3;A0j#+J@)AHZkqcgcItGfz{Q#Rj zfOWEKk#ZWX!xZljp9%o9DFDj^8Xs^_0S>T36;uKb)gXZkE)c;DP7uHYUdq-Vm9}9> z?8hnIFIg;M8|Di}vM1M}tusdX=P*|C{3@5TG_-nLeoCb-S~dT3N-kVCrdQIApZ0<7 zqV>TbJMsqy03+Pz7c<|x$UGq1ECu(0*%S3}rguyt{^! z;l7Yn*cyDguaU5#+$WUoAI;Yfw&rJkY@8&8t(@YJC-_pXHNUvW`r?j>xp!e|Q(3MJ zIz2&L@@RP3qX_p0nzlNrlE*vVTAXt@@sVdtSh{j=J3_3z!0z%@*ytS-9)3H!)lRH~ z*lA&OY5QY8MODa2cZGHAd)rHqKv4relM`}kCs{RHuh+8ZG delta 670 zcmZvZO=uHQ6ot>^XC`kZX_A>F#r~wJpxCH1!I&mmT%;PPq^pLS3L0BYH6Y0%g@_IeO;;5}5f`PQ#Z5tpZi_;z73oT-H9{ap9?$s`y80TX7 z{PYZ^gBvOw(4atu z6R!VyE5D$N@*J(pgWBx9a&@LqsVv+raN!`i4V4>KvyzCl2LUJlY*~ zDAXDD(Gif5p0x+Qj&TL>NAq`zrSi36DO+BsEN6;~-5Kb9I%`CwI34(mq1o!^4gL|_ z_}@4^)&t notifications_to_be_removed; + private HashMap content_notifications; + private HashMap> conversation_notifications; + + private class Notification { + public int64? id; + } private WindowsNotificationProvider(Dino.Application app) { this.stream_interactor = app.stream_interactor; this.app = app; + this.notifications_to_be_removed = new GLib.Queue(); + this.content_notifications = new HashMap(Conversation.hash_func, Conversation.equals_func); + this.conversation_notifications = new HashMap>(Conversation.hash_func, Conversation.equals_func); } public static WindowsNotificationProvider? try_create(Dino.Application app) { @@ -65,10 +71,12 @@ namespace Dino.Plugins.WindowsNotification { template.addAction(_("Accept")); template.addAction(_("Deny")); - + + var notification = new Notification(); var callbacks = new Callbacks(); callbacks.activated = () => { app.activate_action("open-conversation", conversation.id); + add_to_removal_queue(notification.id); }; callbacks.activatedWithIndex = (index) => { @@ -77,10 +85,20 @@ namespace Dino.Plugins.WindowsNotification { } else if (index == 1) { app.activate_action("deny-subscription", conversation.id); } + add_to_removal_queue(notification.id); }; - if (!ShowMessage(template, callbacks) == 0) { + callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); + callbacks.failed = () => add_to_removal_queue(notification.id); + + notification.id = ShowMessage(template, callbacks); + if (notification.id == -1) { warning("Failed showing subscription request notification"); + } else { + if (!conversation_notifications.has_key(conversation)) { + conversation_notifications[conversation] = new ArrayList(); + } + conversation_notifications[conversation].add(notification.id); } } @@ -101,8 +119,20 @@ namespace Dino.Plugins.WindowsNotification { body = "Connection"; break; } - - if (!show_message(summary, body, null, null)) { + + var notification = new Notification(); + var callbacks = new Callbacks(); + callbacks.activated = () => add_to_removal_queue(notification.id); + callbacks.activatedWithIndex = (index) => add_to_removal_queue(notification.id); + callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); + callbacks.failed = () => add_to_removal_queue(notification.id); + + DinoWinToastTemplate template = new DinoWinToastTemplate(TemplateType.Text02); + template.setTextField(summary, TextField.FirstLine); + template.setTextField(body, TextField.SecondLine); + + notification.id = ShowMessage(template, callbacks); + if (notification.id == -1) { warning("Failed showing connection error notification"); } } @@ -115,7 +145,7 @@ namespace Dino.Plugins.WindowsNotification { string body = _("%s invited you to %s").printf(inviter_display_name, display_room); DinoWinToastTemplate template; - var image_path = get_avatar(conversation); + var image_path = get_avatar(direct_conversation); if (image_path != null) { template = new DinoWinToastTemplate(TemplateType.ImageAndText02); template.setImagePath(image_path); @@ -130,9 +160,11 @@ namespace Dino.Plugins.WindowsNotification { template.addAction(_("Deny")); Conversation group_conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(room_jid, account, Conversation.Type.GROUPCHAT); + var notification = new Notification(); var callbacks = new Callbacks(); callbacks.activated = () => { app.activate_action("open-muc-join", group_conversation.id); + add_to_removal_queue(notification.id); }; callbacks.activatedWithIndex = (index) => { @@ -141,28 +173,16 @@ namespace Dino.Plugins.WindowsNotification { } else if (index == 1) { app.activate_action("open-muc-join", group_conversation.id); } + add_to_removal_queue(notification.id); }; - if (!ShowMessage(template, callbacks)) { + callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); + callbacks.failed = () => add_to_removal_queue(notification.id); + + notification.id = ShowMessage(template, callbacks); + if (notification.id == -1) { warning("Failed showing muc invite notification"); } - - // try { - // uint32 notification_id = dbus_notifications.notify("Dino", 0, "", summary, body, actions, hash_table, 0); - - // Conversation group_conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(room_jid, account, Conversation.Type.GROUPCHAT); - // add_action_listener(notification_id, "default", () => { - // GLib.Application.get_default().activate_action("open-muc-join", new Variant.int32(group_conversation.id)); - // }); - // add_action_listener(notification_id, "accept", () => { - // GLib.Application.get_default().activate_action("deny-invite", new Variant.int32(group_conversation.id)); - // }); - // add_action_listener(notification_id, "deny", () => { - // GLib.Application.get_default().activate_action("open-muc-join", new Variant.int32(group_conversation.id)); - // }); - // } catch (Error e) { - - // } } public async void notify_voice_request(Conversation conversation, Jid from_jid) { @@ -186,6 +206,7 @@ namespace Dino.Plugins.WindowsNotification { template.addAction(_("Accept")); template.addAction(_("Deny")); + var notification = new Notification(); var callbacks = new Callbacks(); callbacks.activatedWithIndex = (index) => { if (index == 0) { @@ -193,34 +214,45 @@ namespace Dino.Plugins.WindowsNotification { } else if (index == 1) { app.activate_action("open-muc-join", conversation.id); } + add_to_removal_queue(notification.id); }; - if (!ShowMessage(template, callbacks) == 0) { + callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); + callbacks.failed = () => add_to_removal_queue(notification.id); + callbacks.activated = () => add_to_removal_queue(notification.id); + + notification.id = ShowMessage(template, callbacks); + if (notification.id == -1) { warning("Failed showing voice request notification"); } } public async void retract_content_item_notifications() { - // if (content_notifications != null) { - // foreach (uint32 id in content_notifications.values) { - // try { - // dbus_notifications.close_notification(id); - // } catch (Error e) { } - // } - // content_notifications.clear(); - // } + foreach (int64 id in content_notifications.values) { + RemoveNotification(id); + } + content_notifications.clear(); } public async void retract_conversation_notifications(Conversation conversation) { - // if (content_notifications.has_key(conversation)) { - // try { - // dbus_notifications.close_notification(content_notifications[conversation]); - // } catch (Error e) { } - // } - // content_notifications.unset(conversation); + if (conversation_notifications.has_key(conversation)) { + var conversation_items = conversation_notifications[conversation]; + foreach (int64 id in conversation_items) { + RemoveNotification(id); + } + conversation_items.clear(); + } } - private bool show_message(string sender, string message, string? image_path, Callbacks? callbacks = null) { + private async void notify_content_item(Conversation conversation, string conversation_display_name, string? participant_display_name, string body_) { + clear_queue(); + + string body = body_; + if (participant_display_name != null) { + body = @"$participant_display_name: $body"; + } + + var image_path = get_avatar(conversation); DinoWinToastTemplate template; if (image_path != null) { template = new DinoWinToastTemplate(TemplateType.ImageAndText02); @@ -229,25 +261,24 @@ namespace Dino.Plugins.WindowsNotification { template = new DinoWinToastTemplate(TemplateType.Text02); } - template.setTextField(sender, TextField.FirstLine); - template.setTextField(message, TextField.SecondLine); - if (callbacks != null) { - return ShowMessage(template, callbacks) == 0; - } - return ShowMessage(template, new Callbacks()) == 0; - } - - private async void notify_content_item(Conversation conversation, string conversation_display_name, string? participant_display_name, string body_) { - string body = body_; - if (participant_display_name != null) { - body = @"$participant_display_name: $body"; - } + template.setTextField(conversation_display_name, TextField.FirstLine); + template.setTextField(body, TextField.SecondLine); - var avatar = get_avatar(conversation); + var notification = new Notification(); var callbacks = new Callbacks(); - callbacks.activated = () => app.activate_action("open-conversation", conversation.id); - if (!show_message(conversation_display_name, body, avatar, callbacks)) { + callbacks.activated = () => { + app.activate_action("open-conversation", conversation.id); + add_to_removal_queue(notification.id); + }; + callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); + callbacks.failed = () => add_to_removal_queue(notification.id); + callbacks.activatedWithIndex = (index) => add_to_removal_queue(notification.id); + + notification.id = ShowMessage(template, callbacks); + if (notification.id == -1) { warning("Failed showing content item notification"); + } else { + content_notifications[conversation] = notification.id; } } @@ -255,5 +286,18 @@ namespace Dino.Plugins.WindowsNotification { var avatar_manager = app.stream_interactor.get_module(AvatarManager.IDENTITY); return avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); } + + private void clear_queue() { + int64? id = null; + while ((id = notifications_to_be_removed.pop_head()) != null) { + RemoveNotification(id); + } + } + + private void add_to_removal_queue(int64? id) { + if (id != null && id != -1 && id != 1 && id != 0) { + notifications_to_be_removed.push_head(id); + } + } } } \ No newline at end of file diff --git a/plugins/windows-notification/vapi/DinoWinToastLib.vapi b/plugins/windows-notification/vapi/DinoWinToastLib.vapi index 25077d46c..d47dfbd98 100644 --- a/plugins/windows-notification/vapi/DinoWinToastLib.vapi +++ b/plugins/windows-notification/vapi/DinoWinToastLib.vapi @@ -40,6 +40,9 @@ namespace DinoWinToast { public int Init(); [CCode (cname = "dinoWinToastLib_ShowMessage")] - public int ShowMessage(DinoWinToastTemplate templ, Callbacks callbacks); + public int64 ShowMessage(DinoWinToastTemplate templ, Callbacks callbacks); + + [CCode (cname = "dinoWinToastLib_RemoveNotification")] + public bool RemoveNotification(int64 notification_id); } From 96f96ead7ea4a2f45ce4098734484d745edc26ff Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Thu, 26 Nov 2020 21:06:41 -0300 Subject: [PATCH 053/161] Use list with all notifications --- .../src/win_notification_provider.vala | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/windows-notification/src/win_notification_provider.vala b/plugins/windows-notification/src/win_notification_provider.vala index 3673f07be..81fe0e896 100644 --- a/plugins/windows-notification/src/win_notification_provider.vala +++ b/plugins/windows-notification/src/win_notification_provider.vala @@ -9,8 +9,8 @@ namespace Dino.Plugins.WindowsNotification { private StreamInteractor stream_interactor; private Dino.Application app; - private GLib.Queue notifications_to_be_removed; - private HashMap content_notifications; + private Gee.List notifications_to_be_removed; + private Gee.List content_notifications; private HashMap> conversation_notifications; private class Notification { @@ -20,8 +20,8 @@ namespace Dino.Plugins.WindowsNotification { private WindowsNotificationProvider(Dino.Application app) { this.stream_interactor = app.stream_interactor; this.app = app; - this.notifications_to_be_removed = new GLib.Queue(); - this.content_notifications = new HashMap(Conversation.hash_func, Conversation.equals_func); + this.notifications_to_be_removed = new Gee.ArrayList(); + this.content_notifications = new Gee.ArrayList(); this.conversation_notifications = new HashMap>(Conversation.hash_func, Conversation.equals_func); } @@ -228,7 +228,7 @@ namespace Dino.Plugins.WindowsNotification { } public async void retract_content_item_notifications() { - foreach (int64 id in content_notifications.values) { + foreach (int64 id in content_notifications) { RemoveNotification(id); } content_notifications.clear(); @@ -278,7 +278,7 @@ namespace Dino.Plugins.WindowsNotification { if (notification.id == -1) { warning("Failed showing content item notification"); } else { - content_notifications[conversation] = notification.id; + content_notifications.add(notification.id); } } @@ -288,15 +288,15 @@ namespace Dino.Plugins.WindowsNotification { } private void clear_queue() { - int64? id = null; - while ((id = notifications_to_be_removed.pop_head()) != null) { + foreach (var id in notifications_to_be_removed) { RemoveNotification(id); } + notifications_to_be_removed.clear(); } private void add_to_removal_queue(int64? id) { if (id != null && id != -1 && id != 1 && id != 0) { - notifications_to_be_removed.push_head(id); + notifications_to_be_removed.add(id); } } } From 2d63c8ae77e58d685012332ffa1bed51dd76979d Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Fri, 27 Nov 2020 22:25:19 -0300 Subject: [PATCH 054/161] Rename field --- .../src/win_notification_provider.vala | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/plugins/windows-notification/src/win_notification_provider.vala b/plugins/windows-notification/src/win_notification_provider.vala index 81fe0e896..8aaf1add1 100644 --- a/plugins/windows-notification/src/win_notification_provider.vala +++ b/plugins/windows-notification/src/win_notification_provider.vala @@ -9,7 +9,7 @@ namespace Dino.Plugins.WindowsNotification { private StreamInteractor stream_interactor; private Dino.Application app; - private Gee.List notifications_to_be_removed; + private Gee.List marked_for_removal; private Gee.List content_notifications; private HashMap> conversation_notifications; @@ -20,7 +20,7 @@ namespace Dino.Plugins.WindowsNotification { private WindowsNotificationProvider(Dino.Application app) { this.stream_interactor = app.stream_interactor; this.app = app; - this.notifications_to_be_removed = new Gee.ArrayList(); + this.marked_for_removal = new Gee.ArrayList(); this.content_notifications = new Gee.ArrayList(); this.conversation_notifications = new HashMap>(Conversation.hash_func, Conversation.equals_func); } @@ -76,7 +76,7 @@ namespace Dino.Plugins.WindowsNotification { var callbacks = new Callbacks(); callbacks.activated = () => { app.activate_action("open-conversation", conversation.id); - add_to_removal_queue(notification.id); + mark_for_removal(notification.id); }; callbacks.activatedWithIndex = (index) => { @@ -85,11 +85,11 @@ namespace Dino.Plugins.WindowsNotification { } else if (index == 1) { app.activate_action("deny-subscription", conversation.id); } - add_to_removal_queue(notification.id); + mark_for_removal(notification.id); }; - callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); - callbacks.failed = () => add_to_removal_queue(notification.id); + callbacks.dismissed = (reason) => mark_for_removal(notification.id); + callbacks.failed = () => mark_for_removal(notification.id); notification.id = ShowMessage(template, callbacks); if (notification.id == -1) { @@ -122,10 +122,10 @@ namespace Dino.Plugins.WindowsNotification { var notification = new Notification(); var callbacks = new Callbacks(); - callbacks.activated = () => add_to_removal_queue(notification.id); - callbacks.activatedWithIndex = (index) => add_to_removal_queue(notification.id); - callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); - callbacks.failed = () => add_to_removal_queue(notification.id); + callbacks.activated = () => mark_for_removal(notification.id); + callbacks.activatedWithIndex = (index) => mark_for_removal(notification.id); + callbacks.dismissed = (reason) => mark_for_removal(notification.id); + callbacks.failed = () => mark_for_removal(notification.id); DinoWinToastTemplate template = new DinoWinToastTemplate(TemplateType.Text02); template.setTextField(summary, TextField.FirstLine); @@ -164,7 +164,7 @@ namespace Dino.Plugins.WindowsNotification { var callbacks = new Callbacks(); callbacks.activated = () => { app.activate_action("open-muc-join", group_conversation.id); - add_to_removal_queue(notification.id); + mark_for_removal(notification.id); }; callbacks.activatedWithIndex = (index) => { @@ -173,11 +173,11 @@ namespace Dino.Plugins.WindowsNotification { } else if (index == 1) { app.activate_action("open-muc-join", group_conversation.id); } - add_to_removal_queue(notification.id); + mark_for_removal(notification.id); }; - callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); - callbacks.failed = () => add_to_removal_queue(notification.id); + callbacks.dismissed = (reason) => mark_for_removal(notification.id); + callbacks.failed = () => mark_for_removal(notification.id); notification.id = ShowMessage(template, callbacks); if (notification.id == -1) { @@ -214,12 +214,12 @@ namespace Dino.Plugins.WindowsNotification { } else if (index == 1) { app.activate_action("open-muc-join", conversation.id); } - add_to_removal_queue(notification.id); + mark_for_removal(notification.id); }; - callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); - callbacks.failed = () => add_to_removal_queue(notification.id); - callbacks.activated = () => add_to_removal_queue(notification.id); + callbacks.dismissed = (reason) => mark_for_removal(notification.id); + callbacks.failed = () => mark_for_removal(notification.id); + callbacks.activated = () => mark_for_removal(notification.id); notification.id = ShowMessage(template, callbacks); if (notification.id == -1) { @@ -245,7 +245,7 @@ namespace Dino.Plugins.WindowsNotification { } private async void notify_content_item(Conversation conversation, string conversation_display_name, string? participant_display_name, string body_) { - clear_queue(); + clear_marked(); string body = body_; if (participant_display_name != null) { @@ -268,11 +268,11 @@ namespace Dino.Plugins.WindowsNotification { var callbacks = new Callbacks(); callbacks.activated = () => { app.activate_action("open-conversation", conversation.id); - add_to_removal_queue(notification.id); + mark_for_removal(notification.id); }; - callbacks.dismissed = (reason) => add_to_removal_queue(notification.id); - callbacks.failed = () => add_to_removal_queue(notification.id); - callbacks.activatedWithIndex = (index) => add_to_removal_queue(notification.id); + callbacks.dismissed = (reason) => mark_for_removal(notification.id); + callbacks.failed = () => mark_for_removal(notification.id); + callbacks.activatedWithIndex = (index) => mark_for_removal(notification.id); notification.id = ShowMessage(template, callbacks); if (notification.id == -1) { @@ -287,16 +287,16 @@ namespace Dino.Plugins.WindowsNotification { return avatar_manager.get_avatar_filepath(conversation.account, conversation.counterpart); } - private void clear_queue() { - foreach (var id in notifications_to_be_removed) { + private void clear_marked() { + foreach (var id in marked_for_removal) { RemoveNotification(id); } - notifications_to_be_removed.clear(); + marked_for_removal.clear(); } - private void add_to_removal_queue(int64? id) { + private void mark_for_removal(int64? id) { if (id != null && id != -1 && id != 1 && id != 0) { - notifications_to_be_removed.add(id); + marked_for_removal.add(id); } } } From 03774a3756995c6b0f85687792f57fdb69abcc1c Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sun, 29 Nov 2020 20:52:24 -0300 Subject: [PATCH 055/161] Fix muc invite and voide request not working --- .../src/win_notification_provider.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/windows-notification/src/win_notification_provider.vala b/plugins/windows-notification/src/win_notification_provider.vala index 8aaf1add1..548725273 100644 --- a/plugins/windows-notification/src/win_notification_provider.vala +++ b/plugins/windows-notification/src/win_notification_provider.vala @@ -169,9 +169,9 @@ namespace Dino.Plugins.WindowsNotification { callbacks.activatedWithIndex = (index) => { if (index == 0) { - app.activate_action("deny-invite", group_conversation.id); - } else if (index == 1) { app.activate_action("open-muc-join", group_conversation.id); + } else if (index == 1) { + app.activate_action("deny-invite", group_conversation.id); } mark_for_removal(notification.id); }; @@ -210,9 +210,9 @@ namespace Dino.Plugins.WindowsNotification { var callbacks = new Callbacks(); callbacks.activatedWithIndex = (index) => { if (index == 0) { - app.activate_action("deny-invite", conversation.id); + app.activate_action("accept-voice-request", conversation.id); } else if (index == 1) { - app.activate_action("open-muc-join", conversation.id); + app.activate_action("deny-voice-request", conversation.id); } mark_for_removal(notification.id); }; From e3356bb3aafdbd6f8e720dec271a7215a94bf041 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Fri, 4 Dec 2020 07:40:27 -0300 Subject: [PATCH 056/161] Do not use GLib to open links in messages Use ShellExecute --- .../ui/conversation_content_view/message_widget.vala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main/src/ui/conversation_content_view/message_widget.vala b/main/src/ui/conversation_content_view/message_widget.vala index 44584709e..aae3ef552 100644 --- a/main/src/ui/conversation_content_view/message_widget.vala +++ b/main/src/ui/conversation_content_view/message_widget.vala @@ -221,7 +221,15 @@ public class MessageItemWidget : SizeRequestBin { public static bool on_label_activate_link(string uri) { // Always handle xmpp URIs with Dino - if (!uri.has_prefix("xmpp:")) return false; + if (!uri.has_prefix("xmpp:")) { +#if _WIN32 + Dino.Util.launch_default_for_uri(uri); + return true; +#else + return false; +#endif + } + File file = File.new_for_uri(uri); Dino.Application.get_default().open(new File[]{file}, ""); return true; From 915dd4c738c9d1ed7306386358cbdb2e0b45c1d5 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 27 Mar 2021 06:55:09 -0300 Subject: [PATCH 057/161] Add MIT licensed winrt headers --- .../windows-notification/yolort/LICENSE.md | 22 + .../yolort/include/WindowsNumerics.impl.h | 62 + .../include/winrt/Windows.Data.Xml.Dom.h | 3 + .../winrt/Windows.Foundation.Collections.h | 3 + .../yolort/include/winrt/Windows.Foundation.h | 3 + .../include/winrt/Windows.UI.Notifications.h | 3 + .../yolort/include/winrt/Windows.UI.h | 3 + .../yolort/include/winrt/base.h | 3 + .../include/winrt/yolort_impl/corostub.hpp | 28 + .../yolort_impl/winrt/Windows.Data.Xml.Dom.h | 1691 ++++ .../winrt/Windows.Foundation.Collections.h | 2721 ++++++ .../yolort_impl/winrt/Windows.Foundation.h | 3526 +++++++ .../winrt/Windows.UI.Notifications.h | 3733 ++++++++ .../winrt/yolort_impl/winrt/Windows.UI.h | 2647 ++++++ .../include/winrt/yolort_impl/winrt/base.h | 8109 +++++++++++++++++ .../winrt/impl/Windows.ApplicationModel.0.h | 2281 +++++ .../winrt/impl/Windows.ApplicationModel.1.h | 369 + .../winrt/impl/Windows.ApplicationModel.2.h | 213 + .../winrt/impl/Windows.Data.Xml.Dom.0.h | 1108 +++ .../winrt/impl/Windows.Data.Xml.Dom.1.h | 190 + .../winrt/impl/Windows.Data.Xml.Dom.2.h | 102 + .../winrt/impl/Windows.Foundation.0.h | 1353 +++ .../winrt/impl/Windows.Foundation.1.h | 218 + .../winrt/impl/Windows.Foundation.2.h | 212 + .../impl/Windows.Foundation.Collections.0.h | 605 ++ .../impl/Windows.Foundation.Collections.1.h | 133 + .../impl/Windows.Foundation.Collections.2.h | 58 + .../winrt/impl/Windows.Storage.0.h | 2859 ++++++ .../winrt/impl/Windows.Storage.1.h | 448 + .../winrt/impl/Windows.Storage.2.h | 293 + .../winrt/impl/Windows.Storage.Search.0.h | 937 ++ .../winrt/impl/Windows.Storage.Search.1.h | 135 + .../winrt/impl/Windows.Storage.Search.2.h | 91 + .../winrt/impl/Windows.Storage.Streams.0.h | 941 ++ .../winrt/impl/Windows.Storage.Streams.1.h | 143 + .../winrt/impl/Windows.Storage.Streams.2.h | 108 + .../yolort_impl/winrt/impl/Windows.System.0.h | 3703 ++++++++ .../yolort_impl/winrt/impl/Windows.System.1.h | 524 ++ .../yolort_impl/winrt/impl/Windows.System.2.h | 355 + .../impl/Windows.System.RemoteSystems.0.h | 2905 ++++++ .../impl/Windows.System.RemoteSystems.1.h | 488 + .../impl/Windows.System.RemoteSystems.2.h | 264 + .../yolort_impl/winrt/impl/Windows.UI.0.h | 563 ++ .../yolort_impl/winrt/impl/Windows.UI.1.h | 61 + .../yolort_impl/winrt/impl/Windows.UI.2.h | 190 + .../winrt/impl/Windows.UI.Notifications.0.h | 3050 +++++++ .../winrt/impl/Windows.UI.Notifications.1.h | 467 + .../winrt/impl/Windows.UI.Notifications.2.h | 263 + .../yolort/include/winrt/yolort_impl/yolo.ipp | 133 + .../yolort/winrt-2.0.190620.2+yolort1.7z | Bin 0 -> 2723012 bytes 50 files changed, 48320 insertions(+) create mode 100644 plugins/windows-notification/yolort/LICENSE.md create mode 100644 plugins/windows-notification/yolort/include/WindowsNumerics.impl.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.UI.h create mode 100644 plugins/windows-notification/yolort/include/winrt/base.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.ApplicationModel.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.ApplicationModel.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.ApplicationModel.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Data.Xml.Dom.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Data.Xml.Dom.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Data.Xml.Dom.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.Collections.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.Collections.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.Collections.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Search.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Search.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Search.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Streams.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Streams.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Streams.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.RemoteSystems.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.RemoteSystems.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.RemoteSystems.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.Notifications.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.Notifications.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.Notifications.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/yolo.ipp create mode 100644 plugins/windows-notification/yolort/winrt-2.0.190620.2+yolort1.7z diff --git a/plugins/windows-notification/yolort/LICENSE.md b/plugins/windows-notification/yolort/LICENSE.md new file mode 100644 index 000000000..3e7cd2b9c --- /dev/null +++ b/plugins/windows-notification/yolort/LICENSE.md @@ -0,0 +1,22 @@ + +Copyright © Microsoft Corporation +Copyright © 2021, [mjk](https://github.com/Yuubi-san) +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/windows-notification/yolort/include/WindowsNumerics.impl.h b/plugins/windows-notification/yolort/include/WindowsNumerics.impl.h new file mode 100644 index 000000000..e687c85d3 --- /dev/null +++ b/plugins/windows-notification/yolort/include/WindowsNumerics.impl.h @@ -0,0 +1,62 @@ + +// Copyright © 2021, mjk + +// This file is merely to cheaply plug compilability holes in windows 10 winrt +// APIs that use types from the non-free(?) WindowsNumerics library +// unconditionally, i. e., unguarded by __has_include. +// MinGW will probably have a complete implementation in the future, at which +// point this file may turn into a part of the problem it solves now (FIXME). + +#ifndef YOLORT_WINDOWSNUMERICS_IMPL_H +#define YOLORT_WINDOWSNUMERICS_IMPL_H + +#include +#include + +_WINDOWS_NUMERICS_BEGIN_NAMESPACE_ +{ + // These definitions make sense to *me*, but one cannot be sure microsoft + // didn't add proprietary extensions to mathematics. + +#define define_mathy_type(name, T, N, ...) \ + struct name \ + { \ + private: \ + constexpr auto _tie() const \ + { \ + auto members = std::tie( __VA_ARGS__ ); \ + static_assert( std::tuple_size_v == (N) ); \ + return members; \ + } \ + public: \ + T __VA_ARGS__; \ + friend constexpr auto operator==( const name &l, const name &r ) \ + { return l._tie() == r._tie(); } \ + } + +#define define_vector_type(T,N,...) define_mathy_type(T##N, T, N, __VA_ARGS__) + define_vector_type(float,2,x,y); + define_vector_type(float,3,x,y,z); + define_vector_type(float,4,x,y,z,w); +#undef define_vector_type + +#define define_matrix_type(T,N,M) struct T##N##x##M : std::array {} + define_matrix_type(float,2,2); + define_matrix_type(float,2,3); + define_matrix_type(float,2,4); + define_matrix_type(float,3,2); + define_matrix_type(float,3,3); + define_matrix_type(float,3,4); + define_matrix_type(float,4,2); + define_matrix_type(float,4,3); + define_matrix_type(float,4,4); +#undef define_matrix_type + + define_mathy_type(quaternion, float, 4, a,b,c,d ); + define_mathy_type(plane, float, 3+1, x,y,z, d ); + +#undef define_mathy_type +} +_WINDOWS_NUMERICS_END_NAMESPACE_ + +#endif // YOLORT_WINDOWSNUMERICS_IMPL_H diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h b/plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h new file mode 100644 index 000000000..85d87dab8 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h new file mode 100644 index 000000000..f4175bc37 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h new file mode 100644 index 000000000..e0ab0e3c5 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h b/plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h new file mode 100644 index 000000000..7b3ef9b8f --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.UI.h b/plugins/windows-notification/yolort/include/winrt/Windows.UI.h new file mode 100644 index 000000000..d980c116b --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.UI.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/base.h b/plugins/windows-notification/yolort/include/winrt/base.h new file mode 100644 index 000000000..8a61f54b2 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/base.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp b/plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp new file mode 100644 index 000000000..8328a8376 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp @@ -0,0 +1,28 @@ + +// Copyright © 2021, mjk + +#ifndef YOLORT_IMPL_COROSTUB_HPP +#define YOLORT_IMPL_COROSTUB_HPP + +namespace corostub +{ + template + struct coroutine_handle + { + coroutine_handle() = default; + coroutine_handle( decltype(nullptr) ); + void *address() const; + void operator()() const {} + operator bool() const; + static coroutine_handle<> from_address( ... ); + }; + + struct suspend_always {}; + struct suspend_never {}; + + template + struct coroutine_traits; +} + +#endif // YOLORT_IMPL_COROSTUB_HPP + diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h new file mode 100644 index 000000000..8f15cc3e1 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h @@ -0,0 +1,1691 @@ +// C++/WinRT v2.0.190620.2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef WINRT_Windows_Data_Xml_Dom_H +#define WINRT_Windows_Data_Xml_Dom_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "impl/Windows.Foundation.2.h" +#include "impl/Windows.Foundation.Collections.2.h" +#include "impl/Windows.Storage.2.h" +#include "impl/Windows.Storage.Streams.2.h" +#include "impl/Windows.Data.Xml.Dom.2.h" +namespace winrt::impl +{ + template auto consume_Windows_Data_Xml_Dom_IDtdEntity::PublicId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdEntity)->get_PublicId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdEntity::SystemId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdEntity)->get_SystemId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdEntity::NotationName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdEntity)->get_NotationName(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdNotation::PublicId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdNotation)->get_PublicId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdNotation::SystemId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdNotation)->get_SystemId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Name() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->get_Name(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Specified() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->get_Specified(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Value() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->get_Value(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Value(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->put_Value(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::Data() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->get_Data(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::Data(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->put_Data(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::Length() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->get_Length(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::SubstringData(uint32_t offset, uint32_t count) const + { + void* data{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->SubstringData(offset, count, &data)); + return hstring{ data, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::AppendData(param::hstring const& data) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->AppendData(*(void**)(&data))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::InsertData(uint32_t offset, param::hstring const& data) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->InsertData(offset, *(void**)(&data))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::DeleteData(uint32_t offset, uint32_t count) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->DeleteData(offset, count)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::ReplaceData(uint32_t offset, uint32_t count, param::hstring const& data) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->ReplaceData(offset, count, *(void**)(&data))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::Doctype() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_Doctype(&value)); + return Windows::Data::Xml::Dom::XmlDocumentType{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::Implementation() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_Implementation(&value)); + return Windows::Data::Xml::Dom::XmlDomImplementation{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::DocumentElement() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_DocumentElement(&value)); + return Windows::Data::Xml::Dom::XmlElement{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateElement(param::hstring const& tagName) const + { + void* newElement{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateElement(*(void**)(&tagName), &newElement)); + return Windows::Data::Xml::Dom::XmlElement{ newElement, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateDocumentFragment() const + { + void* newDocumentFragment{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateDocumentFragment(&newDocumentFragment)); + return Windows::Data::Xml::Dom::XmlDocumentFragment{ newDocumentFragment, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateTextNode(param::hstring const& data) const + { + void* newTextNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateTextNode(*(void**)(&data), &newTextNode)); + return Windows::Data::Xml::Dom::XmlText{ newTextNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateComment(param::hstring const& data) const + { + void* newComment{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateComment(*(void**)(&data), &newComment)); + return Windows::Data::Xml::Dom::XmlComment{ newComment, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateProcessingInstruction(param::hstring const& target, param::hstring const& data) const + { + void* newProcessingInstruction{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateProcessingInstruction(*(void**)(&target), *(void**)(&data), &newProcessingInstruction)); + return Windows::Data::Xml::Dom::XmlProcessingInstruction{ newProcessingInstruction, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateAttribute(param::hstring const& name) const + { + void* newAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateAttribute(*(void**)(&name), &newAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ newAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateEntityReference(param::hstring const& name) const + { + void* newEntityReference{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateEntityReference(*(void**)(&name), &newEntityReference)); + return Windows::Data::Xml::Dom::XmlEntityReference{ newEntityReference, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::GetElementsByTagName(param::hstring const& tagName) const + { + void* elements{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->GetElementsByTagName(*(void**)(&tagName), &elements)); + return Windows::Data::Xml::Dom::XmlNodeList{ elements, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateCDataSection(param::hstring const& data) const + { + void* newCDataSection{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateCDataSection(*(void**)(&data), &newCDataSection)); + return Windows::Data::Xml::Dom::XmlCDataSection{ newCDataSection, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::DocumentUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_DocumentUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& qualifiedName) const + { + void* newAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateAttributeNS(*(void**)(&namespaceUri), *(void**)(&qualifiedName), &newAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ newAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateElementNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& qualifiedName) const + { + void* newElement{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateElementNS(*(void**)(&namespaceUri), *(void**)(&qualifiedName), &newElement)); + return Windows::Data::Xml::Dom::XmlElement{ newElement, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::GetElementById(param::hstring const& elementId) const + { + void* element{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->GetElementById(*(void**)(&elementId), &element)); + return Windows::Data::Xml::Dom::XmlElement{ element, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::ImportNode(Windows::Data::Xml::Dom::IXmlNode const& node, bool deep) const + { + void* newNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->ImportNode(*(void**)(&node), deep, &newNode)); + return Windows::Data::Xml::Dom::IXmlNode{ newNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO::LoadXml(param::hstring const& xml) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO)->LoadXml(*(void**)(&xml))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO::LoadXml(param::hstring const& xml, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO)->LoadXmlWithSettings(*(void**)(&xml), *(void**)(&loadSettings))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO::SaveToFileAsync(Windows::Storage::IStorageFile const& file) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO)->SaveToFileAsync(*(void**)(&file), &asyncInfo)); + return Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO2::LoadXmlFromBuffer(Windows::Storage::Streams::IBuffer const& buffer) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO2)->LoadXmlFromBuffer(*(void**)(&buffer))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO2::LoadXmlFromBuffer(Windows::Storage::Streams::IBuffer const& buffer, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO2)->LoadXmlFromBufferWithSettings(*(void**)(&buffer), *(void**)(&loadSettings))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromUriAsync(Windows::Foundation::Uri const& uri) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromUriAsync(*(void**)(&uri), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromUriAsync(Windows::Foundation::Uri const& uri, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromUriWithSettingsAsync(*(void**)(&uri), *(void**)(&loadSettings), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromFileAsync(Windows::Storage::IStorageFile const& file) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromFileAsync(*(void**)(&file), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromFileAsync(Windows::Storage::IStorageFile const& file, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromFileWithSettingsAsync(*(void**)(&file), *(void**)(&loadSettings), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentType::Name() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentType)->get_Name(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentType::Entities() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentType)->get_Entities(&value)); + return Windows::Data::Xml::Dom::XmlNamedNodeMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentType::Notations() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentType)->get_Notations(&value)); + return Windows::Data::Xml::Dom::XmlNamedNodeMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDomImplementation::HasFeature(param::hstring const& feature, Windows::Foundation::IInspectable const& version) const + { + bool featureSupported; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDomImplementation)->HasFeature(*(void**)(&feature), *(void**)(&version), &featureSupported)); + return featureSupported; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::TagName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->get_TagName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttribute(param::hstring const& attributeName) const + { + void* attributeValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttribute(*(void**)(&attributeName), &attributeValue)); + return hstring{ attributeValue, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttribute(param::hstring const& attributeName, param::hstring const& attributeValue) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttribute(*(void**)(&attributeName), *(void**)(&attributeValue))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::RemoveAttribute(param::hstring const& attributeName) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->RemoveAttribute(*(void**)(&attributeName))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttributeNode(param::hstring const& attributeName) const + { + void* attributeNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttributeNode(*(void**)(&attributeName), &attributeNode)); + return Windows::Data::Xml::Dom::XmlAttribute{ attributeNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttributeNode(Windows::Data::Xml::Dom::XmlAttribute const& newAttribute) const + { + void* previousAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttributeNode(*(void**)(&newAttribute), &previousAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ previousAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::RemoveAttributeNode(Windows::Data::Xml::Dom::XmlAttribute const& attributeNode) const + { + void* removedAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->RemoveAttributeNode(*(void**)(&attributeNode), &removedAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ removedAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetElementsByTagName(param::hstring const& tagName) const + { + void* elements{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetElementsByTagName(*(void**)(&tagName), &elements)); + return Windows::Data::Xml::Dom::XmlNodeList{ elements, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& qualifiedName, param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttributeNS(*(void**)(&namespaceUri), *(void**)(&qualifiedName), *(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& localName) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttributeNS(*(void**)(&namespaceUri), *(void**)(&localName), &value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::RemoveAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& localName) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->RemoveAttributeNS(*(void**)(&namespaceUri), *(void**)(&localName))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttributeNodeNS(Windows::Data::Xml::Dom::XmlAttribute const& newAttribute) const + { + void* previousAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttributeNodeNS(*(void**)(&newAttribute), &previousAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ previousAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttributeNodeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& localName) const + { + void* previousAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttributeNodeNS(*(void**)(&namespaceUri), *(void**)(&localName), &previousAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ previousAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::MaxElementDepth() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_MaxElementDepth(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::MaxElementDepth(uint32_t value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_MaxElementDepth(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ProhibitDtd() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ProhibitDtd(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ProhibitDtd(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ProhibitDtd(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ResolveExternals() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ResolveExternals(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ResolveExternals(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ResolveExternals(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ValidateOnParse() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ValidateOnParse(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ValidateOnParse(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ValidateOnParse(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ElementContentWhiteSpace() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ElementContentWhiteSpace(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ElementContentWhiteSpace(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ElementContentWhiteSpace(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::Length() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->get_Length(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::Item(uint32_t index) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->Item(index, &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::GetNamedItem(param::hstring const& name) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->GetNamedItem(*(void**)(&name), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::SetNamedItem(Windows::Data::Xml::Dom::IXmlNode const& node) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->SetNamedItem(*(void**)(&node), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::RemoveNamedItem(param::hstring const& name) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->RemoveNamedItem(*(void**)(&name), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::GetNamedItemNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& name) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->GetNamedItemNS(*(void**)(&namespaceUri), *(void**)(&name), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::RemoveNamedItemNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& name) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->RemoveNamedItemNS(*(void**)(&namespaceUri), *(void**)(&name), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::SetNamedItemNS(Windows::Data::Xml::Dom::IXmlNode const& node) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->SetNamedItemNS(*(void**)(&node), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeValue() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NodeValue(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeValue(Windows::Foundation::IInspectable const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->put_NodeValue(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeType() const + { + Windows::Data::Xml::Dom::NodeType value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NodeType(put_abi(value))); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NodeName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::ParentNode() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_ParentNode(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::ChildNodes() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_ChildNodes(&value)); + return Windows::Data::Xml::Dom::XmlNodeList{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::FirstChild() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_FirstChild(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::LastChild() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_LastChild(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::PreviousSibling() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_PreviousSibling(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NextSibling() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NextSibling(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Attributes() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_Attributes(&value)); + return Windows::Data::Xml::Dom::XmlNamedNodeMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::HasChildNodes() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->HasChildNodes(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::OwnerDocument() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_OwnerDocument(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::InsertBefore(Windows::Data::Xml::Dom::IXmlNode const& newChild, Windows::Data::Xml::Dom::IXmlNode const& referenceChild) const + { + void* insertedChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->InsertBefore(*(void**)(&newChild), *(void**)(&referenceChild), &insertedChild)); + return Windows::Data::Xml::Dom::IXmlNode{ insertedChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::ReplaceChild(Windows::Data::Xml::Dom::IXmlNode const& newChild, Windows::Data::Xml::Dom::IXmlNode const& referenceChild) const + { + void* previousChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->ReplaceChild(*(void**)(&newChild), *(void**)(&referenceChild), &previousChild)); + return Windows::Data::Xml::Dom::IXmlNode{ previousChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::RemoveChild(Windows::Data::Xml::Dom::IXmlNode const& childNode) const + { + void* removedChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->RemoveChild(*(void**)(&childNode), &removedChild)); + return Windows::Data::Xml::Dom::IXmlNode{ removedChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::AppendChild(Windows::Data::Xml::Dom::IXmlNode const& newChild) const + { + void* appendedChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->AppendChild(*(void**)(&newChild), &appendedChild)); + return Windows::Data::Xml::Dom::IXmlNode{ appendedChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::CloneNode(bool deep) const + { + void* newNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->CloneNode(deep, &newNode)); + return Windows::Data::Xml::Dom::IXmlNode{ newNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NamespaceUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NamespaceUri(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::LocalName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_LocalName(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Prefix() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_Prefix(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Normalize() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->Normalize()); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Prefix(Windows::Foundation::IInspectable const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->put_Prefix(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeList::Length() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeList)->get_Length(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeList::Item(uint32_t index) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeList)->Item(index, &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectSingleNode(param::hstring const& xpath) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectSingleNode(*(void**)(&xpath), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectNodes(param::hstring const& xpath) const + { + void* nodelist{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectNodes(*(void**)(&xpath), &nodelist)); + return Windows::Data::Xml::Dom::XmlNodeList{ nodelist, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectSingleNodeNS(param::hstring const& xpath, Windows::Foundation::IInspectable const& namespaces) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectSingleNodeNS(*(void**)(&xpath), *(void**)(&namespaces), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectNodesNS(param::hstring const& xpath, Windows::Foundation::IInspectable const& namespaces) const + { + void* nodelist{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectNodesNS(*(void**)(&xpath), *(void**)(&namespaces), &nodelist)); + return Windows::Data::Xml::Dom::XmlNodeList{ nodelist, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSerializer::GetXml() const + { + void* outerXml{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSerializer)->GetXml(&outerXml)); + return hstring{ outerXml, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSerializer::InnerText() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSerializer)->get_InnerText(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSerializer::InnerText(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSerializer)->put_InnerText(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlProcessingInstruction::Target() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlProcessingInstruction)->get_Target(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlProcessingInstruction::Data() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlProcessingInstruction)->get_Data(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlProcessingInstruction::Data(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlProcessingInstruction)->put_Data(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlText::SplitText(uint32_t offset) const + { + void* secondPart{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlText)->SplitText(offset, &secondPart)); + return Windows::Data::Xml::Dom::IXmlText{ secondPart, take_ownership_from_abi }; + } + template + struct produce : produce_base + { + int32_t __stdcall get_PublicId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PublicId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SystemId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SystemId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NotationName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NotationName()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_PublicId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PublicId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SystemId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SystemId()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Name(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Name()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Specified(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Specified()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Value(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Value(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Value(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Data(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Data()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Data(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Data(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Length(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Length()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SubstringData(uint32_t offset, uint32_t count, void** data) noexcept final try + { + clear_abi(data); + typename D::abi_guard guard(this->shim()); + *data = detach_from(this->shim().SubstringData(offset, count)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AppendData(void* data) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().AppendData(*reinterpret_cast(&data)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall InsertData(uint32_t offset, void* data) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().InsertData(offset, *reinterpret_cast(&data)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall DeleteData(uint32_t offset, uint32_t count) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().DeleteData(offset, count); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ReplaceData(uint32_t offset, uint32_t count, void* data) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ReplaceData(offset, count, *reinterpret_cast(&data)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Doctype(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Doctype()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Implementation(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Implementation()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DocumentElement(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DocumentElement()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateElement(void* tagName, void** newElement) noexcept final try + { + clear_abi(newElement); + typename D::abi_guard guard(this->shim()); + *newElement = detach_from(this->shim().CreateElement(*reinterpret_cast(&tagName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDocumentFragment(void** newDocumentFragment) noexcept final try + { + clear_abi(newDocumentFragment); + typename D::abi_guard guard(this->shim()); + *newDocumentFragment = detach_from(this->shim().CreateDocumentFragment()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTextNode(void* data, void** newTextNode) noexcept final try + { + clear_abi(newTextNode); + typename D::abi_guard guard(this->shim()); + *newTextNode = detach_from(this->shim().CreateTextNode(*reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateComment(void* data, void** newComment) noexcept final try + { + clear_abi(newComment); + typename D::abi_guard guard(this->shim()); + *newComment = detach_from(this->shim().CreateComment(*reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateProcessingInstruction(void* target, void* data, void** newProcessingInstruction) noexcept final try + { + clear_abi(newProcessingInstruction); + typename D::abi_guard guard(this->shim()); + *newProcessingInstruction = detach_from(this->shim().CreateProcessingInstruction(*reinterpret_cast(&target), *reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateAttribute(void* name, void** newAttribute) noexcept final try + { + clear_abi(newAttribute); + typename D::abi_guard guard(this->shim()); + *newAttribute = detach_from(this->shim().CreateAttribute(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateEntityReference(void* name, void** newEntityReference) noexcept final try + { + clear_abi(newEntityReference); + typename D::abi_guard guard(this->shim()); + *newEntityReference = detach_from(this->shim().CreateEntityReference(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetElementsByTagName(void* tagName, void** elements) noexcept final try + { + clear_abi(elements); + typename D::abi_guard guard(this->shim()); + *elements = detach_from(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateCDataSection(void* data, void** newCDataSection) noexcept final try + { + clear_abi(newCDataSection); + typename D::abi_guard guard(this->shim()); + *newCDataSection = detach_from(this->shim().CreateCDataSection(*reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DocumentUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DocumentUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateAttributeNS(void* namespaceUri, void* qualifiedName, void** newAttribute) noexcept final try + { + clear_abi(newAttribute); + typename D::abi_guard guard(this->shim()); + *newAttribute = detach_from(this->shim().CreateAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateElementNS(void* namespaceUri, void* qualifiedName, void** newElement) noexcept final try + { + clear_abi(newElement); + typename D::abi_guard guard(this->shim()); + *newElement = detach_from(this->shim().CreateElementNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetElementById(void* elementId, void** element) noexcept final try + { + clear_abi(element); + typename D::abi_guard guard(this->shim()); + *element = detach_from(this->shim().GetElementById(*reinterpret_cast(&elementId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ImportNode(void* node, bool deep, void** newNode) noexcept final try + { + clear_abi(newNode); + typename D::abi_guard guard(this->shim()); + *newNode = detach_from(this->shim().ImportNode(*reinterpret_cast(&node), deep)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall LoadXml(void* xml) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXml(*reinterpret_cast(&xml)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadXmlWithSettings(void* xml, void* loadSettings) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXml(*reinterpret_cast(&xml), *reinterpret_cast(&loadSettings)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SaveToFileAsync(void* file, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from(this->shim().SaveToFileAsync(*reinterpret_cast(&file))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall LoadXmlFromBuffer(void* buffer) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXmlFromBuffer(*reinterpret_cast(&buffer)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadXmlFromBufferWithSettings(void* buffer, void* loadSettings) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXmlFromBuffer(*reinterpret_cast(&buffer), *reinterpret_cast(&loadSettings)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall LoadFromUriAsync(void* uri, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadFromUriWithSettingsAsync(void* uri, void* loadSettings, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&loadSettings))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadFromFileAsync(void* file, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromFileAsync(*reinterpret_cast(&file))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadFromFileWithSettingsAsync(void* file, void* loadSettings, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&loadSettings))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Name(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Name()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Entities(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Entities()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Notations(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Notations()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall HasFeature(void* feature, void* version, bool* featureSupported) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *featureSupported = detach_from(this->shim().HasFeature(*reinterpret_cast(&feature), *reinterpret_cast(&version))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_TagName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TagName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttribute(void* attributeName, void** attributeValue) noexcept final try + { + clear_abi(attributeValue); + typename D::abi_guard guard(this->shim()); + *attributeValue = detach_from(this->shim().GetAttribute(*reinterpret_cast(&attributeName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttribute(void* attributeName, void* attributeValue) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SetAttribute(*reinterpret_cast(&attributeName), *reinterpret_cast(&attributeValue)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAttribute(void* attributeName) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAttribute(*reinterpret_cast(&attributeName)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttributeNode(void* attributeName, void** attributeNode) noexcept final try + { + clear_abi(attributeNode); + typename D::abi_guard guard(this->shim()); + *attributeNode = detach_from(this->shim().GetAttributeNode(*reinterpret_cast(&attributeName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttributeNode(void* newAttribute, void** previousAttribute) noexcept final try + { + clear_abi(previousAttribute); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_from(this->shim().SetAttributeNode(*reinterpret_cast(&newAttribute))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAttributeNode(void* attributeNode, void** removedAttribute) noexcept final try + { + clear_abi(removedAttribute); + typename D::abi_guard guard(this->shim()); + *removedAttribute = detach_from(this->shim().RemoveAttributeNode(*reinterpret_cast(&attributeNode))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetElementsByTagName(void* tagName, void** elements) noexcept final try + { + clear_abi(elements); + typename D::abi_guard guard(this->shim()); + *elements = detach_from(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttributeNS(void* namespaceUri, void* qualifiedName, void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName), *reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttributeNS(void* namespaceUri, void* localName, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAttributeNS(void* namespaceUri, void* localName) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttributeNodeNS(void* newAttribute, void** previousAttribute) noexcept final try + { + clear_abi(previousAttribute); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_from(this->shim().SetAttributeNodeNS(*reinterpret_cast(&newAttribute))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttributeNodeNS(void* namespaceUri, void* localName, void** previousAttribute) noexcept final try + { + clear_abi(previousAttribute); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_from(this->shim().GetAttributeNodeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_MaxElementDepth(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MaxElementDepth()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_MaxElementDepth(uint32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().MaxElementDepth(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ProhibitDtd(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ProhibitDtd()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ProhibitDtd(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ProhibitDtd(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ResolveExternals(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ResolveExternals()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ResolveExternals(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ResolveExternals(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ValidateOnParse(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ValidateOnParse()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ValidateOnParse(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ValidateOnParse(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ElementContentWhiteSpace(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ElementContentWhiteSpace()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ElementContentWhiteSpace(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ElementContentWhiteSpace(value); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Length(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Length()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Item(uint32_t index, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().Item(index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetNamedItem(void* name, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().GetNamedItem(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetNamedItem(void* node, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().SetNamedItem(*reinterpret_cast(&node))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveNamedItem(void* name, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().RemoveNamedItem(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetNamedItemNS(void* namespaceUri, void* name, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().GetNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveNamedItemNS(void* namespaceUri, void* name, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().RemoveNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetNamedItemNS(void* node, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().SetNamedItemNS(*reinterpret_cast(&node))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_NodeValue(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NodeValue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_NodeValue(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().NodeValue(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NodeType(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NodeType()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NodeName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NodeName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ParentNode(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ParentNode()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ChildNodes(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ChildNodes()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_FirstChild(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().FirstChild()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LastChild(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LastChild()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PreviousSibling(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PreviousSibling()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NextSibling(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NextSibling()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Attributes(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Attributes()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall HasChildNodes(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HasChildNodes()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OwnerDocument(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OwnerDocument()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall InsertBefore(void* newChild, void* referenceChild, void** insertedChild) noexcept final try + { + clear_abi(insertedChild); + typename D::abi_guard guard(this->shim()); + *insertedChild = detach_from(this->shim().InsertBefore(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ReplaceChild(void* newChild, void* referenceChild, void** previousChild) noexcept final try + { + clear_abi(previousChild); + typename D::abi_guard guard(this->shim()); + *previousChild = detach_from(this->shim().ReplaceChild(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveChild(void* childNode, void** removedChild) noexcept final try + { + clear_abi(removedChild); + typename D::abi_guard guard(this->shim()); + *removedChild = detach_from(this->shim().RemoveChild(*reinterpret_cast(&childNode))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AppendChild(void* newChild, void** appendedChild) noexcept final try + { + clear_abi(appendedChild); + typename D::abi_guard guard(this->shim()); + *appendedChild = detach_from(this->shim().AppendChild(*reinterpret_cast(&newChild))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CloneNode(bool deep, void** newNode) noexcept final try + { + clear_abi(newNode); + typename D::abi_guard guard(this->shim()); + *newNode = detach_from(this->shim().CloneNode(deep)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NamespaceUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NamespaceUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LocalName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LocalName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Prefix(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Prefix()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Normalize() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Normalize(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Prefix(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Prefix(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Length(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Length()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Item(uint32_t index, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().Item(index)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall SelectSingleNode(void* xpath, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().SelectSingleNode(*reinterpret_cast(&xpath))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SelectNodes(void* xpath, void** nodelist) noexcept final try + { + clear_abi(nodelist); + typename D::abi_guard guard(this->shim()); + *nodelist = detach_from(this->shim().SelectNodes(*reinterpret_cast(&xpath))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SelectSingleNodeNS(void* xpath, void* namespaces, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().SelectSingleNodeNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SelectNodesNS(void* xpath, void* namespaces, void** nodelist) noexcept final try + { + clear_abi(nodelist); + typename D::abi_guard guard(this->shim()); + *nodelist = detach_from(this->shim().SelectNodesNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetXml(void** outerXml) noexcept final try + { + clear_abi(outerXml); + typename D::abi_guard guard(this->shim()); + *outerXml = detach_from(this->shim().GetXml()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_InnerText(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().InnerText()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_InnerText(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().InnerText(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Target(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Target()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Data(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Data()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Data(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Data(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall SplitText(uint32_t offset, void** secondPart) noexcept final try + { + clear_abi(secondPart); + typename D::abi_guard guard(this->shim()); + *secondPart = detach_from(this->shim().SplitText(offset)); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::Data::Xml::Dom +{ + inline XmlDocument::XmlDocument() : + XmlDocument(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline auto XmlDocument::LoadFromUriAsync(Windows::Foundation::Uri const& uri) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromUriAsync(uri); }); + } + inline auto XmlDocument::LoadFromUriAsync(Windows::Foundation::Uri const& uri, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromUriAsync(uri, loadSettings); }); + } + inline auto XmlDocument::LoadFromFileAsync(Windows::Storage::IStorageFile const& file) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromFileAsync(file); }); + } + inline auto XmlDocument::LoadFromFileAsync(Windows::Storage::IStorageFile const& file, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromFileAsync(file, loadSettings); }); + } + inline XmlLoadSettings::XmlLoadSettings() : + XmlLoadSettings(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h new file mode 100644 index 000000000..2e322ed54 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h @@ -0,0 +1,2721 @@ +// C++/WinRT v2.0.190620.2 +// Patched with YoloRT + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright © 2021, mjk +// Licensed under the MIT License. + +#ifndef WINRT_Windows_Foundation_Collections_H +#define WINRT_Windows_Foundation_Collections_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "Windows.Foundation.h" +#include "impl/Windows.Foundation.2.h" +#include "impl/Windows.Foundation.Collections.2.h" +namespace winrt::impl +{ + template auto consume_Windows_Foundation_Collections_IIterable::First() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterable)->First(&winrt_impl_result)); + return Windows::Foundation::Collections::IIterator{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_Collections_IIterator::Current() const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->get_Current(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IIterator::HasCurrent() const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->get_HasCurrent(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IIterator::MoveNext() const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->MoveNext(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IIterator::GetMany(array_view items) const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->GetMany(items.size(), put_abi(items), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IKeyValuePair::Key() const + { + K winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IKeyValuePair)->get_Key(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IKeyValuePair::Value() const + { + V winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IKeyValuePair)->get_Value(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapChangedEventArgs::CollectionChange() const + { + Windows::Foundation::Collections::CollectionChange winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapChangedEventArgs)->get_CollectionChange(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapChangedEventArgs::Key() const + { + K winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapChangedEventArgs)->get_Key(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::Lookup(impl::param_type const& key) const + { + V winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->Lookup(impl::bind_in(key), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::HasKey(impl::param_type const& key) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->HasKey(impl::bind_in(key), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::Split(Windows::Foundation::Collections::IMapView& first, Windows::Foundation::Collections::IMapView& second) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->Split(impl::bind_out(first), impl::bind_out(second))); + } + template auto consume_Windows_Foundation_Collections_IMap::Lookup(impl::param_type const& key) const + { + V winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Lookup(impl::bind_in(key), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::HasKey(impl::param_type const& key) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->HasKey(impl::bind_in(key), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::GetView() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->GetView(&winrt_impl_result)); + return Windows::Foundation::Collections::IMapView{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_Collections_IMap::Insert(impl::param_type const& key, impl::param_type const& value) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Insert(impl::bind_in(key), impl::bind_in(value), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::Remove(impl::param_type const& key) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Remove(impl::bind_in(key))); + } + template auto consume_Windows_Foundation_Collections_IMap::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Clear()); + } + template auto consume_Windows_Foundation_Collections_IObservableMap::MapChanged(Windows::Foundation::Collections::MapChangedEventHandler const& vhnd) const + { + winrt::event_token winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableMap)->add_MapChanged(*(void**)(&vhnd), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template typename consume_Windows_Foundation_Collections_IObservableMap::MapChanged_revoker consume_Windows_Foundation_Collections_IObservableMap::MapChanged(auto_revoke_t, Windows::Foundation::Collections::MapChangedEventHandler const& vhnd) const + { + return impl::make_event_revoker(this, MapChanged(vhnd)); + } + template auto consume_Windows_Foundation_Collections_IObservableMap::MapChanged(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableMap)->remove_MapChanged(impl::bind_in(token))); + } + template auto consume_Windows_Foundation_Collections_IObservableVector::VectorChanged(Windows::Foundation::Collections::VectorChangedEventHandler const& vhnd) const + { + winrt::event_token winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableVector)->add_VectorChanged(*(void**)(&vhnd), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template typename consume_Windows_Foundation_Collections_IObservableVector::VectorChanged_revoker consume_Windows_Foundation_Collections_IObservableVector::VectorChanged(auto_revoke_t, Windows::Foundation::Collections::VectorChangedEventHandler const& vhnd) const + { + return impl::make_event_revoker(this, VectorChanged(vhnd)); + } + template auto consume_Windows_Foundation_Collections_IObservableVector::VectorChanged(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableVector)->remove_VectorChanged(impl::bind_in(token))); + } + template auto consume_Windows_Foundation_Collections_IVectorChangedEventArgs::CollectionChange() const + { + Windows::Foundation::Collections::CollectionChange value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorChangedEventArgs)->get_CollectionChange(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_Collections_IVectorChangedEventArgs::Index() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorChangedEventArgs)->get_Index(&value)); + return value; + } + template auto consume_Windows_Foundation_Collections_IVectorView::GetAt(uint32_t index) const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->GetAt(index, put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVectorView::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVectorView::IndexOf(impl::param_type const& value, uint32_t& index) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->IndexOf(impl::bind_in(value), &index, &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVectorView::GetMany(uint32_t startIndex, array_view items) const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->GetMany(startIndex, items.size(), put_abi(items), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::GetAt(uint32_t index) const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->GetAt(index, put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::GetView() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->GetView(&winrt_impl_result)); + return Windows::Foundation::Collections::IVectorView{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_Collections_IVector::IndexOf(impl::param_type const& value, uint32_t& index) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->IndexOf(impl::bind_in(value), &index, &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::SetAt(uint32_t index, impl::param_type const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->SetAt(index, impl::bind_in(value))); + } + template auto consume_Windows_Foundation_Collections_IVector::InsertAt(uint32_t index, impl::param_type const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->InsertAt(index, impl::bind_in(value))); + } + template auto consume_Windows_Foundation_Collections_IVector::RemoveAt(uint32_t index) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->RemoveAt(index)); + } + template auto consume_Windows_Foundation_Collections_IVector::Append(impl::param_type const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->Append(impl::bind_in(value))); + } + template auto consume_Windows_Foundation_Collections_IVector::RemoveAtEnd() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->RemoveAtEnd()); + } + template auto consume_Windows_Foundation_Collections_IVector::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->Clear()); + } + template auto consume_Windows_Foundation_Collections_IVector::GetMany(uint32_t startIndex, array_view items) const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->GetMany(startIndex, items.size(), put_abi(items), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::ReplaceAll(array_view items) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->ReplaceAll(items.size(), get_abi(items))); + } + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* sender, void* event) noexcept final try + { + (*this)(*reinterpret_cast const*>(&sender), *reinterpret_cast const*>(&event)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* sender, void* event) noexcept final try + { + (*this)(*reinterpret_cast const*>(&sender), *reinterpret_cast(&event)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall First(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().First()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Current(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Current()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HasCurrent(bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().HasCurrent()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall MoveNext(bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().MoveNext()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetMany(uint32_t __itemsSize, arg_out items, uint32_t* winrt_impl_result) noexcept final try + { + zero_abi(items, __itemsSize); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetMany(array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Key(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Key()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Value(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_CollectionChange(int32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().CollectionChange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Key(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Key()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall Lookup(arg_in key, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Lookup(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall HasKey(arg_in key, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().HasKey(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Split(void** first, void** second) noexcept final try + { + clear_abi(first); + clear_abi(second); + typename D::abi_guard guard(this->shim()); + this->shim().Split(*reinterpret_cast*>(first), *reinterpret_cast*>(second)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall Lookup(arg_in key, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Lookup(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall HasKey(arg_in key, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().HasKey(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetView(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().GetView()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Insert(arg_in key, arg_in value, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Insert(*reinterpret_cast(&key), *reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Remove(arg_in key) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&key)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall add_MapChanged(void* vhnd, winrt::event_token* winrt_impl_result) noexcept final try + { + zero_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().MapChanged(*reinterpret_cast const*>(&vhnd))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_MapChanged(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().MapChanged(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall add_VectorChanged(void* vhnd, winrt::event_token* winrt_impl_result) noexcept final try + { + zero_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().VectorChanged(*reinterpret_cast const*>(&vhnd))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_VectorChanged(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().VectorChanged(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_CollectionChange(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CollectionChange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Index(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Index()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall GetAt(uint32_t index, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetAt(index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall IndexOf(arg_in value, uint32_t* index, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().IndexOf(*reinterpret_cast(&value), *index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetMany(uint32_t startIndex, uint32_t __itemsSize, arg_out items, uint32_t* winrt_impl_result) noexcept final try + { + zero_abi(items, __itemsSize); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetMany(startIndex, array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall GetAt(uint32_t index, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetAt(index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetView(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().GetView()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall IndexOf(arg_in value, uint32_t* index, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().IndexOf(*reinterpret_cast(&value), *index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAt(uint32_t index, arg_in value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SetAt(index, *reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall InsertAt(uint32_t index, arg_in value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().InsertAt(index, *reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAt(uint32_t index) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAt(index); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Append(arg_in value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Append(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAtEnd() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAtEnd(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetMany(uint32_t startIndex, uint32_t __itemsSize, arg_out items, uint32_t* winrt_impl_result) noexcept final try + { + zero_abi(items, __itemsSize); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetMany(startIndex, array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ReplaceAll(uint32_t __itemsSize, arg_out items) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ReplaceAll(array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize)); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::Foundation::Collections +{ + inline PropertySet::PropertySet() : + PropertySet(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline StringMap::StringMap() : + StringMap(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline ValueSet::ValueSet() : + ValueSet(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(L handler) : + MapChangedEventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(F* handler) : + MapChangedEventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(O* object, M method) : + MapChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(com_ptr&& object, M method) : + MapChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(weak_ref&& object, M method) : + MapChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto MapChangedEventHandler::operator()(Windows::Foundation::Collections::IObservableMap const& sender, Windows::Foundation::Collections::IMapChangedEventArgs const& event) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&sender), *(void**)(&event))); + } + template template VectorChangedEventHandler::VectorChangedEventHandler(L handler) : + VectorChangedEventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(F* handler) : + VectorChangedEventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(O* object, M method) : + VectorChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(com_ptr&& object, M method) : + VectorChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(weak_ref&& object, M method) : + VectorChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto VectorChangedEventHandler::operator()(Windows::Foundation::Collections::IObservableVector const& sender, Windows::Foundation::Collections::IVectorChangedEventArgs const& event) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&sender), *(void**)(&event))); + } +} +namespace std +{ + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} + +namespace winrt::impl +{ + namespace wfc = Windows::Foundation::Collections; + + template + struct fast_iterator + { + using iterator_category = std::input_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T * ; + using reference = T & ; + + fast_iterator(T const& collection, uint32_t const index) noexcept : + m_collection(&collection), + m_index(index) + {} + + fast_iterator& operator++() noexcept + { + ++m_index; + return*this; + } + + auto operator*() const + { + return m_collection->GetAt(m_index); + } + + bool operator==(fast_iterator const& other) const noexcept + { + WINRT_ASSERT(m_collection == other.m_collection); + return m_index == other.m_index; + } + + bool operator!=(fast_iterator const& other) const noexcept + { + return !(*this == other); + } + + private: + + T const* m_collection = nullptr; + uint32_t m_index = 0; + }; + + template + class has_GetAt + { + template ().GetAt(0))> static constexpr bool get_value(int) { return true; } + template static constexpr bool get_value(...) { return false; } + + public: + + static constexpr bool value = get_value(0); + }; + + template ::value>* = nullptr> + auto begin(T const& collection) -> decltype(collection.First()) + { + auto result = collection.First(); + + if (!result.HasCurrent()) + { + return {}; + } + + return result; + } + + template ::value>* = nullptr> + auto end([[maybe_unused]] T const& collection) noexcept -> decltype(collection.First()) + { + return {}; + } + + template ::value>* = nullptr> + fast_iterator begin(T const& collection) noexcept + { + return fast_iterator(collection, 0); + } + + template ::value>* = nullptr> + fast_iterator end(T const& collection) + { + return fast_iterator(collection, collection.Size()); + } + + template + struct key_value_pair; + + template + struct key_value_pair> : implements>, wfc::IKeyValuePair> + { + key_value_pair(K key, V value) : + m_key(std::move(key)), + m_value(std::move(value)) + { + } + + K Key() const + { + return m_key; + } + + V Value() const + { + return m_value; + } + + private: + + K const m_key; + V const m_value; + }; + + template + struct is_key_value_pair : std::false_type {}; + + template + struct is_key_value_pair> : std::true_type {}; + + struct input_scope + { + void invalidate_scope() noexcept + { + m_invalid = true; + } + + void check_scope() const + { + if (m_invalid) + { + throw hresult_illegal_method_call(); + } + } + + private: + + bool m_invalid{}; + }; + + struct no_collection_version + { + struct iterator_type + { + iterator_type(no_collection_version const&) noexcept + { + } + + void check_version(no_collection_version const&) const noexcept + { + } + }; + }; + + struct collection_version + { + struct iterator_type + { + iterator_type(collection_version const& version) noexcept : + m_snapshot(version.get_version()) + { + } + + void check_version(collection_version const& version) const + { + if (version.get_version() != m_snapshot) + { + throw hresult_changed_state(); + } + } + + private: + + uint32_t const m_snapshot; + }; + + uint32_t get_version() const noexcept + { + return m_version; + } + + void increment_version() noexcept + { + ++m_version; + } + + private: + + std::atomic m_version{}; + }; + + template + struct range_container + { + T const first; + T const last; + + auto begin() const noexcept + { + return first; + } + + auto end() const noexcept + { + return last; + } + }; +} + +namespace winrt +{ + template + struct iterable_base : Version + { + template + static constexpr auto const& wrap_value(U const& value) noexcept + { + return value; + } + + template + static constexpr auto const& unwrap_value(U const& value) noexcept + { + return value; + } + + auto First() + { + return make(static_cast(this)); + } + + protected: + + template + auto copy_n(InputIt first, Size count, OutputIt result) const + { + if constexpr (std::is_same_v().get_container().begin())> && !impl::is_key_value_pair::value) + { + std::copy_n(first, count, result); + } + else + { + return std::transform(first, std::next(first, count), result, [&](auto&& value) + { + if constexpr (!impl::is_key_value_pair::value) + { + return static_cast(*this).unwrap_value(value); + } + else + { + return make>(static_cast(*this).unwrap_value(value.first), static_cast(*this).unwrap_value(value.second)); + } + }); + } + } + + private: + + struct iterator : Version::iterator_type, implements> + { + void abi_enter() + { + m_owner->abi_enter(); + this->check_version(*m_owner); + } + + void abi_exit() + { + m_owner->abi_exit(); + } + + explicit iterator(D* const owner) noexcept : + Version::iterator_type(*owner), + m_current(owner->get_container().begin()), + m_end(owner->get_container().end()) + { + m_owner.copy_from(owner); + } + + T Current() const + { + if (m_current == m_end) + { + throw hresult_out_of_bounds(); + } + + if constexpr (!impl::is_key_value_pair::value) + { + return m_owner->unwrap_value(*m_current); + } + else + { + return make>(m_owner->unwrap_value(m_current->first), m_owner->unwrap_value(m_current->second)); + } + } + + bool HasCurrent() const noexcept + { + return m_current != m_end; + } + + bool MoveNext() noexcept + { + if (m_current != m_end) + { + ++m_current; + } + + return HasCurrent(); + } + + uint32_t GetMany(array_view values) + { + uint32_t const actual = (std::min)(static_cast(std::distance(m_current, m_end)), values.size()); + m_owner->copy_n(m_current, actual, values.begin()); + std::advance(m_current, actual); + return actual; + } + + private: + + com_ptr m_owner; + decltype(m_owner->get_container().begin()) m_current; + decltype(m_owner->get_container().end()) const m_end; + }; + }; + + template + struct vector_view_base : iterable_base + { + T GetAt(uint32_t const index) const + { + if (index >= Size()) + { + throw hresult_out_of_bounds(); + } + + return static_cast(*this).unwrap_value(*std::next(static_cast(*this).get_container().begin(), index)); + } + + uint32_t Size() const noexcept + { + return static_cast(std::distance(static_cast(*this).get_container().begin(), static_cast(*this).get_container().end())); + } + + bool IndexOf(T const& value, uint32_t& index) const noexcept + { + auto first = std::find_if(static_cast(*this).get_container().begin(), static_cast(*this).get_container().end(), [&](auto&& match) + { + return value == static_cast(*this).unwrap_value(match); + }); + + index = static_cast(first - static_cast(*this).get_container().begin()); + return index < Size(); + } + + uint32_t GetMany(uint32_t const startIndex, array_view values) const + { + if (startIndex >= Size()) + { + return 0; + } + + uint32_t const actual = (std::min)(Size() - startIndex, values.size()); + this->copy_n(static_cast(*this).get_container().begin() + startIndex, actual, values.begin()); + return actual; + } + }; + + template + struct vector_base : vector_view_base + { + Windows::Foundation::Collections::IVectorView GetView() const noexcept + { + return static_cast(*this); + } + + void SetAt(uint32_t const index, T const& value) + { + if (index >= static_cast(*this).get_container().size()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container()[index] = static_cast(*this).wrap_value(value); + } + + void InsertAt(uint32_t const index, T const& value) + { + if (index > static_cast(*this).get_container().size()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container().insert(static_cast(*this).get_container().begin() + index, static_cast(*this).wrap_value(value)); + } + + void RemoveAt(uint32_t const index) + { + if (index >= static_cast(*this).get_container().size()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container().erase(static_cast(*this).get_container().begin() + index); + } + + void Append(T const& value) + { + this->increment_version(); + static_cast(*this).get_container().push_back(static_cast(*this).wrap_value(value)); + } + + void RemoveAtEnd() + { + if (static_cast(*this).get_container().empty()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container().pop_back(); + } + + void Clear() noexcept + { + this->increment_version(); + static_cast(*this).get_container().clear(); + } + + void ReplaceAll(array_view value) + { + this->increment_version(); + assign(value.begin(), value.end()); + } + + private: + + template + void assign(InputIt first, InputIt last) + { + using container_type = std::remove_reference_t(*this).get_container())>; + + if constexpr (std::is_same_v) + { + static_cast(*this).get_container().assign(first, last); + } + else + { + auto& container = static_cast(*this).get_container(); + container.clear(); + container.reserve(std::distance(first, last)); + + std::transform(first, last, std::back_inserter(container), [&](auto&& value) + { + return static_cast(*this).wrap_value(value); + }); + } + } + }; + + template + struct observable_vector_base : vector_base + { + event_token VectorChanged(Windows::Foundation::Collections::VectorChangedEventHandler const& handler) + { + return m_changed.add(handler); + } + + void VectorChanged(event_token const cookie) + { + m_changed.remove(cookie); + } + + void SetAt(uint32_t const index, T const& value) + { + vector_base::SetAt(index, value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemChanged, index); + } + + void InsertAt(uint32_t const index, T const& value) + { + vector_base::InsertAt(index, value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemInserted, index); + } + + void RemoveAt(uint32_t const index) + { + vector_base::RemoveAt(index); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemRemoved, index); + } + + void Append(T const& value) + { + vector_base::Append(value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemInserted, this->Size() - 1); + } + + void RemoveAtEnd() + { + vector_base::RemoveAtEnd(); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemRemoved, this->Size()); + } + + void Clear() + { + vector_base::Clear(); + call_changed(Windows::Foundation::Collections::CollectionChange::Reset, 0); + } + + void ReplaceAll(array_view value) + { + vector_base::ReplaceAll(value); + call_changed(Windows::Foundation::Collections::CollectionChange::Reset, 0); + } + + protected: + + void call_changed(Windows::Foundation::Collections::CollectionChange const change, uint32_t const index) + { + m_changed(static_cast(*this), make(change, index)); + } + + private: + + event> m_changed; + + struct args : implements + { + args(Windows::Foundation::Collections::CollectionChange const change, uint32_t const index) noexcept : + m_change(change), + m_index(index) + { + } + + Windows::Foundation::Collections::CollectionChange CollectionChange() const noexcept + { + return m_change; + } + + uint32_t Index() const noexcept + { + return m_index; + } + + private: + + Windows::Foundation::Collections::CollectionChange const m_change; + uint32_t const m_index; + }; + }; + + template + struct map_view_base : iterable_base, Version> + { + V Lookup(K const& key) const + { + auto pair = static_cast(*this).get_container().find(static_cast(*this).wrap_value(key)); + + if (pair == static_cast(*this).get_container().end()) + { + throw hresult_out_of_bounds(); + } + + return static_cast(*this).unwrap_value(pair->second); + } + + uint32_t Size() const noexcept + { + return static_cast(static_cast(*this).get_container().size()); + } + + bool HasKey(K const& key) const noexcept + { + return static_cast(*this).get_container().find(static_cast(*this).wrap_value(key)) != static_cast(*this).get_container().end(); + } + + void Split(Windows::Foundation::Collections::IMapView& first, Windows::Foundation::Collections::IMapView& second) const noexcept + { + first = nullptr; + second = nullptr; + } + }; + + template + struct map_base : map_view_base + { + Windows::Foundation::Collections::IMapView GetView() const + { + return static_cast(*this); + } + + bool Insert(K const& key, V const& value) + { + this->increment_version(); + auto pair = static_cast(*this).get_container().insert_or_assign(static_cast(*this).wrap_value(key), static_cast(*this).wrap_value(value)); + return !pair.second; + } + + void Remove(K const& key) + { + this->increment_version(); + static_cast(*this).get_container().erase(static_cast(*this).wrap_value(key)); + } + + void Clear() noexcept + { + this->increment_version(); + static_cast(*this).get_container().clear(); + } + }; + + template + struct observable_map_base : map_base + { + event_token MapChanged(Windows::Foundation::Collections::MapChangedEventHandler const& handler) + { + return m_changed.add(handler); + } + + void MapChanged(event_token const cookie) + { + m_changed.remove(cookie); + } + + bool Insert(K const& key, V const& value) + { + bool const result = map_base::Insert(key, value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemInserted, key); + return result; + } + + void Remove(K const& key) + { + map_base::Remove(key); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemRemoved, key); + } + + void Clear() noexcept + { + map_base::Clear(); + call_changed(Windows::Foundation::Collections::CollectionChange::Reset, impl::empty_value()); + } + + private: + + event> m_changed; + + void call_changed(Windows::Foundation::Collections::CollectionChange const change, K const& key) + { + m_changed(static_cast(*this), make(change, key)); + } + + struct args : implements> + { + args(Windows::Foundation::Collections::CollectionChange const change, K const& key) noexcept : + m_change(change), + m_key(key) + { + } + + Windows::Foundation::Collections::CollectionChange CollectionChange() const noexcept + { + return m_change; + } + + K Key() const noexcept + { + return m_key; + } + + private: + + Windows::Foundation::Collections::CollectionChange const m_change; + K const m_key; + }; + }; +} + +namespace winrt::impl +{ + template + struct input_iterable : + implements, non_agile, no_weak_ref, wfc::IIterable>, + iterable_base, T> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_iterable(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container const m_values; + }; + + template + struct scoped_input_iterable : + input_scope, + implements, non_agile, no_weak_ref, wfc::IIterable>, + iterable_base, T> + { + void abi_enter() const + { + check_scope(); + } + + scoped_input_iterable(InputIt first, InputIt last) : m_begin(first), m_end(last) + { + } + + auto get_container() const noexcept + { + return range_container{ m_begin, m_end }; + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + private: + + InputIt const m_begin; + InputIt const m_end; + }; + + template + auto make_input_iterable(Container&& values) + { + return make>(std::forward(values)); + } + + template + auto make_scoped_input_iterable(InputIt first, InputIt last) + { + using interface_type = wfc::IIterable; + std::pair result; + auto ptr = new scoped_input_iterable(first, last); + *put_abi(result.first) = to_abi(ptr); + result.second = ptr; + return result; + } +} + +namespace winrt::param +{ + template + struct iterable + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IIterable; + + iterable(std::nullptr_t) noexcept + { + } + + iterable(iterable const& values) = delete; + iterable& operator=(iterable const& values) = delete; + + iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + iterable(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + iterable(std::vector&& values) : m_pair(impl::make_input_iterable(std::move(values)), nullptr) + { + } + + template + iterable(std::vector const& values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + iterable(std::initializer_list values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template >* = nullptr> + iterable(std::initializer_list values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template + iterable(InputIt first, InputIt last) : m_pair(impl::make_scoped_input_iterable(first, last)) + { + } + + ~iterable() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + struct iterable> + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IIterable; + + iterable(std::nullptr_t) noexcept + { + } + + iterable(iterable const& values) = delete; + iterable& operator=(iterable const& values) = delete; + + iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + iterable(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + iterable(std::map&& values) : m_pair(impl::make_input_iterable(std::move(values)), nullptr) + { + } + + template + iterable(std::map const& values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template + iterable(std::unordered_map&& values) : m_pair(impl::make_input_iterable(std::move(values)), nullptr) + { + } + + template + iterable(std::unordered_map const& values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + iterable(std::initializer_list> values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template + iterable(InputIt first, InputIt last) : m_pair(impl::make_scoped_input_iterable(first, last)) + { + } + + ~iterable() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + auto get_abi(iterable const& object) noexcept + { + return *(void**)(&object); + } + + template + struct async_iterable + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IIterable; + + async_iterable(std::nullptr_t) noexcept + { + } + + async_iterable(async_iterable const& values) = delete; + async_iterable& operator=(async_iterable const& values) = delete; + + async_iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_iterable(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_iterable(std::vector&& values) : + m_interface(impl::make_input_iterable(std::move(values))) + { + } + + async_iterable(std::initializer_list values) : + m_interface(impl::make_input_iterable(std::vector(values))) + { + } + + ~async_iterable() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + struct async_iterable> + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IIterable; + + async_iterable(std::nullptr_t) noexcept + { + } + + async_iterable(async_iterable const& values) = delete; + async_iterable& operator=(async_iterable const& values) = delete; + + async_iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_iterable(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_iterable(std::map&& values) : + m_interface(impl::make_input_iterable(std::move(values))) + { + } + + template + async_iterable(std::unordered_map&& values) : + m_interface(impl::make_input_iterable(std::move(values))) + { + } + + async_iterable(std::initializer_list> values) : + m_interface(impl::make_input_iterable(std::map(values))) + { + } + + ~async_iterable() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(async_iterable const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_vector_view : + implements, non_agile, no_weak_ref, wfc::IVectorView, wfc::IIterable>, + vector_view_base, T> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_vector_view(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container const m_values; + }; + + template + struct scoped_input_vector_view : + input_scope, + implements, non_agile, no_weak_ref, wfc::IVectorView, wfc::IIterable>, + vector_view_base, T> + { + void abi_enter() const + { + check_scope(); + } + + scoped_input_vector_view(InputIt first, InputIt last) : m_begin(first), m_end(last) + { + } + + auto get_container() const noexcept + { + return range_container{ m_begin, m_end }; + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + private: + + InputIt const m_begin; + InputIt const m_end; + }; + + template + auto make_scoped_input_vector_view(InputIt first, InputIt last) + { + using interface_type = wfc::IVectorView; + std::pair result; + auto ptr = new scoped_input_vector_view(first, last); + *put_abi(result.first) = to_abi(ptr); + result.second = ptr; + return result; + } +} + +namespace winrt::param +{ + template + struct vector_view + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IVectorView; + + vector_view(std::nullptr_t) noexcept + { + } + + vector_view(vector_view const& values) = delete; + vector_view& operator=(vector_view const& values) = delete; + + vector_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + vector_view(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + vector_view(std::vector&& values) : m_pair(make>>(std::move(values)), nullptr) + { + } + + template + vector_view(std::vector const& values) : m_pair(impl::make_scoped_input_vector_view(values.begin(), values.end())) + { + } + + vector_view(std::initializer_list values) : m_pair(impl::make_scoped_input_vector_view(values.begin(), values.end())) + { + } + + template >* = nullptr> + vector_view(std::initializer_list values) : m_pair(impl::make_scoped_input_vector_view(values.begin(), values.end())) + { + } + + template + vector_view(InputIt first, InputIt last) : m_pair(impl::make_scoped_input_vector_view(first, last)) + { + } + + ~vector_view() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + auto get_abi(vector_view const& object) noexcept + { + return *(void**)(&object); + } + + template + struct async_vector_view + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IVectorView; + + async_vector_view(std::nullptr_t) noexcept + { + } + + async_vector_view(async_vector_view const& values) = delete; + async_vector_view& operator=(async_vector_view const& values) = delete; + + async_vector_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_vector_view(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_vector_view(std::vector&& values) : + m_interface(make>>(std::move(values))) + { + } + + async_vector_view(std::initializer_list values) : + m_interface(make>>(values)) + { + } + + ~async_vector_view() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(async_vector_view const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_map_view : + implements, non_agile, no_weak_ref, wfc::IMapView, wfc::IIterable>>, + map_view_base, K, V> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_map_view(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container const m_values; + }; + + template + struct scoped_input_map_view : + input_scope, + implements, non_agile, no_weak_ref, wfc::IMapView, wfc::IIterable>>, + map_view_base, K, V> + { + void abi_enter() const + { + check_scope(); + } + + explicit scoped_input_map_view(Container const& values) : m_values(values) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + private: + + Container const& m_values; + }; + + template + auto make_input_map_view(Container&& values) + { + return make>(std::forward(values)); + } + + template + auto make_scoped_input_map_view(Container const& values) + { + using interface_type = wfc::IMapView; + std::pair result; + auto ptr = new scoped_input_map_view(values); + *put_abi(result.first) = to_abi(ptr); + result.second = ptr; + return result; + } +} + +namespace winrt::param +{ + template + struct map_view + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IMapView; + + map_view(std::nullptr_t) noexcept + { + } + + map_view(map_view const& values) = delete; + map_view& operator=(map_view const& values) = delete; + + map_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + map_view(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + map_view(std::map&& values) : m_pair(impl::make_input_map_view(std::move(values)), nullptr) + { + } + + template + map_view(std::map const& values) : m_pair(impl::make_scoped_input_map_view(values)) + { + } + + template + map_view(std::unordered_map&& values) : m_pair(impl::make_input_map_view(std::move(values)), nullptr) + { + } + + template + map_view(std::unordered_map const& values) : m_pair(impl::make_scoped_input_map_view(values)) + { + } + + map_view(std::initializer_list> values) : m_pair(impl::make_input_map_view(std::map(values)), nullptr) + { + } + + ~map_view() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + auto get_abi(map_view const& object) noexcept + { + return *(void**)(&object); + } + + template + struct async_map_view + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IMapView; + + async_map_view(std::nullptr_t) noexcept + { + } + + async_map_view(async_map_view const& values) = delete; + async_map_view& operator=(async_map_view const& values) = delete; + + async_map_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_map_view(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_map_view(std::map&& values) : + m_interface(impl::make_input_map_view(std::move(values))) + { + } + + template + async_map_view(std::unordered_map&& values) : + m_interface(impl::make_input_map_view(std::move(values))) + { + } + + async_map_view(std::initializer_list> values) : + m_interface(impl::make_input_map_view(std::map(values))) + { + } + + ~async_map_view() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(async_map_view const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_vector : + implements, wfc::IVector, wfc::IVectorView, wfc::IIterable>, + vector_base, T> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_vector(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; +} + +namespace winrt::param +{ + template + struct vector + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IVector; + + vector(std::nullptr_t) noexcept + { + } + + vector(vector const& values) = delete; + vector& operator=(vector const& values) = delete; + + vector(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + vector(Collection const& values) noexcept + { + m_interface = values; + } + + template + vector(std::vector&& values) : + m_interface(make>>(std::move(values))) + { + } + + vector(std::initializer_list values) : + m_interface(make>>(values)) + { + } + + ~vector() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(vector const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_map : + implements, wfc::IMap, wfc::IMapView, wfc::IIterable>>, + map_base, K, V> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_map(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; + + template + auto make_input_map(Container&& values) + { + return make>(std::forward(values)); + } +} + +namespace winrt::param +{ + template + struct map + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IMap; + + map(std::nullptr_t) noexcept + { + } + + map(map const& values) = delete; + map& operator=(map const& values) = delete; + + map(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + map(Collection const& values) noexcept + { + m_interface = values; + } + + template + map(std::map&& values) : + m_interface(impl::make_input_map(std::move(values))) + { + } + + template + map(std::unordered_map&& values) : + m_interface(impl::make_input_map(std::move(values))) + { + } + + map(std::initializer_list> values) : + m_interface(impl::make_input_map(std::map(values))) + { + } + + ~map() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(map const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct inspectable_observable_vector : + observable_vector_base, Windows::Foundation::IInspectable>, + implements, + wfc::IObservableVector, wfc::IVector, wfc::IVectorView, wfc::IIterable> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit inspectable_observable_vector(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; + + template + struct convertible_observable_vector : + observable_vector_base, T>, + implements, + wfc::IObservableVector, wfc::IVector, wfc::IVectorView, wfc::IIterable, + wfc::IObservableVector, wfc::IVector, wfc::IVectorView, wfc::IIterable> + { + static_assert(!std::is_same_v); + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + using container_type = convertible_observable_vector; + using base_type = observable_vector_base, T>; + + explicit convertible_observable_vector(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + auto First() + { + struct result + { + container_type* container; + + operator wfc::IIterator() + { + return static_cast(container)->First(); + } + + operator wfc::IIterator() + { + return make(container); + } + }; + + return result{ this }; + } + + auto GetAt(uint32_t const index) const + { + struct result + { + base_type const* container; + uint32_t const index; + + operator T() const + { + return container->GetAt(index); + } + + operator Windows::Foundation::IInspectable() const + { + return box_value(container->GetAt(index)); + } + }; + + return result{ this, index }; + } + + using base_type::IndexOf; + + bool IndexOf(Windows::Foundation::IInspectable const& value, uint32_t& index) const + { + return IndexOf(unbox_value(value), index); + } + + using base_type::GetMany; + + uint32_t GetMany(uint32_t const startIndex, array_view values) const + { + if (startIndex >= m_values.size()) + { + return 0; + } + + uint32_t const actual = (std::min)(static_cast(m_values.size() - startIndex), values.size()); + + std::transform(m_values.begin() + startIndex, m_values.begin() + startIndex + actual, values.begin(), [&](auto && value) + { + return box_value(value); + }); + + return actual; + } + + auto GetView() const noexcept + { + struct result + { + container_type const* container; + + operator wfc::IVectorView() const + { + return *container; + } + + operator wfc::IVectorView() const + { + return *container; + } + }; + + return result{ this }; + } + + using base_type::SetAt; + + void SetAt(uint32_t const index, Windows::Foundation::IInspectable const& value) + { + SetAt(index, unbox_value(value)); + } + + using base_type::InsertAt; + + void InsertAt(uint32_t const index, Windows::Foundation::IInspectable const& value) + { + InsertAt(index, unbox_value(value)); + } + + using base_type::Append; + + void Append(Windows::Foundation::IInspectable const& value) + { + Append(unbox_value(value)); + } + + using base_type::ReplaceAll; + + void ReplaceAll(array_view values) + { + this->increment_version(); + m_values.clear(); + m_values.reserve(values.size()); + + std::transform(values.begin(), values.end(), std::back_inserter(m_values), [&](auto && value) + { + return unbox_value(value); + }); + + this->call_changed(Windows::Foundation::Collections::CollectionChange::Reset, 0); + } + + using base_type::VectorChanged; + + event_token VectorChanged(wfc::VectorChangedEventHandler const& handler) + { + return base_type::VectorChanged([handler](auto && sender, auto && args) + { + handler(sender.template try_as>(), args); + }); + } + + private: + + struct iterator : + impl::collection_version::iterator_type, + implements> + { + void abi_enter() + { + check_version(*m_owner); + } + + explicit iterator(container_type* const container) noexcept : + impl::collection_version::iterator_type(*container), + m_current(container->get_container().begin()), + m_end(container->get_container().end()) + { + m_owner.copy_from(container); + } + + Windows::Foundation::IInspectable Current() const + { + if (m_current == m_end) + { + throw hresult_out_of_bounds(); + } + + return box_value(*m_current); + } + + bool HasCurrent() const noexcept + { + return m_current != m_end; + } + + bool MoveNext() noexcept + { + if (m_current != m_end) + { + ++m_current; + } + + return HasCurrent(); + } + + uint32_t GetMany(array_view values) + { + uint32_t const actual = (std::min)(static_cast(std::distance(m_current, m_end)), values.size()); + + std::transform(m_current, m_current + actual, values.begin(), [&](auto && value) + { + return box_value(value); + }); + + std::advance(m_current, actual); + return actual; + } + + private: + + com_ptr m_owner; + decltype(m_owner->get_container().begin()) m_current; + decltype(m_owner->get_container().end()) const m_end; + }; + + Container m_values; + }; +} + +namespace winrt +{ + template > + Windows::Foundation::Collections::IVector single_threaded_vector(std::vector&& values = {}) + { + return make>>(std::move(values)); + } + + template > + Windows::Foundation::Collections::IObservableVector single_threaded_observable_vector(std::vector&& values = {}) + { + if constexpr (std::is_same_v) + { + return make>>(std::move(values)); + } + else + { + return make>>(std::move(values)); + } + } +} + +namespace winrt::impl +{ + template + struct observable_map : + implements, wfc::IObservableMap, wfc::IMap, wfc::IMapView, wfc::IIterable>>, + observable_map_base, K, V> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit observable_map(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; +} + +namespace winrt +{ + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IMap single_threaded_map() + { + return make>>(std::map{}); + } + + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IMap single_threaded_map(std::map&& values) + { + return make>>(std::move(values)); + } + + template , typename KeyEqual = std::equal_to, typename Allocator = std::allocator>> + Windows::Foundation::Collections::IMap single_threaded_map(std::unordered_map&& values) + { + return make>>(std::move(values)); + } + + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IObservableMap single_threaded_observable_map() + { + return make>>(std::map{}); + } + + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IObservableMap single_threaded_observable_map(std::map&& values) + { + return make>>(std::move(values)); + } + + template , typename KeyEqual = std::equal_to, typename Allocator = std::allocator>> + Windows::Foundation::Collections::IObservableMap single_threaded_observable_map(std::unordered_map&& values) + { + return make>>(std::move(values)); + } +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h new file mode 100644 index 000000000..067512dcf --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h @@ -0,0 +1,3526 @@ +// C++/WinRT v2.0.190620.2 +// Patched with YoloRT + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright © 2021, mjk +// Licensed under the MIT License. + +#ifndef WINRT_Windows_Foundation_H +#define WINRT_Windows_Foundation_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "impl/Windows.Foundation.Collections.2.h" +#include "impl/Windows.Foundation.2.h" +namespace winrt::impl +{ + template auto consume_Windows_Foundation_IAsyncAction::Completed(Windows::Foundation::AsyncActionCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncAction)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncAction::Completed() const + { + void* handler{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncAction)->get_Completed(&handler)); + return Windows::Foundation::AsyncActionCompletedHandler{ handler, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncAction::GetResults() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncAction)->GetResults()); + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Progress(Windows::Foundation::AsyncActionProgressHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->put_Progress(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Progress() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->get_Progress(&winrt_impl_result)); + return Windows::Foundation::AsyncActionProgressHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Completed(Windows::Foundation::AsyncActionWithProgressCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Completed() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->get_Completed(&winrt_impl_result)); + return Windows::Foundation::AsyncActionWithProgressCompletedHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::GetResults() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->GetResults()); + } + template auto consume_Windows_Foundation_IAsyncInfo::Id() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->get_Id(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncInfo::Status() const + { + Windows::Foundation::AsyncStatus winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->get_Status(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncInfo::ErrorCode() const + { + winrt::hresult winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->get_ErrorCode(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncInfo::Cancel() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->Cancel()); + } + template auto consume_Windows_Foundation_IAsyncInfo::Close() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->Close()); + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Progress(Windows::Foundation::AsyncOperationProgressHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->put_Progress(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Progress() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->get_Progress(&winrt_impl_result)); + return Windows::Foundation::AsyncOperationProgressHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Completed(Windows::Foundation::AsyncOperationWithProgressCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Completed() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->get_Completed(&winrt_impl_result)); + return Windows::Foundation::AsyncOperationWithProgressCompletedHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::GetResults() const + { + TResult winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->GetResults(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncOperation::Completed(Windows::Foundation::AsyncOperationCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperation)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncOperation::Completed() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperation)->get_Completed(&winrt_impl_result)); + return Windows::Foundation::AsyncOperationCompletedHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncOperation::GetResults() const + { + TResult winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperation)->GetResults(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IClosable::Close() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IClosable)->Close()); + } + template auto consume_Windows_Foundation_IDeferral::Complete() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IDeferral)->Complete()); + } + template auto consume_Windows_Foundation_IDeferralFactory::Create(Windows::Foundation::DeferralCompletedHandler const& handler) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IDeferralFactory)->Create(*(void**)(&handler), &result)); + return Windows::Foundation::Deferral{ result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IGetActivationFactory::GetActivationFactory(param::hstring const& activatableClassId) const + { + void* factory{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGetActivationFactory)->GetActivationFactory(*(void**)(&activatableClassId), &factory)); + return Windows::Foundation::IInspectable{ factory, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IGuidHelperStatics::CreateNewGuid() const + { + winrt::guid result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGuidHelperStatics)->CreateNewGuid(put_abi(result))); + return result; + } + template auto consume_Windows_Foundation_IGuidHelperStatics::Empty() const + { + winrt::guid value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGuidHelperStatics)->get_Empty(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IGuidHelperStatics::Equals(winrt::guid const& target, winrt::guid const& value) const + { + bool result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGuidHelperStatics)->Equals(impl::bind_in(target), impl::bind_in(value), &result)); + return result; + } + template auto consume_Windows_Foundation_IMemoryBuffer::CreateReference() const + { + void* reference{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBuffer)->CreateReference(&reference)); + return Windows::Foundation::IMemoryBufferReference{ reference, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IMemoryBufferFactory::Create(uint32_t capacity) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferFactory)->Create(capacity, &value)); + return Windows::Foundation::MemoryBuffer{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IMemoryBufferReference::Capacity() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferReference)->get_Capacity(&value)); + return value; + } + template auto consume_Windows_Foundation_IMemoryBufferReference::Closed(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token cookie; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferReference)->add_Closed(*(void**)(&handler), put_abi(cookie))); + return cookie; + } + template typename consume_Windows_Foundation_IMemoryBufferReference::Closed_revoker consume_Windows_Foundation_IMemoryBufferReference::Closed(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Closed(handler)); + } + template auto consume_Windows_Foundation_IMemoryBufferReference::Closed(winrt::event_token const& cookie) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferReference)->remove_Closed(impl::bind_in(cookie))); + } + template auto consume_Windows_Foundation_IPropertyValue::Type() const + { + Windows::Foundation::PropertyType value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->get_Type(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::IsNumericScalar() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->get_IsNumericScalar(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt8() const + { + uint8_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt8(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt16() const + { + int16_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt16(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt16() const + { + uint16_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt16(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt32() const + { + int32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt32(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt32() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt32(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt64() const + { + int64_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt64(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt64() const + { + uint64_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt64(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetSingle() const + { + float value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSingle(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetDouble() const + { + double value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDouble(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetChar16() const + { + char16_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetChar16(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetBoolean() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetBoolean(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetString() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetString(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValue::GetGuid() const + { + winrt::guid value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetGuid(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetDateTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDateTime(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetTimeSpan() const + { + Windows::Foundation::TimeSpan value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetTimeSpan(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetPoint() const + { + Windows::Foundation::Point value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetPoint(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetSize() const + { + Windows::Foundation::Size value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSize(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetRect() const + { + Windows::Foundation::Rect value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetRect(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt8Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt8Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt16Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt16Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt16Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt16Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt32Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt32Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt32Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt32Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt64Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt64Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt64Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt64Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetSingleArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSingleArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetDoubleArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDoubleArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetChar16Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetChar16Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetBooleanArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetBooleanArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetStringArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetStringArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInspectableArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInspectableArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetGuidArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetGuidArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetDateTimeArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDateTimeArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetTimeSpanArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetTimeSpanArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetPointArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetPointArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetSizeArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSizeArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetRectArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetRectArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateEmpty() const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateEmpty(&propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt8(uint8_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt8(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt16(int16_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt16(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt16(uint16_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt16(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt32(int32_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt32(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt32(uint32_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt32(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt64(int64_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt64(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt64(uint64_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt64(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSingle(float value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSingle(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDouble(double value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDouble(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateChar16(char16_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateChar16(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateBoolean(bool value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateBoolean(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateString(param::hstring const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateString(*(void**)(&value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInspectable(Windows::Foundation::IInspectable const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInspectable(*(void**)(&value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateGuid(winrt::guid const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateGuid(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDateTime(Windows::Foundation::DateTime const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDateTime(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateTimeSpan(Windows::Foundation::TimeSpan const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateTimeSpan(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreatePoint(Windows::Foundation::Point const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreatePoint(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSize(Windows::Foundation::Size const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSize(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateRect(Windows::Foundation::Rect const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateRect(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt8Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt8Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt16Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt16Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt16Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt16Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt32Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt32Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt32Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt32Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt64Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt64Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt64Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt64Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSingleArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSingleArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDoubleArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDoubleArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateChar16Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateChar16Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateBooleanArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateBooleanArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateStringArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateStringArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInspectableArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInspectableArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateGuidArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateGuidArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDateTimeArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDateTimeArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateTimeSpanArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateTimeSpanArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreatePointArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreatePointArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSizeArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSizeArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateRectArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateRectArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IReferenceArray::Value() const + { + uint32_t winrt_impl_result_impl_size{}; + T* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IReferenceArray)->get_Value(&winrt_impl_result_impl_size, &winrt_impl_result)); + return com_array{ winrt_impl_result, winrt_impl_result_impl_size, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IReference::Value() const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IReference)->get_Value(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IStringable::ToString() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IStringable)->ToString(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriEscapeStatics::UnescapeComponent(param::hstring const& toUnescape) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriEscapeStatics)->UnescapeComponent(*(void**)(&toUnescape), &value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriEscapeStatics::EscapeComponent(param::hstring const& toEscape) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriEscapeStatics)->EscapeComponent(*(void**)(&toEscape), &value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::AbsoluteUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_AbsoluteUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::DisplayUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_DisplayUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Domain() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Domain(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Extension() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Extension(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Fragment() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Fragment(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Host() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Host(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Password() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Password(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Path() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Path(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Query() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Query(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::QueryParsed() const + { + void* ppWwwFormUrlDecoder{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_QueryParsed(&ppWwwFormUrlDecoder)); + return Windows::Foundation::WwwFormUrlDecoder{ ppWwwFormUrlDecoder, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::RawUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_RawUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::SchemeName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_SchemeName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::UserName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_UserName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Port() const + { + int32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Port(&value)); + return value; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Suspicious() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Suspicious(&value)); + return value; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Equals(Windows::Foundation::Uri const& pUri) const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->Equals(*(void**)(&pUri), &value)); + return value; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::CombineUri(param::hstring const& relativeUri) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->CombineUri(*(void**)(&relativeUri), &instance)); + return Windows::Foundation::Uri{ instance, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassFactory::CreateUri(param::hstring const& uri) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassFactory)->CreateUri(*(void**)(&uri), &instance)); + return Windows::Foundation::Uri{ instance, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassFactory::CreateWithRelativeUri(param::hstring const& baseUri, param::hstring const& relativeUri) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassFactory)->CreateWithRelativeUri(*(void**)(&baseUri), *(void**)(&relativeUri), &instance)); + return Windows::Foundation::Uri{ instance, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassWithAbsoluteCanonicalUri::AbsoluteCanonicalUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassWithAbsoluteCanonicalUri)->get_AbsoluteCanonicalUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassWithAbsoluteCanonicalUri::DisplayIri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassWithAbsoluteCanonicalUri)->get_DisplayIri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderEntry::Name() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderEntry)->get_Name(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderEntry::Value() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderEntry)->get_Value(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderRuntimeClass::GetFirstValueByName(param::hstring const& name) const + { + void* phstrValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderRuntimeClass)->GetFirstValueByName(*(void**)(&name), &phstrValue)); + return hstring{ phstrValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderRuntimeClassFactory::CreateWwwFormUrlDecoder(param::hstring const& query) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderRuntimeClassFactory)->CreateWwwFormUrlDecoder(*(void**)(&query), &instance)); + return Windows::Foundation::WwwFormUrlDecoder{ instance, take_ownership_from_abi }; + } + template struct delegate : implements_delegate + { + delegate(H&& handler) : implements_delegate(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, arg_in progressInfo) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&progressInfo)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, arg_in progressInfo) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&progressInfo)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate : implements_delegate + { + delegate(H&& handler) : implements_delegate(std::forward(handler)) {} + + int32_t __stdcall Invoke() noexcept final try + { + (*this)(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* sender, arg_in args) noexcept final try + { + (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&args)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(arg_in sender, arg_in args) noexcept final try + { + (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&args)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** handler) noexcept final try + { + clear_abi(handler); + typename D::abi_guard guard(this->shim()); + *handler = detach_from(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().GetResults(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall put_Progress(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Progress(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Progress(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Progress()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().GetResults(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Id(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Status(int32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Status()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ErrorCode(winrt::hresult* winrt_impl_result) noexcept final try + { + zero_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().ErrorCode()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Cancel() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Cancel(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Close() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Close(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall put_Progress(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Progress(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Progress(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Progress()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetResults()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetResults()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Close() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Close(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Complete() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Complete(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Create(void* handler, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Create(*reinterpret_cast(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetActivationFactory(void* activatableClassId, void** factory) noexcept final try + { + clear_abi(factory); + typename D::abi_guard guard(this->shim()); + *factory = detach_from(this->shim().GetActivationFactory(*reinterpret_cast(&activatableClassId))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateNewGuid(winrt::guid* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateNewGuid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Empty(winrt::guid* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Empty()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Equals(winrt::guid const& target, winrt::guid const& value, bool* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Equals(*reinterpret_cast(&target), *reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateReference(void** reference) noexcept final try + { + clear_abi(reference); + typename D::abi_guard guard(this->shim()); + *reference = detach_from(this->shim().CreateReference()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Create(uint32_t capacity, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Create(capacity)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Capacity(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Capacity()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall add_Closed(void* handler, winrt::event_token* cookie) noexcept final try + { + zero_abi(cookie); + typename D::abi_guard guard(this->shim()); + *cookie = detach_from(this->shim().Closed(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Closed(winrt::event_token cookie) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Closed(*reinterpret_cast(&cookie)); + return 0; + } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Type(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Type()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_IsNumericScalar(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().IsNumericScalar()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt8(uint8_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt8()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt16(int16_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetInt16()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt16(uint16_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt16()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt32(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetInt32()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt32(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt32()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt64(int64_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetInt64()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt64(uint64_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt64()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSingle(float* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetSingle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDouble(double* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetDouble()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetChar16(char16_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetChar16()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetBoolean(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetBoolean()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetString(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetString()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetGuid(winrt::guid* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetGuid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDateTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetDateTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTimeSpan(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetTimeSpan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetPoint(Windows::Foundation::Point* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetPoint()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSize(Windows::Foundation::Size* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetSize()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetRect(Windows::Foundation::Rect* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetRect()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt8Array(uint32_t* __valueSize, uint8_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt8Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt16Array(uint32_t* __valueSize, int16_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInt16Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt16Array(uint32_t* __valueSize, uint16_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt16Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt32Array(uint32_t* __valueSize, int32_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInt32Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt32Array(uint32_t* __valueSize, uint32_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt32Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt64Array(uint32_t* __valueSize, int64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInt64Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt64Array(uint32_t* __valueSize, uint64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt64Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSingleArray(uint32_t* __valueSize, float** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetSingleArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDoubleArray(uint32_t* __valueSize, double** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetDoubleArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetChar16Array(uint32_t* __valueSize, char16_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetChar16Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetBooleanArray(uint32_t* __valueSize, bool** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetBooleanArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetStringArray(uint32_t* __valueSize, void*** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetStringArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInspectableArray(uint32_t* __valueSize, void*** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInspectableArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetGuidArray(uint32_t* __valueSize, winrt::guid** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetGuidArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDateTimeArray(uint32_t* __valueSize, int64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetDateTimeArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTimeSpanArray(uint32_t* __valueSize, int64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetTimeSpanArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetPointArray(uint32_t* __valueSize, Windows::Foundation::Point** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetPointArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSizeArray(uint32_t* __valueSize, Windows::Foundation::Size** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetSizeArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetRectArray(uint32_t* __valueSize, Windows::Foundation::Rect** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetRectArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateEmpty(void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateEmpty()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt8(uint8_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt8(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt16(int16_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt16(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt16(uint16_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt16(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt32(int32_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt32(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt32(uint32_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt32(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt64(int64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt64(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt64(uint64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt64(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSingle(float value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSingle(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDouble(double value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDouble(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateChar16(char16_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateChar16(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBoolean(bool value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateBoolean(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateString(void* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateString(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInspectable(void* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInspectable(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateGuid(winrt::guid value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateGuid(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDateTime(int64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDateTime(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTimeSpan(int64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateTimeSpan(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreatePoint(Windows::Foundation::Point value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreatePoint(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSize(Windows::Foundation::Size value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSize(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateRect(Windows::Foundation::Rect value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateRect(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt8Array(uint32_t __valueSize, uint8_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt8Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt16Array(uint32_t __valueSize, int16_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt16Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt16Array(uint32_t __valueSize, uint16_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt16Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt32Array(uint32_t __valueSize, int32_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt32Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt32Array(uint32_t __valueSize, uint32_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt32Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt64Array(uint32_t __valueSize, int64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt64Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt64Array(uint32_t __valueSize, uint64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt64Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSingleArray(uint32_t __valueSize, float* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSingleArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDoubleArray(uint32_t __valueSize, double* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDoubleArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateChar16Array(uint32_t __valueSize, char16_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateChar16Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBooleanArray(uint32_t __valueSize, bool* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateBooleanArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateStringArray(uint32_t __valueSize, void** value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateStringArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInspectableArray(uint32_t __valueSize, void** value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInspectableArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateGuidArray(uint32_t __valueSize, winrt::guid* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateGuidArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDateTimeArray(uint32_t __valueSize, int64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDateTimeArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTimeSpanArray(uint32_t __valueSize, int64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateTimeSpanArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreatePointArray(uint32_t __valueSize, Windows::Foundation::Point* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreatePointArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSizeArray(uint32_t __valueSize, Windows::Foundation::Size* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSizeArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateRectArray(uint32_t __valueSize, Windows::Foundation::Rect* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateRectArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Value(uint32_t* __winrt_impl_resultSize, T** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + std::tie(*__winrt_impl_resultSize, *winrt_impl_result) = detach_abi(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Value(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall ToString(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ToString()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall UnescapeComponent(void* toUnescape, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UnescapeComponent(*reinterpret_cast(&toUnescape))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EscapeComponent(void* toEscape, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().EscapeComponent(*reinterpret_cast(&toEscape))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_AbsoluteUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AbsoluteUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DisplayUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DisplayUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Domain(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Domain()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Extension(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Extension()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Fragment(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Fragment()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Host(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Host()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Password(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Password()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Path(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Path()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Query(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Query()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_QueryParsed(void** ppWwwFormUrlDecoder) noexcept final try + { + clear_abi(ppWwwFormUrlDecoder); + typename D::abi_guard guard(this->shim()); + *ppWwwFormUrlDecoder = detach_from(this->shim().QueryParsed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RawUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RawUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SchemeName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SchemeName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_UserName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Port(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Port()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Suspicious(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Suspicious()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Equals(void* pUri, bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Equals(*reinterpret_cast(&pUri))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CombineUri(void* relativeUri, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CombineUri(*reinterpret_cast(&relativeUri))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateUri(void* uri, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CreateUri(*reinterpret_cast(&uri))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateWithRelativeUri(void* baseUri, void* relativeUri, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CreateWithRelativeUri(*reinterpret_cast(&baseUri), *reinterpret_cast(&relativeUri))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_AbsoluteCanonicalUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AbsoluteCanonicalUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DisplayIri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DisplayIri()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Name(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Name()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Value(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetFirstValueByName(void* name, void** phstrValue) noexcept final try + { + clear_abi(phstrValue); + typename D::abi_guard guard(this->shim()); + *phstrValue = detach_from(this->shim().GetFirstValueByName(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateWwwFormUrlDecoder(void* query, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CreateWwwFormUrlDecoder(*reinterpret_cast(&query))); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::Foundation +{ + inline Deferral::Deferral(Windows::Foundation::DeferralCompletedHandler const& handler) : + Deferral(impl::call_factory([&](auto&& f) { return f.Create(handler); })) + { + } + inline auto GuidHelper::CreateNewGuid() + { + return impl::call_factory([&](auto&& f) { return f.CreateNewGuid(); }); + } + inline auto GuidHelper::Empty() + { + return impl::call_factory([&](auto&& f) { return f.Empty(); }); + } + inline auto GuidHelper::Equals(winrt::guid const& target, winrt::guid const& value) + { + return impl::call_factory([&](auto&& f) { return f.Equals(target, value); }); + } + inline MemoryBuffer::MemoryBuffer(uint32_t capacity) : + MemoryBuffer(impl::call_factory([&](auto&& f) { return f.Create(capacity); })) + { + } + inline auto PropertyValue::CreateEmpty() + { + return impl::call_factory([&](auto&& f) { return f.CreateEmpty(); }); + } + inline auto PropertyValue::CreateUInt8(uint8_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt8(value); }); + } + inline auto PropertyValue::CreateInt16(int16_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt16(value); }); + } + inline auto PropertyValue::CreateUInt16(uint16_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt16(value); }); + } + inline auto PropertyValue::CreateInt32(int32_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt32(value); }); + } + inline auto PropertyValue::CreateUInt32(uint32_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt32(value); }); + } + inline auto PropertyValue::CreateInt64(int64_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt64(value); }); + } + inline auto PropertyValue::CreateUInt64(uint64_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt64(value); }); + } + inline auto PropertyValue::CreateSingle(float value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSingle(value); }); + } + inline auto PropertyValue::CreateDouble(double value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDouble(value); }); + } + inline auto PropertyValue::CreateChar16(char16_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateChar16(value); }); + } + inline auto PropertyValue::CreateBoolean(bool value) + { + return impl::call_factory([&](auto&& f) { return f.CreateBoolean(value); }); + } + inline auto PropertyValue::CreateString(param::hstring const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateString(value); }); + } + inline auto PropertyValue::CreateInspectable(Windows::Foundation::IInspectable const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInspectable(value); }); + } + inline auto PropertyValue::CreateGuid(winrt::guid const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateGuid(value); }); + } + inline auto PropertyValue::CreateDateTime(Windows::Foundation::DateTime const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDateTime(value); }); + } + inline auto PropertyValue::CreateTimeSpan(Windows::Foundation::TimeSpan const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateTimeSpan(value); }); + } + inline auto PropertyValue::CreatePoint(Windows::Foundation::Point const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreatePoint(value); }); + } + inline auto PropertyValue::CreateSize(Windows::Foundation::Size const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSize(value); }); + } + inline auto PropertyValue::CreateRect(Windows::Foundation::Rect const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateRect(value); }); + } + inline auto PropertyValue::CreateUInt8Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt8Array(value); }); + } + inline auto PropertyValue::CreateInt16Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt16Array(value); }); + } + inline auto PropertyValue::CreateUInt16Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt16Array(value); }); + } + inline auto PropertyValue::CreateInt32Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt32Array(value); }); + } + inline auto PropertyValue::CreateUInt32Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt32Array(value); }); + } + inline auto PropertyValue::CreateInt64Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt64Array(value); }); + } + inline auto PropertyValue::CreateUInt64Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt64Array(value); }); + } + inline auto PropertyValue::CreateSingleArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSingleArray(value); }); + } + inline auto PropertyValue::CreateDoubleArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDoubleArray(value); }); + } + inline auto PropertyValue::CreateChar16Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateChar16Array(value); }); + } + inline auto PropertyValue::CreateBooleanArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateBooleanArray(value); }); + } + inline auto PropertyValue::CreateStringArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateStringArray(value); }); + } + inline auto PropertyValue::CreateInspectableArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInspectableArray(value); }); + } + inline auto PropertyValue::CreateGuidArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateGuidArray(value); }); + } + inline auto PropertyValue::CreateDateTimeArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDateTimeArray(value); }); + } + inline auto PropertyValue::CreateTimeSpanArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateTimeSpanArray(value); }); + } + inline auto PropertyValue::CreatePointArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreatePointArray(value); }); + } + inline auto PropertyValue::CreateSizeArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSizeArray(value); }); + } + inline auto PropertyValue::CreateRectArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateRectArray(value); }); + } + inline auto Uri::UnescapeComponent(param::hstring const& toUnescape) + { + return impl::call_factory([&](auto&& f) { return f.UnescapeComponent(toUnescape); }); + } + inline auto Uri::EscapeComponent(param::hstring const& toEscape) + { + return impl::call_factory([&](auto&& f) { return f.EscapeComponent(toEscape); }); + } + inline Uri::Uri(param::hstring const& uri) : + Uri(impl::call_factory([&](auto&& f) { return f.CreateUri(uri); })) + { + } + inline Uri::Uri(param::hstring const& baseUri, param::hstring const& relativeUri) : + Uri(impl::call_factory([&](auto&& f) { return f.CreateWithRelativeUri(baseUri, relativeUri); })) + { + } + inline WwwFormUrlDecoder::WwwFormUrlDecoder(param::hstring const& query) : + WwwFormUrlDecoder(impl::call_factory([&](auto&& f) { return f.CreateWwwFormUrlDecoder(query); })) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(L handler) : + AsyncActionCompletedHandler(impl::make_delegate(std::forward(handler))) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(F* handler) : + AsyncActionCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(O* object, M method) : + AsyncActionCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(com_ptr&& object, M method) : + AsyncActionCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(weak_ref&& object, M method) : + AsyncActionCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + inline auto AsyncActionCompletedHandler::operator()(Windows::Foundation::IAsyncAction const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(L handler) : + AsyncActionProgressHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(F* handler) : + AsyncActionProgressHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(O* object, M method) : + AsyncActionProgressHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(com_ptr&& object, M method) : + AsyncActionProgressHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(weak_ref&& object, M method) : + AsyncActionProgressHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncActionProgressHandler::operator()(Windows::Foundation::IAsyncActionWithProgress const& asyncInfo, impl::param_type const& progressInfo) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), impl::bind_in(progressInfo))); + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(L handler) : + AsyncActionWithProgressCompletedHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(F* handler) : + AsyncActionWithProgressCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(O* object, M method) : + AsyncActionWithProgressCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(com_ptr&& object, M method) : + AsyncActionWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(weak_ref&& object, M method) : + AsyncActionWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncActionWithProgressCompletedHandler::operator()(Windows::Foundation::IAsyncActionWithProgress const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(L handler) : + AsyncOperationCompletedHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(F* handler) : + AsyncOperationCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(O* object, M method) : + AsyncOperationCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(com_ptr&& object, M method) : + AsyncOperationCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(weak_ref&& object, M method) : + AsyncOperationCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncOperationCompletedHandler::operator()(Windows::Foundation::IAsyncOperation const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(L handler) : + AsyncOperationProgressHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(F* handler) : + AsyncOperationProgressHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(O* object, M method) : + AsyncOperationProgressHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(com_ptr&& object, M method) : + AsyncOperationProgressHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(weak_ref&& object, M method) : + AsyncOperationProgressHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncOperationProgressHandler::operator()(Windows::Foundation::IAsyncOperationWithProgress const& asyncInfo, impl::param_type const& progressInfo) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), impl::bind_in(progressInfo))); + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(L handler) : + AsyncOperationWithProgressCompletedHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(F* handler) : + AsyncOperationWithProgressCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(O* object, M method) : + AsyncOperationWithProgressCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(com_ptr&& object, M method) : + AsyncOperationWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(weak_ref&& object, M method) : + AsyncOperationWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncOperationWithProgressCompletedHandler::operator()(Windows::Foundation::IAsyncOperationWithProgress const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template DeferralCompletedHandler::DeferralCompletedHandler(L handler) : + DeferralCompletedHandler(impl::make_delegate(std::forward(handler))) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(F* handler) : + DeferralCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(O* object, M method) : + DeferralCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(com_ptr&& object, M method) : + DeferralCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(weak_ref&& object, M method) : + DeferralCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + inline auto DeferralCompletedHandler::operator()() const + { + check_hresult((*(impl::abi_t**)this)->Invoke()); + } + template template EventHandler::EventHandler(L handler) : + EventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template EventHandler::EventHandler(F* handler) : + EventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template EventHandler::EventHandler(O* object, M method) : + EventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template EventHandler::EventHandler(com_ptr&& object, M method) : + EventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template EventHandler::EventHandler(weak_ref&& object, M method) : + EventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto EventHandler::operator()(Windows::Foundation::IInspectable const& sender, impl::param_type const& args) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&sender), impl::bind_in(args))); + } + template template TypedEventHandler::TypedEventHandler(L handler) : + TypedEventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template TypedEventHandler::TypedEventHandler(F* handler) : + TypedEventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template TypedEventHandler::TypedEventHandler(O* object, M method) : + TypedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template TypedEventHandler::TypedEventHandler(com_ptr&& object, M method) : + TypedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template TypedEventHandler::TypedEventHandler(weak_ref&& object, M method) : + TypedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto TypedEventHandler::operator()(impl::param_type const& sender, impl::param_type const& args) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(impl::bind_in(sender), impl::bind_in(args))); + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} + +namespace winrt::impl +{ + template + struct reference : implements, Windows::Foundation::IReference, Windows::Foundation::IPropertyValue> + { + reference(T const& value) : m_value(value) + { + } + + T Value() const + { + return m_value; + } + + Windows::Foundation::PropertyType Type() const noexcept + { + return Windows::Foundation::PropertyType::OtherType; + } + + static constexpr bool IsNumericScalar() noexcept + { + return std::is_arithmetic_v || std::is_enum_v; + } + + uint8_t GetUInt8() const + { + return to_scalar(); + } + + int16_t GetInt16() const + { + return to_scalar(); + } + + uint16_t GetUInt16() const + { + return to_scalar(); + } + + int32_t GetInt32() const + { + return to_scalar(); + } + + uint32_t GetUInt32() const + { + return to_scalar(); + } + + int64_t GetInt64() const + { + return to_scalar(); + } + + uint64_t GetUInt64() const + { + return to_scalar(); + } + + float GetSingle() { throw hresult_not_implemented(); } + double GetDouble() { throw hresult_not_implemented(); } + char16_t GetChar16() { throw hresult_not_implemented(); } + bool GetBoolean() { throw hresult_not_implemented(); } + hstring GetString() { throw hresult_not_implemented(); } + guid GetGuid() { throw hresult_not_implemented(); } + Windows::Foundation::DateTime GetDateTime() { throw hresult_not_implemented(); } + Windows::Foundation::TimeSpan GetTimeSpan() { throw hresult_not_implemented(); } + Windows::Foundation::Point GetPoint() { throw hresult_not_implemented(); } + Windows::Foundation::Size GetSize() { throw hresult_not_implemented(); } + Windows::Foundation::Rect GetRect() { throw hresult_not_implemented(); } + void GetUInt8Array(com_array &) { throw hresult_not_implemented(); } + void GetInt16Array(com_array &) { throw hresult_not_implemented(); } + void GetUInt16Array(com_array &) { throw hresult_not_implemented(); } + void GetInt32Array(com_array &) { throw hresult_not_implemented(); } + void GetUInt32Array(com_array &) { throw hresult_not_implemented(); } + void GetInt64Array(com_array &) { throw hresult_not_implemented(); } + void GetUInt64Array(com_array &) { throw hresult_not_implemented(); } + void GetSingleArray(com_array &) { throw hresult_not_implemented(); } + void GetDoubleArray(com_array &) { throw hresult_not_implemented(); } + void GetChar16Array(com_array &) { throw hresult_not_implemented(); } + void GetBooleanArray(com_array &) { throw hresult_not_implemented(); } + void GetStringArray(com_array &) { throw hresult_not_implemented(); } + void GetInspectableArray(com_array &) { throw hresult_not_implemented(); } + void GetGuidArray(com_array &) { throw hresult_not_implemented(); } + void GetDateTimeArray(com_array &) { throw hresult_not_implemented(); } + void GetTimeSpanArray(com_array &) { throw hresult_not_implemented(); } + void GetPointArray(com_array &) { throw hresult_not_implemented(); } + void GetSizeArray(com_array &) { throw hresult_not_implemented(); } + void GetRectArray(com_array &) { throw hresult_not_implemented(); } + + private: + + template + To to_scalar() const + { + if constexpr (IsNumericScalar()) + { + return static_cast(m_value); + } + else + { + throw hresult_not_implemented(); + } + } + + T m_value; + }; + + template + struct reference_traits + { + static auto make(T const& value) { return winrt::make>(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint8_t value) { return Windows::Foundation::PropertyValue::CreateUInt8(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint16_t value) { return Windows::Foundation::PropertyValue::CreateUInt16(value); } + }; + + template <> + struct reference_traits + { + static auto make(int16_t value) { return Windows::Foundation::PropertyValue::CreateInt16(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint32_t value) { return Windows::Foundation::PropertyValue::CreateUInt32(value); } + }; + + template <> + struct reference_traits + { + static auto make(int32_t value) { return Windows::Foundation::PropertyValue::CreateInt32(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint64_t value) { return Windows::Foundation::PropertyValue::CreateUInt64(value); } + }; + + template <> + struct reference_traits + { + static auto make(int64_t value) { return Windows::Foundation::PropertyValue::CreateInt64(value); } + }; + + template <> + struct reference_traits + { + static auto make(float value) { return Windows::Foundation::PropertyValue::CreateSingle(value); } + }; + + template <> + struct reference_traits + { + static auto make(double value) { return Windows::Foundation::PropertyValue::CreateDouble(value); } + }; + + template <> + struct reference_traits + { + static auto make(char16_t value) { return Windows::Foundation::PropertyValue::CreateChar16(value); } + }; + + template <> + struct reference_traits + { + static auto make(bool value) { return Windows::Foundation::PropertyValue::CreateBoolean(value); } + }; + + template <> + struct reference_traits + { + static auto make(hstring const& value) { return Windows::Foundation::PropertyValue::CreateString(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::IInspectable const& value) { return Windows::Foundation::PropertyValue::CreateInspectable(value); } + }; + + template <> + struct reference_traits + { + static auto make(guid const& value) { return Windows::Foundation::PropertyValue::CreateGuid(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::DateTime value) { return Windows::Foundation::PropertyValue::CreateDateTime(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::TimeSpan value) { return Windows::Foundation::PropertyValue::CreateTimeSpan(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::Point const& value) { return Windows::Foundation::PropertyValue::CreatePoint(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::Size const& value) { return Windows::Foundation::PropertyValue::CreateSize(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::Rect const& value) { return Windows::Foundation::PropertyValue::CreateRect(value); } + }; +} + +namespace winrt::Windows::Foundation +{ + template + bool operator==(IReference const& left, IReference const& right) + { + if (get_abi(left) == get_abi(right)) + { + return true; + } + + if (!left || !right) + { + return false; + } + + return left.Value() == right.Value(); + } + + template + bool operator!=(IReference const& left, IReference const& right) + { + return !(left == right); + } +} + +namespace winrt +{ + inline Windows::Foundation::IInspectable box_value(param::hstring const& value) + { + return Windows::Foundation::IReference(*(hstring*)(&value)); + } + + template >> + Windows::Foundation::IInspectable box_value(T const& value) + { + if constexpr (std::is_base_of_v) + { + return value; + } + else + { + return Windows::Foundation::IReference(value); + } + } + + template + T unbox_value(Windows::Foundation::IInspectable const& value) + { + if constexpr (std::is_base_of_v) + { + return value.as(); + } + else if constexpr (std::is_enum_v) + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + else + { + return static_cast(value.as>>().Value()); + } + } + else + { + return value.as>().Value(); + } + } + + template + hstring unbox_value_or(Windows::Foundation::IInspectable const& value, param::hstring const& default_value) + { + if (value) + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + } + + return *(hstring*)(&default_value); + } + + template >> + T unbox_value_or(Windows::Foundation::IInspectable const& value, T const& default_value) + { + if (value) + { + if constexpr (std::is_base_of_v) + { + if (auto temp = value.try_as()) + { + return temp; + } + } + else if constexpr (std::is_enum_v) + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + + if (auto temp = value.try_as>>()) + { + return static_cast(temp.Value()); + } + } + else + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + } + } + + return default_value; + } +} + +namespace winrt +{ + template + using optional = Windows::Foundation::IReference; +} + +namespace winrt::impl +{ + template + struct async_completed_handler; + + template + using async_completed_handler_t = typename async_completed_handler::type; + + template <> + struct async_completed_handler + { + using type = Windows::Foundation::AsyncActionCompletedHandler; + }; + + template + struct async_completed_handler> + { + using type = Windows::Foundation::AsyncActionWithProgressCompletedHandler; + }; + + template + struct async_completed_handler> + { + using type = Windows::Foundation::AsyncOperationCompletedHandler; + }; + + template + struct async_completed_handler> + { + using type = Windows::Foundation::AsyncOperationWithProgressCompletedHandler; + }; + + inline bool is_sta() noexcept + { + int32_t aptType; + int32_t aptTypeQualifier; + return (error_ok == CoGetApartmentType(&aptType, &aptTypeQualifier)) && ((aptType == 0 /*APTTYPE_STA*/) || (aptType == 3 /*APTTYPE_MAINSTA*/)); + } + + inline void check_sta_blocking_wait() noexcept + { + // Note: A blocking wait on the UI thread for an asynchronous operation can cause a deadlock. + // See https://docs.microsoft.com/windows/uwp/cpp-and-winrt-apis/concurrency#block-the-calling-thread + WINRT_ASSERT(!is_sta()); + } + + template + void wait_for_completed(Async const& async, uint32_t const timeout) + { + void* event = check_pointer(CreateEventW(nullptr, true, false, nullptr)); + + // The delegate is a local to ensure that the event outlives the call to WaitForSingleObject. + async_completed_handler_t delegate = [event = handle(event)](auto && ...) + { + WINRT_VERIFY(SetEvent(event.get())); + }; + + async.Completed(delegate); + WaitForSingleObject(event, timeout); + } + + template + auto wait_for(Async const& async, Windows::Foundation::TimeSpan const& timeout) + { + check_sta_blocking_wait(); + wait_for_completed(async, static_cast(std::chrono::duration_cast(timeout).count())); + return async.Status(); + } + + template + auto wait_get(Async const& async) + { + check_sta_blocking_wait(); + + if (async.Status() == Windows::Foundation::AsyncStatus::Started) + { + wait_for_completed(async, 0xFFFFFFFF); // INFINITE + } + + return async.GetResults(); + } + + template + struct await_adapter + { + Async const& async; + + bool await_ready() const + { + return async.Status() == Windows::Foundation::AsyncStatus::Completed; + } + + void await_suspend(winrt::impl::coroutine_handle<> handle) const + { + auto context = capture(CoGetObjectContext); + + async.Completed([handle, context = std::move(context)](auto const&, Windows::Foundation::AsyncStatus) + { + com_callback_args args{}; + args.data = handle.address(); + + auto callback = [](com_callback_args* args) noexcept -> int32_t + { + winrt::impl::coroutine_handle<>::from_address(args->data)(); + return error_ok; + }; + + check_hresult(context->ContextCallback(callback, &args, guid_of(), 5, nullptr)); + }); + } + + auto await_resume() const + { + return async.GetResults(); + } + }; +} + +#ifdef _RESUMABLE_FUNCTIONS_SUPPORTED +namespace winrt::Windows::Foundation +{ + inline impl::await_adapter operator co_await(IAsyncAction const& async) + { + return{ async }; + } + + template + impl::await_adapter> operator co_await(IAsyncActionWithProgress const& async) + { + return{ async }; + } + + template + impl::await_adapter> operator co_await(IAsyncOperation const& async) + { + return{ async }; + } + + template + impl::await_adapter> operator co_await(IAsyncOperationWithProgress const& async) + { + return{ async }; + } +} +#endif + +namespace winrt +{ + struct get_progress_token_t {}; + + inline get_progress_token_t get_progress_token() noexcept + { + return{}; + } + + struct get_cancellation_token_t {}; + + inline get_cancellation_token_t get_cancellation_token() noexcept + { + return{}; + } +} + +namespace winrt::impl +{ + template + struct cancellation_token + { + cancellation_token(Promise* promise) noexcept : m_promise(promise) + { + } + + bool await_ready() const noexcept + { + return true; + } + + void await_suspend(winrt::impl::coroutine_handle<>) const noexcept + { + } + + cancellation_token await_resume() const noexcept + { + return *this; + } + + bool operator()() const noexcept + { + return m_promise->Status() == Windows::Foundation::AsyncStatus::Canceled; + } + + void callback(winrt::delegate<>&& cancel) noexcept + { + m_promise->cancellation_callback(std::move(cancel)); + } + + private: + + Promise* m_promise; + }; + + template + struct progress_token + { + progress_token(Promise* promise) noexcept : + m_promise(promise) + { + } + + bool await_ready() const noexcept + { + return true; + } + + void await_suspend(winrt::impl::coroutine_handle<>) const noexcept + { + } + + progress_token await_resume() const noexcept + { + return *this; + } + + void operator()(Progress const& result) + { + m_promise->set_progress(result); + } + + private: + + Promise* m_promise; + }; + + template + struct promise_base : implements + { + using AsyncStatus = Windows::Foundation::AsyncStatus; + + unsigned long __stdcall Release() noexcept + { + uint32_t const remaining = this->subtract_reference(); + + if (remaining == 0) + { + std::atomic_thread_fence(std::memory_order_acquire); + winrt::impl::coroutine_handle::from_promise(*static_cast(this)).destroy(); + } + + return remaining; + } + + void Completed(async_completed_handler_t const& handler) + { + AsyncStatus status; + + { + slim_lock_guard const guard(m_lock); + + if (m_completed_assigned) + { + throw hresult_illegal_delegate_assignment(); + } + + m_completed_assigned = true; + + if (m_status == AsyncStatus::Started) + { + m_completed = make_agile_delegate(handler); + return; + } + + status = m_status; + } + + if (handler) + { + invoke(handler, *this, status); + } + } + + auto Completed() noexcept + { + slim_lock_guard const guard(m_lock); + return m_completed; + } + + uint32_t Id() const noexcept + { + return 1; + } + + AsyncStatus Status() noexcept + { + slim_lock_guard const guard(m_lock); + return m_status; + } + + hresult ErrorCode() noexcept + { + try + { + slim_lock_guard const guard(m_lock); + rethrow_if_failed(); + return error_ok; + } + catch (...) + { + return to_hresult(); + } + } + + void Cancel() noexcept + { + winrt::delegate<> cancel; + + { + slim_lock_guard const guard(m_lock); + + if (m_status == AsyncStatus::Started) + { + m_status = AsyncStatus::Canceled; + m_exception = std::make_exception_ptr(hresult_canceled()); + cancel = std::move(m_cancel); + } + } + + if (cancel) + { + cancel(); + } + } + + void Close() const noexcept + { + } + + auto GetResults() + { + slim_lock_guard const guard(m_lock); + + if (m_status == AsyncStatus::Completed) + { + return static_cast(this)->get_return_value(); + } + + rethrow_if_failed(); + WINRT_ASSERT(m_status == AsyncStatus::Started); + throw hresult_illegal_method_call(); + } + + AsyncInterface get_return_object() const noexcept + { + return *this; + } + + void get_return_value() const noexcept + { + } + + void set_completed() noexcept + { + async_completed_handler_t handler; + AsyncStatus status; + + { + slim_lock_guard const guard(m_lock); + + if (m_status == AsyncStatus::Started) + { + m_status = AsyncStatus::Completed; + } + + handler = std::move(this->m_completed); + status = this->m_status; + } + + if (handler) + { + invoke(handler, *this, status); + } + } + + winrt::impl::suspend_never initial_suspend() const noexcept + { + return{}; + } + + struct final_suspend_awaiter + { + promise_base* promise; + + bool await_ready() const noexcept + { + return false; + } + + void await_resume() const noexcept + { + } + + bool await_suspend(winrt::impl::coroutine_handle<>) const noexcept + { + promise->set_completed(); + uint32_t const remaining = promise->subtract_reference(); + + if (remaining == 0) + { + std::atomic_thread_fence(std::memory_order_acquire); + } + + return remaining > 0; + } + }; + + auto final_suspend() noexcept + { + return final_suspend_awaiter{ this }; + } + + void unhandled_exception() noexcept + { + slim_lock_guard const guard(m_lock); + WINRT_ASSERT(m_status == AsyncStatus::Started || m_status == AsyncStatus::Canceled); + m_exception = std::current_exception(); + + try + { + std::rethrow_exception(m_exception); + } + catch (hresult_canceled const&) + { + m_status = AsyncStatus::Canceled; + } + catch (...) + { + m_status = AsyncStatus::Error; + } + } + + template + Expression&& await_transform(Expression&& expression) + { + if (Status() == AsyncStatus::Canceled) + { + throw winrt::hresult_canceled(); + } + + return std::forward(expression); + } + + cancellation_token await_transform(get_cancellation_token_t) noexcept + { + return{ static_cast(this) }; + } + + progress_token await_transform(get_progress_token_t) noexcept + { + return{ static_cast(this) }; + } + + void cancellation_callback(winrt::delegate<>&& cancel) noexcept + { + { + slim_lock_guard const guard(m_lock); + + if (m_status != AsyncStatus::Canceled) + { + m_cancel = std::move(cancel); + return; + } + } + + cancel(); + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + protected: + + void rethrow_if_failed() const + { + if (m_status == AsyncStatus::Error || m_status == AsyncStatus::Canceled) + { + std::rethrow_exception(m_exception); + } + } + + std::exception_ptr m_exception{}; + slim_mutex m_lock; + async_completed_handler_t m_completed; + winrt::delegate<> m_cancel; + AsyncStatus m_status{ AsyncStatus::Started }; + bool m_completed_assigned{ false }; + }; +} + +#ifdef __cpp_lib_coroutine +namespace std +#elif __has_include() +namespace std::experimental +#else +namespace corostub +#endif +{ + template + struct coroutine_traits + { + struct promise_type final : winrt::impl::promise_base + { + void return_void() const noexcept + { + } + }; + }; + + template + struct coroutine_traits, Args...> + { + struct promise_type final : winrt::impl::promise_base, TProgress> + { + using ProgressHandler = winrt::Windows::Foundation::AsyncActionProgressHandler; + + void Progress(ProgressHandler const& handler) noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + m_progress = winrt::impl::make_agile_delegate(handler); + } + + ProgressHandler Progress() noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + return m_progress; + } + + void return_void() const noexcept + { + } + + void set_progress(TProgress const& result) + { + if (auto handler = Progress()) + { + winrt::impl::invoke(handler, *this, result); + } + } + + ProgressHandler m_progress; + }; + }; + + template + struct coroutine_traits, Args...> + { + struct promise_type final : winrt::impl::promise_base> + { + TResult get_return_value() noexcept + { + return std::move(m_result); + } + + void return_value(TResult&& value) noexcept + { + m_result = std::move(value); + } + + void return_value(TResult const& value) noexcept + { + m_result = value; + } + + TResult m_result{ winrt::impl::empty_value() }; + }; + }; + + template + struct coroutine_traits, Args...> + { + struct promise_type final : winrt::impl::promise_base, TProgress> + { + using ProgressHandler = winrt::Windows::Foundation::AsyncOperationProgressHandler; + + void Progress(ProgressHandler const& handler) noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + m_progress = winrt::impl::make_agile_delegate(handler); + } + + ProgressHandler Progress() noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + return m_progress; + } + + TResult get_return_value() noexcept + { + return std::move(m_result); + } + + void return_value(TResult&& value) noexcept + { + m_result = std::move(value); + } + + void return_value(TResult const& value) noexcept + { + m_result = value; + } + + void set_progress(TProgress const& result) + { + if (auto handler = Progress()) + { + winrt::impl::invoke(handler, *this, result); + } + } + + TResult m_result{ winrt::impl::empty_value() }; + ProgressHandler m_progress; + }; + }; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h new file mode 100644 index 000000000..46bb13139 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h @@ -0,0 +1,3733 @@ +// C++/WinRT v2.0.190620.2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef WINRT_Windows_UI_Notifications_H +#define WINRT_Windows_UI_Notifications_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "Windows.UI.h" +#include "impl/Windows.ApplicationModel.2.h" +#include "impl/Windows.Data.Xml.Dom.2.h" +#include "impl/Windows.Foundation.2.h" +#include "impl/Windows.Foundation.Collections.2.h" +#include "impl/Windows.System.2.h" +#include "impl/Windows.UI.Notifications.2.h" +namespace winrt::impl +{ + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationContent::Kind() const + { + Windows::UI::Notifications::AdaptiveNotificationContentKind value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationContent)->get_Kind(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationContent::Hints() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationContent)->get_Hints(&value)); + return Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Text() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->get_Text(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Text(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->put_Text(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Language() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->get_Language(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Language(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->put_Language(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IBadgeNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IBadgeNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeNotificationFactory::CreateBadgeNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotificationFactory)->CreateBadgeNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::BadgeNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->CreateBadgeUpdaterForApplication(&result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->CreateBadgeUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->CreateBadgeUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->CreateBadgeUpdaterForApplication(&result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->CreateBadgeUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->CreateBadgeUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics2::GetForUser(Windows::System::User const& user) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics2)->GetForUser(*(void**)(&user), &result)); + return Windows::UI::Notifications::BadgeUpdateManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::Update(Windows::UI::Notifications::BadgeNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->Update(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->Clear()); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& badgeContent, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->StartPeriodicUpdate(*(void**)(&badgeContent), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& badgeContent, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->StartPeriodicUpdateAtTime(*(void**)(&badgeContent), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::StopPeriodicUpdate() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->StopPeriodicUpdate()); + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::Style() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_Style(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::Wrap() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_Wrap(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::MaxLines() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_MaxLines(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::MinLines() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_MinLines(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::TextStacking() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_TextStacking(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::Align() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_Align(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Caption() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Caption(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Body() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Body(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Base() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Base(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Subtitle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Subtitle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Title() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Title(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Subheader() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Subheader(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Header() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Header(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::TitleNumeral() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_TitleNumeral(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubheaderNumeral() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderNumeral(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::HeaderNumeral() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderNumeral(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::CaptionSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_CaptionSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::BodySubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_BodySubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::BaseSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_BaseSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubtitleSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubtitleSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::TitleSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_TitleSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubheaderSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubheaderNumeralSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderNumeralSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::HeaderSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::HeaderNumeralSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderNumeralSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownNotificationBindingsStatics::ToastGeneric() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownNotificationBindingsStatics)->get_ToastGeneric(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotification::Visual() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->get_Visual(&value)); + return Windows::UI::Notifications::NotificationVisual{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotification::Visual(Windows::UI::Notifications::NotificationVisual const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->put_Visual(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Template() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->get_Template(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Template(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->put_Template(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Language() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->get_Language(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Language(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->put_Language(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Hints() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->get_Hints(&value)); + return Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationBinding::GetTextElements() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->GetTextElements(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationData::Values() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationData)->get_Values(&value)); + return Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationData::SequenceNumber() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationData)->get_SequenceNumber(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_INotificationData::SequenceNumber(uint32_t value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationData)->put_SequenceNumber(value)); + } + template auto consume_Windows_UI_Notifications_INotificationDataFactory::CreateNotificationData(param::iterable> const& initialValues, uint32_t sequenceNumber) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationDataFactory)->CreateNotificationDataWithValuesAndSequenceNumber(*(void**)(&initialValues), sequenceNumber, &value)); + return Windows::UI::Notifications::NotificationData{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationDataFactory::CreateNotificationData(param::iterable> const& initialValues) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationDataFactory)->CreateNotificationDataWithValues(*(void**)(&initialValues), &value)); + return Windows::UI::Notifications::NotificationData{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationVisual::Language() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->get_Language(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationVisual::Language(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->put_Language(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationVisual::Bindings() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->get_Bindings(&value)); + return Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationVisual::GetBinding(param::hstring const& templateName) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->GetBinding(*(void**)(&templateName), &result)); + return Windows::UI::Notifications::NotificationBinding{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::DeliveryTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_DeliveryTime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Id(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->put_Id(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Id() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_Id(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotificationFactory::CreateScheduledTileNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotificationFactory)->CreateScheduledTileNotification(*(void**)(&content), impl::bind_in(deliveryTime), &value)); + return Windows::UI::Notifications::ScheduledTileNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::DeliveryTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_DeliveryTime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::SnoozeInterval() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_SnoozeInterval(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::MaximumSnoozeCount() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_MaximumSnoozeCount(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::Id(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->put_Id(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::Id() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_Id(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Group(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->put_Group(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Group() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->get_Group(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::SuppressPopup(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->put_SuppressPopup(value)); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::SuppressPopup() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->get_SuppressPopup(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::NotificationMirroring() const + { + Windows::UI::Notifications::NotificationMirroring value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->get_NotificationMirroring(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::NotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->put_NotificationMirroring(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::RemoteId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->get_RemoteId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::RemoteId(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->put_RemoteId(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification4::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification4)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification4::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification4)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationFactory::CreateScheduledToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationFactory)->CreateScheduledToastNotification(*(void**)(&content), impl::bind_in(deliveryTime), &value)); + return Windows::UI::Notifications::ScheduledToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationFactory::CreateScheduledToastNotificationRecurring(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime, Windows::Foundation::TimeSpan const& snoozeInterval, uint32_t maximumSnoozeCount) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationFactory)->CreateScheduledToastNotificationRecurring(*(void**)(&content), impl::bind_in(deliveryTime), impl::bind_in(snoozeInterval), maximumSnoozeCount, &value)); + return Windows::UI::Notifications::ScheduledToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::Cancel() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->get_Cancel(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::Cancel(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->put_Cancel(value)); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::ScheduledToastNotification() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->get_ScheduledToastNotification(&value)); + return Windows::UI::Notifications::ScheduledToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::GetDeferral() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->GetDeferral(&result)); + return Windows::Foundation::Deferral{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IShownTileNotification::Arguments() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IShownTileNotification)->get_Arguments(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotificationFactory::CreateTileFlyoutNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotificationFactory)->CreateTileFlyoutNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::TileFlyoutNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->CreateTileFlyoutUpdaterForApplication(&result)); + return Windows::UI::Notifications::TileFlyoutUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->CreateTileFlyoutUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::TileFlyoutUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->CreateTileFlyoutUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::TileFlyoutUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::Update(Windows::UI::Notifications::TileFlyoutNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->Update(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->Clear()); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileFlyoutContent, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->StartPeriodicUpdate(*(void**)(&tileFlyoutContent), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileFlyoutContent, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->StartPeriodicUpdateAtTime(*(void**)(&tileFlyoutContent), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::StopPeriodicUpdate() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->StopPeriodicUpdate()); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::Setting() const + { + Windows::UI::Notifications::NotificationSetting value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->get_Setting(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_ITileNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_ITileNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileNotification::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_ITileNotification::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileNotificationFactory::CreateTileNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotificationFactory)->CreateTileNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::CreateTileUpdaterForApplicationForUser() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->CreateTileUpdaterForApplication(&result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::CreateTileUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->CreateTileUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::CreateTileUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->CreateTileUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::CreateTileUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->CreateTileUpdaterForApplication(&result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::CreateTileUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->CreateTileUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::CreateTileUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->CreateTileUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::TileTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics2::GetForUser(Windows::System::User const& user) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics2)->GetForUser(*(void**)(&user), &result)); + return Windows::UI::Notifications::TileUpdateManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdater::Update(Windows::UI::Notifications::TileNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->Update(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->Clear()); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::EnableNotificationQueue(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->EnableNotificationQueue(enable)); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::Setting() const + { + Windows::UI::Notifications::NotificationSetting value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->get_Setting(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_ITileUpdater::AddToSchedule(Windows::UI::Notifications::ScheduledTileNotification const& scheduledTile) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->AddToSchedule(*(void**)(&scheduledTile))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::RemoveFromSchedule(Windows::UI::Notifications::ScheduledTileNotification const& scheduledTile) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->RemoveFromSchedule(*(void**)(&scheduledTile))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::GetScheduledTileNotifications() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->GetScheduledTileNotifications(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileContent, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdate(*(void**)(&tileContent), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileContent, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdateAtTime(*(void**)(&tileContent), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StopPeriodicUpdate() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StopPeriodicUpdate()); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdateBatch(param::iterable const& tileContents, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdateBatch(*(void**)(&tileContents), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdateBatch(param::iterable const& tileContents, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdateBatchAtTime(*(void**)(&tileContents), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater2::EnableNotificationQueueForSquare150x150(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater2)->EnableNotificationQueueForSquare150x150(enable)); + } + template auto consume_Windows_UI_Notifications_ITileUpdater2::EnableNotificationQueueForWide310x150(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater2)->EnableNotificationQueueForWide310x150(enable)); + } + template auto consume_Windows_UI_Notifications_ITileUpdater2::EnableNotificationQueueForSquare310x310(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater2)->EnableNotificationQueueForSquare310x310(enable)); + } + template auto consume_Windows_UI_Notifications_IToastActivatedEventArgs::Arguments() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastActivatedEventArgs)->get_Arguments(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastActivatedEventArgs2::UserInput() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastActivatedEventArgs2)->get_UserInput(&value)); + return Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::Id() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_Id(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::DisplayName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_DisplayName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::DisplayName(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->put_DisplayName(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastCollection::LaunchArgs() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_LaunchArgs(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::LaunchArgs(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->put_LaunchArgs(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastCollection::Icon() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_Icon(&value)); + return Windows::Foundation::Uri{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::Icon(Windows::Foundation::Uri const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->put_Icon(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastCollectionFactory::CreateInstance(param::hstring const& collectionId, param::hstring const& displayName, param::hstring const& launchArgs, Windows::Foundation::Uri const& iconUri) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionFactory)->CreateInstance(*(void**)(&collectionId), *(void**)(&displayName), *(void**)(&launchArgs), *(void**)(&iconUri), &value)); + return Windows::UI::Notifications::ToastCollection{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::SaveToastCollectionAsync(Windows::UI::Notifications::ToastCollection const& collection) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->SaveToastCollectionAsync(*(void**)(&collection), &operation)); + return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::FindAllToastCollectionsAsync() const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->FindAllToastCollectionsAsync(&operation)); + return Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::GetToastCollectionAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->GetToastCollectionAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::RemoveToastCollectionAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->RemoveToastCollectionAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::RemoveAllToastCollectionsAsync() const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->RemoveAllToastCollectionsAsync(&operation)); + return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::AppId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->get_AppId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastDismissedEventArgs::Reason() const + { + Windows::UI::Notifications::ToastDismissalReason value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastDismissedEventArgs)->get_Reason(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastFailedEventArgs::ErrorCode() const + { + winrt::hresult value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastFailedEventArgs)->get_ErrorCode(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification::Dismissed(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->add_Dismissed(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotification::Dismissed_revoker consume_Windows_UI_Notifications_IToastNotification::Dismissed(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Dismissed(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Dismissed(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->remove_Dismissed(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Activated(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->add_Activated(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotification::Activated_revoker consume_Windows_UI_Notifications_IToastNotification::Activated(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Activated(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Activated(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->remove_Activated(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Failed(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->add_Failed(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotification::Failed_revoker consume_Windows_UI_Notifications_IToastNotification::Failed(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Failed(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Failed(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->remove_Failed(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Group(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->put_Group(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Group() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->get_Group(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification2::SuppressPopup(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->put_SuppressPopup(value)); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::SuppressPopup() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->get_SuppressPopup(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification3::NotificationMirroring() const + { + Windows::UI::Notifications::NotificationMirroring value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->get_NotificationMirroring(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification3::NotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->put_NotificationMirroring(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification3::RemoteId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->get_RemoteId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification3::RemoteId(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->put_RemoteId(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Data() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->get_Data(&value)); + return Windows::UI::Notifications::NotificationData{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Data(Windows::UI::Notifications::NotificationData const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->put_Data(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Priority() const + { + Windows::UI::Notifications::ToastNotificationPriority value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->get_Priority(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Priority(Windows::UI::Notifications::ToastNotificationPriority const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->put_Priority(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification6::ExpiresOnReboot() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification6)->get_ExpiresOnReboot(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification6::ExpiresOnReboot(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification6)->put_ExpiresOnReboot(value)); + } + template auto consume_Windows_UI_Notifications_IToastNotificationActionTriggerDetail::Argument() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationActionTriggerDetail)->get_Argument(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationActionTriggerDetail::UserInput() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationActionTriggerDetail)->get_UserInput(&value)); + return Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationFactory::CreateToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationFactory)->CreateToastNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::RemoveGroup(param::hstring const& group) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroup(*(void**)(&group))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::RemoveGroup(param::hstring const& group, param::hstring const& applicationId) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroupWithId(*(void**)(&group), *(void**)(&applicationId))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Remove(param::hstring const& tag, param::hstring const& group, param::hstring const& applicationId) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroupedTagWithId(*(void**)(&tag), *(void**)(&group), *(void**)(&applicationId))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Remove(param::hstring const& tag, param::hstring const& group) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroupedTag(*(void**)(&tag), *(void**)(&group))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Remove(param::hstring const& tag) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->Remove(*(void**)(&tag))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->Clear()); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Clear(param::hstring const& applicationId) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->ClearWithId(*(void**)(&applicationId))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory2::GetHistory() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory2)->GetHistory(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory2::GetHistory(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory2)->GetHistoryWithId(*(void**)(&applicationId), &result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistoryChangedTriggerDetail::ChangeType() const + { + Windows::UI::Notifications::ToastHistoryChangedType value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistoryChangedTriggerDetail)->get_ChangeType(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistoryChangedTriggerDetail2::CollectionId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistoryChangedTriggerDetail2)->get_CollectionId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::CreateToastNotifier() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->CreateToastNotifier(&result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::CreateToastNotifier(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->CreateToastNotifierWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::History() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->get_History(&value)); + return Windows::UI::Notifications::ToastNotificationHistory{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetToastNotifierForToastCollectionIdAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetToastNotifierForToastCollectionIdAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetHistoryForToastCollectionIdAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetHistoryForToastCollectionIdAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetToastCollectionManager() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetToastCollectionManager(&result)); + return Windows::UI::Notifications::ToastCollectionManager{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetToastCollectionManager(param::hstring const& appId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetToastCollectionManagerWithAppId(*(void**)(&appId), &result)); + return Windows::UI::Notifications::ToastCollectionManager{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics::CreateToastNotifier() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics)->CreateToastNotifier(&result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics::CreateToastNotifier(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics)->CreateToastNotifierWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics::GetTemplateContent(Windows::UI::Notifications::ToastTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics2::History() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics2)->get_History(&value)); + return Windows::UI::Notifications::ToastNotificationHistory{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics4::GetForUser(Windows::System::User const& user) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics4)->GetForUser(*(void**)(&user), &result)); + return Windows::UI::Notifications::ToastNotificationManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics4::ConfigureNotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics4)->ConfigureNotificationMirroring(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics5::GetDefault() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics5)->GetDefault(&result)); + return Windows::UI::Notifications::ToastNotificationManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotifier::Show(Windows::UI::Notifications::ToastNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->Show(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::Hide(Windows::UI::Notifications::ToastNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->Hide(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::Setting() const + { + Windows::UI::Notifications::NotificationSetting value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->get_Setting(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotifier::AddToSchedule(Windows::UI::Notifications::ScheduledToastNotification const& scheduledToast) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->AddToSchedule(*(void**)(&scheduledToast))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::RemoveFromSchedule(Windows::UI::Notifications::ScheduledToastNotification const& scheduledToast) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->RemoveFromSchedule(*(void**)(&scheduledToast))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::GetScheduledToastNotifications() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->GetScheduledToastNotifications(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotifier2::Update(Windows::UI::Notifications::NotificationData const& data, param::hstring const& tag, param::hstring const& group) const + { + Windows::UI::Notifications::NotificationUpdateResult result; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier2)->UpdateWithTagAndGroup(*(void**)(&data), *(void**)(&tag), *(void**)(&group), put_abi(result))); + return result; + } + template auto consume_Windows_UI_Notifications_IToastNotifier2::Update(Windows::UI::Notifications::NotificationData const& data, param::hstring const& tag) const + { + Windows::UI::Notifications::NotificationUpdateResult result; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier2)->UpdateWithTag(*(void**)(&data), *(void**)(&tag), put_abi(result))); + return result; + } + template auto consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier3)->add_ScheduledToastNotificationShowing(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing_revoker consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, ScheduledToastNotificationShowing(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier3)->remove_ScheduledToastNotificationShowing(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IUserNotification::Notification() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_Notification(&value)); + return Windows::UI::Notifications::Notification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IUserNotification::AppInfo() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_AppInfo(&value)); + return Windows::ApplicationModel::AppInfo{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IUserNotification::Id() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_Id(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IUserNotification::CreationTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_CreationTime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IUserNotificationChangedEventArgs::ChangeKind() const + { + Windows::UI::Notifications::UserNotificationChangedKind value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotificationChangedEventArgs)->get_ChangeKind(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IUserNotificationChangedEventArgs::UserNotificationId() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotificationChangedEventArgs)->get_UserNotificationId(&value)); + return value; + } + template + struct produce : produce_base + { + int32_t __stdcall get_Kind(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Kind()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Hints(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Hints()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Text(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Text()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Text(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Text(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Language(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Language()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Language(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Language(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateBadgeNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateBadgeNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateBadgeUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateBadgeUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetForUser(void* user, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Update(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Update(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdate(void* badgeContent, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&badgeContent), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateAtTime(void* badgeContent, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&badgeContent), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StopPeriodicUpdate() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StopPeriodicUpdate(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Style(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Style()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Wrap(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Wrap()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MaxLines(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MaxLines()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MinLines(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MinLines()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_TextStacking(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TextStacking()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Align(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Align()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Caption(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Caption()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Body(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Body()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Base(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Base()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Subtitle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Subtitle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Title(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Title()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Subheader(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Subheader()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Header(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Header()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_TitleNumeral(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TitleNumeral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubheaderNumeral(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubheaderNumeral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HeaderNumeral(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HeaderNumeral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CaptionSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CaptionSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BodySubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BodySubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BaseSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BaseSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubtitleSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubtitleSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_TitleSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TitleSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubheaderSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubheaderSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubheaderNumeralSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubheaderNumeralSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HeaderSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HeaderSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HeaderNumeralSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HeaderNumeralSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ToastGeneric(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ToastGeneric()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Visual(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Visual()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Visual(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Visual(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Template(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Template()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Template(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Template(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Language(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Language()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Language(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Language(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Hints(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Hints()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTextElements(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetTextElements()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Values(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Values()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SequenceNumber(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SequenceNumber()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_SequenceNumber(uint32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SequenceNumber(value); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateNotificationDataWithValuesAndSequenceNumber(void* initialValues, uint32_t sequenceNumber, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateNotificationData(*reinterpret_cast> const*>(&initialValues), sequenceNumber)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateNotificationDataWithValues(void* initialValues, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateNotificationData(*reinterpret_cast> const*>(&initialValues))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Language(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Language()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Language(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Language(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Bindings(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Bindings()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetBinding(void* templateName, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetBinding(*reinterpret_cast(&templateName))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeliveryTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeliveryTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Id(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Id(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Id(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateScheduledTileNotification(void* content, int64_t deliveryTime, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateScheduledTileNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeliveryTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeliveryTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SnoozeInterval(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().SnoozeInterval()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MaximumSnoozeCount(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MaximumSnoozeCount()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Id(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Id(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Id(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Group(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Group(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Group(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Group()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_SuppressPopup(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SuppressPopup(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SuppressPopup(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SuppressPopup()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_NotificationMirroring(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NotificationMirroring()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_NotificationMirroring(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().NotificationMirroring(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RemoteId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RemoteId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_RemoteId(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoteId(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateScheduledToastNotification(void* content, int64_t deliveryTime, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateScheduledToastNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateScheduledToastNotificationRecurring(void* content, int64_t deliveryTime, int64_t snoozeInterval, uint32_t maximumSnoozeCount, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateScheduledToastNotificationRecurring(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime), *reinterpret_cast(&snoozeInterval), maximumSnoozeCount)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Cancel(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Cancel()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Cancel(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Cancel(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ScheduledToastNotification(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ScheduledToastNotification()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDeferral(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetDeferral()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Arguments(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Arguments()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileFlyoutNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateTileFlyoutNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileFlyoutUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileFlyoutUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileFlyoutUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileFlyoutUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileFlyoutUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileFlyoutUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Update(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Update(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdate(void* tileFlyoutContent, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileFlyoutContent), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateAtTime(void* tileFlyoutContent, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileFlyoutContent), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StopPeriodicUpdate() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StopPeriodicUpdate(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Setting(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Setting()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateTileNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplicationForUser()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetForUser(void* user, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Update(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Update(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EnableNotificationQueue(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueue(enable); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Setting(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Setting()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AddToSchedule(void* scheduledTile) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().AddToSchedule(*reinterpret_cast(&scheduledTile)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveFromSchedule(void* scheduledTile) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveFromSchedule(*reinterpret_cast(&scheduledTile)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetScheduledTileNotifications(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetScheduledTileNotifications()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdate(void* tileContent, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileContent), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateAtTime(void* tileContent, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileContent), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StopPeriodicUpdate() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StopPeriodicUpdate(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateBatch(void* tileContents, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdateBatch(*reinterpret_cast const*>(&tileContents), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateBatchAtTime(void* tileContents, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdateBatch(*reinterpret_cast const*>(&tileContents), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall EnableNotificationQueueForSquare150x150(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueueForSquare150x150(enable); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EnableNotificationQueueForWide310x150(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueueForWide310x150(enable); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EnableNotificationQueueForSquare310x310(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueueForSquare310x310(enable); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Arguments(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Arguments()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_UserInput(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserInput()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Id(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DisplayName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DisplayName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_DisplayName(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().DisplayName(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LaunchArgs(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LaunchArgs()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_LaunchArgs(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LaunchArgs(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Icon(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Icon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Icon(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Icon(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateInstance(void* collectionId, void* displayName, void* launchArgs, void* iconUri, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&collectionId), *reinterpret_cast(&displayName), *reinterpret_cast(&launchArgs), *reinterpret_cast(&iconUri))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall SaveToastCollectionAsync(void* collection, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from(this->shim().SaveToastCollectionAsync(*reinterpret_cast(&collection))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall FindAllToastCollectionsAsync(void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>>(this->shim().FindAllToastCollectionsAsync()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetToastCollectionAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>(this->shim().GetToastCollectionAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveToastCollectionAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from(this->shim().RemoveToastCollectionAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAllToastCollectionsAsync(void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from(this->shim().RemoveAllToastCollectionsAsync()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_AppId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AppId()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Reason(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Reason()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ErrorCode(winrt::hresult* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ErrorCode()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall add_Dismissed(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().Dismissed(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Dismissed(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Dismissed(*reinterpret_cast(&token)); + return 0; + } + int32_t __stdcall add_Activated(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().Activated(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Activated(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Activated(*reinterpret_cast(&token)); + return 0; + } + int32_t __stdcall add_Failed(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().Failed(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Failed(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Failed(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce : produce_base + { + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Group(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Group(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Group(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Group()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_SuppressPopup(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SuppressPopup(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SuppressPopup(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SuppressPopup()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_NotificationMirroring(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NotificationMirroring()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_NotificationMirroring(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().NotificationMirroring(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RemoteId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RemoteId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_RemoteId(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoteId(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Data(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Data()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Data(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Data(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Priority(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Priority()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Priority(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Priority(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ExpiresOnReboot(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ExpiresOnReboot()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpiresOnReboot(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpiresOnReboot(value); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Argument(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Argument()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_UserInput(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserInput()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateToastNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateToastNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall RemoveGroup(void* group) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveGroup(*reinterpret_cast(&group)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveGroupWithId(void* group, void* applicationId) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveGroup(*reinterpret_cast(&group), *reinterpret_cast(&applicationId)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveGroupedTagWithId(void* tag, void* group, void* applicationId) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&tag), *reinterpret_cast(&group), *reinterpret_cast(&applicationId)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveGroupedTag(void* tag, void* group) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&tag), *reinterpret_cast(&group)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Remove(void* tag) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&tag)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ClearWithId(void* applicationId) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(*reinterpret_cast(&applicationId)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetHistory(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetHistory()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetHistoryWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetHistory(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ChangeType(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ChangeType()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_CollectionId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CollectionId()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateToastNotifier(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateToastNotifierWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_History(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().History()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetToastNotifierForToastCollectionIdAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>(this->shim().GetToastNotifierForToastCollectionIdAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetHistoryForToastCollectionIdAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>(this->shim().GetHistoryForToastCollectionIdAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetToastCollectionManager(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetToastCollectionManager()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetToastCollectionManagerWithAppId(void* appId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetToastCollectionManager(*reinterpret_cast(&appId))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateToastNotifier(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateToastNotifierWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_History(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().History()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetForUser(void* user, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ConfigureNotificationMirroring(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ConfigureNotificationMirroring(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetDefault(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetDefault()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Show(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Show(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Hide(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Hide(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Setting(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Setting()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AddToSchedule(void* scheduledToast) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().AddToSchedule(*reinterpret_cast(&scheduledToast)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveFromSchedule(void* scheduledToast) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveFromSchedule(*reinterpret_cast(&scheduledToast)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetScheduledToastNotifications(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetScheduledToastNotifications()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall UpdateWithTagAndGroup(void* data, void* tag, void* group, int32_t* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Update(*reinterpret_cast(&data), *reinterpret_cast(&tag), *reinterpret_cast(&group))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall UpdateWithTag(void* data, void* tag, int32_t* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Update(*reinterpret_cast(&data), *reinterpret_cast(&tag))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall add_ScheduledToastNotificationShowing(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().ScheduledToastNotificationShowing(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_ScheduledToastNotificationShowing(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().ScheduledToastNotificationShowing(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Notification(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Notification()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_AppInfo(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AppInfo()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Id(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CreationTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreationTime()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ChangeKind(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ChangeKind()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_UserNotificationId(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserNotificationId()); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::UI::Notifications +{ + constexpr auto operator|(NotificationKinds const left, NotificationKinds const right) noexcept + { + return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); + } + constexpr auto operator|=(NotificationKinds& left, NotificationKinds const right) noexcept + { + left = left | right; + return left; + } + constexpr auto operator&(NotificationKinds const left, NotificationKinds const right) noexcept + { + return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); + } + constexpr auto operator&=(NotificationKinds& left, NotificationKinds const right) noexcept + { + left = left & right; + return left; + } + constexpr auto operator~(NotificationKinds const value) noexcept + { + return static_cast(~impl::to_underlying_type(value)); + } + constexpr auto operator^(NotificationKinds const left, NotificationKinds const right) noexcept + { + return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); + } + constexpr auto operator^=(NotificationKinds& left, NotificationKinds const right) noexcept + { + left = left ^ right; + return left; + } + inline AdaptiveNotificationText::AdaptiveNotificationText() : + AdaptiveNotificationText(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline BadgeNotification::BadgeNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + BadgeNotification(impl::call_factory([&](auto&& f) { return f.CreateBadgeNotification(content); })) + { + } + inline auto BadgeUpdateManager::CreateBadgeUpdaterForApplication() + { + return impl::call_factory([&](auto&& f) { return f.CreateBadgeUpdaterForApplication(); }); + } + inline auto BadgeUpdateManager::CreateBadgeUpdaterForApplication(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateBadgeUpdaterForApplication(applicationId); }); + } + inline auto BadgeUpdateManager::CreateBadgeUpdaterForSecondaryTile(param::hstring const& tileId) + { + return impl::call_factory([&](auto&& f) { return f.CreateBadgeUpdaterForSecondaryTile(tileId); }); + } + inline auto BadgeUpdateManager::GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline auto BadgeUpdateManager::GetForUser(Windows::System::User const& user) + { + return impl::call_factory([&](auto&& f) { return f.GetForUser(user); }); + } + inline auto KnownAdaptiveNotificationHints::Style() + { + return impl::call_factory([&](auto&& f) { return f.Style(); }); + } + inline auto KnownAdaptiveNotificationHints::Wrap() + { + return impl::call_factory([&](auto&& f) { return f.Wrap(); }); + } + inline auto KnownAdaptiveNotificationHints::MaxLines() + { + return impl::call_factory([&](auto&& f) { return f.MaxLines(); }); + } + inline auto KnownAdaptiveNotificationHints::MinLines() + { + return impl::call_factory([&](auto&& f) { return f.MinLines(); }); + } + inline auto KnownAdaptiveNotificationHints::TextStacking() + { + return impl::call_factory([&](auto&& f) { return f.TextStacking(); }); + } + inline auto KnownAdaptiveNotificationHints::Align() + { + return impl::call_factory([&](auto&& f) { return f.Align(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Caption() + { + return impl::call_factory([&](auto&& f) { return f.Caption(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Body() + { + return impl::call_factory([&](auto&& f) { return f.Body(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Base() + { + return impl::call_factory([&](auto&& f) { return f.Base(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Subtitle() + { + return impl::call_factory([&](auto&& f) { return f.Subtitle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Title() + { + return impl::call_factory([&](auto&& f) { return f.Title(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Subheader() + { + return impl::call_factory([&](auto&& f) { return f.Subheader(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Header() + { + return impl::call_factory([&](auto&& f) { return f.Header(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::TitleNumeral() + { + return impl::call_factory([&](auto&& f) { return f.TitleNumeral(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubheaderNumeral() + { + return impl::call_factory([&](auto&& f) { return f.SubheaderNumeral(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::HeaderNumeral() + { + return impl::call_factory([&](auto&& f) { return f.HeaderNumeral(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::CaptionSubtle() + { + return impl::call_factory([&](auto&& f) { return f.CaptionSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::BodySubtle() + { + return impl::call_factory([&](auto&& f) { return f.BodySubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::BaseSubtle() + { + return impl::call_factory([&](auto&& f) { return f.BaseSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubtitleSubtle() + { + return impl::call_factory([&](auto&& f) { return f.SubtitleSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::TitleSubtle() + { + return impl::call_factory([&](auto&& f) { return f.TitleSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubheaderSubtle() + { + return impl::call_factory([&](auto&& f) { return f.SubheaderSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubheaderNumeralSubtle() + { + return impl::call_factory([&](auto&& f) { return f.SubheaderNumeralSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::HeaderSubtle() + { + return impl::call_factory([&](auto&& f) { return f.HeaderSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::HeaderNumeralSubtle() + { + return impl::call_factory([&](auto&& f) { return f.HeaderNumeralSubtle(); }); + } + inline auto KnownNotificationBindings::ToastGeneric() + { + return impl::call_factory([&](auto&& f) { return f.ToastGeneric(); }); + } + inline Notification::Notification() : + Notification(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline NotificationData::NotificationData() : + NotificationData(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline NotificationData::NotificationData(param::iterable> const& initialValues, uint32_t sequenceNumber) : + NotificationData(impl::call_factory([&](auto&& f) { return f.CreateNotificationData(initialValues, sequenceNumber); })) + { + } + inline NotificationData::NotificationData(param::iterable> const& initialValues) : + NotificationData(impl::call_factory([&](auto&& f) { return f.CreateNotificationData(initialValues); })) + { + } + inline ScheduledTileNotification::ScheduledTileNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) : + ScheduledTileNotification(impl::call_factory([&](auto&& f) { return f.CreateScheduledTileNotification(content, deliveryTime); })) + { + } + inline ScheduledToastNotification::ScheduledToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) : + ScheduledToastNotification(impl::call_factory([&](auto&& f) { return f.CreateScheduledToastNotification(content, deliveryTime); })) + { + } + inline ScheduledToastNotification::ScheduledToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime, Windows::Foundation::TimeSpan const& snoozeInterval, uint32_t maximumSnoozeCount) : + ScheduledToastNotification(impl::call_factory([&](auto&& f) { return f.CreateScheduledToastNotificationRecurring(content, deliveryTime, snoozeInterval, maximumSnoozeCount); })) + { + } + inline TileFlyoutNotification::TileFlyoutNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + TileFlyoutNotification(impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutNotification(content); })) + { + } + inline auto TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForApplication() + { + return impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutUpdaterForApplication(); }); + } + inline auto TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForApplication(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutUpdaterForApplication(applicationId); }); + } + inline auto TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForSecondaryTile(param::hstring const& tileId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutUpdaterForSecondaryTile(tileId); }); + } + inline auto TileFlyoutUpdateManager::GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline TileNotification::TileNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + TileNotification(impl::call_factory([&](auto&& f) { return f.CreateTileNotification(content); })) + { + } + inline auto TileUpdateManager::CreateTileUpdaterForApplication() + { + return impl::call_factory([&](auto&& f) { return f.CreateTileUpdaterForApplication(); }); + } + inline auto TileUpdateManager::CreateTileUpdaterForApplication(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileUpdaterForApplication(applicationId); }); + } + inline auto TileUpdateManager::CreateTileUpdaterForSecondaryTile(param::hstring const& tileId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileUpdaterForSecondaryTile(tileId); }); + } + inline auto TileUpdateManager::GetTemplateContent(Windows::UI::Notifications::TileTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline auto TileUpdateManager::GetForUser(Windows::System::User const& user) + { + return impl::call_factory([&](auto&& f) { return f.GetForUser(user); }); + } + inline ToastCollection::ToastCollection(param::hstring const& collectionId, param::hstring const& displayName, param::hstring const& launchArgs, Windows::Foundation::Uri const& iconUri) : + ToastCollection(impl::call_factory([&](auto&& f) { return f.CreateInstance(collectionId, displayName, launchArgs, iconUri); })) + { + } + inline ToastNotification::ToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + ToastNotification(impl::call_factory([&](auto&& f) { return f.CreateToastNotification(content); })) + { + } + inline auto ToastNotificationManager::CreateToastNotifier() + { + return impl::call_factory([&](auto&& f) { return f.CreateToastNotifier(); }); + } + inline auto ToastNotificationManager::CreateToastNotifier(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateToastNotifier(applicationId); }); + } + inline auto ToastNotificationManager::GetTemplateContent(Windows::UI::Notifications::ToastTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline auto ToastNotificationManager::History() + { + return impl::call_factory([&](auto&& f) { return f.History(); }); + } + inline auto ToastNotificationManager::GetForUser(Windows::System::User const& user) + { + return impl::call_factory([&](auto&& f) { return f.GetForUser(user); }); + } + inline auto ToastNotificationManager::ConfigureNotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) + { + impl::call_factory([&](auto&& f) { return f.ConfigureNotificationMirroring(value); }); + } + inline auto ToastNotificationManager::GetDefault() + { + return impl::call_factory([&](auto&& f) { return f.GetDefault(); }); + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h new file mode 100644 index 000000000..f122e18e3 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h @@ -0,0 +1,2647 @@ +// C++/WinRT v2.0.190620.2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef WINRT_Windows_UI_H +#define WINRT_Windows_UI_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "impl/Windows.UI.2.h" +namespace winrt::impl +{ + template auto consume_Windows_UI_IColorHelperStatics::FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) const + { + Windows::UI::Color returnValue; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorHelperStatics)->FromArgb(a, r, g, b, put_abi(returnValue))); + return returnValue; + } + template auto consume_Windows_UI_IColorHelperStatics2::ToDisplayName(Windows::UI::Color const& color) const + { + void* returnValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorHelperStatics2)->ToDisplayName(impl::bind_in(color), &returnValue)); + return hstring{ returnValue, take_ownership_from_abi }; + } + template auto consume_Windows_UI_IColorsStatics::AliceBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_AliceBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::AntiqueWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_AntiqueWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Aqua() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Aqua(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Aquamarine() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Aquamarine(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Azure() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Azure(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Beige() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Beige(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Bisque() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Bisque(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Black() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Black(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::BlanchedAlmond() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_BlanchedAlmond(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Blue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Blue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::BlueViolet() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_BlueViolet(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Brown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Brown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::BurlyWood() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_BurlyWood(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::CadetBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_CadetBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Chartreuse() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Chartreuse(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Chocolate() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Chocolate(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Coral() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Coral(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::CornflowerBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_CornflowerBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Cornsilk() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Cornsilk(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Crimson() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Crimson(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Cyan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Cyan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkCyan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkCyan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkGoldenrod() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkGoldenrod(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkKhaki() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkKhaki(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkMagenta() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkMagenta(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkOliveGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkOliveGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkOrange() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkOrange(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkOrchid() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkOrchid(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSalmon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSalmon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSlateBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSlateBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSlateGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSlateGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkTurquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkTurquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkViolet() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkViolet(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DeepPink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DeepPink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DeepSkyBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DeepSkyBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DimGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DimGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DodgerBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DodgerBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Firebrick() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Firebrick(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::FloralWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_FloralWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::ForestGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_ForestGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Fuchsia() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Fuchsia(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Gainsboro() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Gainsboro(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::GhostWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_GhostWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Gold() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Gold(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Goldenrod() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Goldenrod(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Gray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Gray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Green() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Green(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::GreenYellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_GreenYellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Honeydew() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Honeydew(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::HotPink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_HotPink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::IndianRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_IndianRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Indigo() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Indigo(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Ivory() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Ivory(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Khaki() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Khaki(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Lavender() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Lavender(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LavenderBlush() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LavenderBlush(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LawnGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LawnGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LemonChiffon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LemonChiffon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightCoral() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightCoral(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightCyan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightCyan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightGoldenrodYellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightGoldenrodYellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightPink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightPink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSalmon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSalmon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSkyBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSkyBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSlateGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSlateGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSteelBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSteelBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightYellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightYellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Lime() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Lime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LimeGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LimeGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Linen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Linen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Magenta() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Magenta(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Maroon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Maroon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumAquamarine() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumAquamarine(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumOrchid() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumOrchid(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumPurple() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumPurple(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumSeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumSeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumSlateBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumSlateBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumSpringGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumSpringGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumTurquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumTurquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumVioletRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumVioletRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MidnightBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MidnightBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MintCream() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MintCream(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MistyRose() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MistyRose(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Moccasin() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Moccasin(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::NavajoWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_NavajoWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Navy() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Navy(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::OldLace() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_OldLace(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Olive() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Olive(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::OliveDrab() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_OliveDrab(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Orange() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Orange(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::OrangeRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_OrangeRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Orchid() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Orchid(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleGoldenrod() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleGoldenrod(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleTurquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleTurquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleVioletRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleVioletRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PapayaWhip() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PapayaWhip(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PeachPuff() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PeachPuff(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Peru() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Peru(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Pink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Pink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Plum() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Plum(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PowderBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PowderBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Purple() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Purple(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Red() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Red(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::RosyBrown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_RosyBrown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::RoyalBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_RoyalBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SaddleBrown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SaddleBrown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Salmon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Salmon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SandyBrown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SandyBrown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SeaShell() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SeaShell(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Sienna() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Sienna(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Silver() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Silver(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SkyBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SkyBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SlateBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SlateBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SlateGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SlateGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Snow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Snow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SpringGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SpringGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SteelBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SteelBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Tan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Tan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Teal() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Teal(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Thistle() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Thistle(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Tomato() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Tomato(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Transparent() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Transparent(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Turquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Turquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Violet() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Violet(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Wheat() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Wheat(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::White() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_White(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::WhiteSmoke() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_WhiteSmoke(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Yellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Yellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::YellowGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_YellowGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IUIContentRoot::UIContext() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IUIContentRoot)->get_UIContext(&value)); + return Windows::UI::UIContext{ value, take_ownership_from_abi }; + } + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b, struct struct_Windows_UI_Color* returnValue) noexcept final try + { + zero_abi(returnValue); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_from(this->shim().FromArgb(a, r, g, b)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall ToDisplayName(struct struct_Windows_UI_Color color, void** returnValue) noexcept final try + { + clear_abi(returnValue); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_from(this->shim().ToDisplayName(*reinterpret_cast(&color))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_AliceBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AliceBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_AntiqueWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AntiqueWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Aqua(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Aqua()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Aquamarine(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Aquamarine()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Azure(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Azure()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Beige(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Beige()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Bisque(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Bisque()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Black(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Black()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BlanchedAlmond(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BlanchedAlmond()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Blue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Blue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BlueViolet(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BlueViolet()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Brown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Brown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BurlyWood(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BurlyWood()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CadetBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CadetBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Chartreuse(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Chartreuse()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Chocolate(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Chocolate()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Coral(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Coral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CornflowerBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CornflowerBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Cornsilk(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Cornsilk()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Crimson(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Crimson()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Cyan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Cyan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkCyan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkCyan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkGoldenrod(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkGoldenrod()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkKhaki(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkKhaki()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkMagenta(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkMagenta()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkOliveGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkOliveGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkOrange(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkOrange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkOrchid(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkOrchid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSalmon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSalmon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSlateBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSlateBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSlateGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSlateGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkTurquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkTurquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkViolet(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkViolet()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeepPink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeepPink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeepSkyBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeepSkyBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DimGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DimGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DodgerBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DodgerBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Firebrick(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Firebrick()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_FloralWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().FloralWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ForestGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ForestGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Fuchsia(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Fuchsia()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Gainsboro(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Gainsboro()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_GhostWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GhostWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Gold(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Gold()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Goldenrod(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Goldenrod()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Gray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Gray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Green(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Green()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_GreenYellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GreenYellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Honeydew(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Honeydew()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HotPink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HotPink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_IndianRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().IndianRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Indigo(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Indigo()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Ivory(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Ivory()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Khaki(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Khaki()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Lavender(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Lavender()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LavenderBlush(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LavenderBlush()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LawnGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LawnGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LemonChiffon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LemonChiffon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightCoral(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightCoral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightCyan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightCyan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightGoldenrodYellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightGoldenrodYellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightPink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightPink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSalmon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSalmon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSkyBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSkyBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSlateGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSlateGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSteelBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSteelBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightYellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightYellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Lime(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Lime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LimeGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LimeGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Linen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Linen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Magenta(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Magenta()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Maroon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Maroon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumAquamarine(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumAquamarine()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumOrchid(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumOrchid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumPurple(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumPurple()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumSeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumSeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumSlateBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumSlateBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumSpringGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumSpringGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumTurquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumTurquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumVioletRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumVioletRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MidnightBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MidnightBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MintCream(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MintCream()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MistyRose(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MistyRose()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Moccasin(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Moccasin()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NavajoWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NavajoWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Navy(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Navy()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OldLace(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OldLace()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Olive(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Olive()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OliveDrab(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OliveDrab()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Orange(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Orange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OrangeRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OrangeRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Orchid(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Orchid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleGoldenrod(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleGoldenrod()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleTurquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleTurquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleVioletRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleVioletRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PapayaWhip(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PapayaWhip()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PeachPuff(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PeachPuff()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Peru(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Peru()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Pink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Pink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Plum(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Plum()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PowderBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PowderBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Purple(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Purple()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Red(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Red()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RosyBrown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RosyBrown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RoyalBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RoyalBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SaddleBrown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SaddleBrown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Salmon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Salmon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SandyBrown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SandyBrown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SeaShell(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SeaShell()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Sienna(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Sienna()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Silver(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Silver()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SkyBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SkyBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SlateBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SlateBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SlateGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SlateGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Snow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Snow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SpringGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SpringGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SteelBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SteelBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Teal(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Teal()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Thistle(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Thistle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tomato(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tomato()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Transparent(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Transparent()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Turquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Turquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Violet(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Violet()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Wheat(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Wheat()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_White(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().White()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_WhiteSmoke(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().WhiteSmoke()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Yellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Yellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_YellowGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().YellowGreen()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_UIContext(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UIContext()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; +} +namespace winrt::Windows::UI +{ + inline auto ColorHelper::FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) + { + return impl::call_factory([&](auto&& f) { return f.FromArgb(a, r, g, b); }); + } + inline auto ColorHelper::ToDisplayName(Windows::UI::Color const& color) + { + return impl::call_factory([&](auto&& f) { return f.ToDisplayName(color); }); + } + inline auto Colors::AliceBlue() + { + return impl::call_factory([&](auto&& f) { return f.AliceBlue(); }); + } + inline auto Colors::AntiqueWhite() + { + return impl::call_factory([&](auto&& f) { return f.AntiqueWhite(); }); + } + inline auto Colors::Aqua() + { + return impl::call_factory([&](auto&& f) { return f.Aqua(); }); + } + inline auto Colors::Aquamarine() + { + return impl::call_factory([&](auto&& f) { return f.Aquamarine(); }); + } + inline auto Colors::Azure() + { + return impl::call_factory([&](auto&& f) { return f.Azure(); }); + } + inline auto Colors::Beige() + { + return impl::call_factory([&](auto&& f) { return f.Beige(); }); + } + inline auto Colors::Bisque() + { + return impl::call_factory([&](auto&& f) { return f.Bisque(); }); + } + inline auto Colors::Black() + { + return impl::call_factory([&](auto&& f) { return f.Black(); }); + } + inline auto Colors::BlanchedAlmond() + { + return impl::call_factory([&](auto&& f) { return f.BlanchedAlmond(); }); + } + inline auto Colors::Blue() + { + return impl::call_factory([&](auto&& f) { return f.Blue(); }); + } + inline auto Colors::BlueViolet() + { + return impl::call_factory([&](auto&& f) { return f.BlueViolet(); }); + } + inline auto Colors::Brown() + { + return impl::call_factory([&](auto&& f) { return f.Brown(); }); + } + inline auto Colors::BurlyWood() + { + return impl::call_factory([&](auto&& f) { return f.BurlyWood(); }); + } + inline auto Colors::CadetBlue() + { + return impl::call_factory([&](auto&& f) { return f.CadetBlue(); }); + } + inline auto Colors::Chartreuse() + { + return impl::call_factory([&](auto&& f) { return f.Chartreuse(); }); + } + inline auto Colors::Chocolate() + { + return impl::call_factory([&](auto&& f) { return f.Chocolate(); }); + } + inline auto Colors::Coral() + { + return impl::call_factory([&](auto&& f) { return f.Coral(); }); + } + inline auto Colors::CornflowerBlue() + { + return impl::call_factory([&](auto&& f) { return f.CornflowerBlue(); }); + } + inline auto Colors::Cornsilk() + { + return impl::call_factory([&](auto&& f) { return f.Cornsilk(); }); + } + inline auto Colors::Crimson() + { + return impl::call_factory([&](auto&& f) { return f.Crimson(); }); + } + inline auto Colors::Cyan() + { + return impl::call_factory([&](auto&& f) { return f.Cyan(); }); + } + inline auto Colors::DarkBlue() + { + return impl::call_factory([&](auto&& f) { return f.DarkBlue(); }); + } + inline auto Colors::DarkCyan() + { + return impl::call_factory([&](auto&& f) { return f.DarkCyan(); }); + } + inline auto Colors::DarkGoldenrod() + { + return impl::call_factory([&](auto&& f) { return f.DarkGoldenrod(); }); + } + inline auto Colors::DarkGray() + { + return impl::call_factory([&](auto&& f) { return f.DarkGray(); }); + } + inline auto Colors::DarkGreen() + { + return impl::call_factory([&](auto&& f) { return f.DarkGreen(); }); + } + inline auto Colors::DarkKhaki() + { + return impl::call_factory([&](auto&& f) { return f.DarkKhaki(); }); + } + inline auto Colors::DarkMagenta() + { + return impl::call_factory([&](auto&& f) { return f.DarkMagenta(); }); + } + inline auto Colors::DarkOliveGreen() + { + return impl::call_factory([&](auto&& f) { return f.DarkOliveGreen(); }); + } + inline auto Colors::DarkOrange() + { + return impl::call_factory([&](auto&& f) { return f.DarkOrange(); }); + } + inline auto Colors::DarkOrchid() + { + return impl::call_factory([&](auto&& f) { return f.DarkOrchid(); }); + } + inline auto Colors::DarkRed() + { + return impl::call_factory([&](auto&& f) { return f.DarkRed(); }); + } + inline auto Colors::DarkSalmon() + { + return impl::call_factory([&](auto&& f) { return f.DarkSalmon(); }); + } + inline auto Colors::DarkSeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.DarkSeaGreen(); }); + } + inline auto Colors::DarkSlateBlue() + { + return impl::call_factory([&](auto&& f) { return f.DarkSlateBlue(); }); + } + inline auto Colors::DarkSlateGray() + { + return impl::call_factory([&](auto&& f) { return f.DarkSlateGray(); }); + } + inline auto Colors::DarkTurquoise() + { + return impl::call_factory([&](auto&& f) { return f.DarkTurquoise(); }); + } + inline auto Colors::DarkViolet() + { + return impl::call_factory([&](auto&& f) { return f.DarkViolet(); }); + } + inline auto Colors::DeepPink() + { + return impl::call_factory([&](auto&& f) { return f.DeepPink(); }); + } + inline auto Colors::DeepSkyBlue() + { + return impl::call_factory([&](auto&& f) { return f.DeepSkyBlue(); }); + } + inline auto Colors::DimGray() + { + return impl::call_factory([&](auto&& f) { return f.DimGray(); }); + } + inline auto Colors::DodgerBlue() + { + return impl::call_factory([&](auto&& f) { return f.DodgerBlue(); }); + } + inline auto Colors::Firebrick() + { + return impl::call_factory([&](auto&& f) { return f.Firebrick(); }); + } + inline auto Colors::FloralWhite() + { + return impl::call_factory([&](auto&& f) { return f.FloralWhite(); }); + } + inline auto Colors::ForestGreen() + { + return impl::call_factory([&](auto&& f) { return f.ForestGreen(); }); + } + inline auto Colors::Fuchsia() + { + return impl::call_factory([&](auto&& f) { return f.Fuchsia(); }); + } + inline auto Colors::Gainsboro() + { + return impl::call_factory([&](auto&& f) { return f.Gainsboro(); }); + } + inline auto Colors::GhostWhite() + { + return impl::call_factory([&](auto&& f) { return f.GhostWhite(); }); + } + inline auto Colors::Gold() + { + return impl::call_factory([&](auto&& f) { return f.Gold(); }); + } + inline auto Colors::Goldenrod() + { + return impl::call_factory([&](auto&& f) { return f.Goldenrod(); }); + } + inline auto Colors::Gray() + { + return impl::call_factory([&](auto&& f) { return f.Gray(); }); + } + inline auto Colors::Green() + { + return impl::call_factory([&](auto&& f) { return f.Green(); }); + } + inline auto Colors::GreenYellow() + { + return impl::call_factory([&](auto&& f) { return f.GreenYellow(); }); + } + inline auto Colors::Honeydew() + { + return impl::call_factory([&](auto&& f) { return f.Honeydew(); }); + } + inline auto Colors::HotPink() + { + return impl::call_factory([&](auto&& f) { return f.HotPink(); }); + } + inline auto Colors::IndianRed() + { + return impl::call_factory([&](auto&& f) { return f.IndianRed(); }); + } + inline auto Colors::Indigo() + { + return impl::call_factory([&](auto&& f) { return f.Indigo(); }); + } + inline auto Colors::Ivory() + { + return impl::call_factory([&](auto&& f) { return f.Ivory(); }); + } + inline auto Colors::Khaki() + { + return impl::call_factory([&](auto&& f) { return f.Khaki(); }); + } + inline auto Colors::Lavender() + { + return impl::call_factory([&](auto&& f) { return f.Lavender(); }); + } + inline auto Colors::LavenderBlush() + { + return impl::call_factory([&](auto&& f) { return f.LavenderBlush(); }); + } + inline auto Colors::LawnGreen() + { + return impl::call_factory([&](auto&& f) { return f.LawnGreen(); }); + } + inline auto Colors::LemonChiffon() + { + return impl::call_factory([&](auto&& f) { return f.LemonChiffon(); }); + } + inline auto Colors::LightBlue() + { + return impl::call_factory([&](auto&& f) { return f.LightBlue(); }); + } + inline auto Colors::LightCoral() + { + return impl::call_factory([&](auto&& f) { return f.LightCoral(); }); + } + inline auto Colors::LightCyan() + { + return impl::call_factory([&](auto&& f) { return f.LightCyan(); }); + } + inline auto Colors::LightGoldenrodYellow() + { + return impl::call_factory([&](auto&& f) { return f.LightGoldenrodYellow(); }); + } + inline auto Colors::LightGreen() + { + return impl::call_factory([&](auto&& f) { return f.LightGreen(); }); + } + inline auto Colors::LightGray() + { + return impl::call_factory([&](auto&& f) { return f.LightGray(); }); + } + inline auto Colors::LightPink() + { + return impl::call_factory([&](auto&& f) { return f.LightPink(); }); + } + inline auto Colors::LightSalmon() + { + return impl::call_factory([&](auto&& f) { return f.LightSalmon(); }); + } + inline auto Colors::LightSeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.LightSeaGreen(); }); + } + inline auto Colors::LightSkyBlue() + { + return impl::call_factory([&](auto&& f) { return f.LightSkyBlue(); }); + } + inline auto Colors::LightSlateGray() + { + return impl::call_factory([&](auto&& f) { return f.LightSlateGray(); }); + } + inline auto Colors::LightSteelBlue() + { + return impl::call_factory([&](auto&& f) { return f.LightSteelBlue(); }); + } + inline auto Colors::LightYellow() + { + return impl::call_factory([&](auto&& f) { return f.LightYellow(); }); + } + inline auto Colors::Lime() + { + return impl::call_factory([&](auto&& f) { return f.Lime(); }); + } + inline auto Colors::LimeGreen() + { + return impl::call_factory([&](auto&& f) { return f.LimeGreen(); }); + } + inline auto Colors::Linen() + { + return impl::call_factory([&](auto&& f) { return f.Linen(); }); + } + inline auto Colors::Magenta() + { + return impl::call_factory([&](auto&& f) { return f.Magenta(); }); + } + inline auto Colors::Maroon() + { + return impl::call_factory([&](auto&& f) { return f.Maroon(); }); + } + inline auto Colors::MediumAquamarine() + { + return impl::call_factory([&](auto&& f) { return f.MediumAquamarine(); }); + } + inline auto Colors::MediumBlue() + { + return impl::call_factory([&](auto&& f) { return f.MediumBlue(); }); + } + inline auto Colors::MediumOrchid() + { + return impl::call_factory([&](auto&& f) { return f.MediumOrchid(); }); + } + inline auto Colors::MediumPurple() + { + return impl::call_factory([&](auto&& f) { return f.MediumPurple(); }); + } + inline auto Colors::MediumSeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.MediumSeaGreen(); }); + } + inline auto Colors::MediumSlateBlue() + { + return impl::call_factory([&](auto&& f) { return f.MediumSlateBlue(); }); + } + inline auto Colors::MediumSpringGreen() + { + return impl::call_factory([&](auto&& f) { return f.MediumSpringGreen(); }); + } + inline auto Colors::MediumTurquoise() + { + return impl::call_factory([&](auto&& f) { return f.MediumTurquoise(); }); + } + inline auto Colors::MediumVioletRed() + { + return impl::call_factory([&](auto&& f) { return f.MediumVioletRed(); }); + } + inline auto Colors::MidnightBlue() + { + return impl::call_factory([&](auto&& f) { return f.MidnightBlue(); }); + } + inline auto Colors::MintCream() + { + return impl::call_factory([&](auto&& f) { return f.MintCream(); }); + } + inline auto Colors::MistyRose() + { + return impl::call_factory([&](auto&& f) { return f.MistyRose(); }); + } + inline auto Colors::Moccasin() + { + return impl::call_factory([&](auto&& f) { return f.Moccasin(); }); + } + inline auto Colors::NavajoWhite() + { + return impl::call_factory([&](auto&& f) { return f.NavajoWhite(); }); + } + inline auto Colors::Navy() + { + return impl::call_factory([&](auto&& f) { return f.Navy(); }); + } + inline auto Colors::OldLace() + { + return impl::call_factory([&](auto&& f) { return f.OldLace(); }); + } + inline auto Colors::Olive() + { + return impl::call_factory([&](auto&& f) { return f.Olive(); }); + } + inline auto Colors::OliveDrab() + { + return impl::call_factory([&](auto&& f) { return f.OliveDrab(); }); + } + inline auto Colors::Orange() + { + return impl::call_factory([&](auto&& f) { return f.Orange(); }); + } + inline auto Colors::OrangeRed() + { + return impl::call_factory([&](auto&& f) { return f.OrangeRed(); }); + } + inline auto Colors::Orchid() + { + return impl::call_factory([&](auto&& f) { return f.Orchid(); }); + } + inline auto Colors::PaleGoldenrod() + { + return impl::call_factory([&](auto&& f) { return f.PaleGoldenrod(); }); + } + inline auto Colors::PaleGreen() + { + return impl::call_factory([&](auto&& f) { return f.PaleGreen(); }); + } + inline auto Colors::PaleTurquoise() + { + return impl::call_factory([&](auto&& f) { return f.PaleTurquoise(); }); + } + inline auto Colors::PaleVioletRed() + { + return impl::call_factory([&](auto&& f) { return f.PaleVioletRed(); }); + } + inline auto Colors::PapayaWhip() + { + return impl::call_factory([&](auto&& f) { return f.PapayaWhip(); }); + } + inline auto Colors::PeachPuff() + { + return impl::call_factory([&](auto&& f) { return f.PeachPuff(); }); + } + inline auto Colors::Peru() + { + return impl::call_factory([&](auto&& f) { return f.Peru(); }); + } + inline auto Colors::Pink() + { + return impl::call_factory([&](auto&& f) { return f.Pink(); }); + } + inline auto Colors::Plum() + { + return impl::call_factory([&](auto&& f) { return f.Plum(); }); + } + inline auto Colors::PowderBlue() + { + return impl::call_factory([&](auto&& f) { return f.PowderBlue(); }); + } + inline auto Colors::Purple() + { + return impl::call_factory([&](auto&& f) { return f.Purple(); }); + } + inline auto Colors::Red() + { + return impl::call_factory([&](auto&& f) { return f.Red(); }); + } + inline auto Colors::RosyBrown() + { + return impl::call_factory([&](auto&& f) { return f.RosyBrown(); }); + } + inline auto Colors::RoyalBlue() + { + return impl::call_factory([&](auto&& f) { return f.RoyalBlue(); }); + } + inline auto Colors::SaddleBrown() + { + return impl::call_factory([&](auto&& f) { return f.SaddleBrown(); }); + } + inline auto Colors::Salmon() + { + return impl::call_factory([&](auto&& f) { return f.Salmon(); }); + } + inline auto Colors::SandyBrown() + { + return impl::call_factory([&](auto&& f) { return f.SandyBrown(); }); + } + inline auto Colors::SeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.SeaGreen(); }); + } + inline auto Colors::SeaShell() + { + return impl::call_factory([&](auto&& f) { return f.SeaShell(); }); + } + inline auto Colors::Sienna() + { + return impl::call_factory([&](auto&& f) { return f.Sienna(); }); + } + inline auto Colors::Silver() + { + return impl::call_factory([&](auto&& f) { return f.Silver(); }); + } + inline auto Colors::SkyBlue() + { + return impl::call_factory([&](auto&& f) { return f.SkyBlue(); }); + } + inline auto Colors::SlateBlue() + { + return impl::call_factory([&](auto&& f) { return f.SlateBlue(); }); + } + inline auto Colors::SlateGray() + { + return impl::call_factory([&](auto&& f) { return f.SlateGray(); }); + } + inline auto Colors::Snow() + { + return impl::call_factory([&](auto&& f) { return f.Snow(); }); + } + inline auto Colors::SpringGreen() + { + return impl::call_factory([&](auto&& f) { return f.SpringGreen(); }); + } + inline auto Colors::SteelBlue() + { + return impl::call_factory([&](auto&& f) { return f.SteelBlue(); }); + } + inline auto Colors::Tan() + { + return impl::call_factory([&](auto&& f) { return f.Tan(); }); + } + inline auto Colors::Teal() + { + return impl::call_factory([&](auto&& f) { return f.Teal(); }); + } + inline auto Colors::Thistle() + { + return impl::call_factory([&](auto&& f) { return f.Thistle(); }); + } + inline auto Colors::Tomato() + { + return impl::call_factory([&](auto&& f) { return f.Tomato(); }); + } + inline auto Colors::Transparent() + { + return impl::call_factory([&](auto&& f) { return f.Transparent(); }); + } + inline auto Colors::Turquoise() + { + return impl::call_factory([&](auto&& f) { return f.Turquoise(); }); + } + inline auto Colors::Violet() + { + return impl::call_factory([&](auto&& f) { return f.Violet(); }); + } + inline auto Colors::Wheat() + { + return impl::call_factory([&](auto&& f) { return f.Wheat(); }); + } + inline auto Colors::White() + { + return impl::call_factory([&](auto&& f) { return f.White(); }); + } + inline auto Colors::WhiteSmoke() + { + return impl::call_factory([&](auto&& f) { return f.WhiteSmoke(); }); + } + inline auto Colors::Yellow() + { + return impl::call_factory([&](auto&& f) { return f.Yellow(); }); + } + inline auto Colors::YellowGreen() + { + return impl::call_factory([&](auto&& f) { return f.YellowGreen(); }); + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h new file mode 100644 index 000000000..e68a81677 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h @@ -0,0 +1,8109 @@ +// C++/WinRT v2.0.190620.2 +// Patched with YoloRT + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright © 2021, mjk +// Licensed under the MIT License. + +#ifndef WINRT_BASE_H +#define WINRT_BASE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __has_include() +#define WINRT_NUMERICS +#if __has_include() +// mingw 6.0.0 headers don't have this and it *seems* unused in winrt, but +// leaving it in just in case: +#include +#endif +#define _WINDOWS_NUMERICS_NAMESPACE_ winrt::Windows::Foundation::Numerics +#define _WINDOWS_NUMERICS_BEGIN_NAMESPACE_ namespace winrt::Windows::Foundation::Numerics +#define _WINDOWS_NUMERICS_END_NAMESPACE_ +#ifdef __clang__ +#define _XM_NO_INTRINSICS_ +#endif +#include +#ifdef __clang__ +#undef _XM_NO_INTRINSICS_ +#endif +#undef _WINDOWS_NUMERICS_NAMESPACE_ +#undef _WINDOWS_NUMERICS_BEGIN_NAMESPACE_ +#undef _WINDOWS_NUMERICS_END_NAMESPACE_ +#endif + +#ifdef __cpp_lib_coroutine + +#include +#define _RESUMABLE_FUNCTIONS_SUPPORTED + +namespace winrt::impl +{ + template + using coroutine_handle = std::coroutine_handle; + + using suspend_always = std::suspend_always; + using suspend_never = std::suspend_never; +} + +#elif __has_include() + +#include +#define _RESUMABLE_FUNCTIONS_SUPPORTED + +namespace winrt::impl +{ + // the spaces after `::` protect against the evils of sed: + + template + using coroutine_handle = std::experimental:: coroutine_handle; + + using suspend_always = std::experimental:: suspend_always; + using suspend_never = std::experimental:: suspend_never; +} + +#else + +#include + +namespace winrt::impl +{ + template + using coroutine_handle = corostub::coroutine_handle; + + using suspend_always = corostub::suspend_always; + using suspend_never = corostub::suspend_never; +} + +#endif + +#ifdef _DEBUG + +#define WINRT_ASSERT _ASSERTE +#define WINRT_VERIFY WINRT_ASSERT +#define WINRT_VERIFY_(result, expression) WINRT_ASSERT(result == expression) + +#else + +#define WINRT_ASSERT(expression) ((void)0) +#define WINRT_VERIFY(expression) (void)(expression) +#define WINRT_VERIFY_(result, expression) (void)(expression) + +#endif + +#define WINRT_IMPL_SHIM(...) (*(abi_t<__VA_ARGS__>**)&static_cast<__VA_ARGS__ const&>(static_cast(*this))) + +#ifndef WINRT_EXTERNAL_CATCH_CLAUSE +#define WINRT_EXTERNAL_CATCH_CLAUSE +#endif + +// Note: this is a workaround for a false-positive warning produced by the Visual C++ 15.9 compiler. +#pragma warning(disable : 5046) + +namespace winrt::impl +{ +#ifdef __IUnknown_INTERFACE_DEFINED__ +#define WINRT_WINDOWS_ABI + using hresult_type = long; + using ref_count_type = unsigned long; +#else + using hresult_type = int32_t; + using ref_count_type = uint32_t; +#endif + + using ptp_io = struct tp_io*; + using ptp_timer = struct tp_timer*; + using ptp_wait = struct tp_wait*; + using ptp_pool = struct tp_pool*; + using srwlock = struct srwlock_*; + using condition_variable = struct condition_variable_*; + using bstr = wchar_t*; +} + +namespace winrt +{ + struct hresult + { + int32_t value{}; + + constexpr hresult() noexcept = default; + + constexpr hresult(int32_t const value) noexcept : value(value) + { + } + + constexpr operator int32_t() const noexcept + { + return value; + } + }; + + struct guid + { + uint32_t Data1; + uint16_t Data2; + uint16_t Data3; + uint8_t Data4[8]; + + guid() noexcept = default; + + constexpr guid(uint32_t const Data1, uint16_t const Data2, uint16_t const Data3, std::array const& Data4) noexcept : + Data1(Data1), + Data2(Data2), + Data3(Data3), + Data4{ Data4[0], Data4[1], Data4[2], Data4[3], Data4[4], Data4[5], Data4[6], Data4[7] } + { + } + +#ifdef WINRT_WINDOWS_ABI + + constexpr guid(GUID const& value) noexcept : + Data1(value.Data1), + Data2(value.Data2), + Data3(value.Data3), + Data4{ value.Data4[0], value.Data4[1], value.Data4[2], value.Data4[3], value.Data4[4], value.Data4[5], value.Data4[6], value.Data4[7] } + { + + } + + operator GUID const&() const noexcept + { + return reinterpret_cast(*this); + } + +#endif + }; + + inline bool operator==(guid const& left, guid const& right) noexcept + { + return !memcmp(&left, &right, sizeof(guid)); + } + + inline bool operator!=(guid const& left, guid const& right) noexcept + { + return !(left == right); + } +} + +namespace winrt::Windows::Foundation +{ + enum class TrustLevel : int32_t + { + BaseTrust, + PartialTrust, + FullTrust + }; + + struct IUnknown; + struct IInspectable; + struct IActivationFactory; +} + + +namespace winrt { +extern "C" +{ + int32_t __stdcall GetRestrictedErrorInfo(void** info) noexcept; + int32_t __stdcall RoGetActivationFactory(void* classId, winrt::guid const& iid, void** factory) noexcept; + int32_t __stdcall RoInitialize(uint32_t type) noexcept; + int32_t __stdcall RoOriginateLanguageException(int32_t error, void* message, void* exception) noexcept; + void __stdcall RoUninitialize() noexcept; + int32_t __stdcall SetRestrictedErrorInfo(void* info) noexcept; + int32_t __stdcall RoGetAgileReference(uint32_t options, winrt::guid const& iid, void* object, void** reference) noexcept; + inline const auto &CoIncrementMTAUsage = *[] + { + using farproc = void(); + extern void *LoadLibraryW(const wchar_t *) noexcept __stdcall; + extern farproc *GetProcAddress(void *, const char *) noexcept __stdcall; + + using F = int32_t __stdcall(void **) noexcept; + const auto fp = reinterpret_cast(GetProcAddress(LoadLibraryW(L"ole32.dll"),"CoIncrementMTAUsage")); + if (not fp) + throw std::runtime_error{"couldn't load CoIncrementMTAUsage from ole32.dll"}; + return fp; + }(); + [[noreturn]] void __stdcall RoFailFastWithErrorContext(int32_t error) noexcept; + int32_t __stdcall RoTransformError(int32_t oldError, int32_t newError, void* message) noexcept; + + int32_t __stdcall WindowsCreateString(wchar_t const* sourceString, uint32_t length, void** string) noexcept; + int32_t __stdcall WindowsCreateStringReference(wchar_t const* sourceString, uint32_t length, void* hstringHeader, void** string) noexcept; + int32_t __stdcall WindowsDuplicateString(void* string, void** newString) noexcept; + int32_t __stdcall WindowsDeleteString(void* string) noexcept; + int32_t __stdcall WindowsStringHasEmbeddedNull(void* string, int* hasEmbedNull) noexcept; + int32_t __stdcall WindowsPreallocateStringBuffer(uint32_t length, wchar_t** charBuffer, void** bufferHandle) noexcept; + int32_t __stdcall WindowsDeleteStringBuffer(void* bufferHandle) noexcept; + int32_t __stdcall WindowsPromoteStringBuffer(void* bufferHandle, void** string) noexcept; + int32_t __stdcall WindowsConcatString(void* string1, void* string2, void** newString) noexcept; + wchar_t const* __stdcall WindowsGetStringRawBuffer(void* string, uint32_t* length) noexcept; + uint32_t __stdcall WindowsGetStringLen(void* string) noexcept; + + int32_t __stdcall CoCreateFreeThreadedMarshaler(void* outer, void** marshaler) noexcept; + int32_t __stdcall CoCreateInstance(winrt::guid const& clsid, void* outer, uint32_t context, winrt::guid const& iid, void** object) noexcept; + int32_t __stdcall CoGetCallContext(winrt::guid const& iid, void** object) noexcept; + int32_t __stdcall CoGetObjectContext(winrt::guid const& iid, void** object) noexcept; + int32_t __stdcall CoGetApartmentType(int32_t* type, int32_t* qualifier) noexcept; + void* __stdcall CoTaskMemAlloc(std::size_t size) noexcept; + void __stdcall CoTaskMemFree(void* ptr) noexcept; + void __stdcall SysFreeString(winrt::impl::bstr string) noexcept; + uint32_t __stdcall SysStringLen(winrt::impl::bstr string) noexcept; + int32_t __stdcall IIDFromString(wchar_t const* string, winrt::guid* iid) noexcept; + int32_t __stdcall MultiByteToWideChar(uint32_t codepage, uint32_t flags, char const* in_string, int32_t in_size, wchar_t* out_string, int32_t out_size) noexcept; + int32_t __stdcall WideCharToMultiByte(uint32_t codepage, uint32_t flags, wchar_t const* int_string, int32_t in_size, char* out_string, int32_t out_size, char const* default_char, int32_t* default_used) noexcept; + int32_t __stdcall HeapFree(void* heap, uint32_t flags, void* value) noexcept; + void* __stdcall GetProcessHeap() noexcept; + uint32_t __stdcall FormatMessageW(uint32_t flags, void const* source, uint32_t code, uint32_t language, wchar_t* buffer, uint32_t size, va_list* arguments) noexcept; + uint32_t __stdcall GetLastError() noexcept; + void __stdcall GetSystemTimePreciseAsFileTime(void* result) noexcept; + + int32_t __stdcall OpenProcessToken(void* process, uint32_t access, void** token) noexcept; + void* __stdcall GetCurrentProcess() noexcept; + int32_t __stdcall DuplicateToken(void* existing, uint32_t level, void** duplicate) noexcept; + int32_t __stdcall OpenThreadToken(void* thread, uint32_t access, int32_t self, void** token) noexcept; + void* __stdcall GetCurrentThread() noexcept; + int32_t __stdcall SetThreadToken(void** thread, void* token) noexcept; + + void __stdcall AcquireSRWLockExclusive(winrt::impl::srwlock* lock) noexcept; + void __stdcall AcquireSRWLockShared(winrt::impl::srwlock* lock) noexcept; + uint8_t __stdcall TryAcquireSRWLockExclusive(winrt::impl::srwlock* lock) noexcept; + uint8_t __stdcall TryAcquireSRWLockShared(winrt::impl::srwlock* lock) noexcept; + void __stdcall ReleaseSRWLockExclusive(winrt::impl::srwlock* lock) noexcept; + void __stdcall ReleaseSRWLockShared(winrt::impl::srwlock* lock) noexcept; + int32_t __stdcall SleepConditionVariableSRW(winrt::impl::condition_variable* cv, winrt::impl::srwlock* lock, uint32_t milliseconds, uint32_t flags) noexcept; + void __stdcall WakeConditionVariable(winrt::impl::condition_variable* cv) noexcept; + void __stdcall WakeAllConditionVariable(winrt::impl::condition_variable* cv) noexcept; + void* __stdcall InterlockedPushEntrySList(void* head, void* entry) noexcept; + void* __stdcall InterlockedFlushSList(void* head) noexcept; + + void* __stdcall CreateEventW(void*, int32_t, int32_t, void*) noexcept; + int32_t __stdcall SetEvent(void*) noexcept; + int32_t __stdcall CloseHandle(void* hObject) noexcept; + uint32_t __stdcall WaitForSingleObject(void* handle, uint32_t milliseconds) noexcept; + + int32_t __stdcall TrySubmitThreadpoolCallback(void(__stdcall *callback)(void*, void* context), void* context, void*) noexcept; + winrt::impl::ptp_timer __stdcall CreateThreadpoolTimer(void(__stdcall *callback)(void*, void* context, void*), void* context, void*) noexcept; + void __stdcall SetThreadpoolTimer(winrt::impl::ptp_timer timer, void* time, uint32_t period, uint32_t window) noexcept; + void __stdcall CloseThreadpoolTimer(winrt::impl::ptp_timer timer) noexcept; + winrt::impl::ptp_wait __stdcall CreateThreadpoolWait(void(__stdcall *callback)(void*, void* context, void*, uint32_t result), void* context, void*) noexcept; + void __stdcall SetThreadpoolWait(winrt::impl::ptp_wait wait, void* handle, void* timeout) noexcept; + void __stdcall CloseThreadpoolWait(winrt::impl::ptp_wait wait) noexcept; + winrt::impl::ptp_io __stdcall CreateThreadpoolIo(void* object, void(__stdcall *callback)(void*, void* context, void* overlapped, uint32_t result, std::size_t bytes, void*) noexcept, void* context, void*) noexcept; + void __stdcall StartThreadpoolIo(winrt::impl::ptp_io io) noexcept; + void __stdcall CancelThreadpoolIo(winrt::impl::ptp_io io) noexcept; + void __stdcall CloseThreadpoolIo(winrt::impl::ptp_io io) noexcept; + winrt::impl::ptp_pool __stdcall CreateThreadpool(void* reserved) noexcept; + void __stdcall SetThreadpoolThreadMaximum(winrt::impl::ptp_pool pool, uint32_t value) noexcept; + int32_t __stdcall SetThreadpoolThreadMinimum(winrt::impl::ptp_pool pool, uint32_t value) noexcept; + void __stdcall CloseThreadpool(winrt::impl::ptp_pool pool) noexcept; + + int32_t __stdcall WINRT_CanUnloadNow() noexcept; + int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noexcept; +} +} // namespace winrt + +#ifdef _M_HYBRID +#define WINRT_IMPL_LINK(function, count) __pragma(comment(linker, "/alternatename:#WINRT_" #function "@" #count "=#" #function "@" #count)) +#elif _M_IX86 +#define WINRT_IMPL_LINK(function, count) __pragma(comment(linker, "/alternatename:_WINRT_" #function "@" #count "=_" #function "@" #count)) +#else +#define WINRT_IMPL_LINK(function, count) __pragma(comment(linker, "/alternatename:WINRT_" #function "=" #function)) +#endif + +WINRT_IMPL_LINK(GetRestrictedErrorInfo, 4) +WINRT_IMPL_LINK(RoGetActivationFactory, 12) +WINRT_IMPL_LINK(RoInitialize, 4) +WINRT_IMPL_LINK(RoOriginateLanguageException, 12) +WINRT_IMPL_LINK(RoUninitialize, 0) +WINRT_IMPL_LINK(SetRestrictedErrorInfo, 4) +WINRT_IMPL_LINK(RoGetAgileReference, 16) +WINRT_IMPL_LINK(CoIncrementMTAUsage, 4) +WINRT_IMPL_LINK(RoFailFastWithErrorContext, 4) +WINRT_IMPL_LINK(RoTransformError, 12) + +WINRT_IMPL_LINK(WindowsCreateString, 12) +WINRT_IMPL_LINK(WindowsCreateStringReference, 16) +WINRT_IMPL_LINK(WindowsDuplicateString, 8) +WINRT_IMPL_LINK(WindowsDeleteString, 4) +WINRT_IMPL_LINK(WindowsStringHasEmbeddedNull, 8) +WINRT_IMPL_LINK(WindowsPreallocateStringBuffer, 12) +WINRT_IMPL_LINK(WindowsDeleteStringBuffer, 4) +WINRT_IMPL_LINK(WindowsPromoteStringBuffer, 8) +WINRT_IMPL_LINK(WindowsConcatString, 12) +WINRT_IMPL_LINK(WindowsGetStringRawBuffer, 8) +WINRT_IMPL_LINK(WindowsGetStringLen, 4) + +WINRT_IMPL_LINK(CoCreateFreeThreadedMarshaler, 8) +WINRT_IMPL_LINK(CoCreateInstance, 20) +WINRT_IMPL_LINK(CoGetCallContext, 8) +WINRT_IMPL_LINK(CoGetObjectContext, 8) +WINRT_IMPL_LINK(CoGetApartmentType, 8) +WINRT_IMPL_LINK(CoTaskMemAlloc, 4) +WINRT_IMPL_LINK(CoTaskMemFree, 4) +WINRT_IMPL_LINK(SysFreeString, 4) +WINRT_IMPL_LINK(SysStringLen, 4) +WINRT_IMPL_LINK(IIDFromString, 8) +WINRT_IMPL_LINK(MultiByteToWideChar, 24) +WINRT_IMPL_LINK(WideCharToMultiByte, 32) +WINRT_IMPL_LINK(HeapFree, 12) +WINRT_IMPL_LINK(GetProcessHeap, 0) +WINRT_IMPL_LINK(FormatMessageW, 28) +WINRT_IMPL_LINK(GetLastError, 0) +WINRT_IMPL_LINK(GetSystemTimePreciseAsFileTime, 4) + +WINRT_IMPL_LINK(OpenProcessToken, 12) +WINRT_IMPL_LINK(GetCurrentProcess, 0) +WINRT_IMPL_LINK(DuplicateToken, 12) +WINRT_IMPL_LINK(OpenThreadToken, 16) +WINRT_IMPL_LINK(GetCurrentThread, 0) +WINRT_IMPL_LINK(SetThreadToken, 8) + +WINRT_IMPL_LINK(AcquireSRWLockExclusive, 4) +WINRT_IMPL_LINK(AcquireSRWLockShared, 4) +WINRT_IMPL_LINK(TryAcquireSRWLockExclusive, 4) +WINRT_IMPL_LINK(TryAcquireSRWLockShared, 4) +WINRT_IMPL_LINK(ReleaseSRWLockExclusive, 4) +WINRT_IMPL_LINK(ReleaseSRWLockShared, 4) +WINRT_IMPL_LINK(SleepConditionVariableSRW, 16) +WINRT_IMPL_LINK(WakeConditionVariable, 4) +WINRT_IMPL_LINK(WakeAllConditionVariable, 4) +WINRT_IMPL_LINK(InterlockedPushEntrySList, 8) +WINRT_IMPL_LINK(InterlockedFlushSList, 4) + +WINRT_IMPL_LINK(CreateEventW, 16) +WINRT_IMPL_LINK(SetEvent, 4) +WINRT_IMPL_LINK(CloseHandle, 4) +WINRT_IMPL_LINK(WaitForSingleObject, 8) + +WINRT_IMPL_LINK(TrySubmitThreadpoolCallback, 12) +WINRT_IMPL_LINK(CreateThreadpoolTimer, 12) +WINRT_IMPL_LINK(SetThreadpoolTimer, 16) +WINRT_IMPL_LINK(CloseThreadpoolTimer, 4) +WINRT_IMPL_LINK(CreateThreadpoolWait, 12) +WINRT_IMPL_LINK(SetThreadpoolWait, 12) +WINRT_IMPL_LINK(CloseThreadpoolWait, 4) +WINRT_IMPL_LINK(CreateThreadpoolIo, 16) +WINRT_IMPL_LINK(StartThreadpoolIo, 4) +WINRT_IMPL_LINK(CancelThreadpoolIo, 4) +WINRT_IMPL_LINK(CloseThreadpoolIo, 4) +WINRT_IMPL_LINK(CreateThreadpool, 4) +WINRT_IMPL_LINK(SetThreadpoolThreadMaximum, 8) +WINRT_IMPL_LINK(SetThreadpoolThreadMinimum, 8) +WINRT_IMPL_LINK(CloseThreadpool, 4) + +#undef WINRT_IMPL_LINK + +namespace winrt +{ + void check_hresult(hresult const result); + hresult to_hresult() noexcept; + + template + D* get_self(I const& from) noexcept; + + struct take_ownership_from_abi_t {}; + inline constexpr take_ownership_from_abi_t take_ownership_from_abi{}; + + template + struct com_ptr; + + namespace param + { + template + struct iterable; + + template + struct async_iterable; + + template + struct map_view; + + template + struct async_map_view; + + template + struct map; + + template + struct vector_view; + + template + struct async_vector_view; + + template + struct vector; + } +} + +namespace winrt::impl +{ + using namespace std::literals; + + template + void blocking_suspend(Async const& async); + + template + struct reference_traits; + + template + struct identity + { + using type = T; + }; + + template + struct abi + { + using type = T; + }; + + template + struct abi>> + { + using type = std::underlying_type_t; + }; + + template + using abi_t = typename abi::type; + + template + struct consume; + + template + using consume_t = typename consume::template type; + + template + struct delegate; + + template > + struct default_interface + { + using type = T; + }; + + struct basic_category; + struct interface_category; + struct delegate_category; + struct enum_category; + struct class_category; + + template + struct category + { + using type = void; + }; + + template + using category_t = typename category::type; + + template + inline constexpr bool has_category_v = !std::is_same_v, void>; + + template + struct pinterface_category; + + template + struct struct_category; + + template + struct category_signature; + + template + struct signature + { + static constexpr auto data{ category_signature::type, T>::data }; + }; + + template + struct missing_guid_of + { + static constexpr bool value{}; + }; + + template + struct missing_guid + { + static_assert(missing_guid_of::value, "Support for non-WinRT interfaces is disabled. To enable, simply #include before any C++/WinRT headers."); + }; + +#ifdef WINRT_WINDOWS_ABI + template + struct guid_storage + { + static constexpr guid value{ __uuidof(T) }; + }; +#else + template + struct guid_storage : missing_guid {}; +#endif + + template + constexpr auto to_underlying_type(T const value) noexcept + { + return static_cast>(value); + } + + template > + struct is_implements : std::false_type {}; + + template + struct is_implements> : std::true_type {}; + + template + inline constexpr bool is_implements_v = is_implements::value; + + template + struct require_one : consume_t + { + operator I() const noexcept + { + return static_cast(this)->template try_as(); + } + }; + + template + struct __declspec(empty_bases) require : require_one... + {}; + + template + struct base_one + { + operator I() const noexcept + { + return static_cast(this)->template try_as(); + } + }; + + template + struct __declspec(empty_bases) base : base_one... + {}; + + template + T empty_value() noexcept + { + if constexpr (std::is_base_of_v) + { + return nullptr; + } + else + { + return {}; + } + } + + template + struct arg + { + using in = abi_t; + }; + + template + struct arg>> + { + using in = void*; + }; + + template + using arg_in = typename arg::in; + + template + using arg_out = arg_in*; + + template + struct produce_base; + + template + struct produce : produce_base + { + }; + + template + struct wrapped_type + { + using type = T; + }; + + template + struct wrapped_type> + { + using type = T; + }; + + template + using wrapped_type_t = typename wrapped_type::type; + + template