cleaned up this interface - it builds and even might do some stuff

git-svn-id: svn://10.0.0.236/trunk@13796 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blizzard%appliedtheory.com
1998-10-31 16:02:16 +00:00
parent 29f9544186
commit 811fd2c6b7
2 changed files with 4 additions and 32 deletions

View File

@@ -20,11 +20,6 @@
#include "nsIAppShell.h"
#include <stdlib.h>
extern XtAppContext gAppContext;
//XtAppContext nsAppShell::gAppContext = NULL;
//-------------------------------------------------------------------------
//
// nsISupports implementation macro
@@ -51,20 +46,12 @@ NS_METHOD nsAppShell::Create(int* argc, char ** argv)
{
gtk_set_locale ();
gtk_init (&argc, &argv);
gtk_init (argc, &argv);
gdk_rgb_init ();
mTopLevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
/* we should probibly set even handlers here */
/*
XtSetLanguageProc(NULL, NULL, NULL);
mTopLevel = XtVaAppInitialize(&mAppContext, "nsAppShell", NULL,
0, argc, argv, NULL, NULL);
*/
// SP (what is this supposed to do?)
// XXX This is BAD -- needs to be fixed
gAppContext = mAppContext;
return NS_OK;
}
@@ -77,17 +64,7 @@ NS_METHOD nsAppShell::Create(int* argc, char ** argv)
NS_METHOD nsAppShell::Run()
{
/*
XtRealizeWidget(mTopLevel);
XEvent event;
for (;;) {
XtAppNextEvent(mAppContext, &event);
XtDispatchEvent(&event);
if (mDispatchListener)
mDispatchListener->AfterDispatch();
}
*/
gtk_main();
return NS_OK;
@@ -104,8 +81,6 @@ NS_METHOD nsAppShell::Exit()
gtk_widget_destroy (mTopLevel);
gtk_main_quit ();
/* this shouldn't be needed */
exit(0);
return NS_OK;
}

View File

@@ -20,8 +20,7 @@
#define nsAppShell_h__
#include "nsIAppShell.h"
#include <Xm/MainW.h>
#include <gtk/gtk.h>
/**
* Native MOTIF Application shell wrapper
@@ -30,9 +29,8 @@
class nsAppShell : public nsIAppShell
{
private:
GtkWidget mTopLevel;
XtAppContext mAppContext;
nsDispatchListener* mDispatchListener;
GtkWidget *mTopLevel;
nsDispatchListener *mDispatchListener;
public:
nsAppShell();
@@ -48,7 +46,6 @@ class nsAppShell : public nsIAppShell
virtual void* GetNativeData(PRUint32 aDataType);
// Public global
//static XtAppContext gAppContext;
};
#endif // nsAppShell_h__