widget/cocoa/nsChangeObserver.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     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/. */
     7 #ifndef nsChangeObserver_h_
     8 #define nsChangeObserver_h_
    10 class nsIContent;
    11 class nsIDocument;
    12 class nsIAtom;
    14 #define NS_DECL_CHANGEOBSERVER \
    15 void ObserveAttributeChanged(nsIDocument *aDocument, nsIContent *aContent, nsIAtom *aAttribute); \
    16 void ObserveContentRemoved(nsIDocument *aDocument, nsIContent *aChild, int32_t aIndexInContainer); \
    17 void ObserveContentInserted(nsIDocument *aDocument, nsIContent* aContainer, nsIContent *aChild);
    19 // Something that wants to be alerted to changes in attributes or changes in
    20 // its corresponding content object.
    21 //
    22 // This interface is used by our menu code so we only have to have one
    23 // nsIDocumentObserver.
    24 //
    25 // Any class that implements this interface must take care to unregister itself
    26 // on deletion.
    27 class nsChangeObserver
    28 {
    29 public:
    30   // XXX use dom::Element
    31   virtual void ObserveAttributeChanged(nsIDocument* aDocument,
    32                                        nsIContent* aContent,
    33                                        nsIAtom* aAttribute)=0;
    35   virtual void ObserveContentRemoved(nsIDocument* aDocument,
    36                                      nsIContent* aChild, 
    37                                      int32_t aIndexInContainer)=0;
    39   virtual void ObserveContentInserted(nsIDocument* aDocument,
    40                                       nsIContent* aContainer,
    41                                       nsIContent* aChild)=0;
    42 };
    44 #endif // nsChangeObserver_h_

mercurial