]> code.delx.au - gnu-emacs/blobdiff - src/xterm.h
2002-08-10 Andrew Choi <akochoi@shaw.ca>
[gnu-emacs] / src / xterm.h
index 71d7dc01c7835cf2ca9b0c9fb3d09f4e16328dfc..2258577833ac43521725b2ad6af5930e80b541c7 100644 (file)
@@ -112,7 +112,8 @@ enum text_cursor_kinds
   NO_CURSOR = -1,
   FILLED_BOX_CURSOR,
   HOLLOW_BOX_CURSOR,
-  BAR_CURSOR
+  BAR_CURSOR,
+  HBAR_CURSOR
 };
 
 /* Structure recording X pixmap and reference count.
@@ -617,6 +618,11 @@ struct x_output
      these may differ because this does not take into account possible
      menubar.  y_pixels_diff is with menubar height included */
   int y_pixels_outer_diff;
+
+  /* Keep track of focus.  May be EXPLICIT if we received a FocusIn for this
+     frame, or IMPLICIT if we received an EnterNotify.
+     FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
+  int focus_state;
 };
 
 enum
@@ -630,6 +636,19 @@ enum
   FULLSCREEN_MOVE_WAIT  = 8,
 };
 
+enum
+{
+  /* Values for focus_state, used as bit mask.
+     EXPLICIT means if we received a FocusIn for the frame and know it has
+     the focus.  IMPLICIT means we recevied an EnterNotify and the frame
+     may have the focus if no window manager is running.
+     FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
+  FOCUS_NONE     = 0,
+  FOCUS_IMPLICIT = 1,
+  FOCUS_EXPLICIT = 2
+};
+
+
 /* Return the X window used for displaying data in frame F.  */
 #define FRAME_X_WINDOW(f) ((f)->output_data.x->window_desc)
 
@@ -676,6 +695,7 @@ enum
 #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height)
 
 #define FRAME_DESIRED_CURSOR(f) ((f)->output_data.x->desired_cursor)
+#define FRAME_CURSOR_WIDTH(f) ((f)->output_data.x->cursor_width)
 
 #define FRAME_XIC(f) ((f)->output_data.x->xic)
 #define FRAME_X_XIM(f) (FRAME_X_DISPLAY_INFO (f)->xim)
@@ -904,11 +924,11 @@ struct scroll_bar
                          - (f)->output_data.x->internal_border_width)))
 
 \f
-/* If a struct input_event has a kind which is selection_request_event
-   or selection_clear_event, then its contents are really described
+/* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
+   or SELECTION_CLEAR_EVENT, then its contents are really described
    by this structure.  */
 
-/* For an event of kind selection_request_event,
+/* For an event of kind SELECTION_REQUEST_EVENT,
    this structure really describes the contents.
    **Don't make this struct longer!**
    If it overlaps the frame_or_window field of struct input_event,