aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-08-30 16:17:44 +0400
committerDmitry Antipov2013-08-30 16:17:44 +0400
commit9d7693d74c4ec73c01d03d990d552e1480ec2739 (patch)
tree9b3862361d8d0ca7ca8456321e8eda3e4ac5c54c /src
parent112798c18dbbb095a34ace257767ae6f57643468 (diff)
downloademacs-9d7693d74c4ec73c01d03d990d552e1480ec2739.tar.gz
emacs-9d7693d74c4ec73c01d03d990d552e1480ec2739.zip
Minor cleanup to avoid forward declarations.
* coding.h (struct ccl_spec): Remove forward declaration. * composite.h (toplevel): Include font.h. (struct composition_it, struct face, struct font_metrics): Remove forward declaration. * dispextern.h (struct image, struct atimer): Likewise. * emacsgtkfixed.h (struct frame): Likewise. * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h. * font.h (struct font_driver, struct font, struct glyph_string) (struct face): Remove forward declaration. * fontset.h (struct face, struct font): Likewise. * frame.h (toplevel): Style cleanup. (enum output_method): Move to... * termhooks.h (enum output_method): ...here. (struct glyph, struct frame, struct ns_display_info) (struct x_display_info, struct w32_display_info): Remove forward declaration. * xterm.h (toplevel): Include termhooks.h. (struct font, struct window, struct glyph_matrix, struct frame) (struct input_event, struct face, struct image): Remove forward declaration. * gtkutil.h (struct _widget_value): Likewise. * keyboard.h (toplevel): Include termhooks.h. (struct input_event): Remove forward declaration.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog27
-rw-r--r--src/coding.h2
-rw-r--r--src/composite.h6
-rw-r--r--src/dispextern.h7
-rw-r--r--src/emacsgtkfixed.c4
-rw-r--r--src/emacsgtkfixed.h2
-rw-r--r--src/font.h7
-rw-r--r--src/fontset.h3
-rw-r--r--src/frame.h31
-rw-r--r--src/gtkutil.h2
-rw-r--r--src/keyboard.h4
-rw-r--r--src/termhooks.h28
-rw-r--r--src/xterm.h22
13 files changed, 60 insertions, 85 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c605c5ec4d3..e11587450ec 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,30 @@
12013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Minor cleanup to avoid forward declarations.
4 * coding.h (struct ccl_spec): Remove forward declaration.
5 * composite.h (toplevel): Include font.h.
6 (struct composition_it, struct face, struct font_metrics):
7 Remove forward declaration.
8 * dispextern.h (struct image, struct atimer): Likewise.
9 * emacsgtkfixed.h (struct frame): Likewise.
10 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
11 * font.h (struct font_driver, struct font, struct glyph_string)
12 (struct face): Remove forward declaration.
13 * fontset.h (struct face, struct font): Likewise.
14 * frame.h (toplevel): Style cleanup.
15 (enum output_method): Move to...
16 * termhooks.h (enum output_method): ...here.
17 (struct glyph, struct frame, struct ns_display_info)
18 (struct x_display_info, struct w32_display_info):
19 Remove forward declaration.
20 * xterm.h (toplevel): Include termhooks.h.
21 (struct font, struct window, struct glyph_matrix, struct frame)
22 (struct input_event, struct face, struct image): Remove forward
23 declaration.
24 * gtkutil.h (struct _widget_value): Likewise.
25 * keyboard.h (toplevel): Include termhooks.h.
26 (struct input_event): Remove forward declaration.
27
12013-08-29 Dmitry Antipov <dmantipov@yandex.ru> 282013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
2 29
3 * intervals.c (set_point_from_marker): New function. 30 * intervals.c (set_point_from_marker): New function.
diff --git a/src/coding.h b/src/coding.h
index 7b7078e06fa..2c01a05d197 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -378,8 +378,6 @@ struct emacs_mule_spec
378 struct composition_status cmp_status; 378 struct composition_status cmp_status;
379}; 379};
380 380
381struct ccl_spec;
382
383struct undecided_spec 381struct undecided_spec
384{ 382{
385 /* Inhibit null byte detection. 1 means always inhibit, 383 /* Inhibit null byte detection. 1 means always inhibit,
diff --git a/src/composite.h b/src/composite.h
index 53665b36bd1..df170093797 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -25,6 +25,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#ifndef EMACS_COMPOSITE_H 25#ifndef EMACS_COMPOSITE_H
26#define EMACS_COMPOSITE_H 26#define EMACS_COMPOSITE_H
27 27
28#include "font.h"
29
28INLINE_HEADER_BEGIN 30INLINE_HEADER_BEGIN
29#ifndef COMPOSITE_INLINE 31#ifndef COMPOSITE_INLINE
30# define COMPOSITE_INLINE INLINE 32# define COMPOSITE_INLINE INLINE
@@ -312,10 +314,6 @@ enum lglyph_indices
312#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ 314#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
313 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0) 315 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
314 316
315struct composition_it;
316struct face;
317struct font_metrics;
318
319extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t); 317extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
320extern Lisp_Object composition_gstring_from_id (ptrdiff_t); 318extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
321extern bool composition_gstring_p (Lisp_Object); 319extern bool composition_gstring_p (Lisp_Object);
diff --git a/src/dispextern.h b/src/dispextern.h
index b327250a88a..ce9a34a2e71 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2869,11 +2869,6 @@ struct redisplay_interface
2869 2869
2870#ifdef HAVE_WINDOW_SYSTEM 2870#ifdef HAVE_WINDOW_SYSTEM
2871 2871
2872/* Structure forward declarations. */
2873
2874struct image;
2875
2876
2877/* Each image format (JPEG, TIFF, ...) supported is described by 2872/* Each image format (JPEG, TIFF, ...) supported is described by
2878 a structure of the type below. */ 2873 a structure of the type below. */
2879 2874
@@ -3401,8 +3396,6 @@ extern frame_parm_handler x_frame_parm_handlers[];
3401extern void start_hourglass (void); 3396extern void start_hourglass (void);
3402extern void cancel_hourglass (void); 3397extern void cancel_hourglass (void);
3403extern int hourglass_shown_p; 3398extern int hourglass_shown_p;
3404
3405struct atimer; /* Defined in atimer.h. */
3406/* If non-null, an asynchronous timer that, when it expires, displays 3399/* If non-null, an asynchronous timer that, when it expires, displays
3407 an hourglass cursor on all frames. */ 3400 an hourglass cursor on all frames. */
3408extern struct atimer *hourglass_atimer; 3401extern struct atimer *hourglass_atimer;
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 8b19d89f3a0..44f5cde1b0b 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -20,12 +20,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22 22
23#include "emacsgtkfixed.h"
24#include <stdio.h>
25
26#include "lisp.h" 23#include "lisp.h"
27#include "frame.h" 24#include "frame.h"
28#include "xterm.h" 25#include "xterm.h"
26#include "emacsgtkfixed.h"
29 27
30/* Silence a bogus diagnostic; see GNOME bug 683906. */ 28/* Silence a bogus diagnostic; see GNOME bug 683906. */
31#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) 29#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index d987797a934..773ca26b143 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -25,8 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25 25
26G_BEGIN_DECLS 26G_BEGIN_DECLS
27 27
28struct frame;
29
30extern GtkWidget *emacs_fixed_new (struct frame *f); 28extern GtkWidget *emacs_fixed_new (struct frame *f);
31 29
32G_END_DECLS 30G_END_DECLS
diff --git a/src/font.h b/src/font.h
index adb4a582fd8..3ee579aba2b 100644
--- a/src/font.h
+++ b/src/font.h
@@ -56,11 +56,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56 56
57extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; 57extern Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
58 58
59
60struct font_driver;
61struct font;
62struct glyph_string;
63
64/* An enumerator for each font property. This is used as an index to 59/* An enumerator for each font property. This is used as an index to
65 the vector of FONT-SPEC and FONT-ENTITY. 60 the vector of FONT-SPEC and FONT-ENTITY.
66 61
@@ -487,8 +482,6 @@ struct font_bitmap
487 this value. */ 482 this value. */
488#define FONT_PIXEL_SIZE_QUANTUM 1 483#define FONT_PIXEL_SIZE_QUANTUM 1
489 484
490struct face;
491
492#define FONT_INVALID_CODE 0xFFFFFFFF 485#define FONT_INVALID_CODE 0xFFFFFFFF
493 486
494/* Font driver. Members specified as "optional" can be NULL. */ 487/* Font driver. Members specified as "optional" can be NULL. */
diff --git a/src/fontset.h b/src/fontset.h
index fd16c7178f5..b8ef4789e71 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -26,8 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#ifndef EMACS_FONTSET_H 26#ifndef EMACS_FONTSET_H
27#define EMACS_FONTSET_H 27#define EMACS_FONTSET_H
28 28
29struct face;
30
31extern void free_face_fontset (struct frame *, struct face *); 29extern void free_face_fontset (struct frame *, struct face *);
32extern int face_for_char (struct frame *, struct face *, int, 30extern int face_for_char (struct frame *, struct face *, int,
33 int, Lisp_Object); 31 int, Lisp_Object);
@@ -42,7 +40,6 @@ extern Lisp_Object Qlatin;
42extern Lisp_Object fontset_name (int); 40extern Lisp_Object fontset_name (int);
43extern Lisp_Object fontset_ascii (int); 41extern Lisp_Object fontset_ascii (int);
44 42
45struct font;
46extern int face_for_font (struct frame *, Lisp_Object, struct face *); 43extern int face_for_font (struct frame *, Lisp_Object, struct face *);
47 44
48#endif /* EMACS_FONTSET_H */ 45#endif /* EMACS_FONTSET_H */
diff --git a/src/frame.h b/src/frame.h
index 2dcb7562524..17b6089120a 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -24,31 +24,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
24#define EMACS_FRAME_H 24#define EMACS_FRAME_H
25 25
26#include "dispextern.h" 26#include "dispextern.h"
27#include "termhooks.h"
27 28
28INLINE_HEADER_BEGIN 29INLINE_HEADER_BEGIN
29#ifndef FRAME_INLINE 30#ifndef FRAME_INLINE
30# define FRAME_INLINE INLINE 31# define FRAME_INLINE INLINE
31#endif 32#endif
32 33
33
34/* Miscellanea. */
35
36/* Nonzero means there is at least one garbaged frame. */
37extern bool frame_garbaged;
38
39
40/* The structure representing a frame. */
41
42enum output_method
43{
44 output_initial,
45 output_termcap,
46 output_x_window,
47 output_msdos_raw,
48 output_w32,
49 output_ns
50};
51
52enum vertical_scroll_bar_type 34enum vertical_scroll_bar_type
53{ 35{
54 vertical_scroll_bar_none, 36 vertical_scroll_bar_none,
@@ -66,10 +48,7 @@ enum fullscreen_type
66 FULLSCREEN_WAIT = 0x100 48 FULLSCREEN_WAIT = 0x100
67}; 49};
68 50
69 51/* The structure representing a frame. */
70#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
71#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
72
73 52
74struct frame 53struct frame
75{ 54{
@@ -884,6 +863,9 @@ default_pixels_per_inch_y (void)
884#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width) 863#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width)
885#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width) 864#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width)
886 865
866#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
867#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
868
887/* Return a pointer to the face cache of frame F. */ 869/* Return a pointer to the face cache of frame F. */
888 870
889#define FRAME_FACE_CACHE(F) (F)->face_cache 871#define FRAME_FACE_CACHE(F) (F)->face_cache
@@ -950,6 +932,9 @@ extern Lisp_Object Qtty_color_mode;
950extern Lisp_Object Qterminal; 932extern Lisp_Object Qterminal;
951extern Lisp_Object Qnoelisp; 933extern Lisp_Object Qnoelisp;
952 934
935/* Nonzero means there is at least one garbaged frame. */
936extern bool frame_garbaged;
937
953extern struct frame *last_nonminibuf_frame; 938extern struct frame *last_nonminibuf_frame;
954 939
955extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); 940extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 482331a8934..fc959862fd3 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -74,8 +74,6 @@ typedef struct xg_menu_item_cb_data_
74 74
75} xg_menu_item_cb_data; 75} xg_menu_item_cb_data;
76 76
77struct _widget_value;
78
79extern struct _widget_value *malloc_widget_value (void); 77extern struct _widget_value *malloc_widget_value (void);
80extern void free_widget_value (struct _widget_value *); 78extern void free_widget_value (struct _widget_value *);
81 79
diff --git a/src/keyboard.h b/src/keyboard.h
index 0953f1b7cfd..1ee4a97c5c5 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 19
20#include "systime.h" /* for struct timespec, Time */ 20#include "systime.h" /* for struct timespec, Time */
21#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ 21#include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */
22#include "termhooks.h"
22 23
23INLINE_HEADER_BEGIN 24INLINE_HEADER_BEGIN
24#ifndef KEYBOARD_INLINE 25#ifndef KEYBOARD_INLINE
@@ -477,9 +478,6 @@ extern bool ignore_mouse_drag_p;
477/* The primary selection. */ 478/* The primary selection. */
478extern Lisp_Object QPRIMARY; 479extern Lisp_Object QPRIMARY;
479 480
480/* Forward declaration for prototypes. */
481struct input_event;
482
483extern Lisp_Object parse_modifiers (Lisp_Object); 481extern Lisp_Object parse_modifiers (Lisp_Object);
484extern Lisp_Object reorder_modifiers (Lisp_Object); 482extern Lisp_Object reorder_modifiers (Lisp_Object);
485extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object, 483extern Lisp_Object read_char (int, Lisp_Object, Lisp_Object,
diff --git a/src/termhooks.h b/src/termhooks.h
index b49a7bc706b..77f98938edb 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -18,7 +18,9 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21#ifndef EMACS_TERMHOOKS_H
22#define EMACS_TERMHOOKS_H
23
22/* Miscellanea. */ 24/* Miscellanea. */
23 25
24#include "systime.h" /* for Time */ 26#include "systime.h" /* for Time */
@@ -28,10 +30,6 @@ INLINE_HEADER_BEGIN
28# define TERMHOOKS_INLINE INLINE 30# define TERMHOOKS_INLINE INLINE
29#endif 31#endif
30 32
31struct glyph;
32struct frame;
33
34
35enum scroll_bar_part { 33enum scroll_bar_part {
36 scroll_bar_above_handle, 34 scroll_bar_above_handle,
37 scroll_bar_handle, 35 scroll_bar_handle,
@@ -49,7 +47,18 @@ enum scroll_bar_part {
49 may do something OS dependent, like extended window manager hints on X11. */ 47 may do something OS dependent, like extended window manager hints on X11. */
50extern void (*fullscreen_hook) (struct frame *f); 48extern void (*fullscreen_hook) (struct frame *f);
51 49
52 50/* Output method of a terminal (and frames on this terminal, respectively). */
51
52enum output_method
53{
54 output_initial,
55 output_termcap,
56 output_x_window,
57 output_msdos_raw,
58 output_w32,
59 output_ns
60};
61
53/* Input queue declarations and hooks. */ 62/* Input queue declarations and hooks. */
54 63
55enum event_kind 64enum event_kind
@@ -321,11 +330,6 @@ extern void term_mouse_moveto (int, int);
321extern struct tty_display_info *gpm_tty; 330extern struct tty_display_info *gpm_tty;
322#endif 331#endif
323 332
324
325struct ns_display_info;
326struct x_display_info;
327struct w32_display_info;
328
329/* Terminal-local parameters. */ 333/* Terminal-local parameters. */
330struct terminal 334struct terminal
331{ 335{
@@ -660,3 +664,5 @@ extern void close_gpm (int gpm_fd);
660#endif 664#endif
661 665
662INLINE_HEADER_END 666INLINE_HEADER_END
667
668#endif /* EMACS_TERMHOOKS_H */
diff --git a/src/xterm.h b/src/xterm.h
index 26f6095d727..39e40002d4e 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -20,8 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#ifndef XTERM_H 20#ifndef XTERM_H
21#define XTERM_H 21#define XTERM_H
22 22
23#include "dispextern.h"
24
25#include <X11/Xlib.h> 23#include <X11/Xlib.h>
26#include <X11/cursorfont.h> 24#include <X11/cursorfont.h>
27 25
@@ -73,14 +71,13 @@ typedef GtkWidget *xt_or_gtk_widget;
73#define USE_GTK_TOOLTIP 71#define USE_GTK_TOOLTIP
74#endif 72#endif
75 73
76
77/* Bookkeeping to distinguish X versions. */
78
79
80#ifdef HAVE_X_I18N 74#ifdef HAVE_X_I18N
81#include <X11/Xlocale.h> 75#include <X11/Xlocale.h>
82#endif 76#endif
83 77
78#include "dispextern.h"
79#include "termhooks.h"
80
84#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \ 81#define BLACK_PIX_DEFAULT(f) BlackPixel (FRAME_X_DISPLAY (f), \
85 XScreenNumberOfScreen (FRAME_X_SCREEN (f))) 82 XScreenNumberOfScreen (FRAME_X_SCREEN (f)))
86#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \ 83#define WHITE_PIX_DEFAULT(f) WhitePixel (FRAME_X_DISPLAY (f), \
@@ -409,9 +406,6 @@ extern bool x_display_ok (const char *);
409 406
410extern void select_visual (struct x_display_info *); 407extern void select_visual (struct x_display_info *);
411 408
412
413struct font;
414
415/* Each X frame object points to its own struct x_output object 409/* Each X frame object points to its own struct x_output object
416 in the output_data.x field. The x_output structure contains 410 in the output_data.x field. The x_output structure contains
417 the information that is specific to X windows. */ 411 the information that is specific to X windows. */
@@ -919,14 +913,6 @@ struct selection_input_event
919#define SELECTION_EVENT_TIME(eventp) \ 913#define SELECTION_EVENT_TIME(eventp) \
920 (((struct selection_input_event *) (eventp))->time) 914 (((struct selection_input_event *) (eventp))->time)
921 915
922
923struct window;
924struct glyph_matrix;
925struct frame;
926struct input_event;
927struct face;
928struct image;
929
930/* From xselect.c. */ 916/* From xselect.c. */
931 917
932void x_handle_selection_notify (XSelectionEvent *); 918void x_handle_selection_notify (XSelectionEvent *);