summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2014-06-03 16:07:38 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2014-06-03 16:07:38 +0300
commita6dc67255ec682f7aab9ba89769db06bc717a4c9 (patch)
tree921ac285a1d7cd98f02ea6fd24f547fc68af6533
parentbe478298219d2207c8e7a5ba79f20485afe24b70 (diff)
downloadmetacity-a6dc67255ec682f7aab9ba89769db06bc717a4c9.tar.gz
ui.[c/h]: remove MetaImageWindow, it is unused
-rw-r--r--src/include/ui.h14
-rw-r--r--src/ui/ui.c98
2 files changed, 0 insertions, 112 deletions
diff --git a/src/include/ui.h b/src/include/ui.h
index c1ada1f9..36bb6349 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -34,8 +34,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 8a756d5e..38658278 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -493,104 +493,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.
- */
-
- gdk_draw_pixbuf (iw->pixmap,
- gtk_widget_get_style (iw->window)->black_gc,
- pixbuf,
- 0, 0,
- 0, 0,
- gdk_pixbuf_get_width (pixbuf),
- gdk_pixbuf_get_height (pixbuf),
- GDK_RGB_DITHER_NORMAL,
- 0, 0);
- 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)
{