view lisp/gtk.el @ 2481:505a24c07ba9

[xemacs-hg @ 2005-01-15 15:17:32 by michaels] 2005-01-08 Mike Sperber <mike@xemacs.org> * packages.el (packages-find-installation-package-directories): Add. * find-paths.el (paths-for-each-emacs-directory): Abstract FUNC parameter out of `paths-find-emacs-directory'. (paths-find-emacs-directories): Add. (paths-find-emacs-directory): Redefine in terms of `paths-for-each-emacs-directory'. (paths-for-each-site-directory): Add. (paths-find-site-directory): Redefine in terms of `paths-for-each-site-directory'. (paths-find-site-directories): Add. (paths-for-each-version-directory): Add. (paths-find-version-directory): Redefine in terms of `paths-for-each-version-directory'. (paths-find-version-directories): Add.
author michaels
date Sat, 15 Jan 2005 15:17:36 +0000
parents 7039e6323819
children b4f4e0cc90f1
line wrap: on
line source

(globally-declare-fboundp
 '(gtk-import-function-internal gtk-call-function gtk-type-name))

(globally-declare-boundp
 '(gtk-enumeration-info))

(gtk-import-function nil "gdk_flush")

(defun gtk-describe-enumerations ()
  "Show a list of all GtkEnum or GtkFlags objects available from lisp."
  (interactive)
  (set-buffer (get-buffer-create "*GTK Enumerations*"))
  (erase-buffer)
  (let ((separator (make-string (- (window-width) 3) ?-)))
    (maphash (lambda (key val)
	       (insert
		separator "\n"
		(if (stringp key)
		    key
		  (gtk-type-name key)) "\n")
	       (mapc (lambda (cell)
		       (insert (format "\t%40s == %d\n" (car cell) (cdr cell)))) val))
	     gtk-enumeration-info))
  (goto-char (point-min))
  (display-buffer (current-buffer)))