зеркало из https://github.com/mozilla/pjs.git
Finish landing XP Beep() functionality (bug #6911). Approved chofmann, reviewed saari & mcafee.
This commit is contained in:
Родитель
326c05e1e3
Коммит
67dd013973
|
@ -56,6 +56,8 @@
|
|||
#include "nsIGenericFactory.h"
|
||||
#include "nsGfxCIID.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
|
||||
#include "prprf.h"
|
||||
#include "prmem.h"
|
||||
|
||||
|
@ -196,6 +198,8 @@ static NS_DEFINE_IID(kCMenuCID, NS_MENU_CID);
|
|||
static NS_DEFINE_IID(kCMenuItemCID, NS_MENUITEM_CID);
|
||||
static NS_DEFINE_IID(kCContextMenuCID, NS_CONTEXTMENU_CID);
|
||||
//static NS_DEFINE_IID(kCXULCommandCID, NS_XULCOMMAND_CID);
|
||||
static NS_DEFINE_IID(kSoundCID, NS_SOUND_CID);
|
||||
|
||||
|
||||
|
||||
static NS_DEFINE_IID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
|
||||
|
@ -266,4 +270,6 @@ NS_SetupRegistry()
|
|||
nsComponentManager::RegisterComponent(kCMenuCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kCMenuItemCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kCContextMenuCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
nsComponentManager::RegisterComponent(kSoundCID, "Sound Services", "component://netscape/sound", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#include "nsIGenericFactory.h"
|
||||
#include "nsGfxCIID.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
|
||||
#include "prprf.h"
|
||||
#include "prmem.h"
|
||||
|
||||
|
@ -131,6 +133,7 @@ static NS_DEFINE_IID(kCMenuCID, NS_MENU_CID);
|
|||
static NS_DEFINE_IID(kCMenuItemCID, NS_MENUITEM_CID);
|
||||
static NS_DEFINE_IID(kCContextMenuCID, NS_CONTEXTMENU_CID);
|
||||
//static NS_DEFINE_IID(kCXULCommandCID, NS_XULCOMMAND_CID);
|
||||
static NS_DEFINE_IID(kSoundCID, NS_SOUND_CID);
|
||||
|
||||
// GFXWIN
|
||||
static NS_DEFINE_IID(kCRenderingContextIID, NS_RENDERING_CONTEXT_CID);
|
||||
|
@ -209,6 +212,7 @@ NS_SetupRegistry()
|
|||
nsComponentManager::RegisterComponent(kCMenuCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kCMenuItemCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kCContextMenuCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kSoundCID, "Sound Services", "component://netscape/sound", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// GFXWIN
|
||||
nsComponentManager::RegisterComponent(kCRenderingContextIID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
|
|
Двоичные данные
widget/macbuild/widget.mcp
Двоичные данные
widget/macbuild/widget.mcp
Двоичный файл не отображается.
Двоичные данные
widget/macbuild/widgetIDL.mcp
Двоичные данные
widget/macbuild/widgetIDL.mcp
Двоичный файл не отображается.
|
@ -2,4 +2,5 @@
|
|||
# This is a list of local files which get copied to the mozilla:dist:idl directory
|
||||
#
|
||||
|
||||
nsIFileSpecWithUI.idl
|
||||
nsIFileSpecWithUI.idl
|
||||
nsISound.idl
|
|
@ -83,6 +83,9 @@ EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
|
|||
MODULE = raptor
|
||||
XPILD_MODULE = widget
|
||||
|
||||
XPIDLSRCS = nsISound.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -22,6 +22,9 @@ DEFINES=-D_IMPL_NS_UI
|
|||
MODULE=raptor
|
||||
XPIDL_MODULE=widget
|
||||
|
||||
XPIDLSRCS = .\nsISound.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS=nsui.h \
|
||||
nsIFontSizeIterator.h \
|
||||
nsIFontNameIterator.h \
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
#include "nsXIFFormatConverter.h"
|
||||
#include "nsDragService.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
|
||||
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
|
||||
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
|
||||
static NS_DEFINE_IID(kCButton, NS_BUTTON_CID);
|
||||
|
@ -84,6 +86,9 @@ static NS_DEFINE_IID(kCDragService, NS_DRAGSERVICE_CID);
|
|||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
||||
// Sound services (just Beep for now)
|
||||
static NS_DEFINE_CID(kCSound, NS_SOUND_CID);
|
||||
|
||||
|
||||
class nsWidgetFactory : public nsIFactory
|
||||
{
|
||||
|
@ -225,6 +230,11 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
else if (mClassID.Equals(kCPopUpMenu)) {
|
||||
inst = (nsISupports*)new nsPopUpMenu();
|
||||
}
|
||||
else if (mClassID.Equals(kCSound)) {
|
||||
nsISound* aSound = nsnull;
|
||||
NS_NewSound(&aSound);
|
||||
inst = (nsISupports*) aSound;
|
||||
}
|
||||
else if (mClassID.Equals(kCTransferable)) {
|
||||
inst = (nsISupports*)new nsTransferable();
|
||||
}
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
#include "nsDragService.h"
|
||||
#include "nsFileListTransferable.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
|
||||
static NS_DEFINE_IID(kCWindow, NS_WINDOW_CID);
|
||||
static NS_DEFINE_IID(kCChild, NS_CHILD_CID);
|
||||
static NS_DEFINE_IID(kCButton, NS_BUTTON_CID);
|
||||
|
@ -89,6 +91,9 @@ static NS_DEFINE_IID(kCFileListTransferable, NS_FILELISTTRANSFERABLE_CID);
|
|||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
||||
// Sound services (just Beep for now)
|
||||
static NS_DEFINE_CID(kCSound, NS_SOUND_CID);
|
||||
|
||||
class nsWidgetFactory : public nsIFactory
|
||||
{
|
||||
public:
|
||||
|
@ -231,6 +236,11 @@ nsresult nsWidgetFactory::CreateInstance( nsISupports* aOuter,
|
|||
else if (mClassID.Equals(kCPopUpMenu)) {
|
||||
inst = (nsISupports*)new nsPopUpMenu();
|
||||
}
|
||||
else if (mClassID.Equals(kCSound)) {
|
||||
nsISound* aSound = nsnull;
|
||||
NS_NewSound(&aSound);
|
||||
inst = (nsISupports*) aSound;
|
||||
}
|
||||
else if (mClassID.Equals(kCTransferable)) {
|
||||
inst = (nsISupports*)new nsTransferable();
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
|
||||
// NOTE the following does not match MAC_STATIC actually used below in this file!
|
||||
#define MACSTATIC
|
||||
|
||||
|
@ -87,6 +89,9 @@ static NS_DEFINE_IID(kCTransferable, NS_TRANSFERABLE_CID);
|
|||
static NS_DEFINE_IID(kCXIFFormatConverter, NS_XIFFORMATCONVERTER_CID);
|
||||
static NS_DEFINE_IID(kCDragService, NS_DRAGSERVICE_CID);
|
||||
|
||||
// Sound services (just Beep for now)
|
||||
static NS_DEFINE_CID(kCSound, NS_SOUND_CID);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -249,6 +254,11 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
// inst = (nsISupports*)new nsPopUpMenu();
|
||||
NS_NOTYETIMPLEMENTED("nsPopUpMenu");
|
||||
}
|
||||
else if (mClassID.Equals(kCSound)) {
|
||||
nsISound* aSound = nsnull;
|
||||
NS_NewSound(&aSound);
|
||||
inst = (nsISupports*) aSound;
|
||||
}
|
||||
else if (mClassID.Equals(kCTransferable)) {
|
||||
inst = (nsISupports*)new nsTransferable();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче