annotate src/proto/gui_mac.pro @ 6885:ce209c5103a3 v7.4.762

patch 7.4.762 Problem: Comment for may_req_bg_color() is wrong. (Christ van Willegen) Solution: Rewrite the comment.
author Bram Moolenaar <bram@vim.org>
date Sat, 27 Jun 2015 18:34:24 +0200
parents 951641b8784d
children 744c66477ba9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* gui_mac.c */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 * Mac specific prototypes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 pascal Boolean WaitNextEventWrp __ARGS((EventMask eventMask, EventRecord *theEvent, UInt32 sleep, RgnHandle mouseRgn));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 pascal void gui_mac_scroll_action __ARGS((ControlHandle theControl, short partCode));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 pascal void gui_mac_drag_thumb (ControlHandle theControl, short partCode);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 void gui_mac_handle_event __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 void gui_mac_doMouseDown __ARGS((EventRecord *theEvent));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 void gui_mac_do_key __ARGS((EventRecord *theEvent));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 void gui_mac_handle_menu __ARGS((long menuChoice));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 void gui_mac_focus_change __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 void gui_mac_update __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 short gui_mch_get_mac_menu_item_index __ARGS((vimmenu_T *menu, vimmenu_T *parent));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 void gui_mch_set_blinking __ARGS((long wait, long on, long off));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 void gui_mch_stop_blink __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 void gui_mch_start_blink __ARGS((void));
87
014ba200db86 updated for version 7.0035
vimboss
parents: 7
diff changeset
20 void gui_mch_getmouse __ARGS((int *x, int *y));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 void gui_mch_setmouse __ARGS((int x, int y));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 void gui_mch_prepare __ARGS((int *argc, char **argv));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 int gui_mch_init_check __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 int gui_mch_init __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 void gui_mch_new_colors __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 int gui_mch_open __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 void gui_mch_exit __ARGS((int));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 void gui_mch_set_winsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 int gui_mch_get_winpos __ARGS((int *x, int *y));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 void gui_mch_set_winpos __ARGS((int x, int y));
816
4a79d6d376f0 updated for version 7.0c02
vimboss
parents: 501
diff changeset
31 void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
444
d0d15b184c56 updated for version 7.0116
vimboss
parents: 167
diff changeset
39 int gui_mch_adjust_charheight __ARGS((void));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 GuiFont gui_mch_get_font __ARGS((char_u *name, int giveErrorIfMissing));
167
c93c9cad9618 updated for version 7.0051
vimboss
parents: 87
diff changeset
42 char_u *gui_mch_get_fontname __ARGS((GuiFont font, char_u *name));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 GuiFont gui_mac_find_font __ARGS((char_u *font_name));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 void gui_mch_set_font __ARGS((GuiFont font));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 int gui_mch_same_font __ARGS((GuiFont f1, GuiFont f2));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 void gui_mch_free_font __ARGS((GuiFont font));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 guicolor_T gui_mch_get_color __ARGS((char_u *name));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 void gui_mch_set_fg_color __ARGS((guicolor_T color));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 void gui_mch_set_bg_color __ARGS((guicolor_T color));
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 444
diff changeset
50 void gui_mch_set_sp_color __ARGS((guicolor_T color));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 void gui_mch_draw_string __ARGS((int row, int col, char_u *s, int len, int flags));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 int gui_mch_haskey __ARGS((char_u *name));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 void gui_mch_beep __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 void gui_mch_flash __ARGS((int msec));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 void gui_mch_invert_rectangle __ARGS((int r, int c, int nr, int nc));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 void gui_mch_iconify __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 void gui_mch_draw_hollow_cursor __ARGS((guicolor_T color));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 void gui_mch_draw_part_cursor __ARGS((int w, int h, guicolor_T color));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 void gui_mch_update __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 int gui_mch_wait_for_chars __ARGS((int wtime));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 void gui_mch_flush __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 void gui_mch_clear_block __ARGS((int row1, int col1, int row2, int col2));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 void gui_mch_clear_all __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 void gui_mch_delete_lines __ARGS((int row, int num_lines));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 void gui_mch_insert_lines __ARGS((int row, int num_lines));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 void gui_mch_enable_menu __ARGS((int flag));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 void gui_mch_set_menu_pos __ARGS((int x, int y, int w, int h));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 /*void gui_mch_add_menu __ARGS((vimmenu_T *menu, vimmenu_T *parent, int idx));*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 void gui_mch_add_menu __ARGS((vimmenu_T *menu, int pos));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 /*void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, vimmenu_T *parent, int idx));*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 void gui_mch_menu_grey __ARGS((vimmenu_T *menu, int grey));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 void gui_mch_menu_hidden __ARGS((vimmenu_T *menu, int hidden));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 void gui_mch_draw_menubar __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 int gui_mch_get_lightness __ARGS((guicolor_T pixel));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 long_u gui_mch_get_rgb __ARGS((guicolor_T pixel));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 int gui_mch_get_mouse_x __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 int gui_mch_get_mouse_y __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 void gui_mch_setmouse __ARGS((int x, int y));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
2684
951641b8784d updated for version 7.3.102
Bram Moolenaar <bram@vim.org>
parents: 2565
diff changeset
84 int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 void gui_mch_set_foreground __ARGS((void));
1106
6c4da3e24371 updated for version 7.0-232
vimboss
parents: 816
diff changeset
87 void gui_mch_show_tabline __ARGS((int showit));
6c4da3e24371 updated for version 7.0-232
vimboss
parents: 816
diff changeset
88 int gui_mch_showing_tabline __ARGS((void));
6c4da3e24371 updated for version 7.0-232
vimboss
parents: 816
diff changeset
89 void gui_mch_update_tabline __ARGS((void));
6c4da3e24371 updated for version 7.0-232
vimboss
parents: 816
diff changeset
90 void gui_mch_set_curtab __ARGS((int nr));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 char_u *C2Pascal_save __ARGS((char_u *Cstring));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 char_u *C2Pascal_save_and_remove_backslash __ARGS((char_u *Cstring));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 int_u EventModifiers2VimMouseModifiers __ARGS((EventModifiers macModifiers));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 char_u **new_fnames_from_AEDesc __ARGS((AEDesc *theList, long *numFiles, OSErr *error));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 void gui_request_selection __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 void gui_mch_lose_selection __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 int gui_mch_own_selection __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 void gui_mch_clear_selection __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 void gui_win_new_height __ARGS((win_T *wp));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 void gui_win_comp_pos __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 void gui_win_free __ARGS((win_T *wp));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 void gui_win_alloc __ARGS((win_T *wp));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 void mch_post_buffer_write (buf_T *buf);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 void mch_errmsg __ARGS((char *str));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 void mch_display_error __ARGS((void));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 void clip_mch_lose_selection __ARGS((VimClipboard *cbd));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 void clip_mch_request_selection __ARGS((VimClipboard *cbd));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 void clip_mch_set_selection __ARGS((VimClipboard *cbd));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 int clip_mch_own_selection __ARGS((VimClipboard *cbd));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 pascal OSErr FindProcessBySignature( const OSType targetType,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 const OSType targetCreator, ProcessSerialNumberPtr psnPtr );
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 OSErr InstallAEHandlers (void);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 pascal OSErr HandleODocAE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 pascal OSErr Handle_aevt_oapp_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 pascal OSErr Handle_aevt_quit_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 pascal OSErr Handle_aevt_pdoc_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 pascal OSErr Handle_unknown_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 /* Shoulde we return MenuItemIndex? IMO yes, I did that for 5.7 ak*/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 short gui_mac_get_menu_item_index (vimmenu_T *pMenu);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 pascal OSErr Handle_KAHL_SRCH_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 pascal OSErr Handle_KAHL_MOD_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 pascal OSErr Handle_KAHL_GTTX_AE (const AppleEvent *theAEvent, AppleEvent *theReply, long refCon);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 void Send_KAHL_MOD_AE (buf_T *buf);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 void gui_mac_doInContentClick __ARGS((EventRecord *theEvent, WindowPtr whichWindow));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 void gui_mac_doInDragClick __ARGS((Point where, WindowPtr whichWindow));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 void gui_mac_doInGrowClick __ARGS((Point where, WindowPtr whichWindow));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 void gui_mac_doUpdateEvent __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 void gui_mac_doActivateEvent __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 void gui_mac_doSuspendEvent __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 void gui_mac_doKeyEvent __ARGS((EventRecord *theEvent));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 void gui_mac_doMouseDownEvent __ARGS((EventRecord *theEvent));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 void gui_mac_doMouseMovedEvent __ARGS((EventRecord *event));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 void gui_mac_doMouseUpEvent __ARGS((EventRecord *theEvent));
2565
4b7929dad28a Fix building the Mac version with GUI.
Bram Moolenaar <bram@vim.org>
parents: 1106
diff changeset
142 void gui_mch_mousehide __ARGS((int hide));
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 int C2PascalString (char_u *CString, Str255 *PascalString);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 char_u *FullPathFromFSSpec_save (FSSpec file);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 /* vim: set ft=c : */