]> code.delx.au - gnu-emacs/blobdiff - src/w32term.h
Fixed a bug in w32-long-file-name.
[gnu-emacs] / src / w32term.h
index d29cab35dedfe5adcd50c7030552cb516f9e4f42..89008b7348c5b14771e4d7161978592c86042bcf 100644 (file)
@@ -26,23 +26,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0)
 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)
 
-#define FONT_WIDTH(f)     ((f)->max_width)
-#define FONT_HEIGHT(f)    ((f)->height)
-#define FONT_BASE(f)      ((f)->ascent)
-#define FONT_DESCENT(f)   ((f)->descent)
-
 #define CP_DEFAULT 1004
 
-#define CHECK_W32_FRAME(f, frame)              \
-  if (NILP (frame))                            \
-    f = SELECTED_FRAME ();                     \
-  else                                         \
-    {                                          \
-      CHECK_LIVE_FRAME (frame, 0);             \
-      f = XFRAME (frame);                      \
-    }                                          \
-  if (! FRAME_W32_P (f))
-
 /* Indicates whether we are in the readsocket call and the message we
    are processing in the current loop */
 
@@ -86,8 +71,7 @@ struct w32_display_info
   /* The generic display parameters corresponding to this w32 display.  */
   struct terminal *terminal;
 
-  /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
-     The same cons cell also appears in x_display_name_list.  */
+  /* This is a cons cell of the form (NAME . FONT-LIST-CACHE).  */
   Lisp_Object name_list_element;
 
   /* Number of frames that are on this display.  */
@@ -185,18 +169,37 @@ struct w32_display_info
 
   /* The frame where the mouse was last time we reported a mouse event.  */
   struct frame *last_mouse_frame;
+
+  /* The frame where the mouse was last time we reported a mouse motion.  */
+  struct frame *last_mouse_motion_frame;
+
+  /* The frame where the mouse was last time we reported a mouse position.  */
+  struct frame *last_mouse_glyph_frame;
+
+  /* Position where the mouse was last time we reported a motion.
+     This is a position on last_mouse_motion_frame.  */
+  int last_mouse_motion_x;
+  int last_mouse_motion_y;
+
+  /* Where the mouse was last time we reported a mouse position.
+     This is a rectangle on last_mouse_glyph_frame.  */
+  RECT last_mouse_glyph;
+
+  /* The scroll bar in which the last motion event occurred.  */
+  struct scroll_bar *last_mouse_scroll_bar;
+
+  /* Mouse position on the scroll bar above.
+     FIXME: shouldn't it be a member of struct scroll_bar?  */
+  int last_mouse_scroll_bar_pos;
+
+  /* Time of last mouse movement.  */
+  Time last_mouse_movement_time;
 };
 
 /* This is a chain of structures for all the displays currently in use.  */
 extern struct w32_display_info *x_display_list;
 extern struct w32_display_info one_w32_display_info;
 
-/* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
-   one for each element of w32_display_list and in the same order.
-   NAME is the name of the frame.
-   FONT-LIST-CACHE records previous values returned by x-list-fonts.  */
-extern Lisp_Object w32_display_name_list;
-
 extern struct frame *x_window_to_frame (struct w32_display_info *, HWND);
 
 struct w32_display_info *x_display_info_for_name (Lisp_Object);
@@ -212,7 +215,7 @@ extern struct w32_display_info *w32_term_init (Lisp_Object,
 extern int w32_defined_color (struct frame *f, const char *color,
                               XColor *color_def, int alloc);
 extern void x_set_window_size (struct frame *f, int change_grav,
-                              int cols, int rows);
+                              int width, int height, bool pixelwise);
 extern int x_display_pixel_height (struct w32_display_info *);
 extern int x_display_pixel_width (struct w32_display_info *);
 extern Lisp_Object x_get_focus_frame (struct frame *);
@@ -239,6 +242,10 @@ extern int w32_kbd_mods_to_emacs (DWORD mods, WORD key);
 
 extern Lisp_Object x_get_focus_frame (struct frame *);
 
+/* w32console.c */
+extern void w32con_hide_cursor (void);
+extern void w32con_show_cursor (void);
+
 \f
 #define PIX_TYPE COLORREF
 
@@ -327,6 +334,7 @@ struct w32_output
   Cursor hand_cursor;
   Cursor hourglass_cursor;
   Cursor horizontal_drag_cursor;
+  Cursor vertical_drag_cursor;
 
   /* Non-zero means hourglass cursor is currently displayed.  */
   unsigned hourglass_p : 1;
@@ -354,7 +362,6 @@ struct w32_output
   {
     XGCValues *gc;
     unsigned long pixel;
-    int allocated_p;
   }
   black_relief, white_relief;
 
@@ -659,6 +666,7 @@ extern DWORD notifications_size;
 extern void *notifications_desc;
 extern Lisp_Object w32_get_watch_object (void *);
 extern Lisp_Object lispy_file_action (DWORD);
+extern int handle_file_notifications (struct input_event *);
 
 extern void w32_initialize_display_info (Lisp_Object);
 extern void initialize_w32_display (struct terminal *, int *, int *);
@@ -769,6 +777,10 @@ typedef char guichar_t;
 
 #define GUI_SDATA(x) ((guichar_t*) SDATA (x))
 
+#if defined HAVE_DIALOGS
+extern Lisp_Object w32_popup_dialog (struct frame *, Lisp_Object, Lisp_Object);
+#endif
+
 extern void syms_of_w32term (void);
 extern void syms_of_w32menu (void);
 extern void syms_of_w32fns (void);