First attempt at getting unix Makefiles to work, not sure where

everything goes just yet..
This commit is contained in:
Jerry.Kirk%Nexwarecorp.com 1999-09-08 14:38:21 +00:00
parent e8d169a16b
commit 4bc22f0e9e
6 changed files with 196 additions and 6 deletions

View File

@ -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 <Jerry.Kirk@NexwareCorp.com>
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

View File

@ -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 <travis@netscape.com>
*/
#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__ */

View File

@ -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 <travis@netscape.com>
*/
#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__ */

View File

@ -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);

View File

@ -24,7 +24,7 @@
#ifndef nsCPhFilter_h__
#define nsCPhFilter_h__
#include "Pht.h"
#include "PhT.h"
class nsCPhFilter
{

View File

@ -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 <travis@netscape.com>
*/
#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__ */