Commits

Jeff Sparkes committed d990606

Convert XLIKE_clear_frame to cairo for Gtk.

* redisplay-gtk.c (XLIKE_clear_frame): Copy to here and convert to
cairo.

* redisplay-x.c (XLIKE_clear_frame): Move here.

Comments (0)

Files changed (4)

src/ChangeLog.GTK

+2012-05-11  Jeff Sparkes  <jsparkes@gmail.com>
+
+	* redisplay-gtk.c (XLIKE_clear_frame): Copy to here and convert to cairo.
+
+	* redisplay-x.c (XLIKE_clear_frame): Move here.
+
 2012-05-10  Jeff Sparkes  <jsparkes@gmail.com>
 
 	* redisplay-gtk.c (XLIKE_output_string): Remove unused Xlib

src/redisplay-gtk.c

   cairo_destroy (cr);
 }
 
+static void
+XLIKE_clear_frame (struct frame *f)
+{
+  GtkWidget *widget = FRAME_GTK_TEXT_WIDGET (f);
+  cairo_t *cr = gdk_cairo_create (gtk_widget_get_window (widget));
+  int x, y, width, height;
+  Lisp_Object frame;
+
+  /* #### GEOM! This clears the internal border and gutter (and scrollbars)
+     but not the toolbar.  Correct? */
+  x = FRAME_LEFT_INTERNAL_BORDER_START (f);
+  width = (FRAME_RIGHT_INTERNAL_BORDER_END (f) - x);
+  /* #### This adjustment by 1 should be being done in the macros.
+     There is some small differences between when the menubar is on
+     and off that we still need to deal with.  The adjustment also occurs in
+     redisplay_clear_top_of_window(). */
+  y = FRAME_TOP_INTERNAL_BORDER_START (f) - 1;
+  height = (FRAME_BOTTOM_INTERNAL_BORDER_END (f) - y);
+
+  cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
+  gtk_fill_rectangle (cr, x, y, width, height);
+
+  frame = wrap_frame (f);
+
+  if (!UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vdefault_face, frame))
+      || !UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vleft_margin_face, frame))
+      || !UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vright_margin_face, frame)))
+    {
+      XLIKE_clear_frame_windows (f->root_window);
+    }
+}
+
 /*****************************************************************************
  Draw a shadow around the given area using the standard theme engine routines.
  ****************************************************************************/

src/redisplay-x.c

     }
 }
 
+static void
+XLIKE_clear_frame_windows (Lisp_Object window)
+{
+  for (; !NILP (window); window = XWINDOW (window)->next)
+    XLIKE_clear_frame_window (window);
+}
+
+static void
+XLIKE_clear_frame (struct frame *f)
+{
+  XLIKE_DISPLAY dpy = GET_XLIKE_X_DISPLAY (XDEVICE (f->device));
+  XLIKE_WINDOW x_win = GET_XLIKE_WINDOW (f);
+  int x, y, width, height;
+  Lisp_Object frame;
+
+  /* #### GEOM! This clears the internal border and gutter (and scrollbars)
+     but not the toolbar.  Correct? */
+  x = FRAME_LEFT_INTERNAL_BORDER_START (f);
+  width = (FRAME_RIGHT_INTERNAL_BORDER_END (f) - x);
+  /* #### This adjustment by 1 should be being done in the macros.
+     There is some small differences between when the menubar is on
+     and off that we still need to deal with.  The adjustment also occurs in
+     redisplay_clear_top_of_window(). */
+  y = FRAME_TOP_INTERNAL_BORDER_START (f) - 1;
+  height = (FRAME_BOTTOM_INTERNAL_BORDER_END (f) - y);
+
+  XLIKE_CLEAR_AREA (dpy, x_win, x, y, width, height);
+
+  frame = wrap_frame (f);
+
+  if (!UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vdefault_face, frame))
+      || !UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vleft_margin_face, frame))
+      || !UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vright_margin_face, frame)))
+    {
+      XLIKE_clear_frame_windows (f->root_window);
+    }
+  {
+    struct device *d = XDEVICE (f->device);
+    if (!(check_if_pending_expose_event (d)))
+      XFlush (DEVICE_X_DISPLAY (d));
+  }
+}
+
+
 /*****************************************************************************
  x_bevel_area
 

src/redisplay-xlike-inc.c

 				     struct display_line *dl,
 				     int xpos, face_index findex);
 static void XLIKE_clear_frame_windows (Lisp_Object window);
+static void XLIKE_clear_frame (struct frame *f);
 static void XLIKE_bevel_area (struct window *w, face_index findex,
 			      int x, int y, int width, int height,
 			      int shadow_thickness, int edges,
 				 WINDOW_TEXT_BOTTOM (w));
 }
 
-static void
-XLIKE_clear_frame_windows (Lisp_Object window)
-{
-  for (; !NILP (window); window = XWINDOW (window)->next)
-    XLIKE_clear_frame_window (window);
-}
-
-static void
-XLIKE_clear_frame (struct frame *f)
-{
-  XLIKE_DISPLAY dpy = GET_XLIKE_X_DISPLAY (XDEVICE (f->device));
-  XLIKE_WINDOW x_win = GET_XLIKE_WINDOW (f);
-  int x, y, width, height;
-  Lisp_Object frame;
-
-  /* #### GEOM! This clears the internal border and gutter (and scrollbars)
-     but not the toolbar.  Correct? */
-  x = FRAME_LEFT_INTERNAL_BORDER_START (f);
-  width = (FRAME_RIGHT_INTERNAL_BORDER_END (f) - x);
-  /* #### This adjustment by 1 should be being done in the macros.
-     There is some small differences between when the menubar is on
-     and off that we still need to deal with.  The adjustment also occurs in
-     redisplay_clear_top_of_window(). */
-  y = FRAME_TOP_INTERNAL_BORDER_START (f) - 1;
-  height = (FRAME_BOTTOM_INTERNAL_BORDER_END (f) - y);
-
-  XLIKE_CLEAR_AREA (dpy, x_win, x, y, width, height);
-
-  frame = wrap_frame (f);
-
-  if (!UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vdefault_face, frame))
-      || !UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vleft_margin_face, frame))
-      || !UNBOUNDP (FACE_BACKGROUND_PIXMAP (Vright_margin_face, frame)))
-    {
-      XLIKE_clear_frame_windows (f->root_window);
-    }
-#ifdef THIS_IS_X
-  {
-    struct device *d = XDEVICE (f->device);
-    if (!(check_if_pending_expose_event (d)))
-      XFlush (DEVICE_X_DISPLAY (d));
-  }
-#endif /* THIS_IS_X */
-}
-
 
 /************************************************************************/
 /*                            initialization                            */
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.