Initial git import
[sxemacs] / lisp / gtk.el
1 (globally-declare-fboundp
2  '(gtk-import-function-internal gtk-call-function gtk-type-name))
3
4 (globally-declare-boundp
5  '(gtk-enumeration-info))
6
7 (eval-when-compile (require 'gtk-ffi))
8
9 (gtk-import-function nil "gdk_flush")
10
11 (defun gtk-describe-enumerations ()
12   "Show a list of all GtkEnum or GtkFlags objects available from lisp."
13   (interactive)
14   (set-buffer (get-buffer-create "*GTK Enumerations*"))
15   (erase-buffer)
16   (let ((separator (make-string (- (window-width) 3) ?-)))
17     (maphash (lambda (key val)
18                (insert
19                 separator "\n"
20                 (if (stringp key)
21                     key
22                   (gtk-type-name key)) "\n")
23                (mapc (lambda (cell)
24                        (insert (format "\t%40s == %d\n" (car cell) (cdr cell)))) val))
25              gtk-enumeration-info))
26   (goto-char (point-min))
27   (display-buffer (current-buffer)))