aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.h
diff options
context:
space:
mode:
authorJan Djärv2003-01-19 21:50:03 +0000
committerJan Djärv2003-01-19 21:50:03 +0000
commit488dd4c404eba70d48e4ee70141b8abcce2f863b (patch)
tree741ec2bb5abe963b292521e3a478e716a4ebb999 /src/xterm.h
parent3c77dc44b8052a9bcb19486a605a861cf120b31e (diff)
downloademacs-488dd4c404eba70d48e4ee70141b8abcce2f863b.tar.gz
emacs-488dd4c404eba70d48e4ee70141b8abcce2f863b.zip
GTK version
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h55
1 files changed, 53 insertions, 2 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 9e8779bf55d..7ad148c0004 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -33,6 +33,18 @@ Boston, MA 02111-1307, USA. */
33 window inside a widget instead of one 33 window inside a widget instead of one
34 that Xt creates... */ 34 that Xt creates... */
35#include <X11/StringDefs.h> 35#include <X11/StringDefs.h>
36
37typedef Widget xt_or_gtk_widget;
38#endif
39
40#ifdef USE_GTK
41#include <gtk/gtk.h>
42#include <gdk/gdkx.h>
43
44/* Some definitions to reduce conditionals. */
45typedef GtkWidget *xt_or_gtk_widget;
46#define XtParent(x) (gtk_widget_get_parent (x))
47
36#endif 48#endif
37 49
38/* The class of this X application. */ 50/* The class of this X application. */
@@ -348,7 +360,7 @@ extern void check_x P_ ((void));
348 360
349extern struct frame *x_window_to_frame P_ ((struct x_display_info *, int)); 361extern struct frame *x_window_to_frame P_ ((struct x_display_info *, int));
350 362
351#ifdef USE_X_TOOLKIT 363#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
352extern struct frame *x_any_window_to_frame P_ ((struct x_display_info *, int)); 364extern struct frame *x_any_window_to_frame P_ ((struct x_display_info *, int));
353extern struct frame *x_non_menubar_window_to_frame P_ ((struct x_display_info *, int)); 365extern struct frame *x_non_menubar_window_to_frame P_ ((struct x_display_info *, int));
354extern struct frame *x_top_window_to_frame P_ ((struct x_display_info *, int)); 366extern struct frame *x_top_window_to_frame P_ ((struct x_display_info *, int));
@@ -403,6 +415,10 @@ struct x_output
403 if the menubar is turned off. */ 415 if the menubar is turned off. */
404 int menubar_height; 416 int menubar_height;
405 417
418 /* Height of tool bar widget, in pixels.
419 Zero if not using an external tool bar. */
420 int toolbar_height;
421
406 /* Height of a line, in pixels. */ 422 /* Height of a line, in pixels. */
407 int line_height; 423 int line_height;
408 424
@@ -446,6 +462,26 @@ struct x_output
446 Widget menubar_widget; 462 Widget menubar_widget;
447#endif 463#endif
448 464
465#ifdef USE_GTK
466 /* The widget of this screen. This is the window of a top widget. */
467 GtkWidget *widget;
468 /* The widget of the edit portion of this screen; the window in
469 "window_desc" is inside of this. */
470 GtkWidget *edit_widget;
471 /* The widget used for laying out widgets vertically. */
472 GtkWidget *vbox_widget;
473 /* The menubar in this frame. */
474 GtkWidget *menubar_widget;
475 /* The tool bar in this frame */
476 GtkWidget *toolbar_widget;
477 /* The handle box that makes the tool bar detachable. */
478 GtkWidget *handlebox_widget;
479
480 /* The last size hints set. */
481 GdkGeometry size_hints;
482 long hint_flags;
483#endif
484
449 /* If >=0, a bitmap index. The indicated bitmap is used for the 485 /* If >=0, a bitmap index. The indicated bitmap is used for the
450 icon. */ 486 icon. */
451 int icon_bitmap; 487 int icon_bitmap;
@@ -638,13 +674,28 @@ enum
638 XtWindow ((f)->output_data.x->widget) : \ 674 XtWindow ((f)->output_data.x->widget) : \
639 FRAME_X_WINDOW (f)) 675 FRAME_X_WINDOW (f))
640#else 676#else
677#ifdef USE_GTK
678#define GTK_WIDGET_TO_X_WIN(w) \
679 ((w) && (w)->window ? GDK_WINDOW_XWINDOW ((w)->window) : 0)
680
681#define FRAME_GTK_OUTER_WIDGET(f) ((f)->output_data.x->widget)
682#define FRAME_GTK_WIDGET(f) ((f)->output_data.x->edit_widget)
683#define FRAME_OUTER_WINDOW(f) \
684 (FRAME_GTK_OUTER_WIDGET (f) ? \
685 GTK_WIDGET_TO_X_WIN (FRAME_GTK_OUTER_WIDGET (f)) : \
686 FRAME_X_WINDOW (f))
687
688#else /* !USE_GTK */
641#define FRAME_OUTER_WINDOW(f) (FRAME_X_WINDOW (f)) 689#define FRAME_OUTER_WINDOW(f) (FRAME_X_WINDOW (f))
690#endif /* !USE_GTK */
642#endif 691#endif
643 692
693
644#define FRAME_FONT(f) ((f)->output_data.x->font) 694#define FRAME_FONT(f) ((f)->output_data.x->font)
645#define FRAME_FONTSET(f) ((f)->output_data.x->fontset) 695#define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
646#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width) 696#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width)
647#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) 697#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
698#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height)
648#define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height) 699#define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height)
649 700
650/* Width of the default font of frame F. Must be defined by each 701/* Width of the default font of frame F. Must be defined by each
@@ -681,7 +732,7 @@ enum
681 ((f)->output_data.x->x_pixels_outer_diff) 732 ((f)->output_data.x->x_pixels_outer_diff)
682#define FRAME_OUTER_TO_INNER_DIFF_Y(f) \ 733#define FRAME_OUTER_TO_INNER_DIFF_Y(f) \
683 ((f)->output_data.x->y_pixels_outer_diff \ 734 ((f)->output_data.x->y_pixels_outer_diff \
684 + (f)->output_data.x->menubar_height) 735 + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
685 736
686 737
687#define FRAME_XIC(f) ((f)->output_data.x->xic) 738#define FRAME_XIC(f) ((f)->output_data.x->xic)