remove documentation-string reading hack
[bpt/emacs.git] / src / frame.h
index 60d3e36..214f6d7 100644 (file)
@@ -164,6 +164,11 @@ struct frame
   /* Cache of realized faces.  */
   struct face_cache *face_cache;
 
+#if defined (HAVE_WINDOW_SYSTEM) && ! defined (USE_GTK) && ! defined (HAVE_NS)
+  /* Tool-bar item index of the item on which a mouse button was pressed.  */
+  int last_tool_bar_item;
+#endif
+
   /* Number of elements in `menu_bar_vector' that have meaningful data.  */
   int menu_bar_items_used;
 
@@ -592,7 +597,7 @@ default_pixels_per_inch_y (void)
 #define FRAME_IMAGE_CACHE(F) ((F)->terminal->image_cache)
 
 #define XFRAME(p) \
-  (eassert (FRAMEP (p)), (struct frame *) XUNTAG (p, Lisp_Vectorlike))
+  (eassert (FRAMEP (p)), (struct frame *) SCM_SMOB_DATA (p))
 #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
 
 /* Given a window, return its frame as a Lisp_Object.  */
@@ -992,8 +997,10 @@ extern struct frame *make_minibuffer_frame (void);
 extern struct frame *make_frame_without_minibuffer (Lisp_Object,
                                                     struct kboard *,
                                                     Lisp_Object);
-#endif /* HAVE_WINDOW_SYSTEM */
 extern bool window_system_available (struct frame *);
+#else /* not HAVE_WINDOW_SYSTEM */
+#define window_system_available(f) ((void) (f), false)
+#endif /* HAVE_WINDOW_SYSTEM */
 extern void check_window_system (struct frame *);
 extern void frame_make_pointer_invisible (struct frame *);
 extern void frame_make_pointer_visible (struct frame *);
@@ -1217,7 +1224,6 @@ extern Lisp_Object Qborder_color, Qborder_width;
 extern Lisp_Object Qbuffer_predicate;
 extern Lisp_Object Qcursor_color, Qcursor_type;
 extern Lisp_Object Qfont;
-extern Lisp_Object Qbackground_color, Qforeground_color;
 extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
 extern Lisp_Object Qinternal_border_width;
 extern Lisp_Object Qright_divider_width, Qbottom_divider_width;
@@ -1318,7 +1324,6 @@ extern void x_make_frame_visible (struct frame *f);
 extern void x_make_frame_invisible (struct frame *f);
 extern void x_iconify_frame (struct frame *f);
 extern void x_set_frame_alpha (struct frame *f);
-extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_set_tool_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
 extern void x_activate_menubar (struct frame *);
 extern void x_real_positions (struct frame *, int *, int *);
@@ -1353,38 +1358,6 @@ x_set_bitmap_icon (struct frame *f)
 }
 
 #endif /* !HAVE_NS */
-
-/* Convert character coordinates X and Y to pixel
-   coordinates PIX_X and PIX_Y on frame F.  */
-
-INLINE void
-frame_char_to_pixel_position (struct frame *f, int x, int y, int *pix_x, int *pix_y)
-{
-  *pix_x = FRAME_COL_TO_PIXEL_X (f, x) + FRAME_COLUMN_WIDTH (f) / 2;
-  *pix_y = FRAME_LINE_TO_PIXEL_Y (f, y) + FRAME_LINE_HEIGHT (f) / 2;
-
-  if (*pix_x < 0)
-    *pix_x = 0;
-  if (*pix_x > FRAME_PIXEL_WIDTH (f))
-    *pix_x = FRAME_PIXEL_WIDTH (f);
-
-  if (*pix_y < 0)
-    *pix_y = 0;
-  if (*pix_y > FRAME_PIXEL_HEIGHT (f))
-    *pix_y = FRAME_PIXEL_HEIGHT (f);
-}
-
-/* Reposition mouse pointer to character coordinates X and Y on frame F.  */
-
-INLINE
-void frame_set_mouse_position (struct frame *f, int x, int y)
-{
-  int pix_x, pix_y;
-
-  frame_char_to_pixel_position (f, x, y, &pix_x, &pix_y);
-  frame_set_mouse_pixel_position (f, pix_x, pix_y);
-}
-
 #endif /* HAVE_WINDOW_SYSTEM */
 
 INLINE void