From f13b83273b977bf89b080ad4273535e5a889e5f7 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Tue, 20 Oct 1998 00:19:17 +0000 Subject: [PATCH] Revised API to use TextFragment's --- content/base/public/nsITextContent.h | 18 ++++++++++++++---- layout/base/public/nsITextContent.h | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/content/base/public/nsITextContent.h b/content/base/public/nsITextContent.h index a04623d2b9e6..8db2ba595333 100644 --- a/content/base/public/nsITextContent.h +++ b/content/base/public/nsITextContent.h @@ -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___ */ diff --git a/layout/base/public/nsITextContent.h b/layout/base/public/nsITextContent.h index a04623d2b9e6..8db2ba595333 100644 --- a/layout/base/public/nsITextContent.h +++ b/layout/base/public/nsITextContent.h @@ -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___ */