From e3c0c06c63078c6f8baaacfc615c769748d6a449 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Wed, 17 Feb 1999 14:34:33 +0000 Subject: [PATCH] Added methods for adding and removing nsMenuListeners and --- widget/src/gtk/nsMenu.cpp | 2 +- widget/src/gtk/nsMenu.h | 2 +- widget/src/gtk/nsMenuItem.cpp | 12 ++++++++++++ widget/src/gtk/nsMenuItem.h | 2 ++ widget/src/mac/nsMenu.cpp | 2 +- widget/src/mac/nsMenu.h | 2 +- widget/src/mac/nsMenuItem.cpp | 12 ++++++++++++ widget/src/mac/nsMenuItem.h | 2 ++ 8 files changed, 32 insertions(+), 4 deletions(-) diff --git a/widget/src/gtk/nsMenu.cpp b/widget/src/gtk/nsMenu.cpp index ebb372d3efd..17056db5998 100644 --- a/widget/src/gtk/nsMenu.cpp +++ b/widget/src/gtk/nsMenu.cpp @@ -221,7 +221,7 @@ NS_METHOD nsMenu::GetItemCount(PRUint32 &aCount) } //------------------------------------------------------------------------- -NS_METHOD nsMenu::GetItemAt(const PRUint32 aCount, nsIMenuItem *& aMenuItem) +NS_METHOD nsMenu::GetItemAt(const PRUint32 aCount, nsISupports *& aMenuItem) { return NS_OK; } diff --git a/widget/src/gtk/nsMenu.h b/widget/src/gtk/nsMenu.h index b37a8ca3b36..77e22539e07 100644 --- a/widget/src/gtk/nsMenu.h +++ b/widget/src/gtk/nsMenu.h @@ -53,7 +53,7 @@ public: NS_IMETHOD AddMenu(nsIMenu * aMenu); NS_IMETHOD AddSeparator(); NS_IMETHOD GetItemCount(PRUint32 &aCount); - NS_IMETHOD GetItemAt(const PRUint32 aCount, nsIMenuItem *& aMenuItem); + NS_IMETHOD GetItemAt(const PRUint32 aCount, nsISupports *& aMenuItem); NS_IMETHOD InsertItemAt(const PRUint32 aCount, nsIMenuItem *& aMenuItem); NS_IMETHOD InsertItemAt(const PRUint32 aCount, const nsString & aMenuItemName); NS_IMETHOD InsertSeparator(const PRUint32 aCount); diff --git a/widget/src/gtk/nsMenuItem.cpp b/widget/src/gtk/nsMenuItem.cpp index 27694a571a3..c3a03dae125 100644 --- a/widget/src/gtk/nsMenuItem.cpp +++ b/widget/src/gtk/nsMenuItem.cpp @@ -255,6 +255,18 @@ NS_METHOD nsMenuItem::GetNativeData(void *& aData) return NS_OK; } +//------------------------------------------------------------------------- +NS_METHOD nsMenuItem::AddMenuListener(nsIMenuListener * aMenuListener) +{ + return NS_OK; +} + +//------------------------------------------------------------------------- +NS_METHOD nsMenuItem::RemoveMenuListener(nsIMenuListener * aMenuListener) +{ + return NS_OK; +} + //------------------------------------------------------------------------- // nsIMenuListener interface //------------------------------------------------------------------------- diff --git a/widget/src/gtk/nsMenuItem.h b/widget/src/gtk/nsMenuItem.h index f5f8743dec6..bdc10ea921d 100644 --- a/widget/src/gtk/nsMenuItem.h +++ b/widget/src/gtk/nsMenuItem.h @@ -55,6 +55,8 @@ public: NS_IMETHOD GetCommand(PRUint32 & aCommand); NS_IMETHOD GetTarget(nsIWidget *& aTarget); NS_IMETHOD GetNativeData(void*& aData); + NS_IMETHOD AddMenuListener(nsIMenuListener * aMenuListener); + NS_IMETHOD RemoveMenuListener(nsIMenuListener * aMenuListener); // nsIMenuListener interface nsEventStatus MenuSelected(const nsMenuEvent & aMenuEvent); diff --git a/widget/src/mac/nsMenu.cpp b/widget/src/mac/nsMenu.cpp index 1adc548a1c9..52253f99d0b 100644 --- a/widget/src/mac/nsMenu.cpp +++ b/widget/src/mac/nsMenu.cpp @@ -265,7 +265,7 @@ NS_METHOD nsMenu::GetItemCount(PRUint32 &aCount) } //------------------------------------------------------------------------- -NS_METHOD nsMenu::GetItemAt(const PRUint32 aCount, nsIMenuItem *& aMenuItem) +NS_METHOD nsMenu::GetItemAt(const PRUint32 aCount, nsISupports *& aMenuItem) { return NS_OK; } diff --git a/widget/src/mac/nsMenu.h b/widget/src/mac/nsMenu.h index ad11e7e4377..15fa017628e 100644 --- a/widget/src/mac/nsMenu.h +++ b/widget/src/mac/nsMenu.h @@ -55,7 +55,7 @@ public: NS_IMETHOD AddMenu(nsIMenu * aMenu); NS_IMETHOD AddSeparator(); NS_IMETHOD GetItemCount(PRUint32 &aCount); - NS_IMETHOD GetItemAt(const PRUint32 aCount, nsIMenuItem *& aMenuItem); + NS_IMETHOD GetItemAt(const PRUint32 aCount, nsISupports *& aMenuItem); NS_IMETHOD InsertItemAt(const PRUint32 aCount, nsIMenuItem *& aMenuItem); NS_IMETHOD InsertItemAt(const PRUint32 aCount, const nsString & aMenuItemName); NS_IMETHOD InsertSeparator(const PRUint32 aCount); diff --git a/widget/src/mac/nsMenuItem.cpp b/widget/src/mac/nsMenuItem.cpp index 27aa614383b..94804efe1c7 100644 --- a/widget/src/mac/nsMenuItem.cpp +++ b/widget/src/mac/nsMenuItem.cpp @@ -266,6 +266,18 @@ NS_METHOD nsMenuItem::GetNativeData(void *& aData) return NS_OK; } +//------------------------------------------------------------------------- +NS_METHOD nsMenuItem::AddMenuListener(nsIMenuListener * aMenuListener) +{ + return NS_OK; +} + +//------------------------------------------------------------------------- +NS_METHOD nsMenuItem::RemoveMenuListener(nsIMenuListener * aMenuListener) +{ + return NS_OK; +} + //------------------------------------------------------------------------- // nsIMenuListener interface //------------------------------------------------------------------------- diff --git a/widget/src/mac/nsMenuItem.h b/widget/src/mac/nsMenuItem.h index 4ea3368fbbd..571d117f687 100644 --- a/widget/src/mac/nsMenuItem.h +++ b/widget/src/mac/nsMenuItem.h @@ -56,6 +56,8 @@ public: NS_IMETHOD GetCommand(PRUint32 & aCommand); NS_IMETHOD GetTarget(nsIWidget *& aTarget); NS_IMETHOD GetNativeData(void*& aData); + NS_IMETHOD AddMenuListener(nsIMenuListener * aMenuListener); + NS_IMETHOD RemoveMenuListener(nsIMenuListener * aMenuListener); // nsIMenuListener interface nsEventStatus MenuSelected(const nsMenuEvent & aMenuEvent);