author Mike Hommey <mh+mozilla@glandium.org>
Tue, 07 Jun 2016 13:49:14 +0900
changeset 301919 08093ab05dd463215a7ab14c73fa0905a7ef3ff9
parent 300429 ccdb440b7b7e8e680f6c2b561fbd9db0a1214f14
child 315039 de82c28636a102736d72f823a934030eda7c8fb5
permissions -rw-r--r--
Bug 1278415 - Also write a mozinfo for js standalone builds. r=gps Historically, a mozinfo for js standalone build has not been necessary, but with the move towards a) having things work with mach and b) buildconfig using the MozbuildObject.from_environment in next patch, mozinfo becomes necessary (it's required for MozbuildObject.from_environment to find the directory is an objdir). Interestingly, hazard builds do both a js standalone build and a desktop Firefox build at the same time, both of which are done with MOZCONFIG set in the environment... with the Firefox mozconfig. The result of now writing a mozinfo for js standalone builds is that in that case, they end up with a reference to the mozconfig, which the build system then reads, and finds a MOZ_OBJDIR, which then doesn't match the js standalone build objdir. So for those builds, reset MOZCONFIG.

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */

#ifndef mozilla_EventForwards_h__
#define mozilla_EventForwards_h__

#include <stdint.h>

#include "nsTArray.h"

 * XXX Following enums should be in BasicEvents.h.  However, currently, it's
 *     impossible to use foward delearation for enum.

 * Return status for event processors.
enum nsEventStatus
  // The event is ignored, do default processing
  // The event is consumed, don't do default processing
  // The event is consumed, but do default processing
  // Value is not for use, only for serialization

namespace mozilla {

 * Event messages

typedef uint16_t EventMessageType;

enum EventMessage : EventMessageType

#define NS_EVENT_MESSAGE(aMessage) aMessage,
#define NS_EVENT_MESSAGE_FIRST_LAST(aMessage, aFirst, aLast) \
  aMessage##First = aFirst, aMessage##Last = aLast,

#include "mozilla/EventMessageList.h"


  // For preventing bustage due to "," after the last item.

const char* ToChar(EventMessage aEventMessage);

 * Event class IDs

typedef uint8_t EventClassIDType;

enum EventClassID : EventClassIDType
  // The event class name will be:
  //   eBasicEventClass for WidgetEvent
  //   eFooEventClass for WidgetFooEvent or InternalFooEvent
#define NS_ROOT_EVENT_CLASS(aPrefix, aName)   eBasic##aName##Class
#define NS_EVENT_CLASS(aPrefix, aName)      , e##aName##Class

#include "mozilla/EventClassList.h"


const char* ToChar(EventClassID aEventClassID);

typedef uint16_t Modifiers;

#define NS_DEFINE_KEYNAME(aCPPName, aDOMKeyName) \

typedef uint16_t KeyNameIndexType;
enum KeyNameIndex : KeyNameIndexType
#include "mozilla/KeyNameList.h"
  // If a DOM keyboard event is synthesized by script, this is used.  Then,
  // specified key name should be stored and use it as .key value.



typedef uint8_t CodeNameIndexType;
enum CodeNameIndex : CodeNameIndexType
#include "mozilla/PhysicalKeyCodeNameList.h"
  // If a DOM keyboard event is synthesized by script, this is used.  Then,
  // specified code name should be stored and use it as .code value.


#define NS_DEFINE_COMMAND(aName, aCommandStr) , Command##aName

typedef int8_t CommandInt;
enum Command : CommandInt

#include "mozilla/CommandList.h"

} // namespace mozilla

 * All header files should include this header instead of *Events.h.

namespace mozilla {

#define NS_EVENT_CLASS(aPrefix, aName) class aPrefix##aName;
#define NS_ROOT_EVENT_CLASS(aPrefix, aName) NS_EVENT_CLASS(aPrefix, aName)

#include "mozilla/EventClassList.h"


// BasicEvents.h
struct BaseEventFlags;
struct EventFlags;

class WidgetEventTime;

class NativeEventData;

// TextEvents.h
struct AlternativeCharCode;
struct ShortcutKeyCandidate;

typedef nsTArray<ShortcutKeyCandidate> ShortcutKeyCandidateArray;
typedef AutoTArray<ShortcutKeyCandidate, 10> AutoShortcutKeyCandidateArray;

// TextRange.h
typedef uint8_t RawTextRangeType;
enum class TextRangeType : RawTextRangeType;

struct TextRangeStyle;
struct TextRange;

class TextRangeArray;

// FontRange.h
struct FontRange;

} // namespace mozilla

#endif // mozilla_EventForwards_h__