added change notification support

This commit is contained in:
peterl%netscape.com 1998-11-26 01:24:52 +00:00
Родитель daab147c00
Коммит 1bfec862ce
9 изменённых файлов: 150 добавлений и 1 удалений

Просмотреть файл

@ -35,6 +35,7 @@ class nsIStreamListener;
class nsIStreamObserver;
class nsIStyleSet;
class nsIStyleSheet;
class nsIStyleRule;
class nsIURL;
class nsIURLGroup;
class nsIViewManager;
@ -188,6 +189,16 @@ public:
nsIContent* aChild,
PRInt32 aIndexInContainer) = 0;
// Observation hooks for style data to propogate notifications
// to document observers
NS_IMETHOD StyleRuleChanged(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
NS_IMETHOD StyleRuleAdded(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
NS_IMETHOD StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* Returns the Selection Object
*/

Просмотреть файл

@ -22,6 +22,7 @@
class nsIContent;
class nsIPresShell;
class nsIStyleSheet;
class nsIStyleRule;
class nsString;
class nsIDocument;
@ -204,6 +205,53 @@ public:
PRBool aDisabled) = 0;
/**
* A StyleRule has just been modified within a style sheet.
* This method is called automatically when the rule gets
* modified. The style sheet passes this notification to
* the document. The notification is passed on to all of
* the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that contians the rule
* @param aStyleRule the rule that was modified
* @param aHint some possible info about the nature of the change
*/
NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
/**
* A StyleRule has just been added to a style sheet.
* This method is called automatically when the rule gets
* added to the sheet. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been modified
* @param aStyleRule the rule that was added
*/
NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* A StyleRule has just been removed from a style sheet.
* This method is called automatically when the rule gets
* removed from the sheet. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been modified
* @param aStyleRule the rule that was removed
*/
NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* The document is in the process of being destroyed.
* This method is called automatically during document
* destruction.

Просмотреть файл

@ -23,6 +23,7 @@
#include "nslayout.h"
#include "nsISupports.h"
class nsIStyleSheet;
class nsIStyleContext;
class nsIPresContext;
class nsIContent;
@ -36,6 +37,8 @@ public:
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const = 0;
NS_IMETHOD HashValue(PRUint32& aValue) const = 0;
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const = 0;
// Strength is an out-of-band weighting, useful for mapping CSS ! important
NS_IMETHOD GetStrength(PRInt32& aStrength) = 0;

Просмотреть файл

@ -35,6 +35,7 @@ class nsIStreamListener;
class nsIStreamObserver;
class nsIStyleSet;
class nsIStyleSheet;
class nsIStyleRule;
class nsIURL;
class nsIURLGroup;
class nsIViewManager;
@ -188,6 +189,16 @@ public:
nsIContent* aChild,
PRInt32 aIndexInContainer) = 0;
// Observation hooks for style data to propogate notifications
// to document observers
NS_IMETHOD StyleRuleChanged(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
NS_IMETHOD StyleRuleAdded(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
NS_IMETHOD StyleRuleRemoved(nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* Returns the Selection Object
*/

Просмотреть файл

@ -22,6 +22,7 @@
class nsIContent;
class nsIPresShell;
class nsIStyleSheet;
class nsIStyleRule;
class nsString;
class nsIDocument;
@ -204,6 +205,53 @@ public:
PRBool aDisabled) = 0;
/**
* A StyleRule has just been modified within a style sheet.
* This method is called automatically when the rule gets
* modified. The style sheet passes this notification to
* the document. The notification is passed on to all of
* the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that contians the rule
* @param aStyleRule the rule that was modified
* @param aHint some possible info about the nature of the change
*/
NS_IMETHOD StyleRuleChanged(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
/**
* A StyleRule has just been added to a style sheet.
* This method is called automatically when the rule gets
* added to the sheet. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been modified
* @param aStyleRule the rule that was added
*/
NS_IMETHOD StyleRuleAdded(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* A StyleRule has just been removed from a style sheet.
* This method is called automatically when the rule gets
* removed from the sheet. The style sheet passes this
* notification to the document. The notification is passed on
* to all of the document observers.
*
* @param aDocument The document being observed
* @param aStyleSheet the StyleSheet that has been modified
* @param aStyleRule the rule that was removed
*/
NS_IMETHOD StyleRuleRemoved(nsIDocument *aDocument,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
/**
* The document is in the process of being destroyed.
* This method is called automatically during document
* destruction.

Просмотреть файл

@ -74,6 +74,18 @@ public:
nsIContent* aContent,
nsIAtom* aAttribute,
PRInt32 aHint) = 0;
// Style change notifications
NS_IMETHOD StyleRuleChanged(nsIPresContext* aPresContext,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
NS_IMETHOD StyleRuleAdded(nsIPresContext* aPresContext,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
NS_IMETHOD StyleRuleRemoved(nsIPresContext* aPresContext,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
};
#endif /* nsIStyleFrameConstruction_h___ */

Просмотреть файл

@ -23,6 +23,7 @@
#include "nslayout.h"
#include "nsISupports.h"
class nsIStyleSheet;
class nsIStyleContext;
class nsIPresContext;
class nsIContent;
@ -36,6 +37,8 @@ public:
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const = 0;
NS_IMETHOD HashValue(PRUint32& aValue) const = 0;
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const = 0;
// Strength is an out-of-band weighting, useful for mapping CSS ! important
NS_IMETHOD GetStrength(PRInt32& aStrength) = 0;

Просмотреть файл

@ -132,7 +132,17 @@ public:
nsIAtom* aAttribute,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
// xxx style rules enumeration
// Style change notifications
NS_IMETHOD StyleRuleChanged(nsIPresContext* aPresContext,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule,
PRInt32 aHint) = 0; // See nsStyleConsts fot hint values
NS_IMETHOD StyleRuleAdded(nsIPresContext* aPresContext,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
NS_IMETHOD StyleRuleRemoved(nsIPresContext* aPresContext,
nsIStyleSheet* aStyleSheet,
nsIStyleRule* aStyleRule) = 0;
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) = 0;
virtual void ListContexts(nsIStyleContext* aRootContext, FILE* out = stdout, PRInt32 aIndent = 0) = 0;

Просмотреть файл

@ -23,6 +23,7 @@
#include "nslayout.h"
#include "nsISupports.h"
class nsIStyleSheet;
class nsIStyleContext;
class nsIPresContext;
class nsIContent;
@ -36,6 +37,8 @@ public:
NS_IMETHOD Equals(const nsIStyleRule* aRule, PRBool& aResult) const = 0;
NS_IMETHOD HashValue(PRUint32& aValue) const = 0;
NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aSheet) const = 0;
// Strength is an out-of-band weighting, useful for mapping CSS ! important
NS_IMETHOD GetStrength(PRInt32& aStrength) = 0;