Stub implementation of QT drag service

This commit is contained in:
tero.turtiainen 2008-04-19 18:41:02 +03:00
parent b742081754
commit 11c3fd0209
4 changed files with 197 additions and 4 deletions

View File

@ -95,6 +95,7 @@ CPPSRCS = \
nsQtKeyUtils.cpp \
nsClipboard.cpp \
nsBidiKeyboard.cpp \
nsDragService.cpp \
mozqwidget.cpp \
$(NULL)

View File

@ -0,0 +1,133 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:expandtab:shiftwidth=4:tabstop=4:
*/
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Oleg Romashin <romaxa@gmail.com>.
*
* Contributor(s):
* Oleg Romashin <romaxa@gmail.com>.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsDragService.h"
NS_IMPL_ISUPPORTS1(nsDragService, nsIDragService)
nsDragService::nsDragService()
{
/* member initializers and constructor code */
qDebug("nsDragService::nsDragService");
}
nsDragService::~nsDragService()
{
/* destructor code */
qDebug("nsDragService::~nsDragService");
}
/* void invokeDragSession (in nsIDOMNode aDOMNode, in nsISupportsArray aTransferables, in nsIScriptableRegion aRegion, in unsigned long aActionType); */
NS_IMETHODIMP
nsDragService::InvokeDragSession(nsIDOMNode *aDOMNode, nsISupportsArray *aTransferables, nsIScriptableRegion *aRegion, PRUint32 aActionType)
{
qDebug("nsDragService::InvokeDragSession");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void invokeDragSessionWithImage ( nsIDOMNode DOMNode , nsISupportsArray transferableArray , nsIScriptableRegion region , PRUint32 actionType , nsIDOMNode image , PRInt32 imageX , PRInt32 imageY , nsIDOMMouseEvent dragEvent ); */
NS_IMETHODIMP
nsDragService::InvokeDragSessionWithImage(nsIDOMNode *aDOMNode, nsISupportsArray*aTransferables, nsIScriptableRegion* aRegion, PRUint32 aActionType, nsIDOMNode* aImage, PRInt32 aImageX, PRInt32 aImageY, nsIDOMMouseEvent* aDragEvent)
{
qDebug("nsDragService::InvokeDragSessionWithImage");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void invokeDragSessionWithSelection ( nsISelection selection , nsISupportsArray transferableArray , PRUint32 actionType , nsIDOMMouseEvent dragEvent ) */
NS_IMETHODIMP
nsDragService::InvokeDragSessionWithSelection(nsISelection* aSelection, nsISupportsArray* aTransferables, PRUint32 aActionType, nsIDOMMouseEvent* aDragEvent)
{
qDebug("nsDragService::InvokeDragSessionWithSelection");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* nsIDragSession getCurrentSession (); */
NS_IMETHODIMP
nsDragService::GetCurrentSession(nsIDragSession **_retval)
{
qDebug("nsDragService::GetCurrentSession");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void startDragSession (); */
NS_IMETHODIMP
nsDragService::StartDragSession()
{
qDebug("nsDragService::StartDragSession");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void endDragSession (in PRBool aDoneDrag); */
NS_IMETHODIMP
nsDragService::EndDragSession(PRBool aDoneDrag)
{
qDebug("nsDragService::EndDragSession");
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void fireDragEventAtSource (in unsigned long aMsg); */
NS_IMETHODIMP
nsDragService::FireDragEventAtSource(PRUint32 aMsg)
{
qDebug("nsDragService::FireDragEventAtSource");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDragService::Suppress()
{
qDebug("nsDragService::Suppress");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsDragService::Unsuppress()
{
qDebug("nsDragService::Unsuppress");
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@ -0,0 +1,61 @@
/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Oleg Romashin <romaxa@gmail.com>
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Oleg Romashin <romaxa@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsDragService_h__
#define nsDragService_h__
#include "nsIDragService.h"
#include <qdrag.h>
/* Header file */
class nsDragService : public nsIDragService
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDRAGSERVICE
nsDragService();
private:
~nsDragService();
protected:
/* additional members */
};
#endif // nsDragService_h__

View File

@ -61,7 +61,7 @@
#include "nsClipboard.h"
#include "nsClipboardHelper.h"
// #include "nsDragService.h"
#include "nsDragService.h"
// #include "nsScrollbar.h"
// #include "nsFilePicker.h"
// #include "nsSound.h"
@ -94,7 +94,7 @@ static NS_DEFINE_CID(kNativeScrollCID, NS_NATIVESCROLLBAR_CID);
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
//NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
//NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeScrollbar)
//NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
@ -153,12 +153,10 @@ static const nsModuleComponentInfo components[] =
NS_CLIPBOARDHELPER_CID,
"@mozilla.org/widget/clipboardhelper;1",
nsClipboardHelperConstructor },
/*
{ "Qt Drag Service",
NS_DRAGSERVICE_CID,
"@mozilla.org/widget/dragservice;1",
nsDragServiceConstructor },
*/
{ "Qt Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",