1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/remote/nsGTKRemoteService.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,54 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim:expandtab:shiftwidth=2:tabstop=2: 1.6 + */ 1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +#ifndef __nsGTKRemoteService_h__ 1.12 +#define __nsGTKRemoteService_h__ 1.13 + 1.14 +#include <gdk/gdk.h> 1.15 +#include <gdk/gdkx.h> 1.16 +#include <gtk/gtk.h> 1.17 + 1.18 +#include "nsInterfaceHashtable.h" 1.19 +#include "nsXRemoteService.h" 1.20 +#include "mozilla/Attributes.h" 1.21 + 1.22 +class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService 1.23 +{ 1.24 +public: 1.25 + // We will be a static singleton, so don't use the ordinary methods. 1.26 + NS_DECL_ISUPPORTS 1.27 + NS_DECL_NSIREMOTESERVICE 1.28 + 1.29 + 1.30 + nsGTKRemoteService() : 1.31 + mServerWindow(nullptr) { } 1.32 + 1.33 +private: 1.34 + ~nsGTKRemoteService() { } 1.35 + 1.36 + void HandleCommandsFor(GtkWidget* aWidget, 1.37 + nsIWeakReference* aWindow); 1.38 + 1.39 + 1.40 + static PLDHashOperator StartupHandler(GtkWidget* aKey, 1.41 + nsIWeakReference* aData, 1.42 + void* aClosure); 1.43 + 1.44 + 1.45 + static gboolean HandlePropertyChange(GtkWidget *widget, 1.46 + GdkEventProperty *event, 1.47 + nsIWeakReference* aThis); 1.48 + 1.49 + 1.50 + virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID, 1.51 + uint32_t aTimestamp); 1.52 + 1.53 + nsInterfaceHashtable<nsPtrHashKey<GtkWidget>, nsIWeakReference> mWindows; 1.54 + GtkWidget* mServerWindow; 1.55 +}; 1.56 + 1.57 +#endif // __nsGTKRemoteService_h__