all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: display-mm-height for MacOS?
Date: Tue, 23 Mar 2004 09:51:09 +0900	[thread overview]
Message-ID: <wl65cwmlmq.wl@church.math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <x5zna913v8.fsf@lola.goethe.zz>

>>>>> On 22 Mar 2004 13:08:11 +0100, David Kastrup <dak@gnu.org> said:

> On MacOS, it would appear that this results in awfully large images,
> so one of the three above stated dimensions would seem to be quite
> wrong.

Could you try this patch?

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

Index: src/macfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macfns.c,v
retrieving revision 1.31
diff -c -r1.31 macfns.c
*** src/macfns.c	11 Mar 2004 22:43:18 -0000	1.31
--- src/macfns.c	23 Mar 2004 00:42:32 -0000
***************
*** 3025,3035 ****
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
-   short h, v;
  
!   ScreenRes (&h, &v);
! 
!   return make_number ((int) (v / 72.0 * 25.4));
  }
  
  DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
--- 3025,3032 ----
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
  
!   return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
  }
  
  DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
***************
*** 3043,3053 ****
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
-   short h, v;
- 
-   ScreenRes (&h, &v);
  
!   return make_number ((int) (h / 72.0 * 25.4));
  }
  
  DEFUN ("x-display-backing-store", Fx_display_backing_store,
--- 3040,3047 ----
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
  
!   return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
  }
  
  DEFUN ("x-display-backing-store", Fx_display_backing_store,

      parent reply	other threads:[~2004-03-23  0:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-22 12:08 display-mm-height for MacOS? David Kastrup
2004-03-22 13:22 ` Hans-Peter Binder
2004-03-22 14:09   ` David Kastrup
2004-03-23  9:13     ` Vincent LADEUIL
2004-03-23  0:51 ` YAMAMOTO Mitsuharu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wl65cwmlmq.wl@church.math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.