use idl files for these things

This commit is contained in:
pavlov%netscape.com 1999-10-01 08:32:30 +00:00
parent 823582adf4
commit 4c9e093757
6 changed files with 10 additions and 238 deletions

View File

@ -2,11 +2,14 @@
# This is a list of local files which get copied to the mozilla:dist:idl directory # This is a list of local files which get copied to the mozilla:dist:idl directory
# #
nsIAppShell.idl
nsIFileSpecWithUI.idl nsIFileSpecWithUI.idl
nsISound.idl nsISound.idl
nsIToolkit.idl
nsITransferable.idl nsITransferable.idl
nsIDragSession.idl nsIDragSession.idl
nsIDragService.idl nsIDragService.idl
nsIFormatConverter.idl nsIFormatConverter.idl
nsIClipboard.idl nsIClipboard.idl
nsIClipboardOwner.idl nsIClipboardOwner.idl
nsIRollupListener.idl

View File

@ -51,9 +51,7 @@ EXPORTS = \
nsIMouseListener.h \ nsIMouseListener.h \
nsIEventListener.h \ nsIEventListener.h \
nsIMenuListener.h \ nsIMenuListener.h \
nsIToolkit.h \
nsWidgetsCID.h \ nsWidgetsCID.h \
nsIAppShell.h \
nsILookAndFeel.h \ nsILookAndFeel.h \
nsILabel.h \ nsILabel.h \
nsIMenuBar.h \ nsIMenuBar.h \
@ -64,11 +62,12 @@ EXPORTS = \
nsIFontSizeIterator.h \ nsIFontSizeIterator.h \
nsIFontRetrieverService.h \ nsIFontRetrieverService.h \
nsIContextMenu.h \ nsIContextMenu.h \
nsIRollupListener.h \
$(NULL) $(NULL)
XPIDLSRCS = \ XPIDLSRCS = \
nsIAppShell.idl \
nsIFileSpecWithUI.idl \ nsIFileSpecWithUI.idl \
nsIToolkit.idl \
nsISound.idl \ nsISound.idl \
nsITransferable.idl \ nsITransferable.idl \
nsIDragSession.idl \ nsIDragSession.idl \
@ -76,6 +75,7 @@ XPIDLSRCS = \
nsIFormatConverter.idl \ nsIFormatConverter.idl \
nsIClipboard.idl \ nsIClipboard.idl \
nsIClipboardOwner.idl \ nsIClipboardOwner.idl \
nsIRollupListener.idl \
$(NULL) $(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS)) EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))

View File

@ -23,14 +23,17 @@ MODULE=raptor
XPIDL_MODULE=widget XPIDL_MODULE=widget
XPIDLSRCS = \ XPIDLSRCS = \
.\nsIAppShell.idl \
.\nsIFileSpecWithUI.idl \ .\nsIFileSpecWithUI.idl \
.\nsISound.idl \ .\nsISound.idl \
.\nsIToolkit.idl \
.\nsITransferable.idl \ .\nsITransferable.idl \
.\nsIDragSession.idl \ .\nsIDragSession.idl \
.\nsIDragService.idl \ .\nsIDragService.idl \
.\nsIFormatConverter.idl \ .\nsIFormatConverter.idl \
.\nsIClipboard.idl \ .\nsIClipboard.idl \
.\nsIClipboardOwner.idl \ .\nsIClipboardOwner.idl \
.\nsIRollupListener.idl \
$(NULL) $(NULL)
EXPORTS=nsui.h \ EXPORTS=nsui.h \
@ -53,9 +56,7 @@ EXPORTS=nsui.h \
nsIMouseListener.h \ nsIMouseListener.h \
nsIEventListener.h \ nsIEventListener.h \
nsIMenuListener.h \ nsIMenuListener.h \
nsIToolkit.h \
nsWidgetsCID.h \ nsWidgetsCID.h \
nsIAppShell.h \
nsStringUtil.h \ nsStringUtil.h \
nsILookAndFeel.h \ nsILookAndFeel.h \
nsILabel.h \ nsILabel.h \
@ -64,7 +65,6 @@ EXPORTS=nsui.h \
nsIMenuItem.h \ nsIMenuItem.h \
nsIContextMenu.h \ nsIContextMenu.h \
nsIPopUpMenu.h \ nsIPopUpMenu.h \
nsIRollupListener.h \
$(NULL) $(NULL)

View File

@ -1,134 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIAppShell_h__
#define nsIAppShell_h__
#include "nsString.h"
#include "nsIEventQueue.h"
/**
* Flags for the getNativeData function.
* See GetNativeData()
*/
#define NS_NATIVE_SHELL 0
#define NS_IAPPSHELL_IID \
{ 0xa0757c31, 0xeeac, 0x11d1, { 0x9e, 0xc1, 0x0, 0xaa, 0x0, 0x2f, 0xb8, 0x21 } }
/**
* During the nsIAppShell Run method notify this listener
* after each message dispatch.
* @see SetDispatchListener member function of nsIAppShell
*/
class nsDispatchListener {
public:
virtual void AfterDispatch() = 0;
};
class nsIWidget;
/**
* Application shell used for Test applications
*/
class nsIAppShell : public nsISupports
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IAPPSHELL_IID)
/**
* Creates an application shell
*/
NS_IMETHOD Create(int* argc, char ** argv) = 0;
/**
* Enter an event loop.
* Don't leave until application exits.
*/
virtual nsresult Run() = 0;
/**
* Prepare to process events.
*/
NS_IMETHOD Spinup() = 0;
/**
* Prepare to stop processing events.
*/
NS_IMETHOD Spindown() = 0;
/**
* Push event queue onto current thread and begin processing events from it
*/
NS_IMETHOD PushThreadEventQueue() = 0;
/**
* Pop event queue from current thread's stack
*/
NS_IMETHOD PopThreadEventQueue() = 0;
/**
* After event dispatch execute app specific code
*/
NS_IMETHOD GetNativeEvent(PRBool &aRealEvent, void *&aEvent) = 0;
/**
* After event dispatch execute app specific code
*/
NS_IMETHOD DispatchNativeEvent(PRBool aRealEvent, void * aEvent) = 0;
/**
* After event dispatch execute app specific code
*/
NS_IMETHOD SetDispatchListener(nsDispatchListener* aDispatchListener) = 0;
/**
* Exit the handle event loop
*/
NS_IMETHOD Exit() = 0;
/**
* Returns Native Data
*/
virtual void* GetNativeData(PRUint32 aDataType) = 0;
/**
* Determines whether a given event should be processed assuming the given
* widget is a currently active modal window
*/
NS_IMETHOD EventIsForModalWindow(PRBool aRealEvent, void *aEvent, nsIWidget *aWidget,
PRBool *aForWindow) = 0;
};
#endif // nsIAppShell_h__

View File

@ -1,42 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIRollupListener_h__
#define nsIRollupListener_h__
#include "nsISupports.h"
// {23C2BA03-6C76-11d3-96ED-0060B0FB9956}
#define NS_IROLLUPLISTENER_IID \
{ 0x23c2ba03, 0x6c76, 0x11d3, { 0x96, 0xed, 0x0, 0x60, 0xb0, 0xfb, 0x99, 0x56 } };
class nsIRollupListener : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IROLLUPLISTENER_IID)
/**
* Notifies the object to rollup
* @result NS_Ok if no errors
*/
NS_IMETHOD Rollup() = 0;
};
#endif

View File

@ -1,55 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsIToolkit_h__
#define nsIToolkit_h__
#include "nsISupports.h"
#include "prthread.h"
// {18032BD0-B265-11d1-AA2A-000000000000}
#define NS_ITOOLKIT_IID \
{ 0x18032bd0, 0xb265, 0x11d1, \
{ 0xaa, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
/**
*
* Toolkit to associate with widgets.
* Each widget that is created must belong to a specific toolkit
* The toolkit is used to switch to the appropriate thread when
* the message pump for the widget is processed.
*/
class nsIToolkit : public nsISupports {
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLKIT_IID)
/**
* Initialize this toolkit with aThread.
* @param aThread The thread passed in runs the message pump.
* NULL can be passed in, in which case a new thread gets created
* and a message pump will run in that thread
*
*/
NS_IMETHOD Init(PRThread *aThread) = 0;
};
#endif