Changeset 76012 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 6, 2018 12:08:52 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r75763 r76012 197 197 if "$(KBUILD_TYPE)" != "release" || defined(VBOX_GUI_WITH_EXTRADATA_MANAGER_UI) 198 198 VirtualBox_DEFS += VBOX_GUI_WITH_EXTRADATA_MANAGER_UI 199 endif 200 ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 201 VirtualBox_DEFS += VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 199 202 endif 200 203 … … 267 270 VirtualBoxVM_DEFS += VBOX_GUI_WITH_EXTRADATA_MANAGER_UI 268 271 endif 272 ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 273 VirtualBoxVM_DEFS += VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 274 endif 269 275 270 276 … … 275 281 VBoxGlobal_NAME = VBoxGlobal 276 282 VBoxGlobal_DEFS = 277 VBoxGlobal_DEFS 283 VBoxGlobal_DEFS += VBOX_GUI_LIBRARY 278 284 VBoxGlobal_DEFS.darwin = VBOX_WS_MAC 279 285 VBoxGlobal_DEFS.freebsd = VBOX_WS_X11 … … 322 328 if "$(KBUILD_TYPE)" != "release" || defined(VBOX_GUI_WITH_GUEST_CONTROL_UI) 323 329 VBoxGlobal_DEFS += VBOX_GUI_WITH_GUEST_CONTROL_UI 330 endif 331 ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 332 VBoxGlobal_DEFS += VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 324 333 endif 325 334 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
r74878 r76012 701 701 } 702 702 703 #ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 704 virtual IID const &getIID() const = 0; 705 #else 706 IID const &getIID() const { return COM_IIDOF(I); } 707 #endif 708 703 709 // utility methods 704 710 void createInstance(const CLSID &aClsId) … … 709 715 I* pObj = NULL; 710 716 #if !defined(VBOX_WITH_XPCOM) 711 B::mRC = CoCreateInstance(aClsId, NULL, CLSCTX_ALL, 712 COM_IIDOF(I), (void **)&pObj); 717 B::mRC = CoCreateInstance(aClsId, NULL, CLSCTX_ALL, getIID(), (void **)&pObj); 713 718 #else 714 719 nsCOMPtr<nsIComponentManager> manager; 715 720 B::mRC = NS_GetComponentManager(getter_AddRefs(manager)); 716 721 if (SUCCEEDED(B::mRC)) 717 B::mRC = manager->CreateInstance(aClsId, nsnull, NS_GET_IID(I), 718 (void **)&pObj); 722 B::mRC = manager->CreateInstance(aClsId, nsnull, getIID(), (void **)&pObj); 719 723 #endif 720 724 … … 746 750 { 747 751 amIface = NULL; 748 B::mRC = aIface->QueryInterface( COM_IIDOF(I), (void **)&amIface);752 B::mRC = aIface->QueryInterface(getIID(), (void **)&amIface); 749 753 this->release((IUnknown*)aIface); 750 754 setPtr(amIface); … … 907 911 } 908 912 913 #ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 914 virtual IID const &getIID() const = 0; 915 #else 916 IID const &getIID() const { return COM_IIDOF(I); } 917 #endif 918 909 919 // utility methods 910 920 … … 916 926 I* pObj = NULL; 917 927 #if !defined(VBOX_WITH_XPCOM) 918 COMBase::mRC = CoCreateInstance(clsId, NULL, CLSCTX_ALL, 919 COM_IIDOF(I), (void **)&pObj); 928 COMBase::mRC = CoCreateInstance(clsId, NULL, CLSCTX_ALL, getIID(), (void **)&pObj); 920 929 #else 921 930 nsCOMPtr<nsIComponentManager> manager; 922 931 COMBase::mRC = NS_GetComponentManager(getter_AddRefs(manager)); 923 932 if (SUCCEEDED(COMBase::mRC)) 924 COMBase::mRC = manager->CreateInstance(clsId, nsnull, NS_GET_IID(I), 925 (void **)&pObj); 933 COMBase::mRC = manager->CreateInstance(clsId, nsnull, getIID(), (void **)&pObj); 926 934 #endif 927 935 … … 948 956 { 949 957 pmIface = NULL; 950 COMBase::mRC = pIface->QueryInterface( COM_IIDOF(I), (void **)&pmIface);958 COMBase::mRC = pIface->QueryInterface(getIID(), (void **)&pmIface); 951 959 this->release((IUnknown*)pIface); 952 960 setPtr(pmIface); … … 1127 1135 return *this; 1128 1136 } 1137 1138 #ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING 1139 IID const &getIID() const RT_OVERRIDE { return COM_IIDOF(IUnknown); } 1140 #else 1141 IID const &getIID() const { return COM_IIDOF(IUnknown); } 1142 #endif 1129 1143 }; 1130 1144 1131 1145 /** @} */ 1132 1146 1133 #endif // __COMDefs_h__1134 1147 #endif // !__COMDefs_h__ 1148 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl
r74878 r76012 256 256 <xsl:text> * Generator : src/VBox/Frontends/VirtualBox/src/globals/COMWrappers.xsl
</xsl:text> 257 257 <xsl:text> */

</xsl:text> 258 259 <xsl:text>#include "VBox/com/VirtualBox.h"

</xsl:text> 260 258 261 <xsl:text>/* COM includes: */
</xsl:text> 259 262 <xsl:text>#include "COMEnums.h"
</xsl:text> … … 300 303 <xsl:text>#include "UILibraryDefs.h"

</xsl:text> 301 304 <xsl:text>/* VirtualBox interface declarations: */
</xsl:text> 302 <xsl:text>#ifndef VBOX_WITH_XPCOM
</xsl:text> 303 <xsl:text># include "VirtualBox.h"
</xsl:text> 304 <xsl:text>#else /* !VBOX_WITH_XPCOM */
</xsl:text> 305 <xsl:text># include "VirtualBox_XPCOM.h"
</xsl:text> 306 <xsl:text>#endif /* VBOX_WITH_XPCOM */

</xsl:text> 305 <xsl:text>#ifndef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING
</xsl:text> 306 <xsl:text># ifndef VBOX_WITH_XPCOM
</xsl:text> 307 <xsl:text># include "VirtualBox.h"
</xsl:text> 308 <xsl:text># else /* !VBOX_WITH_XPCOM */
</xsl:text> 309 <xsl:text># include "VirtualBox_XPCOM.h"
</xsl:text> 310 <xsl:text># endif /* VBOX_WITH_XPCOM */
</xsl:text> 311 <xsl:text>#else
</xsl:text> 312 <xsl:text>COM_STRUCT_OR_CLASS(</xsl:text><xsl:value-of select="@name"/><xsl:text>);
</xsl:text> 313 <xsl:text>#endif
</xsl:text> 307 314 308 315 <!-- Forward declarations: --> … … 566 573 <xsl:text> * aIface);
</xsl:text> 567 574 <xsl:text>
</xsl:text> 575 576 <xsl:text>#ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING
</xsl:text> 577 <xsl:text>const IID &getIID() const RT_OVERRIDE;
</xsl:text> 578 <xsl:text>#endif

</xsl:text> 568 579 569 580 <xsl:text> /* Attributes (properties): */
</xsl:text> … … 754 765 </xsl:template> 755 766 767 <xsl:template name="defineIIDGetter"> 768 <xsl:text>#ifdef VBOX_WITH_LESS_VIRTUALBOX_INCLUDING
</xsl:text> 769 <xsl:text>const IID &C</xsl:text> 770 <xsl:value-of select="substring(@name,2)"/> 771 <xsl:text>::getIID() const
</xsl:text> 772 <xsl:text>{
</xsl:text> 773 <xsl:text> return COM_IIDOF(</xsl:text> 774 <xsl:value-of select="@name"/> 775 <xsl:text>);
</xsl:text> 776 <xsl:text>}
</xsl:text> 777 <xsl:text>#endif

</xsl:text> 778 779 </xsl:template> 780 756 781 <xsl:template name="defineAttributes"> 757 782 … … 994 1019 <xsl:template name="defineMembers"> 995 1020 <xsl:call-template name="defineConstructors"> 1021 <xsl:with-param name="iface" select="."/> 1022 </xsl:call-template> 1023 <xsl:call-template name="defineIIDGetter"> 996 1024 <xsl:with-param name="iface" select="."/> 997 1025 </xsl:call-template> -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r75319 r76012 36 36 37 37 /* Other VBox includes: */ 38 #include <VBox/com/listeners.h> 38 #include <VBox/com/listeners.h> /** @todo This drags in VirtualBox.h! It may be possible avoid it for XPCOM, but not COM due to VBoxEventType_T. */ 39 39 40 40 /* Forward declarations: */
Note:
See TracChangeset
for help on using the changeset viewer.