Line data Source code
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 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 0 : nsGTKRemoteService() :
28 0 : mServerWindow(nullptr) { }
29 :
30 : private:
31 0 : ~nsGTKRemoteService() { }
32 :
33 : void HandleCommandsFor(GtkWidget* aWidget,
34 : nsIWeakReference* aWindow);
35 :
36 :
37 : static gboolean HandlePropertyChange(GtkWidget *widget,
38 : GdkEventProperty *event,
39 : nsIWeakReference* aThis);
40 :
41 :
42 : virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID,
43 : uint32_t aTimestamp) override;
44 :
45 : nsInterfaceHashtable<nsPtrHashKey<GtkWidget>, nsIWeakReference> mWindows;
46 : GtkWidget* mServerWindow;
47 : };
48 :
49 : #endif // __nsGTKRemoteService_h__
|