comparison lisp/gtk-widget-accessors.el @ 591:ec73ae6e772b

[xemacs-hg @ 2001-05-31 02:05:16 by wmperry] Fix GTK auto-generation elisp files...
author wmperry
date Thu, 31 May 2001 02:05:18 +0000
parents cd662ad69f40
children 11502791fc1c
comparison
equal deleted inserted replaced
590:ea7687dc2b34 591:ec73ae6e772b
1 (globally-declare-fboundp 1 '(globally-declare-fboundp
2 '(gtk-fundamental-type)) 2 '(gtk-fundamental-type))
3 3
4 (require 'gtk-ffi) 4 (require 'gtk-ffi)
5 5
6 (defconst GTK_TYPE_INVALID 0) 6 (defconst GTK_TYPE_INVALID 0)
64 "\n" 64 "\n"
65 "\tCHECK_GTK_OBJECT (obj);\n" 65 "\tCHECK_GTK_OBJECT (obj);\n"
66 "\n" 66 "\n"
67 (format "\tif (!GTK_IS_%s (XGTK_OBJECT (obj)->object))\n" wrapper) 67 (format "\tif (!GTK_IS_%s (XGTK_OBJECT (obj)->object))\n" wrapper)
68 "\t{\n" 68 "\t{\n"
69 (format "\t\tsignal_simple_error (\"Object is not a %s\", obj);\n" gtk-class) 69 (format "\t\twtaerror (\"Object is not a %s\", obj);\n" gtk-class)
70 "\t};\n" 70 "\t};\n"
71 "\n" 71 "\n"
72 (format "\tthe_obj = GTK_%s (XGTK_OBJECT (obj)->object);\n" wrapper) 72 (format "\tthe_obj = GTK_%s (XGTK_OBJECT (obj)->object);\n" wrapper)
73 73
74 (format "\targ.type = gtk_type_from_name (\"%s\");\n" (symbol-name (car arg)))) 74 (format "\targ.type = gtk_type_from_name (\"%s\");\n" (symbol-name (car arg))))
110 (declare (special c-mode-common-hook c-mode-hook)) 110 (declare (special c-mode-common-hook c-mode-hook))
111 (let ((c-mode-common-hook nil) 111 (let ((c-mode-common-hook nil)
112 (c-mode-hook nil)) 112 (c-mode-hook nil))
113 (find-file file)) 113 (find-file file))
114 (erase-buffer) 114 (erase-buffer)
115 (insert "/* This file was automatically generated by ../lisp/gtk-widget-accessors.el */\n"
116 "/* DO NOT EDIT BY HAND!!! */\n")
115 (let ((c-funcs nil)) 117 (let ((c-funcs nil))
116 (while description 118 (while description
117 (setq c-funcs (nconc (define-widget-accessors 119 (setq c-funcs (nconc (define-widget-accessors
118 (pop description) (pop description) 120 (pop description) (pop description)
119 (pop description) (pop description)) c-funcs))) 121 (pop description) (pop description)) c-funcs)))
131 (mapatoms (lambda (sym) 133 (mapatoms (lambda (sym)
132 (if (string-match "gtk-[^-]+-get-type" (symbol-name sym)) 134 (if (string-match "gtk-[^-]+-get-type" (symbol-name sym))
133 (funcall sym)))) 135 (funcall sym))))
134 136
135 (import-widget-accessors 137 (import-widget-accessors
136 "../../src/emacs-widget-accessors.c" 138 "../src/emacs-widget-accessors.c"
137 "syms_of_widget_accessors " 139 "syms_of_widget_accessors "
138 140
139 'GtkAdjustment "ADJUSTMENT" "adjustment" 141 'GtkAdjustment "ADJUSTMENT" "adjustment"
140 '((gfloat . lower) 142 '((gfloat . lower)
141 (gfloat . upper) 143 (gfloat . upper)