+2004-05-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * lisp.h (Vx_resource_name, Vx_resource_class): Move from xfns.c
+ section to frame.c section.
+ (Fxw_display_color_p, Fx_file_dialog): Declare if
+ HAVE_WINDOW_SYSTEM defined.
+ * macfns.c (Fx_create_frame): Fix int/Lisp_Object mixup.
+ * macmenu.c (set_frame_menubar): Use NILP to test a lisp value.
+ * macterm.c (mac_get_emulated_btn, mac_event_to_emacs_modifiers)
+ (mac_get_mouse_btn): Use NILP and EQ to test/compare lisp values.
+ (XTread_socket): Fix int/Lisp_Object mixup.
+ (mac_check_for_quit_char): Fix pointer/Lisp_Object mixup.
+ * macterm.h (struct frame, struct face, struct image)
+ (display_x_get_resource, Fx_display_color_p)
+ (Fx_display_grayscale_p, Fx_display_planes, x_free_gcs): Add
+ prototypes.
+
2004-05-14 Kim F. Storm <storm@cua.dk>
* process.c (wait_reading_process_input): Make reentrant.
extern void syms_of_indent P_ ((void));
/* defined in frame.c */
+#ifdef HAVE_WINDOW_SYSTEM
+extern Lisp_Object Vx_resource_name;
+extern Lisp_Object Vx_resource_class;
+#endif /* HAVE_WINDOW_SYSTEM */
extern Lisp_Object Qvisible;
extern void store_frame_param P_ ((struct frame *, Lisp_Object, Lisp_Object));
extern void store_in_alist P_ ((Lisp_Object *, Lisp_Object, Lisp_Object));
#ifdef HAVE_X_WINDOWS
/* Defined in xfns.c */
extern void syms_of_xfns P_ ((void));
-extern Lisp_Object Vx_resource_name;
-extern Lisp_Object Vx_resource_class;
+#endif /* HAVE_X_WINDOWS */
+#ifdef HAVE_WINDOW_SYSTEM
+/* Defined in xfns.c, w32fns.c, or macfns.c */
EXFUN (Fxw_display_color_p, 1);
EXFUN (Fx_file_dialog, 4);
-#endif /* HAVE_X_WINDOWS */
+#endif /* HAVE_WINDOW_SYSTEM */
/* Defined in xsmfns.c */
extern void syms_of_xsmfns P_ ((void));
if (!NILP (parent))
{
- f->output_data.mac->parent_desc = (Window) parent;
+ f->output_data.mac->parent_desc = (Window) XFASTINT (parent);
f->output_data.mac->explicit_parent = 1;
}
else
for (i = 0; i < previous_menu_items_used; i++)
if (menu_items_used == i
- || (!Fequal (previous_items[i], XVECTOR (menu_items)->contents[i])))
+ || (NILP (Fequal (previous_items[i],
+ XVECTOR (menu_items)->contents[i]))))
break;
if (i == menu_items_used && i == previous_menu_items_used && i != 0)
{
mac_get_emulated_btn ( UInt32 modifiers )
{
int result = 0;
- if (Vmac_emulate_three_button_mouse != Qnil) {
- int cmdIs3 = (Vmac_emulate_three_button_mouse != Qreverse);
+ if (!NILP (Vmac_emulate_three_button_mouse)) {
+ int cmdIs3 = !EQ (Vmac_emulate_three_button_mouse, Qreverse);
if (modifiers & controlKey)
result = cmdIs3 ? 2 : 1;
else if (modifiers & optionKey)
UInt32 mods = 0;
GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, NULL,
sizeof (UInt32), NULL, &mods);
- if (Vmac_emulate_three_button_mouse != Qnil &&
+ if (!NILP (Vmac_emulate_three_button_mouse) &&
GetEventClass(eventRef) == kEventClassMouse)
{
mods &= ~(optionKey & cmdKey);
switch (result)
{
case kEventMouseButtonPrimary:
- if (Vmac_emulate_three_button_mouse == Qnil)
+ if (NILP (Vmac_emulate_three_button_mouse))
return 0;
else {
UInt32 mods = 0;
inev.timestamp = er.when * (1000 / 60);
/* ticks to milliseconds */
- XSETINT (inev.x, tracked_scroll_bar->left + 2);
+ XSETINT (inev.x, XFASTINT (tracked_scroll_bar->left) + 2);
XSETINT (inev.y, mouse_loc.v - 24);
tracked_scroll_bar->dragging = Qnil;
mouse_tracking_in_progress = mouse_tracking_none;
else
{
Lisp_Object window;
+ int x = mouse_loc.h;
+ int y = mouse_loc.v;
XSETFRAME (inev.frame_or_window, mwp->mFP);
if (er.what == mouseDown)
= mouse_tracking_mouse_movement;
else
mouse_tracking_in_progress = mouse_tracking_none;
- window = window_from_coordinates (mwp->mFP, inev.x, inev.y, 0, 0, 0, 1);
+ window = window_from_coordinates (mwp->mFP, x, y, 0, 0, 0, 1);
if (EQ (window, mwp->mFP->tool_bar_window))
{
if (er.what == mouseDown)
- handle_tool_bar_click (mwp->mFP, inev.x, inev.y, 1, 0);
+ handle_tool_bar_click (mwp->mFP, x, y, 1, 0);
else
- handle_tool_bar_click (mwp->mFP, inev.x, inev.y, 0,
+ handle_tool_bar_click (mwp->mFP, x, y, 0,
#if USE_CARBON_EVENTS
mac_event_to_emacs_modifiers (eventRef)
#else
EVENT_INIT (e);
e.kind = ASCII_KEYSTROKE_EVENT;
e.code = quit_char;
- e.arg = NULL;
+ e.arg = Qnil;
e.modifiers = NULL;
e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60);
XSETFRAME (e.frame_or_window, mwp->mFP);
text from glomming up against the scroll bar */
#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
-
-struct frame * check_x_frame (Lisp_Object);
+struct frame;
+struct face;
+struct image;
+
+Lisp_Object display_x_get_resource P_ ((struct x_display_info *,
+ Lisp_Object, Lisp_Object,
+ Lisp_Object, Lisp_Object));
+struct frame *check_x_frame P_ ((Lisp_Object));
+EXFUN (Fx_display_color_p, 1);
+EXFUN (Fx_display_grayscale_p, 1);
+EXFUN (Fx_display_planes, 1);
+extern void x_free_gcs P_ ((struct frame *));
void activate_scroll_bars (FRAME_PTR);
void deactivate_scroll_bars (FRAME_PTR);