emacs-devel
[Top][All Lists]
Advanced

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

Re: Gtk tabs in emacs, new branch.


From: YAMAMOTO Mitsuharu
Subject: Re: Gtk tabs in emacs, new branch.
Date: Sat, 10 Apr 2010 11:56:53 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Sat, 10 Apr 2010 02:27:45 +0300, Juri Linkov <address@hidden> said:

> I've published a new branch that implements tabs for non-toolkit X
> builds.  It is at bzr.savannah.gnu.org/srv/bzr/emacs/x-tabs.  The
> tab bar is modelled after the tool bar.  Tab functions share some
> similarities with frame-, window- and buffer-related functions (same
> name conventions, etc.)

The following patch will make a few things more consistent with my
2010-01-09 changes.

                                     YAMAMOTO Mitsuharu
                                address@hidden

=== modified file 'src/window.h'
*** src/window.h        2010-04-09 23:19:38 +0000
--- src/window.h        2010-04-10 01:34:30 +0000
***************
*** 415,425 ****
    (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \
     && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window))
  
  /* Return the frame y-position at which window W starts.
     This includes a header line, if any.  */
  
  #define WINDOW_TOP_EDGE_Y(W) \
!   (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
      ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
     + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
  
--- 415,431 ----
    (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \
     && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window))
  
+ /* 1 if W is a tab bar window.  */
+ 
+ #define WINDOW_TAB_BAR_P(W) \
+   (WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \
+    && (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window))
+ 
  /* Return the frame y-position at which window W starts.
     This includes a header line, if any.  */
  
  #define WINDOW_TOP_EDGE_Y(W) \
!   (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W) || WINDOW_TAB_BAR_P (W)) \
      ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
     + WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
  
***************
*** 427,433 ****
     This includes a mode line, if any.  */
  
  #define WINDOW_BOTTOM_EDGE_Y(W) \
!   (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
      ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
     + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
  
--- 433,439 ----
     This includes a mode line, if any.  */
  
  #define WINDOW_BOTTOM_EDGE_Y(W) \
!   (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W) || WINDOW_TAB_BAR_P (W)) \
      ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
     + WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
  

=== modified file 'src/xfns.c'
*** src/xfns.c  2010-04-09 23:19:38 +0000
--- src/xfns.c  2010-04-10 02:35:00 +0000
***************
*** 1540,1546 ****
      {
        int height = FRAME_INTERNAL_BORDER_WIDTH (f);
        int width = FRAME_PIXEL_WIDTH (f);
!       int y = nlines * FRAME_LINE_HEIGHT (f);
  
        /* height can be zero here. */
        if (height > 0 && width > 0)
--- 1540,1547 ----
      {
        int height = FRAME_INTERNAL_BORDER_WIDTH (f);
        int width = FRAME_PIXEL_WIDTH (f);
!       int y = (FRAME_MENU_BAR_LINES (f) + FRAME_TOOL_BAR_LINES (f)
!              + nlines) * FRAME_LINE_HEIGHT (f);
  
        /* height can be zero here. */
        if (height > 0 && width > 0)

=== modified file 'src/xterm.c'
*** src/xterm.c 2010-04-09 23:19:38 +0000
--- src/xterm.c 2010-04-10 02:31:59 +0000
***************
*** 751,761 ****
      {
        int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y));
  
-       /* Internal border is drawn below the tab bar.  */
-       if (WINDOWP (f->tab_bar_window)
-         && w == XWINDOW (f->tab_bar_window))
-       y -= width;
- 
        BLOCK_INPUT;
        x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                    0, y, width, height, False);
--- 751,756 ----





reply via email to

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