broadway: Remove displaymanager implementation
This is an API break, but the broadway backend is unsupported, so we can get away with it.
This commit is contained in:
@ -23,7 +23,6 @@ libgdkinclude_HEADERS = \
|
|||||||
gdkbroadway.h
|
gdkbroadway.h
|
||||||
|
|
||||||
libgdkbroadwayinclude_HEADERS = \
|
libgdkbroadwayinclude_HEADERS = \
|
||||||
gdkbroadwaydisplaymanager.h \
|
|
||||||
gdkbroadwaywindow.h \
|
gdkbroadwaywindow.h \
|
||||||
gdkbroadwaycursor.h \
|
gdkbroadwaycursor.h \
|
||||||
gdkbroadwayvisual.h
|
gdkbroadwayvisual.h
|
||||||
@ -55,7 +54,6 @@ libgdk_broadway_la_SOURCES = \
|
|||||||
gdkdevicemanager-broadway.c \
|
gdkdevicemanager-broadway.c \
|
||||||
gdkdisplay-broadway.c \
|
gdkdisplay-broadway.c \
|
||||||
gdkdisplay-broadway.h \
|
gdkdisplay-broadway.h \
|
||||||
gdkdisplaymanager-broadway.c \
|
|
||||||
gdkdnd-broadway.c \
|
gdkdnd-broadway.c \
|
||||||
gdkeventsource.c \
|
gdkeventsource.c \
|
||||||
gdkeventsource.h \
|
gdkeventsource.h \
|
||||||
|
|||||||
@ -32,7 +32,6 @@
|
|||||||
#include <gdk/broadway/gdkbroadwaywindow.h>
|
#include <gdk/broadway/gdkbroadwaywindow.h>
|
||||||
#include <gdk/broadway/gdkbroadwaycursor.h>
|
#include <gdk/broadway/gdkbroadwaycursor.h>
|
||||||
#include <gdk/broadway/gdkbroadwayvisual.h>
|
#include <gdk/broadway/gdkbroadwayvisual.h>
|
||||||
#include <gdk/broadway/gdkbroadwaydisplaymanager.h>
|
|
||||||
|
|
||||||
#undef __GDKBROADWAY_H_INSIDE__
|
#undef __GDKBROADWAY_H_INSIDE__
|
||||||
|
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
/* gdkbroadwaydisplaymanager.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2005-2007 Imendio AB
|
|
||||||
* Copyright 2010 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GDK_BROADWAY_DISPLAY_MANAGER_H__
|
|
||||||
#define __GDK_BROADWAY_DISPLAY_MANAGER_H__
|
|
||||||
|
|
||||||
#if !defined(__GDKBROADWAY_H_INSIDE__) && !defined (GDK_COMPILATION)
|
|
||||||
#error "Only <gdk/gdkbroadway.h> can be included directly."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <gdk/gdk.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GDK_TYPE_BROADWAY_DISPLAY_MANAGER (gdk_broadway_display_manager_get_type ())
|
|
||||||
#define GDK_BROADWAY_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_DISPLAY_MANAGER, GdkBroadwayDisplayManager))
|
|
||||||
|
|
||||||
#ifdef GDK_COMPILATION
|
|
||||||
typedef struct _GdkBroadwayDisplayManager GdkBroadwayDisplayManager;
|
|
||||||
#else
|
|
||||||
typedef GdkDisplayManager _GdkBroadwayDisplayManager;
|
|
||||||
#endif
|
|
||||||
typedef struct _GdkDisplayManagerClass GdkBroadwayDisplayManagerClass;
|
|
||||||
|
|
||||||
GType gdk_broadway_display_manager_get_type (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GDK_BROADWAY_DISPLAY_MANAGER_H__ */
|
|
||||||
@ -1,103 +0,0 @@
|
|||||||
/* GDK - The GIMP Drawing Kit
|
|
||||||
* gdkdisplaymanager-broadway.c
|
|
||||||
*
|
|
||||||
* Copyright (C) 2005 Imendio AB
|
|
||||||
* Copyright 2010 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* Author: Matthias clasen
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "gdkdisplay-broadway.h"
|
|
||||||
#include "gdkbroadwaydisplaymanager.h"
|
|
||||||
#include "gdkprivate-broadway.h"
|
|
||||||
|
|
||||||
#include "gdkdisplaymanagerprivate.h"
|
|
||||||
#include "gdkinternals.h"
|
|
||||||
|
|
||||||
struct _GdkBroadwayDisplayManager
|
|
||||||
{
|
|
||||||
GdkDisplayManager parent;
|
|
||||||
|
|
||||||
gboolean init_failed;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void g_initable_iface_init (GInitableIface *iface);
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GdkBroadwayDisplayManager, gdk_broadway_display_manager, GDK_TYPE_DISPLAY_MANAGER,
|
|
||||||
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, g_initable_iface_init))
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gdk_broadway_display_manager_initable_init (GInitable *initable,
|
|
||||||
GCancellable *cancellable,
|
|
||||||
GError **error)
|
|
||||||
{
|
|
||||||
const gchar *display_name;
|
|
||||||
gint port;
|
|
||||||
GdkBroadwayServer *server;
|
|
||||||
|
|
||||||
display_name = g_getenv ("BROADWAY_DISPLAY");
|
|
||||||
|
|
||||||
port = 0;
|
|
||||||
if (display_name != NULL)
|
|
||||||
{
|
|
||||||
if (*display_name == ':')
|
|
||||||
display_name++;
|
|
||||||
port = strtol(display_name, NULL, 10);
|
|
||||||
}
|
|
||||||
if (port == 0)
|
|
||||||
port = 1;
|
|
||||||
|
|
||||||
server = _gdk_broadway_server_new (port, NULL);
|
|
||||||
if (server == NULL)
|
|
||||||
{
|
|
||||||
GDK_BROADWAY_DISPLAY_MANAGER (initable)->init_failed = TRUE;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_unref (server);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
g_initable_iface_init (GInitableIface *iface)
|
|
||||||
{
|
|
||||||
iface->init = gdk_broadway_display_manager_initable_init;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gdk_broadway_display_manager_init (GdkBroadwayDisplayManager *manager)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gdk_broadway_display_manager_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
if (!GDK_BROADWAY_DISPLAY_MANAGER (object)->init_failed)
|
|
||||||
g_error ("A GdkBroadwayDisplayManager object was finalized. This should not happen");
|
|
||||||
G_OBJECT_CLASS (gdk_broadway_display_manager_parent_class)->finalize (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gdk_broadway_display_manager_class_init (GdkBroadwayDisplayManagerClass *class)
|
|
||||||
{
|
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
|
||||||
|
|
||||||
object_class->finalize = gdk_broadway_display_manager_finalize;
|
|
||||||
}
|
|
||||||
@ -48,7 +48,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_BROADWAY
|
#ifdef GDK_WINDOWING_BROADWAY
|
||||||
#include "broadway/gdkbroadwaydisplaymanager.h"
|
|
||||||
#include "broadway/gdkprivate-broadway.h"
|
#include "broadway/gdkprivate-broadway.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user