aboutsummaryrefslogtreecommitdiffstats
path: root/src/macgui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macgui.h')
-rw-r--r--src/macgui.h115
1 files changed, 114 insertions, 1 deletions
diff --git a/src/macgui.h b/src/macgui.h
index 755bffbd461..c549a885f48 100644
--- a/src/macgui.h
+++ b/src/macgui.h
@@ -71,7 +71,7 @@ typedef unsigned long Time;
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>
@@ -127,6 +127,28 @@ typedef unsigned long Time;
127#endif 127#endif
128 128
129typedef WindowRef Window; 129typedef WindowRef Window;
130#if TARGET_API_MAC_CARBON
131typedef ScrapRef Selection;
132#else
133typedef int Selection;
134#endif
135#define mac_set_window_title SetWindowTitleWithCFString
136#define mac_set_window_modified SetWindowModified
137#define mac_is_window_visible IsWindowVisible
138#define mac_is_window_collapsed IsWindowCollapsed
139#define mac_bring_window_to_front BringToFront
140#define mac_send_window_behind SendBehind
141#define mac_hide_window HideWindow
142#define mac_show_window ShowWindow
143#define mac_collapse_window CollapseWindow
144#define mac_front_non_floating_window FrontNonFloatingWindow
145#define mac_active_non_floating_window ActiveNonFloatingWindow
146#define mac_activate_window ActivateWindow
147#define mac_move_window_structure MoveWindowStructure
148#define mac_move_window MoveWindow
149#define mac_size_window SizeWindow
150#define mac_get_global_mouse GetGlobalMouse
151#define mac_is_window_toolbar_visible IsWindowToolbarVisible
130typedef GWorldPtr Pixmap; 152typedef GWorldPtr Pixmap;
131 153
132#define Cursor ThemeCursor 154#define Cursor ThemeCursor
@@ -363,6 +385,97 @@ typedef struct {
363 (nr).right = ((nr).left + (width)), \ 385 (nr).right = ((nr).left + (width)), \
364 (nr).bottom = ((nr).top + (height))) 386 (nr).bottom = ((nr).top + (height)))
365 387
388/* Definitions copied from lwlib.h */
389
390typedef void * XtPointer;
391
392enum button_type
393{
394 BUTTON_TYPE_NONE,
395 BUTTON_TYPE_TOGGLE,
396 BUTTON_TYPE_RADIO
397};
398
399/* This structure is based on the one in ../lwlib/lwlib.h, modified
400 for Mac OS. */
401typedef struct _widget_value
402{
403 /* name of widget */
404 Lisp_Object lname;
405 char* name;
406 /* value (meaning depend on widget type) */
407 char* value;
408 /* keyboard equivalent. no implications for XtTranslations */
409 Lisp_Object lkey;
410 char* key;
411 /* Help string or nil if none.
412 GC finds this string through the frame's menu_bar_vector
413 or through menu_items. */
414 Lisp_Object help;
415 /* true if enabled */
416 Boolean enabled;
417 /* true if selected */
418 Boolean selected;
419 /* The type of a button. */
420 enum button_type button_type;
421 /* true if menu title */
422 Boolean title;
423#if 0
424 /* true if was edited (maintained by get_value) */
425 Boolean edited;
426 /* true if has changed (maintained by lw library) */
427 change_type change;
428 /* true if this widget itself has changed,
429 but not counting the other widgets found in the `next' field. */
430 change_type this_one_change;
431#endif
432 /* Contents of the sub-widgets, also selected slot for checkbox */
433 struct _widget_value* contents;
434 /* data passed to callback */
435 XtPointer call_data;
436 /* next one in the list */
437 struct _widget_value* next;
438#if 0
439 /* slot for the toolkit dependent part. Always initialize to NULL. */
440 void* toolkit_data;
441 /* tell us if we should free the toolkit data slot when freeing the
442 widget_value itself. */
443 Boolean free_toolkit_data;
444
445 /* we resource the widget_value structures; this points to the next
446 one on the free list if this one has been deallocated.
447 */
448 struct _widget_value *free_list;
449#endif
450} widget_value;
451
452#if MAC_OS8
453#define M_APPLE 234
454#define I_ABOUT 1
455
456#define EXTRA_STACK_ALLOC (256 * 1024)
457
458#define ARGV_STRING_LIST_ID 129
459#define RAM_TOO_LARGE_ALERT_ID 129
460#define ABOUT_ALERT_ID 128
461#endif
462
463#define DIALOG_LEFT_MARGIN (112)
464#define DIALOG_TOP_MARGIN (24)
465#define DIALOG_RIGHT_MARGIN (24)
466#define DIALOG_BOTTOM_MARGIN (20)
467#define DIALOG_MIN_INNER_WIDTH (338)
468#define DIALOG_MAX_INNER_WIDTH (564)
469#define DIALOG_BUTTON_BUTTON_HORIZONTAL_SPACE (12)
470#define DIALOG_BUTTON_BUTTON_VERTICAL_SPACE (12)
471#define DIALOG_BUTTON_MIN_WIDTH (68)
472#define DIALOG_TEXT_MIN_HEIGHT (50)
473#define DIALOG_TEXT_BUTTONS_VERTICAL_SPACE (10)
474#define DIALOG_ICON_WIDTH (64)
475#define DIALOG_ICON_HEIGHT (64)
476#define DIALOG_ICON_LEFT_MARGIN (24)
477#define DIALOG_ICON_TOP_MARGIN (15)
478
366#endif /* EMACS_MACGUI_H */ 479#endif /* EMACS_MACGUI_H */
367 480
368/* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849 481/* arch-tag: 5a0da49a-35e2-418b-a58c-8a55778ae849