зеркало из https://github.com/mozilla/pjs.git
create a drag service.
This commit is contained in:
Родитель
c77b5c7257
Коммит
1b9944082f
|
@ -44,6 +44,7 @@
|
|||
#include "nsTransferable.h"
|
||||
#include "nsXIFFormatConverter.h"
|
||||
#include "nsDataFlavor.h"
|
||||
#include "nsDragService.h"
|
||||
|
||||
#include "nsTextAreaWidget.h"
|
||||
#include "nsListBox.h"
|
||||
|
@ -81,10 +82,12 @@ static NS_DEFINE_IID(kCMenuButton, NS_MENUBUTTON_CID);
|
|||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
||||
// Drag and Drop/Clipboard
|
||||
static NS_DEFINE_IID(kCDataFlavor, NS_DATAFLAVOR_CID);
|
||||
static NS_DEFINE_IID(kCClipboard, NS_CLIPBOARD_CID);
|
||||
static NS_DEFINE_IID(kCGenericTransferable, NS_GENERICTRANSFERABLE_CID);
|
||||
static NS_DEFINE_IID(kCXIFFormatConverter, NS_XIFFORMATCONVERTER_CID);
|
||||
static NS_DEFINE_IID(kCDragService, NS_DRAGSERVICE_CID);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
@ -266,6 +269,9 @@ nsresult nsWidgetFactory::CreateInstance(nsISupports *aOuter,
|
|||
else if (mClassID.Equals(kCClipboard)) {
|
||||
inst = (nsISupports*)new nsClipboard();
|
||||
}
|
||||
else if (mClassID.Equals(kCDragService)) {
|
||||
inst = (nsISupports*)NS_STATIC_CAST(nsIDragService*, new nsDragService());
|
||||
}
|
||||
|
||||
if (inst == NULL) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче