[mutter] Remove MetaImageWindow
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Remove MetaImageWindow
- Date: Thu, 23 Sep 2010 10:58:20 +0000 (UTC)
commit a3c6486e525d632a8f6043e38f537782b8560f55
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 21 10:39:29 2010 +0200
Remove MetaImageWindow
The code isn't used anymore.
https://bugzilla.gnome.org/show_bug.cgi?id=630203
src/include/ui.h | 14 --------
src/ui/ui.c | 91 ------------------------------------------------------
2 files changed, 0 insertions(+), 105 deletions(-)
---
diff --git a/src/include/ui.h b/src/include/ui.h
index bc94999..c53ef1e 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -33,8 +33,6 @@
typedef struct _MetaUI MetaUI;
-typedef struct _MetaImageWindow MetaImageWindow;
-
typedef gboolean (* MetaEventFunc) (XEvent *xevent, gpointer data);
typedef enum
@@ -132,18 +130,6 @@ void meta_ui_window_menu_popup (MetaWindowMenu *menu,
void meta_ui_window_menu_free (MetaWindowMenu *menu);
-MetaImageWindow* meta_image_window_new (Display *xdisplay,
- int screen_number,
- int max_width,
- int max_height);
-void meta_image_window_free (MetaImageWindow *iw);
-void meta_image_window_set_showing (MetaImageWindow *iw,
- gboolean showing);
-void meta_image_window_set (MetaImageWindow *iw,
- GdkPixbuf *pixbuf,
- int x,
- int y);
-
/* FIXME these lack a display arg */
GdkPixbuf* meta_gdk_pixbuf_get_from_window (GdkPixbuf *dest,
Window xwindow,
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 5895f18..4b09dc9 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -355,97 +355,6 @@ meta_ui_window_menu_free (MetaWindowMenu *menu)
meta_window_menu_free (menu);
}
-struct _MetaImageWindow
-{
- GtkWidget *window;
- GdkPixmap *pixmap;
-};
-
-MetaImageWindow*
-meta_image_window_new (Display *xdisplay,
- int screen_number,
- int max_width,
- int max_height)
-{
- MetaImageWindow *iw;
- GdkDisplay *gdisplay;
- GdkScreen *gscreen;
-
- iw = g_new (MetaImageWindow, 1);
- iw->window = gtk_window_new (GTK_WINDOW_POPUP);
-
- gdisplay = gdk_x11_lookup_xdisplay (xdisplay);
- gscreen = gdk_display_get_screen (gdisplay, screen_number);
-
- gtk_window_set_screen (GTK_WINDOW (iw->window), gscreen);
-
- gtk_widget_realize (iw->window);
- iw->pixmap = gdk_pixmap_new (gtk_widget_get_window (iw->window),
- max_width, max_height,
- -1);
-
- gtk_widget_set_size_request (iw->window, 1, 1);
- gtk_widget_set_double_buffered (iw->window, FALSE);
- gtk_widget_set_app_paintable (iw->window, TRUE);
-
- return iw;
-}
-
-void
-meta_image_window_free (MetaImageWindow *iw)
-{
- gtk_widget_destroy (iw->window);
- g_object_unref (G_OBJECT (iw->pixmap));
- g_free (iw);
-}
-
-void
-meta_image_window_set_showing (MetaImageWindow *iw,
- gboolean showing)
-{
- if (showing)
- gtk_widget_show_all (iw->window);
- else
- {
- gtk_widget_hide (iw->window);
- meta_core_increment_event_serial (
- GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
- }
-}
-
-void
-meta_image_window_set (MetaImageWindow *iw,
- GdkPixbuf *pixbuf,
- int x,
- int y)
-{
- GdkWindow *window;
- cairo_t *cr;
-
- /* We use a back pixmap to avoid having to handle exposes, because
- * it's really too slow for large clients being minimized, etc.
- * and this way flicker is genuinely zero.
- */
-
- cr = gdk_cairo_create (iw->pixmap);
- gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
- cairo_paint (cr);
- cairo_destroy (cr);
-
- window = gtk_widget_get_window (iw->window);
-
- gdk_window_set_back_pixmap (window,
- iw->pixmap,
- FALSE);
-
- gdk_window_move_resize (window,
- x, y,
- gdk_pixbuf_get_width (pixbuf),
- gdk_pixbuf_get_height (pixbuf));
-
- gdk_window_clear (window);
-}
-
static GdkColormap*
get_cmap (GdkPixmap *pixmap)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]