/[emacs]/emacs/src/xterm.h
ViewVC logotype

Diff of /emacs/src/xterm.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.130.2.1 by miles, Fri Apr 4 06:21:10 2003 UTC revision 1.130.2.2 by miles, Tue Oct 14 23:22:52 2003 UTC
# Line 126  typedef GtkWidget *xt_or_gtk_widget; Line 126  typedef GtkWidget *xt_or_gtk_widget;
126  struct x_bitmap_record  struct x_bitmap_record
127  {  {
128    Pixmap pixmap;    Pixmap pixmap;
129      int have_mask;
130      Pixmap mask;
131    char *file;    char *file;
132    int refcount;    int refcount;
133    /* Record some info about this pixmap.  */    /* Record some info about this pixmap.  */
# Line 181  struct x_display_info Line 183  struct x_display_info
183    /* The root window of this screen.  */    /* The root window of this screen.  */
184    Window root_window;    Window root_window;
185    
186      /* Client leader window.  */
187      Window client_leader_window;
188    
189    /* The cursor to use for vertical scroll bars.  */    /* The cursor to use for vertical scroll bars.  */
190    Cursor vertical_scroll_bar_cursor;    Cursor vertical_scroll_bar_cursor;
191    
# Line 287  struct x_display_info Line 292  struct x_display_info
292    /* Other WM communication */    /* Other WM communication */
293    Atom Xatom_wm_configure_denied; /* When our config request is denied */    Atom Xatom_wm_configure_denied; /* When our config request is denied */
294    Atom Xatom_wm_window_moved;     /* When the WM moves us.  */    Atom Xatom_wm_window_moved;     /* When the WM moves us.  */
295      Atom Xatom_wm_client_leader;    /* Id of client leader window.  */
296    
297    /* EditRes protocol */    /* EditRes protocol */
298    Atom Xatom_editres;    Atom Xatom_editres;
# Line 354  struct x_display_info Line 360  struct x_display_info
360       use this directly, call x_color_cells instead.  */       use this directly, call x_color_cells instead.  */
361    XColor *color_cells;    XColor *color_cells;
362    int ncolor_cells;    int ncolor_cells;
363    
364      /* Bits and shifts to use to compose pixel values on TrueColor visuals.  */
365      int red_bits, blue_bits, green_bits;
366      int red_offset, blue_offset, green_offset;
367    
368      /* The type of window manager we have.  If we move FRAME_OUTER_WINDOW
369         to x/y 0/0, some window managers (type A) puts the window manager
370         decorations outside the screen and FRAME_OUTER_WINDOW exactly at 0/0.
371         Other window managers (type B) puts the window including decorations
372         at 0/0, so FRAME_OUTER_WINDOW is a bit below 0/0.
373         Record the type of WM in use so we can compensate for type A WMs.  */
374      enum
375        {
376          X_WMTYPE_UNKNOWN,
377          X_WMTYPE_A,
378          X_WMTYPE_B
379        } wm_type;
380  };  };
381    
382    #ifdef HAVE_X_I18N
383    /* Whether or not to use XIM if we have it.  */
384    extern int use_xim;
385    #endif
386    
387  /* This checks to make sure we have a display.  */  /* This checks to make sure we have a display.  */
388  extern void check_x P_ ((void));  extern void check_x P_ ((void));
389    
# Line 400  extern void x_find_ccl_program P_ ((stru Line 428  extern void x_find_ccl_program P_ ((stru
428    
429  struct x_output  struct x_output
430  {  {
   /* Position of the X window (x and y offsets in root window).  */  
   int left_pos;  
   int top_pos;  
   
   /* Border width of the X window as known by the X window system.  */  
   int border_width;  
   
   /* Size of the X window in pixels.  */  
   int pixel_height, pixel_width;  
   
431    /* Height of menu bar widget, in pixels.    /* Height of menu bar widget, in pixels.
432       Zero if not using the X toolkit.       Zero if not using the X toolkit.
433       When using the toolkit, this value is not meaningful       When using the toolkit, this value is not meaningful
# Line 420  struct x_output Line 438  struct x_output
438       Zero if not using an external tool bar.  */       Zero if not using an external tool bar.  */
439    int toolbar_height;    int toolbar_height;
440    
   /* Height of a line, in pixels.  */  
   int line_height;  
   
441    /* The tiled border used when the mouse is out of the frame.  */    /* The tiled border used when the mouse is out of the frame.  */
442    Pixmap border_tile;    Pixmap border_tile;
443    
# Line 431  struct x_output Line 446  struct x_output
446    GC reverse_gc;                        /* Reverse video */    GC reverse_gc;                        /* Reverse video */
447    GC cursor_gc;                         /* cursor drawing */    GC cursor_gc;                         /* cursor drawing */
448    
   /* Width of the internal border.  This is a line of background color  
      just inside the window's border.  When the frame is selected,  
      a highlighting is displayed inside the internal border.  */  
   int internal_border_width;  
   
449    /* The X window used for this frame.    /* The X window used for this frame.
450       May be zero while the frame object is being created       May be zero while the frame object is being created
451       and the X window has not yet been created.  */       and the X window has not yet been created.  */
# Line 551  struct x_output Line 561  struct x_output
561       to the mask as we go.  */       to the mask as we go.  */
562    XWMHints wm_hints;    XWMHints wm_hints;
563    
   /* The size of the extra width currently allotted for vertical  
      scroll bars, in pixels.  */  
   int vertical_scroll_bar_extra;  
   
   /* The extra width currently allotted for the areas in which  
      truncation marks, continuation marks, and overlay arrows are  
      displayed.  */  
   int left_fringe_width, right_fringe_width;  
   int fringe_cols, fringes_extra;  
   
   /* This is the gravity value for the specified window position.  */  
   int win_gravity;  
   
   /* The geometry flags for this window.  */  
   int size_hint_flags;  
   
564    /* This is the Emacs structure for the X display this frame is on.  */    /* This is the Emacs structure for the X display this frame is on.  */
565    struct x_display_info *display_info;    struct x_display_info *display_info;
566    
# Line 616  struct x_output Line 610  struct x_output
610       zero, tell Xt not to wait.  */       zero, tell Xt not to wait.  */
611    int wait_for_wm;    int wait_for_wm;
612    
   /* See enum below */  
   int want_fullscreen;  
   
   /* This many pixels are the difference between the outer window (i.e. the  
      left of the window manager decoration) and FRAME_X_WINDOW. */  
   int x_pixels_diff;  
   
   /* This many pixels are the difference between the outer window (i.e. the  
      top of the window manager titlebar) and FRAME_X_WINDOW. */  
   int y_pixels_diff;  
   
613    /* As x_pixels_diff, but to FRAME_OUTER_WINDOW.  For some reason the    /* As x_pixels_diff, but to FRAME_OUTER_WINDOW.  For some reason the
614       two might differ by a pixel, depending on WM */       two might differ by a pixel, depending on WM */
615    int x_pixels_outer_diff;    int x_pixels_outer_diff;
# Line 640  struct x_output Line 623  struct x_output
623       frame, or IMPLICIT if we received an EnterNotify.       frame, or IMPLICIT if we received an EnterNotify.
624       FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */       FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
625    int focus_state;    int focus_state;
626    
627      /* The latest move we made to FRAME_OUTER_WINDOW.  Saved so we can
628         compensate for type A WMs (see wm_type in dpyinfo above).  */
629      int expected_top;
630      int expected_left;
631    
632      /* The offset we need to add to compensate for type A WMs.  */
633      int move_offset_top;
634      int move_offset_left;
635    
636      /* Nonzero if we have made a move and needs to check if the WM placed us
637         at the right position.  */
638      int check_expected_move;
639  };  };
640    
641  #define No_Cursor (None)  #define No_Cursor (None)
# Line 688  enum Line 684  enum
684    
685  #define FRAME_FONT(f) ((f)->output_data.x->font)  #define FRAME_FONT(f) ((f)->output_data.x->font)
686  #define FRAME_FONTSET(f) ((f)->output_data.x->fontset)  #define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
 #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width)  
687  #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)  #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
688  #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height)  #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height)
 #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)  
   
 /* Width of the default font of frame F.  Must be defined by each  
    terminal specific header.  */  
 #define FRAME_DEFAULT_FONT_WIDTH(F)     FONT_WIDTH (FRAME_FONT (F))  
689  #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset)  #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset)
690    
691  /* This gives the x_display_info structure for the display F is on.  */  /* This gives the x_display_info structure for the display F is on.  */
# Line 717  enum Line 707  enum
707  /* This is the 'font_info *' which frame F has.  */  /* This is the 'font_info *' which frame F has.  */
708  #define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table)  #define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table)
709    
 /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}.  */  
 #define PIXEL_WIDTH(f) ((f)->output_data.x->pixel_width)  
 #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height)  
   
710  /* The difference in pixels between the top left corner of the  /* The difference in pixels between the top left corner of the
711     Emacs window (including possible window manager decorations)     Emacs window (including possible window manager decorations)
712     and FRAME_X_WINDOW (f).  */     and FRAME_X_WINDOW (f).  */
# Line 752  enum Line 738  enum
738  #define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache  #define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache
739    
740    
 /* Total width of fringes reserved for drawing truncation bitmaps,  
    continuation bitmaps and alike.  The width is in canonical char  
    units of the frame.  This must currently be the case because window  
    sizes aren't pixel values.  If it weren't the case, we wouldn't be  
    able to split windows horizontally nicely.  */  
   
 #define FRAME_X_FRINGE_COLS(F)  ((F)->output_data.x->fringe_cols)  
   
 /* Total width of fringes in pixels.  */  
   
 #define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.x->fringes_extra)  
   
 /* Pixel-width of the left and right fringe.  */  
   
 #define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.x->left_fringe_width)  
 #define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.x->right_fringe_width)  
   
   
   
741  /* X-specific scroll bar stuff.  */  /* X-specific scroll bar stuff.  */
742    
743  /* We represent scroll bars as lisp vectors.  This allows us to place  /* We represent scroll bars as lisp vectors.  This allows us to place
# Line 912  struct scroll_bar Line 879  struct scroll_bar
879  #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)  #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
880    
881    
 /* Manipulating pixel sizes and character sizes.  
    Knowledge of which factors affect the overall size of the window should  
    be hidden in these macros, if that's possible.  
   
    Return the upper/left pixel position of the character cell on frame F  
    at ROW/COL.  */  
 #define CHAR_TO_PIXEL_ROW(f, row) \  
   ((f)->output_data.x->internal_border_width \  
    + (row) * (f)->output_data.x->line_height)  
 #define CHAR_TO_PIXEL_COL(f, col) \  
   ((f)->output_data.x->internal_border_width \  
    + (col) * FONT_WIDTH ((f)->output_data.x->font))  
   
 /* Return the pixel width/height of frame F if it has  
    WIDTH columns/HEIGHT rows.  */  
 #define CHAR_TO_PIXEL_WIDTH(f, width) \  
   (CHAR_TO_PIXEL_COL (f, width) \  
    + (f)->output_data.x->vertical_scroll_bar_extra \  
    + (f)->output_data.x->fringes_extra \  
    + (f)->output_data.x->internal_border_width)  
 #define CHAR_TO_PIXEL_HEIGHT(f, height) \  
   (CHAR_TO_PIXEL_ROW (f, height) \  
    + (f)->output_data.x->internal_border_width)  
   
   
 /* Return the row/column (zero-based) of the character cell containing  
    the pixel on FRAME at ROW/COL.  */  
 #define PIXEL_TO_CHAR_ROW(f, row) \  
   (((row) - (f)->output_data.x->internal_border_width) \  
    / (f)->output_data.x->line_height)  
 #define PIXEL_TO_CHAR_COL(f, col) \  
   (((col) - (f)->output_data.x->internal_border_width) \  
    / FONT_WIDTH ((f)->output_data.x->font))  
   
 /* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on  
    frame F?  */  
 #define PIXEL_TO_CHAR_WIDTH(f, width) \  
   (PIXEL_TO_CHAR_COL (f, ((width) \  
                           - (f)->output_data.x->internal_border_width \  
                           - (f)->output_data.x->fringes_extra \  
                           - (f)->output_data.x->vertical_scroll_bar_extra)))  
 #define PIXEL_TO_CHAR_HEIGHT(f, height) \  
   (PIXEL_TO_CHAR_ROW (f, ((height) \  
                           - (f)->output_data.x->internal_border_width)))  
   
   
882  /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT  /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
883     or SELECTION_CLEAR_EVENT, then its contents are really described     or SELECTION_CLEAR_EVENT, then its contents are really described
884     by this structure.  */     by this structure.  */
# Line 1091  extern int x_create_bitmap_from_data P_ Line 1012  extern int x_create_bitmap_from_data P_
1012                                            unsigned int, unsigned int));                                            unsigned int, unsigned int));
1013  extern int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object));  extern int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object));
1014  extern void x_destroy_bitmap P_ ((struct frame *, int));  extern void x_destroy_bitmap P_ ((struct frame *, int));
1015    extern int x_create_bitmap_mask P_ ((struct frame * , int));
1016    
1017    #ifdef USE_GTK
1018    extern int xg_set_icon P_ ((struct frame *, Lisp_Object));
1019    #endif /* USE_GTK */
1020    
1021  extern void x_real_positions P_ ((struct frame *, int *, int *));  extern void x_real_positions P_ ((struct frame *, int *, int *));
1022  extern int defined_color P_ ((struct frame *, char *, XColor *, int));  extern int defined_color P_ ((struct frame *, char *, XColor *, int));
1023  extern void x_set_border_pixel P_ ((struct frame *, int));  extern void x_set_border_pixel P_ ((struct frame *, int));
# Line 1117  extern void x_set_tool_bar_lines P_ ((st Line 1044  extern void x_set_tool_bar_lines P_ ((st
1044    
1045  /* Defined in xfaces.c */  /* Defined in xfaces.c */
1046    
 extern int frame_update_line_height P_ ((struct frame *));  
1047  extern int compute_glyph_face P_ ((struct frame *, int, int));  extern int compute_glyph_face P_ ((struct frame *, int, int));
1048  extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int));  extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int));
1049  extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap,  extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap,
# Line 1137  extern void widget_store_internal_border Line 1063  extern void widget_store_internal_border
1063    
1064  /* Defined in xsmfns.c */  /* Defined in xsmfns.c */
1065  #ifdef HAVE_X_SM  #ifdef HAVE_X_SM
1066  extern void x_session_initialize P_ ((void));  extern void x_session_initialize P_ ((struct x_display_info *dpyinfo));
1067  extern int x_session_check_input P_ ((struct input_event *bufp,  extern int x_session_check_input P_ ((struct input_event *bufp,
1068                                        int *numchars));                                        int *numchars));
1069  extern int x_session_have_connection P_ ((void));  extern int x_session_have_connection P_ ((void));
# Line 1161  extern int x_session_have_connection P_ Line 1087  extern int x_session_have_connection P_
1087     (nr).y = (ry),                                       \     (nr).y = (ry),                                       \
1088     (nr).width = (rwidth),                               \     (nr).width = (rwidth),                               \
1089     (nr).height = (rheight))     (nr).height = (rheight))
1090    
1091    /* arch-tag: 78a7972a-b18f-4694-861a-0780c4b3090e
1092       (do not change this comment) */

Legend:
Removed from v.1.130.2.1  
changed lines
  Added in v.1.130.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26