Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
- /**
- * This checks compatibility between definitions from StateList.h with nsIAccessibleStates.idl
- */
- #include "mozilla/Assertions.h"
- #include "nsIAccessibleStates.h"
- #define EXPAND_XPCOM_NAME(number_, xpcomStateName_) ( (number_ < 31) ? (nsIAccessibleStates::STATE_##xpcomStateName_ ) : ( nsIAccessibleStates::EXT_STATE_##xpcomStateName_ ) )
- #define EXPAND_XPCOM_NUMBER(number_) ( (number_ < 31) ? (1 << number_) : (1 << (number_ - 31)) )
- #define STATE(name_, number_, atkState_, atkMappingType_, xpcomStateName_) \
- MOZ_STATIC_ASSERT(EXPAND_XPCOM_NUMBER(number_) == EXPAND_XPCOM_NAME(number_, xpcomStateName_), \
- "xpcom and internal states don't match");
- #include "StateList.h"
- #undef STATE
- #undef EXPAND_XPCOM_NAME
- #undef EXPAND_XPCOM_NUMBER
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement