forked from AuroraMiddleware/gtk
broadway: Remove all mentions of visuals
This commit is contained in:
parent
31a0933fe9
commit
8040d78c04
@ -29,8 +29,7 @@ libgdkbroadwayinclude_HEADERS = \
|
||||
gdkbroadwaydisplay.h \
|
||||
gdkbroadwaywindow.h \
|
||||
gdkbroadwaycursor.h \
|
||||
gdkbroadwaymonitor.h \
|
||||
gdkbroadwayvisual.h
|
||||
gdkbroadwaymonitor.h
|
||||
|
||||
EXTRA_DIST += toarray.pl
|
||||
|
||||
@ -73,7 +72,6 @@ libgdk_broadway_la_SOURCES = \
|
||||
gdkscreen-broadway.h \
|
||||
gdkselection-broadway.c \
|
||||
gdktestutils-broadway.c \
|
||||
gdkvisual-broadway.c \
|
||||
gdkwindow-broadway.c \
|
||||
gdkwindow-broadway.h \
|
||||
gdkprivate-broadway.h \
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <gdk/broadway/gdkbroadwaywindow.h>
|
||||
#include <gdk/broadway/gdkbroadwaycursor.h>
|
||||
#include <gdk/broadway/gdkbroadwaymonitor.h>
|
||||
#include <gdk/broadway/gdkbroadwayvisual.h>
|
||||
|
||||
#undef __GDKBROADWAY_H_INSIDE__
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
/* gdkbroadwayvisual.h
|
||||
*
|
||||
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
|
||||
*
|
||||
* 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_VISUAL_H__
|
||||
#define __GDK_BROADWAY_VISUAL_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_VISUAL (gdk_broadway_visual_get_type ())
|
||||
#define GDK_BROADWAY_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisual))
|
||||
#define GDK_BROADWAY_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisualClass))
|
||||
#define GDK_IS_BROADWAY_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_VISUAL))
|
||||
#define GDK_IS_BROADWAY_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_VISUAL))
|
||||
#define GDK_BROADWAY_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisualClass))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkBroadwayVisual GdkBroadwayVisual;
|
||||
#else
|
||||
typedef GdkVisual GdkBroadwayVisual;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayVisualClass GdkBroadwayVisualClass;
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_broadway_visual_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_VISUAL_H__ */
|
@ -36,7 +36,6 @@
|
||||
#include "gdkdisplay-broadway.h"
|
||||
|
||||
#include "gdkbroadwaycursor.h"
|
||||
#include "gdkbroadwayvisual.h"
|
||||
#include "gdkbroadwaywindow.h"
|
||||
|
||||
void _gdk_broadway_resync_windows (void);
|
||||
@ -96,7 +95,6 @@ void _gdk_broadway_screen_size_changed (GdkScreen *screen,
|
||||
void _gdk_broadway_events_got_input (BroadwayInputMsg *message);
|
||||
|
||||
void _gdk_broadway_screen_init_root_window (GdkScreen *screen);
|
||||
void _gdk_broadway_screen_init_visuals (GdkScreen *screen);
|
||||
void _gdk_broadway_display_init_dnd (GdkDisplay *display);
|
||||
GdkDisplay * _gdk_broadway_display_open (const gchar *display_name);
|
||||
void _gdk_broadway_display_queue_events (GdkDisplay *display);
|
||||
|
@ -99,16 +99,10 @@ static void
|
||||
gdk_broadway_screen_finalize (GObject *object)
|
||||
{
|
||||
GdkBroadwayScreen *broadway_screen = GDK_BROADWAY_SCREEN (object);
|
||||
gint i;
|
||||
|
||||
if (broadway_screen->root_window)
|
||||
g_object_unref (broadway_screen->root_window);
|
||||
|
||||
/* Visual Part */
|
||||
for (i = 0; i < broadway_screen->nvisuals; i++)
|
||||
g_object_unref (broadway_screen->visuals[i]);
|
||||
g_free (broadway_screen->visuals);
|
||||
|
||||
G_OBJECT_CLASS (gdk_broadway_screen_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@ -123,7 +117,6 @@ _gdk_broadway_screen_new (GdkDisplay *display,
|
||||
|
||||
broadway_screen = GDK_BROADWAY_SCREEN (screen);
|
||||
broadway_screen->display = display;
|
||||
_gdk_broadway_screen_init_visuals (screen);
|
||||
_gdk_broadway_screen_init_root_window (screen);
|
||||
|
||||
return screen;
|
||||
|
@ -23,7 +23,6 @@
|
||||
#define __GDK_BROADWAY_SCREEN_H__
|
||||
|
||||
#include <gdk/gdkscreenprivate.h>
|
||||
#include <gdk/gdkvisual.h>
|
||||
#include "gdkprivate-broadway.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
@ -46,16 +45,6 @@ struct _GdkBroadwayScreen
|
||||
|
||||
GdkDisplay *display;
|
||||
GdkWindow *root_window;
|
||||
|
||||
/* Visual Part */
|
||||
GdkVisual **visuals;
|
||||
gint nvisuals;
|
||||
GdkVisual *system_visual;
|
||||
GdkVisual *rgba_visual;
|
||||
gint available_depths[7];
|
||||
gint navailable_depths;
|
||||
GdkVisualType available_types[6];
|
||||
gint navailable_types;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayScreenClass
|
||||
|
@ -1,112 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkvisualprivate.h"
|
||||
|
||||
#include "gdkprivate-broadway.h"
|
||||
#include "gdkscreen-broadway.h"
|
||||
#include "gdkinternals.h"
|
||||
|
||||
struct _GdkBroadwayVisual
|
||||
{
|
||||
GdkVisual visual;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayVisualClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwayVisual, gdk_broadway_visual, GDK_TYPE_VISUAL)
|
||||
|
||||
static void
|
||||
gdk_broadway_visual_finalize (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (gdk_broadway_visual_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_visual_class_init (GdkBroadwayVisualClass *visual_class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (visual_class);
|
||||
|
||||
object_class->finalize = gdk_broadway_visual_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_visual_init (GdkBroadwayVisual *visual)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_screen_init_visuals (GdkScreen *screen)
|
||||
{
|
||||
GdkBroadwayScreen *broadway_screen;
|
||||
GdkVisual **visuals;
|
||||
int nvisuals;
|
||||
|
||||
g_return_if_fail (GDK_IS_SCREEN (screen));
|
||||
broadway_screen = GDK_BROADWAY_SCREEN (screen);
|
||||
|
||||
nvisuals = 2;
|
||||
visuals = g_new (GdkVisual *, nvisuals);
|
||||
|
||||
visuals[0] = g_object_new (GDK_TYPE_BROADWAY_VISUAL, NULL);
|
||||
visuals[0]->screen = screen;
|
||||
visuals[0]->type = GDK_VISUAL_TRUE_COLOR;
|
||||
visuals[0]->depth = 32;
|
||||
visuals[0]->byte_order = (G_BYTE_ORDER == G_LITTLE_ENDIAN) ? GDK_LSB_FIRST : GDK_MSB_FIRST;
|
||||
visuals[0]->red_mask = 0xff0000;
|
||||
visuals[0]->green_mask = 0xff00;
|
||||
visuals[0]->blue_mask = 0xff;
|
||||
visuals[0]->colormap_size = 256;
|
||||
visuals[0]->bits_per_rgb = 8;
|
||||
|
||||
visuals[1] = g_object_new (GDK_TYPE_BROADWAY_VISUAL, NULL);
|
||||
visuals[1]->screen = screen;
|
||||
visuals[1]->type = GDK_VISUAL_TRUE_COLOR;
|
||||
visuals[1]->depth = 24;
|
||||
visuals[1]->byte_order = (G_BYTE_ORDER == G_LITTLE_ENDIAN) ? GDK_LSB_FIRST : GDK_MSB_FIRST;
|
||||
visuals[1]->red_mask = 0xff0000;
|
||||
visuals[1]->green_mask = 0xff00;
|
||||
visuals[1]->blue_mask = 0xff;
|
||||
visuals[1]->colormap_size = 256;
|
||||
visuals[1]->bits_per_rgb = 8;
|
||||
|
||||
broadway_screen->system_visual = visuals[1];
|
||||
broadway_screen->rgba_visual = visuals[0];
|
||||
|
||||
broadway_screen->navailable_depths = 2;
|
||||
broadway_screen->available_depths[0] = 32;
|
||||
broadway_screen->available_depths[1] = 24;
|
||||
|
||||
broadway_screen->navailable_types = 1;
|
||||
broadway_screen->available_types[0] = GDK_VISUAL_TRUE_COLOR;
|
||||
|
||||
broadway_screen->visuals = visuals;
|
||||
broadway_screen->nvisuals = nvisuals;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user