Incremental changes to get this building again. Stub out appshell.

This commit is contained in:
blizzard%redhat.com 2001-10-14 19:02:05 +00:00
Родитель 06fd63aab5
Коммит a560dc7474
4 изменённых файлов: 180 добавлений и 5 удалений

Просмотреть файл

@ -30,24 +30,29 @@ LIBRARY_NAME = widget_gtk2
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsWidgetGtk2Module
REQUIRES =
REQUIRES = xpcom \
string \
gfx \
dom
CSRCS =
CPPSRCS = \
nsWindow.cpp \
nsScrollbar.cpp \
nsAppShell.cpp \
nsWidgetFactory.cpp \
$(NULL)
SHARED_LIBRARY_LIBS = $(DIST)/lib/libxpwidgets_s.a
EXTRA_DSO_LDOPTS += $(TK_LIBS)
CFLAGS += $(TK_CFLAGS)
LDFLAGS += $(TK_CFLAGS)
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS)
include $(topsrcdir)/config/rules.mk
CFLAGS += $(MOZ_GTK2_CFLAGS)
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
INCLUDES += \
-I$(srcdir)/../xpwidgets \
$(NULL)

Просмотреть файл

@ -0,0 +1,98 @@
/*
* 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 Christopher Blizzard.
* Portions created by Christopher Blizzard are Copyright (C)
* Christopher Blizzard. All Rights Reserved.
*
* Contributor(s):
* Christopher Blizzard <blizzard@mozilla.org>
*/
#include "nsAppShell.h"
#include <gtk/gtkmain.h>
static PRBool sInitialized = PR_FALSE;
nsAppShell::nsAppShell(void)
{
NS_INIT_REFCNT();
}
nsAppShell::~nsAppShell(void)
{
}
NS_IMPL_ISUPPORTS1(nsAppShell, nsIAppShell)
NS_IMETHODIMP
nsAppShell::Create(int *argc, char **argv)
{
if (sInitialized)
return NS_OK;
sInitialized = PR_TRUE;
gtk_init(argc, &argv);
return NS_OK;
}
NS_IMETHODIMP
nsAppShell::Run(void)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::Spinup(void)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::Spindown(void)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::ListenToEventQueue(nsIEventQueue *aQueue, PRBool aListen)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::GetNativeEvent(PRBool &aRealEvent, void * &aEvent)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::DispatchNativeEvent(PRBool aRealEvent, void *aEvent)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::SetDispatchListener(nsDispatchListener *aDispatchListener)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsAppShell::Exit(void)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -18,3 +18,26 @@
* Contributor(s):
* Christopher Blizzard <blizzard@mozilla.org>
*/
#ifndef nsAppShell_h__
#define nsAppShell_h__
#include "nsIAppShell.h"
#include "nsIEventQueue.h"
#include "nsCOMPtr.h"
class nsAppShell : public nsIAppShell {
public:
nsAppShell();
virtual ~nsAppShell();
NS_DECL_ISUPPORTS
NS_DECL_NSIAPPSHELL
private:
nsCOMPtr<nsIEventQueue> mEventQueue;
};
#endif /* nsAppShell_h__ */

Просмотреть файл

@ -0,0 +1,49 @@
/*
* 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 Christopher Blizzard.
* Portions created by Christopher Blizzard are Copyright (C)
* Christopher Blizzard. All Rights Reserved.
*
* Contributor(s):
* Christopher Blizzard <blizzard@mozilla.org>
*/
#include "nsIGenericFactory.h"
#include "nsWidgetsCID.h"
#include "nsWindow.h"
#include "nsAppShell.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
static nsModuleComponentInfo components[] =
{
{ "Gtk2 Window",
NS_WINDOW_CID,
"@mozilla.org/widget/window/gtk2;1",
nsWindowConstructor },
{ "Gtk2 AppShell",
NS_APPSHELL_CID,
"@mozilla.org/widget/appshell/gtk2;1",
nsAppShellConstructor },
};
PR_STATIC_CALLBACK(void)
nsWidgetGtk2ModuleDtor(nsIModule *aSelf)
{
}
NS_IMPL_NSGETMODULE_WITH_DTOR(nsWidgetGtk2Module,
components,
nsWidgetGtk2ModuleDtor)