Revised API to use TextFragment's

git-svn-id: svn://10.0.0.236/trunk@13151 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-10-20 00:19:17 +00:00
parent 5552ee46a1
commit d0dbc1ba65
2 changed files with 28 additions and 8 deletions

View File

@@ -20,6 +20,7 @@
#include "nslayout.h"
class nsString;
class nsTextFragment;
// IID for the nsITextContent interface
#define NS_ITEXT_CONTENT_IID \
@@ -31,18 +32,27 @@ class nsString;
*/
class nsITextContent : public nsISupports {
public:
/*
/**
* Get direct access to the text in the text content.
*/
NS_IMETHOD GetText(const PRUnichar*& aBaseResult,
PRInt32& aLengthResult) = 0;
/*
NS_IMETHOD GetText(const nsTextFragment*& aFragmentsResult,
PRInt32& aNumFragmentsResult) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const PRUnichar* aBuffer,
PRInt32 aLength,
PRBool aNotify) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const char* aBuffer,
PRInt32 aLength,
PRBool aNotify) = 0;
};
#endif /* nsITextContent_h___ */

View File

@@ -20,6 +20,7 @@
#include "nslayout.h"
class nsString;
class nsTextFragment;
// IID for the nsITextContent interface
#define NS_ITEXT_CONTENT_IID \
@@ -31,18 +32,27 @@ class nsString;
*/
class nsITextContent : public nsISupports {
public:
/*
/**
* Get direct access to the text in the text content.
*/
NS_IMETHOD GetText(const PRUnichar*& aBaseResult,
PRInt32& aLengthResult) = 0;
/*
NS_IMETHOD GetText(const nsTextFragment*& aFragmentsResult,
PRInt32& aNumFragmentsResult) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const PRUnichar* aBuffer,
PRInt32 aLength,
PRBool aNotify) = 0;
/**
* Set the text to the given value. If aNotify is PR_TRUE then
* the document is notified of the content change.
*/
NS_IMETHOD SetText(const char* aBuffer,
PRInt32 aLength,
PRBool aNotify) = 0;
};
#endif /* nsITextContent_h___ */