windows.foundation.metadata.idl 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright 2022 Zhiyi Zhang for CodeWeavers
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  17. */
  18. #ifdef __WIDL__
  19. #pragma winrt ns_prefix
  20. #endif
  21. import "inspectable.idl";
  22. import "asyncinfo.idl";
  23. import "eventtoken.idl";
  24. import "windowscontracts.idl";
  25. import "windows.foundation.idl";
  26. namespace Windows.Foundation.Metadata
  27. {
  28. typedef enum GCPressureAmount GCPressureAmount;
  29. interface IApiInformationStatics;
  30. runtimeclass ApiInformation;
  31. [
  32. contract(Windows.Foundation.FoundationContract, 1.0)
  33. ]
  34. enum GCPressureAmount
  35. {
  36. Low = 0,
  37. Medium = 1,
  38. High = 2
  39. };
  40. [
  41. contract(Windows.Foundation.FoundationContract, 1.0),
  42. exclusiveto(Windows.Foundation.Metadata.ApiInformation),
  43. uuid(997439fe-f681-4a11-b416-c13a47e8ba36)
  44. ]
  45. interface IApiInformationStatics : IInspectable
  46. {
  47. HRESULT IsTypePresent([in] HSTRING type_name, [out, retval] boolean *value);
  48. [overload("IsMethodPresent")] HRESULT IsMethodPresent([in] HSTRING type_name, [in] HSTRING method_name, [out, retval] boolean *value);
  49. [overload("IsMethodPresent")] HRESULT IsMethodPresentWithArity([in] HSTRING type_name, [in] HSTRING method_name, [in] UINT32 parameter_count, [out, retval] boolean *value);
  50. HRESULT IsEventPresent([in] HSTRING type_name, [in] HSTRING event_name, [out, retval] boolean *value);
  51. HRESULT IsPropertyPresent([in] HSTRING type_name, [in] HSTRING property_name, [out, retval] boolean *value);
  52. HRESULT IsReadOnlyPropertyPresent([in] HSTRING type_name, [in] HSTRING property_name, [out, retval] boolean *value);
  53. HRESULT IsWriteablePropertyPresent([in] HSTRING type_name, [in] HSTRING property_name, [out, retval] boolean *value);
  54. HRESULT IsEnumNamedValuePresent([in] HSTRING enum_type_name, [in] HSTRING value_name, [out, retval] boolean *value);
  55. [overload("IsApiContractPresent")] HRESULT IsApiContractPresentByMajor([in] HSTRING contract_name, [in] UINT16 major_version, [out, retval] boolean *value);
  56. [overload("IsApiContractPresent")] HRESULT IsApiContractPresentByMajorAndMinor([in] HSTRING contract_name, [in] UINT16 major_version, [in] UINT16 minor_version, [out, retval] boolean *value);
  57. }
  58. [
  59. contract(Windows.Foundation.FoundationContract, 1.0),
  60. marshaling_behavior(agile),
  61. static(Windows.Foundation.Metadata.IApiInformationStatics, Windows.Foundation.FoundationContract, 1.0),
  62. threading(both)
  63. ]
  64. runtimeclass ApiInformation
  65. {
  66. }
  67. }