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

Diff of /emacs/src/macterm.h

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

revision 1.1 by akochoi, Fri Apr 26 23:39:05 2002 UTC revision 1.1.2.1 by miles, Fri Apr 4 06:21:02 2003 UTC
# Line 23  Boston, MA 02111-1307, USA.  */ Line 23  Boston, MA 02111-1307, USA.  */
23  #include "macgui.h"  #include "macgui.h"
24  #include "frame.h"  #include "frame.h"
25    
26  /* The class of this X application.  */  /* Include Carbon.h to define Cursor and Rect.  */
27  #define EMACS_CLASS "Emacs"  #ifdef HAVE_CARBON
28    #undef mktime
29    #undef DEBUG
30    #undef Z
31    #undef free
32    #undef malloc
33    #undef realloc
34    /* Macros max and min defined in lisp.h conflict with those in
35       precompiled header Carbon.h.  */
36    #undef max
37    #undef min
38    #undef init_process
39    #include <Carbon/Carbon.h>
40    #undef Z
41    #define Z (current_buffer->text->z)
42    #undef free
43    #define free unexec_free
44    #undef malloc
45    #define malloc unexec_malloc
46    #undef realloc
47    #define realloc unexec_realloc
48    #undef min
49    #define min(a, b) ((a) < (b) ? (a) : (b))
50    #undef max
51    #define max(a, b) ((a) > (b) ? (a) : (b))
52    #undef init_process
53    #define init_process emacs_init_process
54    #endif /* MAC_OSX */
55    
56  #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b))  #define RGB_TO_ULONG(r, g, b) (((r) << 16) | ((g) << 8) | (b))
57    
# Line 42  Boston, MA 02111-1307, USA.  */ Line 69  Boston, MA 02111-1307, USA.  */
69    
70  #define FONT_MAX_WIDTH(f) FONT_WIDTH(f)  /* fix later */  #define FONT_MAX_WIDTH(f) FONT_WIDTH(f)  /* fix later */
71    
 enum text_cursor_kinds {  
   NO_CURSOR = -1,  
   FILLED_BOX_CURSOR,  
   HOLLOW_BOX_CURSOR,  
   BAR_CURSOR  
 };  
   
72  /* Structure recording bitmaps and reference count.  /* Structure recording bitmaps and reference count.
73     If REFCOUNT is 0 then this record is free to be reused.  */     If REFCOUNT is 0 then this record is free to be reused.  */
74    
75  struct mac_bitmap_record  struct mac_bitmap_record
76  {  {
77    char *bitmap_data;    char *bitmap_data;
78    int refcount;    int refcount;
# Line 103  struct mac_display_info Line 123  struct mac_display_info
123    Window root_window;    Window root_window;
124    
125    /* The cursor to use for vertical scroll bars.  */    /* The cursor to use for vertical scroll bars.  */
126    struct Cursor *vertical_scroll_bar_cursor;    Cursor vertical_scroll_bar_cursor;
127    
128      /* Resource data base */
129      XrmDatabase xrdb;
130    
131  #if 0  #if 0
132    /* color palette information.  */    /* color palette information.  */
# Line 328  struct mac_output { Line 351  struct mac_output {
351    /* Foreground color for scroll bars.  A value of -1 means use the    /* Foreground color for scroll bars.  A value of -1 means use the
352       default (black for non-toolkit scroll bars).  */       default (black for non-toolkit scroll bars).  */
353    unsigned long scroll_bar_foreground_pixel;    unsigned long scroll_bar_foreground_pixel;
354      
355    /* Background color for scroll bars.  A value of -1 means use the    /* Background color for scroll bars.  A value of -1 means use the
356       default (background color of the frame for non-toolkit scroll       default (background color of the frame for non-toolkit scroll
357       bars).  */       bars).  */
358    unsigned long scroll_bar_background_pixel;    unsigned long scroll_bar_background_pixel;
359    
360    /* Descriptor for the cursor in use for this window.  */    /* Descriptor for the cursor in use for this window.  */
361    struct Cursor *text_cursor;    Cursor text_cursor;
362    struct Cursor *nontext_cursor;    Cursor nontext_cursor;
363    struct Cursor *modeline_cursor;    Cursor modeline_cursor;
364    struct Cursor *cross_cursor;    Cursor hand_cursor;
365    struct Cursor *hourglass_cursor;    Cursor hourglass_cursor;
366      Cursor horizontal_drag_cursor;
367  #if 0  #if 0
368    /* Window whose cursor is hourglass_cursor.  This window is temporarily    /* Window whose cursor is hourglass_cursor.  This window is temporarily
369       mapped to display a hourglass-cursor.  */       mapped to display a hourglass-cursor.  */
370    Window hourglass_window;    Window hourglass_window;
371      
372    /* Non-zero means hourglass cursor is currently displayed.  */    /* Non-zero means hourglass cursor is currently displayed.  */
373    unsigned hourglass_p : 1;    unsigned hourglass_p : 1;
374    
# Line 353  struct mac_output { Line 377  struct mac_output {
377    
378  #endif  #endif
379    
   /* 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;  
   
380  #if 0  #if 0
381    DWORD dwStyle;    DWORD dwStyle;
382  #endif  #endif
# Line 416  struct mac_output { Line 429  struct mac_output {
429    /* The background for which the above relief GCs were set up.    /* The background for which the above relief GCs were set up.
430       They are changed only when a different background is involved.  */       They are changed only when a different background is involved.  */
431    unsigned long relief_background;    unsigned long relief_background;
432    
433      /* See enum below */
434      int want_fullscreen;
435    
436      /* This many pixels are the difference between the outer window (i.e. the
437         left of the window manager decoration) and FRAME_X_WINDOW. */
438      int x_pixels_diff;
439    
440      /* This many pixels are the difference between the outer window (i.e. the
441         top of the window manager titlebar) and FRAME_X_WINDOW. */
442      int y_pixels_diff;
443  };  };
444    
445  typedef struct mac_output mac_output;  typedef struct mac_output mac_output;
446    
447    /* Return the X output data for frame F.  */
448    #define FRAME_X_OUTPUT(f) ((f)->output_data.mac)
449    
450  /* Return the Mac window used for displaying data in frame F.  */  /* Return the Mac window used for displaying data in frame F.  */
451  #define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP)  #define FRAME_MAC_WINDOW(f) ((f)->output_data.mac->mWP)
452    #define FRAME_X_WINDOW(f) ((f)->output_data.mac->mWP)
453    
454  #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)  #define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
455  #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)  #define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
# Line 444  typedef struct mac_output mac_output; Line 472  typedef struct mac_output mac_output;
472    
473  /* This is the `Display *' which frame F is on.  */  /* This is the `Display *' which frame F is on.  */
474  #define FRAME_MAC_DISPLAY(f) (0)  #define FRAME_MAC_DISPLAY(f) (0)
475    #define FRAME_X_DISPLAY(f) (0)
476    
477  /* This is the 'font_info *' which frame F has.  */  /* This is the 'font_info *' which frame F has.  */
478  #define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table)  #define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table)
# Line 452  typedef struct mac_output mac_output; Line 481  typedef struct mac_output mac_output;
481  #define PIXEL_WIDTH(f) ((f)->output_data.mac->pixel_width)  #define PIXEL_WIDTH(f) ((f)->output_data.mac->pixel_width)
482  #define PIXEL_HEIGHT(f) ((f)->output_data.mac->pixel_height)  #define PIXEL_HEIGHT(f) ((f)->output_data.mac->pixel_height)
483    
 #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.mac->desired_cursor)  
   
484  /* 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.  */
485    
486  #define FRAME_SMALLEST_CHAR_WIDTH(F) \  #define FRAME_SMALLEST_CHAR_WIDTH(F) \
# Line 578  struct scroll_bar { Line 605  struct scroll_bar {
605    
606  /* Return the length of the rectangle within which the top of the  /* Return the length of the rectangle within which the top of the
607     handle must stay.  This isn't equivalent to the inside height,     handle must stay.  This isn't equivalent to the inside height,
608     because the scroll bar handle has a minimum height.       because the scroll bar handle has a minimum height.
609    
610     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
611     scaling buffer positions to scroll bar positions, we use this, not     scaling buffer positions to scroll bar positions, we use this, not
# Line 646  struct scroll_bar { Line 673  struct scroll_bar {
673     + (f)->output_data.mac->internal_border_width)     + (f)->output_data.mac->internal_border_width)
674    
675    
676  /* Return the row/column (zero-based) of the character cell containing  /* Return the row/column (zero-based) of the character cell containing
677     the pixel on FRAME at ROW/COL.  */     the pixel on FRAME at ROW/COL.  */
678  #define PIXEL_TO_CHAR_ROW(f, row) \  #define PIXEL_TO_CHAR_ROW(f, row) \
679    (((row) - (f)->output_data.mac->internal_border_width) \    (((row) - (f)->output_data.mac->internal_border_width) \
# Line 668  struct scroll_bar { Line 695  struct scroll_bar {
695    
696  struct frame * check_x_frame (Lisp_Object);  struct frame * check_x_frame (Lisp_Object);
697    
698    void activate_scroll_bars (FRAME_PTR);
699    void deactivate_scroll_bars (FRAME_PTR);
700    
701    #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
702    #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
703    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

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