/[mcclim]/mcclim/clx-graft.lisp
ViewVC logotype

Contents of /mcclim/clx-graft.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Mon Oct 29 19:57:12 2001 UTC (12 years, 5 months ago) by mikemac
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
restructure directory layout
1 ;;; -*- Mode: Lisp; Package: CLIM-INTERNALS -*-
2
3 ;;; (c) copyright 1998,1999,2000 by Michael McDonald (mikemac@mikemac.com)
4
5 ;;; This library is free software; you can redistribute it and/or
6 ;;; modify it under the terms of the GNU Library General Public
7 ;;; License as published by the Free Software Foundation; either
8 ;;; version 2 of the License, or (at your option) any later version.
9 ;;;
10 ;;; This library is distributed in the hope that it will be useful,
11 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ;;; Library General Public License for more details.
14 ;;;
15 ;;; You should have received a copy of the GNU Library General Public
16 ;;; License along with this library; if not, write to the
17 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 ;;; Boston, MA 02111-1307 USA.
19
20 (in-package :CLIM-INTERNALS)
21
22 ;;; CLX-GRAFT class
23
24 (defclass clx-graft (graft)
25 ()
26 )
27
28 (defmethod graft-width ((graft clx-graft) &key (units :device))
29 (let ((screen (clx-port-screen (port graft))))
30 (ecase units
31 (:device (xlib:screen-width screen))
32 (:inches (/ (xlib:screen-width-in-millimeters screen) 25.4s0))
33 (:millimeters (xlib:screen-width-in-millimeters screen))
34 (:screen-sized 1))))
35
36 (defmethod graft-height ((graft clx-graft) &key (units :device))
37 (let ((screen (clx-port-screen (port graft))))
38 (ecase units
39 (:device (xlib:screen-height screen))
40 (:inches (/ (xlib:screen-height-in-millimeters screen) 25.4s0))
41 (:millimeters (xlib:screen-height-in-millimeters screen))
42 (:screen-sized 1))))
43
44 (defmethod graft-pixels-per-millimeter ((graft clx-graft))
45 (let ((screen (clx-port-screen (port graft))))
46 (/ (xlib:screen-width screen)
47 (xlib:screen-width-in-millimeters screen))))
48
49 (defmethod graft-pixels-per-inch ((graft clx-graft))
50 (* (graft-pixels-per-millimeter graft) 25.4s0))
51

  ViewVC Help
Powered by ViewVC 1.1.5