Commit 3f53d9c9 authored by Iban Hatchondo's avatar Iban Hatchondo
Browse files

- doc updated for (setf font-name)

 - (setf font-name) minor changes. Now checks if the font exists in the server before updating it in the graphic context. (global.lisp)
 - code clean up in eclipse.lisp: we can now use (according to the manual) (setf font-name) in the user config file.
parent cabdea66
.TH Eclipse 1 "(c) 2001 Iban HATCHONDO"
.\"$Id: eclipse.1,v 1.8 2003/10/06 17:57:27 ihatchondo Exp $
.\"$Id: eclipse.1,v 1.9 2003/10/09 11:40:39 ihatchondo Exp $
.SH NAME
eclipse - a window manager in Common Lisp
......@@ -214,6 +214,13 @@ is suposed to be equal to the number of virtual screens.
.TP
.B\-(setf font-name) font-name-string\ \fIstring\fP
Sets the font used in title bar to display the application title.
The following pattern characters can be used for wildcard matching:
\fB#\\*\fP Matches any sequence of zero or more characters.
\fB#\\?\fP Matches any single character.
For example, the pattern "T?mes Roman" matches the name "Times Roman"
but not the name "Thames Roman". However, the pattern "T*mes Roman"
matches both names.
.SH THEMES
The image file format is \fBpnm P6\fP.
......
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: eclipse.lisp,v 1.10 2003/10/06 17:57:26 ihatchondo Exp $
;;; $Id: eclipse.lisp,v 1.11 2003/11/13 11:02:05 ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2002 Iban HATCHONDO
......@@ -127,11 +127,6 @@
;; init all gnome properties on root.
(init-gnome-compliance display root-window manager)
(ppm:initialize colormap)
;; load personal configuration file, or the default one.
(or (load-config-file (home-subdirectory cl-user::*eclipse-initfile*))
(load-config-file (eclipse-path "eclipserc"))
(format *error-output* "Unable to read a configuration file.~%")
(%quit%))
;; Eclipse globals vars.
(setf *black* (xlib:screen-black-pixel screen)
*white* (xlib:screen-white-pixel screen)
......@@ -142,15 +137,18 @@
*max-char-width* (xlib:max-char-width menu-font)
*gcontext* (xlib:create-gcontext
:drawable root-window
:foreground *white*
:background *black*
:fill-style :solid
:line-style :solid
:line-width 1
:exposures :OFF
:font (xlib:open-font display *font-name*)))
:foreground *white* :background *black*
:fill-style :solid :line-style :solid
:line-width 1 :exposures :OFF))
;; load personal configuration file, or the default one.
(or (load-config-file (home-subdirectory cl-user::*eclipse-initfile*))
(load-config-file (eclipse-path "eclipserc"))
(format *error-output* "Unable to read a configuration file.~%")
(%quit%))
(setf (xlib:window-cursor root-window) (root-default-cursor *root*))
(setf (slot-value *root* 'gcontext) *gcontext*)
(unless (xlib:gcontext-font *gcontext*)
(setf (font-name) +default-font-name+))
(unless (root-decoration-theme *root*)
(setf (decoration-theme) "microGUI"))
(init-edges-cursors))))
......
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: global.lisp,v 1.13 2003/10/09 11:36:18 ihatchondo Exp $
;;; $Id: global.lisp,v 1.14 2003/11/24 13:12:26 ihatchondo Exp $
;;;
;;; This file is part of Eclipse.
;;; Copyright (C) 2001, 2002 Iban HATCHONDO
......@@ -51,6 +51,9 @@
(defconstant +any-desktop+ #xFFFFFFFF)
(defconstant +default-font-name+
"-misc-fixed-medium-r-normal--14-110-100-100-c-70-iso8859-1")
(defvar *cursor-2* nil)
(defvar *display* nil)
(defvar *root* nil)
......@@ -77,8 +80,6 @@
(defparameter *move-mode* :opaque "values are: :box :opaque")
(defparameter *resize-mode* :opaque "values are: :box :opaque")
(defparameter *focus-type* :none "values are: :none :on-click")
(defparameter *font-name*
"-misc-fixed-medium-r-normal--14-110-100-100-c-70-iso8859-1")
(defparameter *maximize-fill* nil
"Indicate if the action of maximizing window should making it filling whether
the largest area around (excluding overlapped windows) or screen area.")
......@@ -95,8 +96,13 @@
\(aka `icon-sort-creation-order'\).")
(defsetf font-name () (name)
`(setf *font-name* ,name
(xlib:gcontext-font *gcontext*) (xlib:open-font *display* ,name)))
"Set the title bar font to the font named by `name'.
The following pattern characters can be used for wildcard matching:
#\* Matches any sequence of zero or more characters.
#\? Matches any single character."
`(if (xlib:list-font-names *display* ,name)
(setf (xlib:gcontext-font *gcontext*) (xlib:open-font *display* ,name))
(format *stderr* "~a is not a valid font name or pattern~%" ,name)))
(defsetf decoration-theme (&key free-old-theme-p) (name)
`(with-slots (decoration-theme) *root*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment