1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:expandtab:shiftwidth=4:tabstop=4: 3 */ 4 /* This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 8 #ifndef nsAppShell_h__ 9 #define nsAppShell_h__ 10 11 #include <glib.h> 12 #include "nsBaseAppShell.h" 13 #include "nsCOMPtr.h" 14 15 class nsAppShell : public nsBaseAppShell { 16 public: nsAppShell()17 nsAppShell() : mTag(0) { mPipeFDs[0] = mPipeFDs[1] = 0; } 18 19 // nsBaseAppShell overrides: 20 nsresult Init(); 21 virtual void ScheduleNativeEventCallback() override; 22 virtual bool ProcessNextNativeEvent(bool mayWait) override; 23 24 private: 25 virtual ~nsAppShell(); 26 27 static gboolean EventProcessorCallback(GIOChannel* source, 28 GIOCondition condition, gpointer data); 29 30 int mPipeFDs[2]; 31 unsigned mTag; 32 }; 33 34 #endif /* nsAppShell_h__ */ 35