2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim:expandtab:shiftwidth=2:tabstop=2:
|
|
|
|
*/
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef __nsGTKRemoteService_h__
|
|
|
|
#define __nsGTKRemoteService_h__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <gdk/gdkx.h>
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include "nsInterfaceHashtable.h"
|
2010-08-07 00:18:43 -07:00
|
|
|
#include "nsXRemoteService.h"
|
2012-07-23 14:26:48 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-07-23 14:26:48 -07:00
|
|
|
class nsGTKRemoteService MOZ_FINAL : public nsXRemoteService
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// We will be a static singleton, so don't use the ordinary methods.
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIREMOTESERVICE
|
2010-08-07 00:18:43 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsGTKRemoteService() :
|
|
|
|
mServerWindow(NULL) { }
|
|
|
|
|
|
|
|
private:
|
|
|
|
~nsGTKRemoteService() { }
|
|
|
|
|
|
|
|
void HandleCommandsFor(GtkWidget* aWidget,
|
|
|
|
nsIWeakReference* aWindow);
|
|
|
|
|
2010-08-07 00:18:43 -07:00
|
|
|
|
2012-03-21 11:07:31 -07:00
|
|
|
static PLDHashOperator StartupHandler(GtkWidget* aKey,
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIWeakReference* aData,
|
|
|
|
void* aClosure);
|
|
|
|
|
|
|
|
|
|
|
|
static gboolean HandlePropertyChange(GtkWidget *widget,
|
|
|
|
GdkEventProperty *event,
|
|
|
|
nsIWeakReference* aThis);
|
|
|
|
|
|
|
|
|
2010-08-07 00:18:43 -07:00
|
|
|
virtual void SetDesktopStartupIDOrTimestamp(const nsACString& aDesktopStartupID,
|
2012-08-22 08:56:38 -07:00
|
|
|
uint32_t aTimestamp);
|
2010-08-07 00:18:43 -07:00
|
|
|
|
2012-03-21 11:07:31 -07:00
|
|
|
nsInterfaceHashtable<nsPtrHashKey<GtkWidget>, nsIWeakReference> mWindows;
|
2010-08-07 00:18:43 -07:00
|
|
|
GtkWidget* mServerWindow;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __nsGTKRemoteService_h__
|