no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / widget / gtk / nsAppShell.h
blobf907fff7bae3b11aca9917292a6a2c58e203c13c
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/. */
8 #ifndef nsAppShell_h__
9 #define nsAppShell_h__
11 #ifdef MOZ_ENABLE_DBUS
12 # include <gio/gio.h>
13 # include "mozilla/RefPtr.h"
14 # include "mozilla/GRefPtr.h"
15 #endif
16 #include <glib.h>
17 #include "nsBaseAppShell.h"
18 #include "nsCOMPtr.h"
20 class nsAppShell : public nsBaseAppShell {
21 public:
22 nsAppShell() : mTag(0) { mPipeFDs[0] = mPipeFDs[1] = 0; }
24 // nsBaseAppShell overrides:
25 nsresult Init();
26 virtual void ScheduleNativeEventCallback() override;
27 virtual bool ProcessNextNativeEvent(bool mayWait) override;
29 #ifdef MOZ_ENABLE_DBUS
30 void StartDBusListening();
31 void StopDBusListening();
33 static void DBusSessionSleepCallback(GDBusProxy* aProxy, gchar* aSenderName,
34 gchar* aSignalName,
35 GVariant* aParameters,
36 gpointer aUserData);
37 static void DBusTimedatePropertiesChangedCallback(GDBusProxy* aProxy,
38 gchar* aSenderName,
39 gchar* aSignalName,
40 GVariant* aParameters,
41 gpointer aUserData);
42 static void DBusConnectClientResponse(GObject* aObject, GAsyncResult* aResult,
43 gpointer aUserData);
44 #endif
46 private:
47 virtual ~nsAppShell();
49 static gboolean EventProcessorCallback(GIOChannel* source,
50 GIOCondition condition, gpointer data);
51 int mPipeFDs[2];
52 unsigned mTag;
54 #ifdef MOZ_ENABLE_DBUS
55 RefPtr<GDBusProxy> mLogin1Proxy;
56 RefPtr<GCancellable> mLogin1ProxyCancellable;
57 RefPtr<GDBusProxy> mTimedate1Proxy;
58 RefPtr<GCancellable> mTimedate1ProxyCancellable;
59 #endif
62 #endif /* nsAppShell_h__ */