warren%netscape.com cc5d426fbe Renaming nsIAllocator to nsIMemory (and nsAllocator to nsMemory). API cleanup/freeze. Bug #18433
git-svn-id: svn://10.0.0.236/trunk@71450 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-03 09:46:12 +00:00

85 lines
2.9 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* 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 the Mozilla browser.
*
* The Initial Developer of the Original Code is Netscape
* Communications, Inc. Portions created by Netscape are
* Copyright (C) 1999, Mozilla. All Rights Reserved.
*
* Contributor(s):
* Travis Bogard <travis@netscape.com>
*/
#include "nsISupports.idl"
#include "nsrootidl.idl"
/**
* The nsIEvent serves as a base interface for the platform specific
* interfaces that define what an event looks like.
*/
typedef long nsNativeEventDataType;
[scriptable, uuid(2EFB5011-4508-11d3-AEDA-00A024FFC08C)]
interface nsNativeEventDataTypes
{
const long WinMsgStruct = 1; // Windows MSG structure
const long PhotonMsgStruct = 2; // Photon MSG structure
};
[scriptable, uuid(2EFB5004-4508-11d3-AEDA-00A024FFC08C)]
interface nsIEvent : nsISupports
{
/*
Retrieves the internal structure requested via the dataType parameter.
@param dataType The type of data being requested. This should be one of
the consts found in nsNativeEventDataTypes.
@param data Returns a pointer to the requested data. For optimization sake,
this is a pointer to internal memory, so the validity of the returned
pointer is only valuable as long as the object pointed to with the
nsIEvent pointer is referenced. If you need it beyond the life of this
object, then copy the structure data.
@return NS_OK The returned data value has been filled with the appropriate
pointer.
NS_INVALID_ARG The requested dataType is not available.
NS_INVALID_POINTER The parameter data was not a valid pointer to
return the pointer in.
*/
[noscript] void GetNativeData(in nsNativeEventDataType dataType,
out voidPtr data);
/*
Sets the internal structure to hold the appropriate data.
@param dataType The type of data being passed in.
@param data A pointer to the data to set. Unlike the get method this
pointer does not need to live for the life of the object. The object
will copy the contents of referred to by the pointer. nsnull can be
passed to this function. Passing null will 0 out the contents of
the internal structure or pointer referrned to by dataType.
@return NS_OK - All went well with setting the data.
NS_INVALID_ARG The data type sent is not supported by this event.
*/
[noscript] void SetNativeData(in nsNativeEventDataType dataType,
in voidPtr data);
readonly attribute boolean isExitEvent;
};