emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113975: Minor cleanup for redisplay interface and f


From: Dmitry Antipov
Subject: [Emacs-diffs] trunk r113975: Minor cleanup for redisplay interface and few related functions.
Date: Fri, 23 Aug 2013 04:06:21 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113975
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Fri 2013-08-23 08:03:25 +0400
message:
  Minor cleanup for redisplay interface and few related functions.
  * frame.h (enum text_cursor_kinds): Move from here...
  * dispextern.h (enum text_cursor_kinds): ...to here.
  (toplevel): Drop unnecessary declarations.
  (struct redisplay_interface): Use bool and enum text_cursor_kinds
  in update_window_end_hook and draw_window_cursor functions.
  (display_and_set_cursor, x_update_cursor): Adjust prototypes.
  * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
  * w32term.c (x_update_window_end,w32_draw_window_cursor):
  * xterm.c (x_update_window_end, x_draw_window_cursor):
  * xdisp.c (display_and_set_cursor, update_window_cursor)
  (update_cursor_in_window_tree, x_update_cursor): Use bool and
  enum text_cursor_kinds where appropriate.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/dispextern.h               
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
  src/frame.h                    frame.h-20091113204419-o5vbwnq5f7feedwu-229
  src/nsterm.m                   nsterm.m-20091113204419-o5vbwnq5f7feedwu-8747
  src/w32term.c                  w32term.c-20091113204419-o5vbwnq5f7feedwu-950
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-08-23 03:03:37 +0000
+++ b/src/ChangeLog     2013-08-23 04:03:25 +0000
@@ -1,5 +1,21 @@
 2013-08-23  Dmitry Antipov  <address@hidden>
 
+       Minor cleanup for redisplay interface and few related functions.
+       * frame.h (enum text_cursor_kinds): Move from here...
+       * dispextern.h (enum text_cursor_kinds): ...to here.
+       (toplevel): Drop unnecessary declarations.
+       (struct redisplay_interface): Use bool and enum text_cursor_kinds
+       in update_window_end_hook and draw_window_cursor functions.
+       (display_and_set_cursor, x_update_cursor): Adjust prototypes.
+       * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
+       * w32term.c (x_update_window_end,w32_draw_window_cursor):
+       * xterm.c (x_update_window_end, x_draw_window_cursor):
+       * xdisp.c (display_and_set_cursor, update_window_cursor)
+       (update_cursor_in_window_tree, x_update_cursor): Use bool and
+       enum text_cursor_kinds where appropriate.
+
+2013-08-23  Dmitry Antipov  <address@hidden>
+
        Redesign redisplay interface to drop updated_row and updated_area.
        * dispextern.h (updated_row, updated_area): Remove declaration.
        (struct redisplay_interface): Pass glyph row and row area parameters

=== modified file 'src/dispextern.h'
--- a/src/dispextern.h  2013-08-23 03:03:37 +0000
+++ b/src/dispextern.h  2013-08-23 04:03:25 +0000
@@ -95,18 +95,17 @@
 #define NativeRectangle int
 #endif
 
-/* Structure forward declarations.  Some are here because function
-   prototypes below reference structure types before their definition
-   in this file.  Some are here because not every file including
-   dispextern.h also includes frame.h and windows.h.  */
-
-struct glyph;
-struct glyph_row;
-struct glyph_matrix;
-struct glyph_pool;
-struct frame;
-struct window;
-
+/* Text cursor types.  */
+
+enum text_cursor_kinds
+{
+  DEFAULT_CURSOR = -2,
+  NO_CURSOR = -1,
+  FILLED_BOX_CURSOR,
+  HOLLOW_BOX_CURSOR,
+  BAR_CURSOR,
+  HBAR_CURSOR
+};
 
 /* Values returned from coordinates_in_window.  */
 
@@ -2739,8 +2738,8 @@
      MOUSE_FACE_OVERWRITTEN_P non-zero means that some lines in W
      that contained glyphs in mouse-face were overwritten, so we
      have to update the mouse highlight.  */
-  void (*update_window_end_hook) (struct window *w, int cursor_on_p,
-                                  int mouse_face_overwritten_p);
+  void (*update_window_end_hook) (struct window *w, bool cursor_on_p,
+                                  bool mouse_face_overwritten_p);
 
   /* Move cursor to row/column position VPOS/HPOS, pixel coordinates
      Y/X. HPOS/VPOS are window-relative row and column numbers and X/Y
@@ -2799,10 +2798,10 @@
    0, don't draw cursor.  If ACTIVE_P is 1, system caret
    should track this cursor (when applicable).  */
   void (*draw_window_cursor) (struct window *w,
-                              struct glyph_row *glyph_row,
-                              int x, int y,
-                              int cursor_type, int cursor_width,
-                              int on_p, int active_p);
+                             struct glyph_row *glyph_row,
+                             int x, int y,
+                             enum text_cursor_kinds cursor_type,
+                             int cursor_width, bool on_p, bool active_p);
 
 /* Draw vertical border for window W from (X,Y_0) to (X,Y_1).  */
   void (*draw_vertical_window_border) (struct window *w,
@@ -3195,13 +3194,12 @@
 extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
                                       struct glyph *, int *, int *, int *);
 extern void erase_phys_cursor (struct window *);
-extern void display_and_set_cursor (struct window *,
-                                    int, int, int, int, int);
+extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
 
 extern void set_output_cursor (struct cursor_pos *);
 extern void x_cursor_to (struct window *, int, int, int, int);
 
-extern void x_update_cursor (struct frame *, int);
+extern void x_update_cursor (struct frame *, bool);
 extern void x_clear_cursor (struct window *);
 extern void x_draw_vertical_border (struct window *w);
 

=== modified file 'src/frame.h'
--- a/src/frame.h       2013-08-12 09:34:00 +0000
+++ b/src/frame.h       2013-08-23 04:03:25 +0000
@@ -56,16 +56,6 @@
   vertical_scroll_bar_right
 };
 
-enum text_cursor_kinds
-{
-  DEFAULT_CURSOR = -2,
-  NO_CURSOR = -1,
-  FILLED_BOX_CURSOR,
-  HOLLOW_BOX_CURSOR,
-  BAR_CURSOR,
-  HBAR_CURSOR
-};
-
 enum fullscreen_type
 {
   FULLSCREEN_NONE,

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2013-08-13 15:45:43 +0000
+++ b/src/nsterm.m      2013-08-23 04:03:25 +0000
@@ -742,8 +742,8 @@
 
 
 static void
-ns_update_window_end (struct window *w, int cursor_on_p,
-                      int mouse_face_overwritten_p)
+ns_update_window_end (struct window *w, bool cursor_on_p,
+                      bool mouse_face_overwritten_p)
 /* --------------------------------------------------------------------------
    Finished a grouped sequence of drawing calls
    external (RIF) call; for one window called before update_end
@@ -2341,8 +2341,8 @@
 
 static void
 ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
-                       int x, int y, int cursor_type, int cursor_width,
-                       int on_p, int active_p)
+                      int x, int y, enum text_cursor_kinds cursor_type,
+                      int cursor_width, bool on_p, bool active_p)
 /* --------------------------------------------------------------------------
      External call (RIF): draw cursor.
      Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2013-08-14 16:36:16 +0000
+++ b/src/w32term.c     2013-08-23 04:03:25 +0000
@@ -210,7 +210,6 @@
 int w32_message_fd = -1;
 #endif /* CYGWIN */
 
-static void x_update_window_end (struct window *, int, int);
 static void w32_handle_tool_bar_click (struct frame *,
                                        struct input_event *);
 static void w32_define_cursor (Window, Cursor);
@@ -676,8 +675,8 @@
    here. */
 
 static void
-x_update_window_end (struct window *w, int cursor_on_p,
-                    int mouse_face_overwritten_p)
+x_update_window_end (struct window *w, bool cursor_on_p,
+                    bool mouse_face_overwritten_p)
 {
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
@@ -5300,8 +5299,8 @@
 
 static void
 w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
-                       int x, int y, int cursor_type, int cursor_width,
-                       int on_p, int active_p)
+                       int x, int y, enum text_cursor_kinds cursor_type,
+                       int cursor_width, bool on_p, bool active_p)
 {
   if (on_p)
     {

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2013-08-23 03:03:37 +0000
+++ b/src/xdisp.c       2013-08-23 04:03:25 +0000
@@ -26465,7 +26465,7 @@
    where to put the cursor is specified by HPOS, VPOS, X and Y.  */
 
 void
-display_and_set_cursor (struct window *w, int on,
+display_and_set_cursor (struct window *w, bool on,
                        int hpos, int vpos, int x, int y)
 {
   struct frame *f = XFRAME (w->frame);
@@ -26549,7 +26549,7 @@
    of ON.  */
 
 static void
-update_window_cursor (struct window *w, int on)
+update_window_cursor (struct window *w, bool on)
 {
   /* Don't update cursor in windows whose frame is in the process
      of being deleted.  */
@@ -26585,7 +26585,7 @@
    in the window tree rooted at W.  */
 
 static void
-update_cursor_in_window_tree (struct window *w, int on_p)
+update_cursor_in_window_tree (struct window *w, bool on_p)
 {
   while (w)
     {
@@ -26604,7 +26604,7 @@
    Don't change the cursor's position.  */
 
 void
-x_update_cursor (struct frame *f, int on_p)
+x_update_cursor (struct frame *f, bool on_p)
 {
   update_cursor_in_window_tree (XWINDOW (f->root_window), on_p);
 }

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2013-08-15 05:23:40 +0000
+++ b/src/xterm.c       2013-08-23 04:03:25 +0000
@@ -292,8 +292,6 @@
 static void x_raise_frame (struct frame *);
 static void x_lower_frame (struct frame *);
 static const XColor *x_color_cells (Display *, int *);
-static void x_update_window_end (struct window *, int, int);
-
 static int x_io_error_quitter (Display *);
 static struct terminal *x_create_terminal (struct x_display_info *);
 void x_delete_terminal (struct terminal *);
@@ -612,7 +610,8 @@
    here.  */
 
 static void
-x_update_window_end (struct window *w, int cursor_on_p, int 
mouse_face_overwritten_p)
+x_update_window_end (struct window *w, bool cursor_on_p,
+                    bool mouse_face_overwritten_p)
 {
   Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (XFRAME (w->frame));
 
@@ -7372,7 +7371,9 @@
 /* RIF: Draw cursor on window W.  */
 
 static void
-x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, 
int y, int cursor_type, int cursor_width, int on_p, int active_p)
+x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x,
+                     int y, enum text_cursor_kinds cursor_type,
+                     int cursor_width, bool on_p, bool active_p)
 {
   struct frame *f = XFRAME (WINDOW_FRAME (w));
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]