tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

xpctest_cenums.idl (1074B)


      1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
      2 *
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "nsISupports.idl"
      8 /*
      9 * This defines the interface for a test object.
     10 *
     11 */
     12 
     13 [scriptable, uuid(6a2f918e-cda2-11e8-bc9a-a34c716d1f2a)]
     14 interface nsIXPCTestCEnums : nsISupports {
     15  const long testConst = 1;
     16 
     17  cenum testFlagsExplicit: 8 {
     18    shouldBe1Explicit = 1,
     19    shouldBe2Explicit = 2,
     20    shouldBe4Explicit = 4,
     21    shouldBe8Explicit = 8,
     22    shouldBe12Explicit = shouldBe4Explicit | shouldBe8Explicit,
     23  };
     24 
     25  cenum testFlagsImplicit: 8 {
     26    shouldBe0Implicit,
     27    shouldBe1Implicit,
     28    shouldBe2Implicit,
     29    shouldBe3Implicit,
     30    shouldBe5Implicit = 5,
     31    shouldBe6Implicit,
     32    shouldBe2AgainImplicit = 2,
     33    shouldBe3AgainImplicit,
     34  };
     35 
     36  void testCEnumInput(in nsIXPCTestCEnums_testFlagsExplicit abc);
     37 
     38  nsIXPCTestCEnums_testFlagsExplicit testCEnumOutput();
     39 };