toolkit/components/remote/nsGTKRemoteService.h

branch
TOR_BUG_9701
changeset 14
925c144e1f1f
equal deleted inserted replaced
-1:000000000000 0:835c323d86e0
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:expandtab:shiftwidth=2:tabstop=2:
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 __nsGTKRemoteService_h__
9 #define __nsGTKRemoteService_h__
10
11 #include <gdk/gdk.h>
12 #include <gdk/gdkx.h>
13 #include <gtk/gtk.h>
14
15 #include "nsInterfaceHashtable.h"
16 #include "nsXRemoteService.h"
17 #include "mozilla/Attributes.h"
18
19 class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService
20 {
21 public:
22 // We will be a static singleton, so don't use the ordinary methods.
23 NS_DECL_ISUPPORTS
24 NS_DECL_NSIREMOTESERVICE
25
26
27 nsGTKRemoteService() :
28 mServerWindow(nullptr) { }
29
30 private:
31 ~nsGTKRemoteService() { }
32
33 void HandleCommandsFor(GtkWidget* aWidget,
34 nsIWeakReference* aWindow);
35
36
37 static PLDHashOperator StartupHandler(GtkWidget* aKey,
38 nsIWeakReference* aData,
39 void* aClosure);
40
41
42 static gboolean HandlePropertyChange(GtkWidget *widget,
43 GdkEventProperty *event,
44 nsIWeakReference* aThis);
45
46
47 virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID,
48 uint32_t aTimestamp);
49
50 nsInterfaceHashtable<nsPtrHashKey<GtkWidget>, nsIWeakReference> mWindows;
51 GtkWidget* mServerWindow;
52 };
53
54 #endif // __nsGTKRemoteService_h__

mercurial