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

Diff of /emacs/src/w32term.h

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

revision 1.46 by jasonr, Wed May 22 19:36:13 2002 UTC revision 1.46.2.1 by miles, Fri Apr 4 06:21:04 2003 UTC
# Line 22  Boston, MA 02111-1307, USA.  */ Line 22  Boston, MA 02111-1307, USA.  */
22    
23  #include "w32gui.h"  #include "w32gui.h"
24    
 /* The class of this X application.  */  
 #define EMACS_CLASS "Emacs"  
25    
26  #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0)  #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0)
27  #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)  #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)
# Line 63  extern BOOL bUseDflt; Line 61  extern BOOL bUseDflt;
61    
62  extern struct frame *x_window_to_frame ();  extern struct frame *x_window_to_frame ();
63    
 enum text_cursor_kinds {  
   NO_CURSOR = -1,  
   FILLED_BOX_CURSOR,  
   HOLLOW_BOX_CURSOR,  
   BAR_CURSOR,  
   HBAR_CURSOR  
 };  
   
64  /* Structure recording bitmaps and reference count.  /* Structure recording bitmaps and reference count.
65     If REFCOUNT is 0 then this record is free to be reused.  */     If REFCOUNT is 0 then this record is free to be reused.  */
66    
67  struct w32_bitmap_record  struct w32_bitmap_record
68  {  {
69    Pixmap pixmap;    Pixmap pixmap;
70    char *file;    char *file;
# Line 142  struct w32_display_info Line 132  struct w32_display_info
132    /* The cursor to use for vertical scroll bars.  */    /* The cursor to use for vertical scroll bars.  */
133    Cursor vertical_scroll_bar_cursor;    Cursor vertical_scroll_bar_cursor;
134    
135      /* Resource data base */
136      XrmDatabase xrdb;
137    
138    /* color palette information.  */    /* color palette information.  */
139    int has_palette;    int has_palette;
140    struct w32_palette_entry * color_list;    struct w32_palette_entry * color_list;
# Line 235  struct w32_display_info Line 228  struct w32_display_info
228       event).  It points to the focus frame's selected window's       event).  It points to the focus frame's selected window's
229       frame.  It differs from w32_focus_frame when we're using a global       frame.  It differs from w32_focus_frame when we're using a global
230       minibuffer.  */       minibuffer.  */
231    struct frame *w32_highlight_frame;    struct frame *x_highlight_frame;
232    
233    /* Cache of images.  */    /* Cache of images.  */
234    struct image_cache *image_cache;    struct image_cache *image_cache;
# Line 345  struct w32_output Line 338  struct w32_output
338    /* Foreground color for scroll bars.  A value of -1 means use the    /* Foreground color for scroll bars.  A value of -1 means use the
339       default (black for non-toolkit scroll bars).  */       default (black for non-toolkit scroll bars).  */
340    COLORREF scroll_bar_foreground_pixel;    COLORREF scroll_bar_foreground_pixel;
341      
342    /* Background color for scroll bars.  A value of -1 means use the    /* Background color for scroll bars.  A value of -1 means use the
343       default (background color of the frame for non-toolkit scroll       default (background color of the frame for non-toolkit scroll
344       bars).  */       bars).  */
# Line 355  struct w32_output Line 348  struct w32_output
348    Cursor text_cursor;    Cursor text_cursor;
349    Cursor nontext_cursor;    Cursor nontext_cursor;
350    Cursor modeline_cursor;    Cursor modeline_cursor;
351    Cursor cross_cursor;    Cursor hand_cursor;
352    Cursor hourglass_cursor;    Cursor hourglass_cursor;
353    Cursor horizontal_drag_cursor;    Cursor horizontal_drag_cursor;
354    
355    /* Window whose cursor is hourglass_cursor.  This window is    /* Window whose cursor is hourglass_cursor.  This window is
356       temporarily mapped to display an hourglass cursor.  */       temporarily mapped to display an hourglass cursor.  */
357    Window hourglass_window;    Window hourglass_window;
358      
359    /* Non-zero means hourglass cursor is currently displayed.  */    /* Non-zero means hourglass cursor is currently displayed.  */
360    unsigned hourglass_p : 1;    unsigned hourglass_p : 1;
361    
362    /* Flag to set when the window needs to be completely repainted.  */    /* Flag to set when the window needs to be completely repainted.  */
363    int needs_exposure;    int needs_exposure;
364    
   /* What kind of text cursor is drawn in this window right now?  
      (If there is no cursor (phys_cursor_x < 0), then this means nothing.)  */  
   enum text_cursor_kinds current_cursor;  
   
   /* What kind of text cursor should we draw in the future?  
      This should always be filled_box_cursor or bar_cursor.  */  
   enum text_cursor_kinds desired_cursor;  
   
   /* Width of bar cursor (if we are using that).  */  
   int cursor_width;  
   
365    DWORD dwStyle;    DWORD dwStyle;
366    
367    /* The size of the extra width currently allotted for vertical    /* The size of the extra width currently allotted for vertical
# Line 445  struct w32_output Line 427  struct w32_output
427    
428  extern struct w32_output w32term_display;  extern struct w32_output w32term_display;
429    
430  enum  /* Return the X output data for frame F.  */
431  {  #define FRAME_X_OUTPUT(f) ((f)->output_data.w32)
   /* Values used as a bit mask, BOTH == WIDTH | HEIGHT.  */  
   FULLSCREEN_NONE       = 0,  
   FULLSCREEN_WIDTH      = 1,  
   FULLSCREEN_HEIGHT     = 2,  
   FULLSCREEN_BOTH       = 3,  
   FULLSCREEN_WAIT       = 4,  
   FULLSCREEN_MOVE_WAIT  = 8,  
 };  
432    
433  /* Return the window associated with the frame F.  */  /* Return the window associated with the frame F.  */
434  #define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc)  #define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc)
435    #define FRAME_X_WINDOW(f) ((f)->output_data.w32->window_desc)
436    
437  #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)  #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
438  #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)  #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
# Line 474  enum Line 449  enum
449  #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)  #define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)
450  #define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info)  #define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info)
451    
452    /* This is the `Display *' which frame F is on.  */
453    #define FRAME_X_DISPLAY(f) (0)
454    
455  /* This is the 'font_info *' which frame F has.  */  /* This is the 'font_info *' which frame F has.  */
456  #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table)  #define FRAME_W32_FONT_TABLE(f) (FRAME_W32_DISPLAY_INFO (f)->font_table)
457    
# Line 481  enum Line 459  enum
459  #define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width)  #define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width)
460  #define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height)  #define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height)
461    
 #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.w32->desired_cursor)  
   
462  /* Value is the smallest width of any character in any font on frame F.  */  /* Value is the smallest width of any character in any font on frame F.  */
463    
464  #define FRAME_SMALLEST_CHAR_WIDTH(F) \  #define FRAME_SMALLEST_CHAR_WIDTH(F) \
# Line 615  struct scroll_bar { Line 591  struct scroll_bar {
591    
592  /* Return the length of the rectangle within which the top of the  /* Return the length of the rectangle within which the top of the
593     handle must stay.  This isn't equivalent to the inside height,     handle must stay.  This isn't equivalent to the inside height,
594     because the scroll bar handle has a minimum height.       because the scroll bar handle has a minimum height.
595    
596     This is the real range of motion for the scroll bar, so when we're     This is the real range of motion for the scroll bar, so when we're
597     scaling buffer positions to scroll bar positions, we use this, not     scaling buffer positions to scroll bar positions, we use this, not
# Line 678  struct scroll_bar { Line 654  struct scroll_bar {
654     + (f)->output_data.w32->internal_border_width)     + (f)->output_data.w32->internal_border_width)
655    
656    
657  /* Return the row/column (zero-based) of the character cell containing  /* Return the row/column (zero-based) of the character cell containing
658     the pixel on FRAME at ROW/COL.  */     the pixel on FRAME at ROW/COL.  */
659  #define PIXEL_TO_CHAR_ROW(f, row) \  #define PIXEL_TO_CHAR_ROW(f, row) \
660    (((row) - (f)->output_data.w32->internal_border_width) \    (((row) - (f)->output_data.w32->internal_border_width) \
# Line 721  w32_fill_area (f,hdc,f->output_data.x->b Line 697  w32_fill_area (f,hdc,f->output_data.x->b
697  extern struct font_info *w32_load_font ();  extern struct font_info *w32_load_font ();
698  extern void w32_unload_font ();  extern void w32_unload_font ();
699    
 extern void x_fullscreen_adjust P_ ((struct frame *f, int *, int *,  
                                      int *, int *));  
   
700  /* Define for earlier versions of Visual C */  /* Define for earlier versions of Visual C */
701  #ifndef WM_MOUSEWHEEL  #ifndef WM_MOUSEWHEEL
702  #define WM_MOUSEWHEEL                  (WM_MOUSELAST + 1)  #define WM_MOUSEWHEEL                  (WM_MOUSELAST + 1)
# Line 756  extern void x_fullscreen_adjust P_ ((str Line 729  extern void x_fullscreen_adjust P_ ((str
729  #define WM_EMACS_DESTROY_CARET         (WM_EMACS_START + 16)  #define WM_EMACS_DESTROY_CARET         (WM_EMACS_START + 16)
730  #define WM_EMACS_SHOW_CARET            (WM_EMACS_START + 17)  #define WM_EMACS_SHOW_CARET            (WM_EMACS_START + 17)
731  #define WM_EMACS_HIDE_CARET            (WM_EMACS_START + 18)  #define WM_EMACS_HIDE_CARET            (WM_EMACS_START + 18)
732  #define WM_EMACS_END                   (WM_EMACS_START + 19)  #define WM_EMACS_SETCURSOR             (WM_EMACS_START + 19)
733    #define WM_EMACS_END                   (WM_EMACS_START + 20)
734    
735  #define WND_FONTWIDTH_INDEX    (0)  #define WND_FONTWIDTH_INDEX    (0)
736  #define WND_LINEHEIGHT_INDEX   (4)  #define WND_LINEHEIGHT_INDEX   (4)
737  #define WND_BORDER_INDEX       (8)  #define WND_BORDER_INDEX       (8)
738  #define WND_SCROLLBAR_INDEX    (12)  #define WND_SCROLLBAR_INDEX    (12)
739  #define WND_BACKGROUND_INDEX   (16)  #define WND_BACKGROUND_INDEX   (16)
740  #define WND_LAST_INDEX         (20)  #define WND_LAST_INDEX         (20)
741    
742  #define WND_EXTRA_BYTES     (WND_LAST_INDEX)  #define WND_EXTRA_BYTES     (WND_LAST_INDEX)
# Line 850  extern BOOL parse_button (); Line 824  extern BOOL parse_button ();
824  #define WM_MOUSELEAVE 0x02A3  #define WM_MOUSELEAVE 0x02A3
825  #define TME_LEAVE 0x00000002;  #define TME_LEAVE 0x00000002;
826    
827  typedef struct tagTRACKMOUSEEVENT  typedef struct tagTRACKMOUSEEVENT
828  {  {
829    DWORD cbSize;    DWORD cbSize;
830    DWORD dwFlags;    DWORD dwFlags;
# Line 867  struct frame * check_x_frame (Lisp_Objec Line 841  struct frame * check_x_frame (Lisp_Objec
841  EXFUN (Fx_display_color_p, 1);  EXFUN (Fx_display_color_p, 1);
842  EXFUN (Fx_display_grayscale_p, 1);  EXFUN (Fx_display_grayscale_p, 1);
843  int image_ascent P_ ((struct image *, struct face *));  int image_ascent P_ ((struct image *, struct face *));
844    
845    #define FONT_TYPE_FOR_UNIBYTE(font, ch)                 \
846      ((font)->bdf ? BDF_1D_FONT : ANSI_FONT)
847    
848    #define FONT_TYPE_FOR_MULTIBYTE(font, ch)               \
849      (!(font)->bdf                                         \
850       ? UNICODE_FONT                                       \
851       : ((CHARSET_DIMENSION (CHAR_CHARSET ((ch))) == 1)    \
852          ? BDF_1D_FONT : BDF_2D_FONT))

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.46.2.1

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