Mercurial > emacs
comparison src/macgui.h @ 80452:6d01fa145e93
[!HAVE_CARBON]: Include Quickdraw.h instead of QuickDraw.h.
(XtPointer): Move typedef from macmenu.c.
(enum button_type): Move enum from macmenu.c.
(widget_value): Move typedef from macmenu.c.
(M_APPLE, I_ABOUT, EXTRA_STACK_ALLOC, ARGV_STRING_LIST_ID)
(DIALOG_LEFT_MARGIN, DIALOG_TOP_MARGIN, DIALOG_RIGHT_MARGIN)
(DIALOG_BOTTOM_MARGIN, DIALOG_MIN_INNER_WIDTH, DIALOG_MAX_INNER_WIDTH)
(DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE)
(DIALOG_BUTTON_BUTTON_VERTICAL_SPACE, DIALOG_BUTTON_MIN_WIDTH)
(DIALOG_TEXT_MIN_HEIGHT, DIALOG_TEXT_BUTTONS_VERTICAL_SPACE)
(DIALOG_ICON_WIDTH, DIALOG_ICON_HEIGHT, DIALOG_ICON_LEFT_MARGIN)
(DIALOG_ICON_TOP_MARGIN): Move defines from macmenu.c.
(Selection): Move typedef from macselect.c.
(RAM_TOO_LARGE_ALERT_ID, ABOUT_ALERT_ID) [MAC_OS8]: Move defines from
macterm.c.
(mac_set_window_title, mac_set_window_modified, mac_is_window_visible)
(mac_is_window_collapsed, mac_bring_window_to_front)
(mac_send_window_behind, mac_hide_window, mac_show_window)
(mac_collapse_window, mac_front_non_floating_window)
(mac_active_non_floating_window, mac_activate_window)
(mac_move_window_structure, mac_move_window, mac_size_window)
(mac_get_global_mouse, mac_is_window_toolbar_visible): New defines.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Sun, 06 Apr 2008 01:58:05 +0000 |
parents | f89745e778b8 |
children | fbe5484e7555 3af508d0bd74 |
comparison
equal
deleted
inserted
replaced
80451:458a994205d2 | 80452:6d01fa145e93 |
---|---|
69 #include <Carbon.h> | 69 #include <Carbon.h> |
70 #endif /* not MAC_OSX */ | 70 #endif /* not MAC_OSX */ |
71 #undef Z | 71 #undef Z |
72 #define Z (current_buffer->text->z) | 72 #define Z (current_buffer->text->z) |
73 #else /* not HAVE_CARBON */ | 73 #else /* not HAVE_CARBON */ |
74 #include <QuickDraw.h> /* for WindowRef */ | 74 #include <Quickdraw.h> /* for WindowRef */ |
75 #include <QDOffscreen.h> /* for GWorldPtr */ | 75 #include <QDOffscreen.h> /* for GWorldPtr */ |
76 #include <Appearance.h> /* for ThemeCursor */ | 76 #include <Appearance.h> /* for ThemeCursor */ |
77 #include <Windows.h> | 77 #include <Windows.h> |
78 #include <Controls.h> | 78 #include <Controls.h> |
79 #include <Gestalt.h> | 79 #include <Gestalt.h> |
123 #define USE_MAC_TOOLBAR 1 | 123 #define USE_MAC_TOOLBAR 1 |
124 #endif | 124 #endif |
125 #endif | 125 #endif |
126 | 126 |
127 typedef WindowRef Window; | 127 typedef WindowRef Window; |
128 #if TARGET_API_MAC_CARBON | |
129 typedef ScrapRef Selection; | |
130 #else | |
131 typedef int Selection; | |
132 #endif | |
133 #define mac_set_window_title SetWindowTitleWithCFString | |
134 #define mac_set_window_modified SetWindowModified | |
135 #define mac_is_window_visible IsWindowVisible | |
136 #define mac_is_window_collapsed IsWindowCollapsed | |
137 #define mac_bring_window_to_front BringToFront | |
138 #define mac_send_window_behind SendBehind | |
139 #define mac_hide_window HideWindow | |
140 #define mac_show_window ShowWindow | |
141 #define mac_collapse_window CollapseWindow | |
142 #define mac_front_non_floating_window FrontNonFloatingWindow | |
143 #define mac_active_non_floating_window ActiveNonFloatingWindow | |
144 #define mac_activate_window ActivateWindow | |
145 #define mac_move_window_structure MoveWindowStructure | |
146 #define mac_move_window MoveWindow | |
147 #define mac_size_window SizeWindow | |
148 #define mac_get_global_mouse GetGlobalMouse | |
149 #define mac_is_window_toolbar_visible IsWindowToolbarVisible | |
128 typedef GWorldPtr Pixmap; | 150 typedef GWorldPtr Pixmap; |
129 | 151 |
130 #define Cursor ThemeCursor | 152 #define Cursor ThemeCursor |
131 #define No_Cursor (-1) | 153 #define No_Cursor (-1) |
132 | 154 |
359 ((nr).left = (x), \ | 381 ((nr).left = (x), \ |
360 (nr).top = (y), \ | 382 (nr).top = (y), \ |
361 (nr).right = ((nr).left + (width)), \ | 383 (nr).right = ((nr).left + (width)), \ |
362 (nr).bottom = ((nr).top + (height))) | 384 (nr).bottom = ((nr).top + (height))) |
363 | 385 |
386 /* Definitions copied from lwlib.h */ | |
387 | |
388 typedef void * XtPointer; | |
389 | |
390 enum button_type | |
391 { | |
392 BUTTON_TYPE_NONE, | |
393 BUTTON_TYPE_TOGGLE, | |
394 BUTTON_TYPE_RADIO | |
395 }; | |
396 | |
397 /* This structure is based on the one in ../lwlib/lwlib.h, modified | |
398 for Mac OS. */ | |
399 typedef struct _widget_value | |
400 { | |
401 /* name of widget */ | |
402 Lisp_Object lname; | |
403 char* name; | |
404 /* value (meaning depend on widget type) */ | |
405 char* value; | |
406 /* keyboard equivalent. no implications for XtTranslations */ | |
407 Lisp_Object lkey; | |
408 char* key; | |
409 /* Help string or nil if none. | |
410 GC finds this string through the frame's menu_bar_vector | |
411 or through menu_items. */ | |
412 Lisp_Object help; | |
413 /* true if enabled */ | |
414 Boolean enabled; | |
415 /* true if selected */ | |
416 Boolean selected; | |
417 /* The type of a button. */ | |
418 enum button_type button_type; | |
419 /* true if menu title */ | |
420 Boolean title; | |
421 #if 0 | |
422 /* true if was edited (maintained by get_value) */ | |
423 Boolean edited; | |
424 /* true if has changed (maintained by lw library) */ | |
425 change_type change; | |
426 /* true if this widget itself has changed, | |
427 but not counting the other widgets found in the `next' field. */ | |
428 change_type this_one_change; | |
429 #endif | |
430 /* Contents of the sub-widgets, also selected slot for checkbox */ | |
431 struct _widget_value* contents; | |
432 /* data passed to callback */ | |
433 XtPointer call_data; | |
434 /* next one in the list */ | |
435 struct _widget_value* next; | |
436 #if 0 | |
437 /* slot for the toolkit dependent part. Always initialize to NULL. */ | |
438 void* toolkit_data; | |
439 /* tell us if we should free the toolkit data slot when freeing the | |
440 widget_value itself. */ | |
441 Boolean free_toolkit_data; | |
442 | |
443 /* we resource the widget_value structures; this points to the next | |
444 one on the free list if this one has been deallocated. | |
445 */ | |
446 struct _widget_value *free_list; | |
447 #endif | |
448 } widget_value; | |
449 | |
450 #if MAC_OS8 | |
451 #define M_APPLE 234 | |
452 #define I_ABOUT 1 | |
453 | |
454 #define EXTRA_STACK_ALLOC (256 * 1024) | |
455 | |
456 #define ARGV_STRING_LIST_ID 129 | |
457 #define RAM_TOO_LARGE_ALERT_ID 129 | |
458 #define ABOUT_ALERT_ID 128 | |
459 #endif | |
460 | |
461 #define DIALOG_LEFT_MARGIN (112) | |
462 #define DIALOG_TOP_MARGIN (24) | |
463 #define DIALOG_RIGHT_MARGIN (24) | |
464 #define DIALOG_BOTTOM_MARGIN (20) | |
465 #define DIALOG_MIN_INNER_WIDTH (338) | |
466 #define DIALOG_MAX_INNER_WIDTH (564) | |
467 #define DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE (12) | |
468 #define DIALOG_BUTTON_BUTTON_VERTICAL_SPACE (12) | |
469 #define DIALOG_BUTTON_MIN_WIDTH (68) | |
470 #define DIALOG_TEXT_MIN_HEIGHT (50) | |
471 #define DIALOG_TEXT_BUTTONS_VERTICAL_SPACE (10) | |
472 #define DIALOG_ICON_WIDTH (64) | |
473 #define DIALOG_ICON_HEIGHT (64) | |
474 #define DIALOG_ICON_LEFT_MARGIN (24) | |
475 #define DIALOG_ICON_TOP_MARGIN (15) | |
476 | |
364 #endif /* EMACS_MACGUI_H */ | 477 #endif /* EMACS_MACGUI_H */ |
365 | 478 |
366 /* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849 | 479 /* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849 |
367 (do not change this comment) */ | 480 (do not change this comment) */ |