From dacc9715a7aaf3e363cf67d6f8f3edd1c5f0e011 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Mon, 2 Dec 2013 17:35:53 +0400 Subject: [PATCH] * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT): Define here to unify between... * nsterm.h, w32term.h, xterm.h: ...port-specific headers. * w32term.h (CHECK_W32_FRAME): Remove unused macro. --- src/ChangeLog | 7 +++++++ src/font.h | 5 +++++ src/nsterm.h | 5 ----- src/w32term.h | 15 --------------- src/xterm.h | 5 ----- 5 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6eb258ce4d5..e691c91f6b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2013-12-02 Dmitry Antipov + + * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT): + Define here to unify between... + * nsterm.h, w32term.h, xterm.h: ...port-specific headers. + * w32term.h (CHECK_W32_FRAME): Remove unused macro. + 2013-12-02 YAMAMOTO Mitsuharu * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'. diff --git a/src/font.h b/src/font.h index 2db8d35af48..1f2f9bfbb19 100644 --- a/src/font.h +++ b/src/font.h @@ -234,6 +234,11 @@ enum font_property_index #define FONT_SET_STYLE(font, prop, val) \ ASET ((font), prop, make_number (font_style_to_value (prop, val, 1))) +#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) + extern Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClang, QCscript; extern Lisp_Object QCavgwidth, QCantialias, QCfont_entity; extern Lisp_Object Qp; diff --git a/src/nsterm.h b/src/nsterm.h index 0f22350156e..976347ad3b4 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -720,11 +720,6 @@ struct x_output #define FRAME_NS_TITLEBAR_HEIGHT(f) ((f)->output_data.ns->titlebar_height) #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.ns->toolbar_height) -#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 FRAME_DEFAULT_FACE(f) FACE_FROM_ID (f, DEFAULT_FACE_ID) #define FRAME_NS_VIEW(f) ((f)->output_data.ns->view) diff --git a/src/w32term.h b/src/w32term.h index 779b37e63a8..89008b7348c 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -26,23 +26,8 @@ along with GNU Emacs. If not, see . */ #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 */ diff --git a/src/xterm.h b/src/xterm.h index f67b79c3068..2729a771445 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -84,11 +84,6 @@ typedef GtkWidget *xt_or_gtk_widget; #define WHITE_PIX_DEFAULT(f) \ WhitePixel (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)) -#define FONT_WIDTH(f) ((f)->max_width) -#define FONT_HEIGHT(f) ((f)->ascent + (f)->descent) -#define FONT_BASE(f) ((f)->ascent) -#define FONT_DESCENT(f) ((f)->descent) - /* The mask of events that text windows always want to receive. This includes mouse movement events, since handling the mouse-font text property means that we must track mouse motion all the time. */ -- 2.39.2