Advertisement
Guest User

Untitled

a guest
Jan 18th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4.  
  5. /**
  6. * This checks compatibility between definitions from StateList.h with nsIAccessibleStates.idl
  7. */
  8.  
  9. #include "mozilla/Assertions.h"
  10. #include "nsIAccessibleStates.h"
  11.  
  12. #define EXPAND_XPCOM_NAME(number_, xpcomStateName_) ( (number_ < 31) ? (nsIAccessibleStates::STATE_##xpcomStateName_ ) : ( nsIAccessibleStates::EXT_STATE_##xpcomStateName_ ) )
  13. #define EXPAND_XPCOM_NUMBER(number_) ( (number_ < 31) ? (1 << number_) : (1 << (number_ - 31)) )
  14.  
  15. #define STATE(name_, number_, atkState_, atkMappingType_, xpcomStateName_) \
  16. MOZ_STATIC_ASSERT(EXPAND_XPCOM_NUMBER(number_) == EXPAND_XPCOM_NAME(number_, xpcomStateName_), \
  17. "xpcom and internal states don't match");
  18.  
  19. #include "StateList.h"
  20.  
  21. #undef STATE
  22. #undef EXPAND_XPCOM_NAME
  23. #undef EXPAND_XPCOM_NUMBER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement