content/events/src/nsDOMTextEvent.h
author Ehsan Akhgari <ehsan@mozilla.com>
Thu, 18 Jul 2013 12:06:38 -0400
changeset 139098 d5390807c2ce07d7e23a647ef322c53394e633a9
parent 133410 fab554d11298336146df09d4f9464c624b61f767
child 148651 cc7aad8c31096fb35ed48a3fc77b5b98431dac62
permissions -rw-r--r--
Bug 895141 - Remove useless prlong.h inclusions from the tree; r=jcranmer

/* -*- 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 nsDOMTextEvent_h__
#define nsDOMTextEvent_h__

#include "mozilla/Attributes.h"
#include "nsDOMUIEvent.h"
#include "nsIPrivateTextEvent.h"
#include "nsPrivateTextRange.h"

class nsDOMTextEvent : public nsDOMUIEvent,
                       public nsIPrivateTextEvent
{
public:
  nsDOMTextEvent(mozilla::dom::EventTarget* aOwner,
                 nsPresContext* aPresContext, nsTextEvent* aEvent);

  NS_DECL_ISUPPORTS_INHERITED

  // Forward to base class
  NS_FORWARD_TO_NSDOMUIEVENT

  // nsIPrivateTextEvent interface
  NS_IMETHOD GetText(nsString& aText) MOZ_OVERRIDE;
  NS_IMETHOD_(already_AddRefed<nsIPrivateTextRangeList>) GetInputRange() MOZ_OVERRIDE;
  
protected:
  nsString mText;
  nsRefPtr<nsPrivateTextRangeList> mTextRange;
};

#endif // nsDOMTextEvent_h__