diff --git a/mozilla/xpcom/appshell/eventloop/photon/Makefile.in b/mozilla/xpcom/appshell/eventloop/photon/Makefile.in new file mode 100644 index 00000000000..1519419c6d9 --- /dev/null +++ b/mozilla/xpcom/appshell/eventloop/photon/Makefile.in @@ -0,0 +1,60 @@ +#!gmake +# +# 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. +# +# Contributor(s): +# Jerry Kirk + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +LIBRARY_NAME = eventloop +MODULE=xpcom_eventloop_photon +REQUIRES=xpcom +IS_COMPONENT = 1 + +CPPSRCS = \ + nsCEvent.cpp \ + nsCEventFilter.cpp + +# nsCPlatformBaseLoop.cpp + +LOCAL_INCLUDES += -I../xp + +include $(topsrcdir)/config/config.mk + +CXXFLAGS += $(TK_CFLAGS) + +SHARED_LIBRARY_LIBS = \ + ../xp/libxp_eventloop.a \ + $(NULL) + +EXTRA_DSO_LDOPTS+= \ + $(TOOLKIT_DSO_LDOPTS) \ + $(MKSHLIB_FORCE_ALL) \ + $(SHARED_LIBRARY_LIBS) \ + $(MKSHLIB_UNFORCE_ALL) \ + $(NULL) + +EXTRA_DSO_LDOPTS += $(TK_LIBS) + +include $(topsrcdir)/config/rules.mk + +$(LIBRARY) $(SHARED_LIBRARY): $(SHARED_LIBRARY_LIBS) Makefile diff --git a/mozilla/xpcom/appshell/eventloop/photon/nsCAppLoop.h b/mozilla/xpcom/appshell/eventloop/photon/nsCAppLoop.h new file mode 100644 index 00000000000..75776271ca6 --- /dev/null +++ b/mozilla/xpcom/appshell/eventloop/photon/nsCAppLoop.h @@ -0,0 +1,42 @@ +/* -*- 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 + */ + +#ifndef nsCAppLoop_h__ +#define nsCAppLoop_h__ + +#include "nsCBaseAppLoop.h" + +class nsCAppLoop : public nsCBaseAppLoop +{ +public: + static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void** ppv); + +protected: + nsCAppLoop(); + virtual ~nsCAppLoop(); + + // Internal Platform Implementations of nsIEventLoop + // (Error checking is ensured above) + nsresult PlatformExit(PRInt32 exitCode); +}; + +#endif /* nsCAppLoop_h__ */ diff --git a/mozilla/xpcom/appshell/eventloop/photon/nsCBreathLoop.h b/mozilla/xpcom/appshell/eventloop/photon/nsCBreathLoop.h new file mode 100644 index 00000000000..6e7670d608a --- /dev/null +++ b/mozilla/xpcom/appshell/eventloop/photon/nsCBreathLoop.h @@ -0,0 +1,44 @@ +/* -*- 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 + */ + +#ifndef nsCBreathLoop_h__ +#define nsCBreathLoop_h__ + +#include "nsCBaseBreathLoop.h" + +class nsCBreathLoop : public nsCBaseBreathLoop +{ +public: + static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void** ppv); + +protected: + nsCBreathLoop(); + virtual ~nsCBreathLoop(); + + // Internal Platform Implementations of nsIEventLoop + // (Error checking is ensured above) + nsresult PlatformExit(PRInt32 exitCode); + + PRInt32 PlatformGetReturnCode(void* platformEventData); +}; + +#endif /* nsCBreathLoop_h__ */ diff --git a/mozilla/xpcom/appshell/eventloop/photon/nsCEvent.cpp b/mozilla/xpcom/appshell/eventloop/photon/nsCEvent.cpp index 186677c94cb..b5198b9d282 100644 --- a/mozilla/xpcom/appshell/eventloop/photon/nsCEvent.cpp +++ b/mozilla/xpcom/appshell/eventloop/photon/nsCEvent.cpp @@ -37,15 +37,15 @@ nsCEvent::nsCEvent(void* platformEventData) { mEventBufferSz = PhGetMsgSize ( (PhEvent_t *) platformEventData ); m_msg = (PhEvent_t *) malloc( mEventBufferSz ); - NS_ENSURE_ARG_POINTER(m_msg); - nsCRT::memcpy(m_msg, platformEventData, mEventBufferSz); + if (m_msg); + nsCRT::memcpy(m_msg, platformEventData, mEventBufferSz); } else { mEventBufferSz = sizeof(PhEvent_t); m_msg = (PhEvent_t *) malloc( mEventBufferSz ); - NS_ENSURE_ARG_POINTER(m_msg); - nsCRT::memset(m_msg, 0, mEventBufferSz); + if (m_msg); + nsCRT::memset(m_msg, 0, mEventBufferSz); } } @@ -90,7 +90,7 @@ NS_IMETHODIMP nsCEvent::SetNativeData(nsNativeEventDataType dataType, if (locEventBufferSz > mEventBufferSz) { mEventBufferSz = locEventBufferSz; - m_msg = (PhEvent_t *) realloc( mEventBufferSz ); + m_msg = (PhEvent_t *) realloc( mEventBufferSz, mEventBufferSz ); NS_ENSURE_ARG_POINTER(m_msg); } nsCRT::memcpy(m_msg, data, mEventBufferSz); diff --git a/mozilla/xpcom/appshell/eventloop/photon/nsCPhFilter.h b/mozilla/xpcom/appshell/eventloop/photon/nsCPhFilter.h index e54799c373b..98a8afc0b8f 100644 --- a/mozilla/xpcom/appshell/eventloop/photon/nsCPhFilter.h +++ b/mozilla/xpcom/appshell/eventloop/photon/nsCPhFilter.h @@ -24,7 +24,7 @@ #ifndef nsCPhFilter_h__ #define nsCPhFilter_h__ -#include "Pht.h" +#include "PhT.h" class nsCPhFilter { diff --git a/mozilla/xpcom/appshell/eventloop/photon/nsCThreadLoop.h b/mozilla/xpcom/appshell/eventloop/photon/nsCThreadLoop.h new file mode 100644 index 00000000000..29c2fb20730 --- /dev/null +++ b/mozilla/xpcom/appshell/eventloop/photon/nsCThreadLoop.h @@ -0,0 +1,44 @@ +/* -*- 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 + */ + +#ifndef nsCThreadLoop_h__ +#define nsCThreadLoop_h__ + +#include "nsCBaseThreadLoop.h" + +class nsCThreadLoop : public nsCBaseThreadLoop +{ +public: + static NS_METHOD Create(nsISupports* aOuter, const nsIID& aIID, void** ppv); + +protected: + nsCThreadLoop(); + virtual ~nsCThreadLoop(); + + // Internal Platform Implementations of nsIEventLoop + // (Error checking is ensured above) + nsresult PlatformExit(PRInt32 exitCode); + +protected: +}; + +#endif /* nsCThreadLoop_h__ */