Mercurial > hg > xemacs-beta
comparison man/internals/internals.texi @ 446:1ccc32a20af4 r21-2-38
Import from CVS: tag r21-2-38
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:37:21 +0200 |
parents | 576fb035e263 |
children | 3078fd1074e8 |
comparison
equal
deleted
inserted
replaced
445:34f3776fcf0e | 446:1ccc32a20af4 |
---|---|
133 * Faces:: | 133 * Faces:: |
134 * Glyphs:: | 134 * Glyphs:: |
135 * Specifiers:: | 135 * Specifiers:: |
136 * Menus:: | 136 * Menus:: |
137 * Subprocesses:: | 137 * Subprocesses:: |
138 * Interface to X Windows:: | 138 * Interface to the X Window System:: |
139 * Index:: | 139 * Index:: |
140 | 140 |
141 @detailmenu | 141 @detailmenu |
142 | 142 |
143 --- The Detailed Node Listing --- | 143 --- The Detailed Node Listing --- |
7176 Many are accessible indirectly in Lisp programs via Lisp primitives. | 7176 Many are accessible indirectly in Lisp programs via Lisp primitives. |
7177 | 7177 |
7178 @table @code | 7178 @table @code |
7179 @item name | 7179 @item name |
7180 The buffer name is a string that names the buffer. It is guaranteed to | 7180 The buffer name is a string that names the buffer. It is guaranteed to |
7181 be unique. @xref{Buffer Names,,, lispref, XEmacs Lisp Programmer's | 7181 be unique. @xref{Buffer Names,,, lispref, XEmacs Lisp Reference |
7182 Manual}. | 7182 Manual}. |
7183 | 7183 |
7184 @item save_modified | 7184 @item save_modified |
7185 This field contains the time when the buffer was last saved, as an | 7185 This field contains the time when the buffer was last saved, as an |
7186 integer. @xref{Buffer Modification,,, lispref, XEmacs Lisp Programmer's | 7186 integer. @xref{Buffer Modification,,, lispref, XEmacs Lisp Reference |
7187 Manual}. | 7187 Manual}. |
7188 | 7188 |
7189 @item modtime | 7189 @item modtime |
7190 This field contains the modification time of the visited file. It is | 7190 This field contains the modification time of the visited file. It is |
7191 set when the file is written or read. Every time the buffer is written | 7191 set when the file is written or read. Every time the buffer is written |
7192 to the file, this field is compared to the modification time of the | 7192 to the file, this field is compared to the modification time of the |
7193 file. @xref{Buffer Modification,,, lispref, XEmacs Lisp Programmer's | 7193 file. @xref{Buffer Modification,,, lispref, XEmacs Lisp Reference |
7194 Manual}. | 7194 Manual}. |
7195 | 7195 |
7196 @item auto_save_modified | 7196 @item auto_save_modified |
7197 This field contains the time when the buffer was last auto-saved. | 7197 This field contains the time when the buffer was last auto-saved. |
7198 | 7198 |
7200 This field contains the @code{window-start} position in the buffer as of | 7200 This field contains the @code{window-start} position in the buffer as of |
7201 the last time the buffer was displayed in a window. | 7201 the last time the buffer was displayed in a window. |
7202 | 7202 |
7203 @item undo_list | 7203 @item undo_list |
7204 This field points to the buffer's undo list. @xref{Undo,,, lispref, | 7204 This field points to the buffer's undo list. @xref{Undo,,, lispref, |
7205 XEmacs Lisp Programmer's Manual}. | 7205 XEmacs Lisp Reference Manual}. |
7206 | 7206 |
7207 @item syntax_table_v | 7207 @item syntax_table_v |
7208 This field contains the syntax table for the buffer. @xref{Syntax | 7208 This field contains the syntax table for the buffer. @xref{Syntax |
7209 Tables,,, lispref, XEmacs Lisp Programmer's Manual}. | 7209 Tables,,, lispref, XEmacs Lisp Reference Manual}. |
7210 | 7210 |
7211 @item downcase_table | 7211 @item downcase_table |
7212 This field contains the conversion table for converting text to lower | 7212 This field contains the conversion table for converting text to lower |
7213 case. @xref{Case Tables,,, lispref, XEmacs Lisp Programmer's Manual}. | 7213 case. @xref{Case Tables,,, lispref, XEmacs Lisp Reference Manual}. |
7214 | 7214 |
7215 @item upcase_table | 7215 @item upcase_table |
7216 This field contains the conversion table for converting text to upper | 7216 This field contains the conversion table for converting text to upper |
7217 case. @xref{Case Tables,,, lispref, XEmacs Lisp Programmer's Manual}. | 7217 case. @xref{Case Tables,,, lispref, XEmacs Lisp Reference Manual}. |
7218 | 7218 |
7219 @item case_canon_table | 7219 @item case_canon_table |
7220 This field contains the conversion table for canonicalizing text for | 7220 This field contains the conversion table for canonicalizing text for |
7221 case-folding search. @xref{Case Tables,,, lispref, XEmacs Lisp | 7221 case-folding search. @xref{Case Tables,,, lispref, XEmacs Lisp |
7222 Programmer's Manual}. | 7222 Reference Manual}. |
7223 | 7223 |
7224 @item case_eqv_table | 7224 @item case_eqv_table |
7225 This field contains the equivalence table for case-folding search. | 7225 This field contains the equivalence table for case-folding search. |
7226 @xref{Case Tables,,, lispref, XEmacs Lisp Programmer's Manual}. | 7226 @xref{Case Tables,,, lispref, XEmacs Lisp Reference Manual}. |
7227 | 7227 |
7228 @item display_table | 7228 @item display_table |
7229 This field contains the buffer's display table, or @code{nil} if it | 7229 This field contains the buffer's display table, or @code{nil} if it |
7230 doesn't have one. @xref{Display Tables,,, lispref, XEmacs Lisp | 7230 doesn't have one. @xref{Display Tables,,, lispref, XEmacs Lisp |
7231 Programmer's Manual}. | 7231 Reference Manual}. |
7232 | 7232 |
7233 @item markers | 7233 @item markers |
7234 This field contains the chain of all markers that currently point into | 7234 This field contains the chain of all markers that currently point into |
7235 the buffer. Deletion of text in the buffer, and motion of the buffer's | 7235 the buffer. Deletion of text in the buffer, and motion of the buffer's |
7236 gap, must check each of these markers and perhaps update it. | 7236 gap, must check each of these markers and perhaps update it. |
7237 @xref{Markers,,, lispref, XEmacs Lisp Programmer's Manual}. | 7237 @xref{Markers,,, lispref, XEmacs Lisp Reference Manual}. |
7238 | 7238 |
7239 @item backed_up | 7239 @item backed_up |
7240 This field is a flag that tells whether a backup file has been made for | 7240 This field is a flag that tells whether a backup file has been made for |
7241 the visited file of this buffer. | 7241 the visited file of this buffer. |
7242 | 7242 |
7243 @item mark | 7243 @item mark |
7244 This field contains the mark for the buffer. The mark is a marker, | 7244 This field contains the mark for the buffer. The mark is a marker, |
7245 hence it is also included on the list @code{markers}. @xref{The Mark,,, | 7245 hence it is also included on the list @code{markers}. @xref{The Mark,,, |
7246 lispref, XEmacs Lisp Programmer's Manual}. | 7246 lispref, XEmacs Lisp Reference Manual}. |
7247 | 7247 |
7248 @item mark_active | 7248 @item mark_active |
7249 This field is non-@code{nil} if the buffer's mark is active. | 7249 This field is non-@code{nil} if the buffer's mark is active. |
7250 | 7250 |
7251 @item local_var_alist | 7251 @item local_var_alist |
7252 This field contains the association list describing the variables local | 7252 This field contains the association list describing the variables local |
7253 in this buffer, and their values, with the exception of local variables | 7253 in this buffer, and their values, with the exception of local variables |
7254 that have special slots in the buffer object. (Those slots are omitted | 7254 that have special slots in the buffer object. (Those slots are omitted |
7255 from this table.) @xref{Buffer-Local Variables,,, lispref, XEmacs Lisp | 7255 from this table.) @xref{Buffer-Local Variables,,, lispref, XEmacs Lisp |
7256 Programmer's Manual}. | 7256 Reference Manual}. |
7257 | 7257 |
7258 @item modeline_format | 7258 @item modeline_format |
7259 This field contains a Lisp object which controls how to display the mode | 7259 This field contains a Lisp object which controls how to display the mode |
7260 line for this buffer. @xref{Modeline Format,,, lispref, XEmacs Lisp | 7260 line for this buffer. @xref{Modeline Format,,, lispref, XEmacs Lisp |
7261 Programmer's Manual}. | 7261 Reference Manual}. |
7262 | 7262 |
7263 @item base_buffer | 7263 @item base_buffer |
7264 This field holds the buffer's base buffer (if it is an indirect buffer), | 7264 This field holds the buffer's base buffer (if it is an indirect buffer), |
7265 or @code{nil}. | 7265 or @code{nil}. |
7266 @end table | 7266 @end table |
8721 @node Glyphs, Specifiers, Faces, Top | 8721 @node Glyphs, Specifiers, Faces, Top |
8722 @chapter Glyphs | 8722 @chapter Glyphs |
8723 | 8723 |
8724 Glyphs are graphical elements that can be displayed in XEmacs buffers or | 8724 Glyphs are graphical elements that can be displayed in XEmacs buffers or |
8725 gutters. We use the term graphical element here in the broadest possible | 8725 gutters. We use the term graphical element here in the broadest possible |
8726 sense since glyphs can be as mundane as text to as arcane as a native | 8726 sense since glyphs can be as mundane as text or as arcane as a native |
8727 tab widget. | 8727 tab widget. |
8728 | 8728 |
8729 In XEmacs, glyphs represent the uninstantiated state of graphical | 8729 In XEmacs, glyphs represent the uninstantiated state of graphical |
8730 elements, i.e. they hold all the information necessary to produce an | 8730 elements, i.e. they hold all the information necessary to produce an |
8731 image on-screen but the image does not exist at this stage. | 8731 image on-screen but the image need not exist at this stage, and multiple |
8732 screen images can be instantiated from a single glyph. | |
8732 | 8733 |
8733 Glyphs are lazily instantiated by calling one of the glyph | 8734 Glyphs are lazily instantiated by calling one of the glyph |
8734 functions. This usually occurs within redisplay when | 8735 functions. This usually occurs within redisplay when |
8735 @code{Fglyph_height} is called. Instantiation causes an image-instance | 8736 @code{Fglyph_height} is called. Instantiation causes an image-instance |
8736 to be created and cached. This cache is on a device basis for all glyphs | 8737 to be created and cached. This cache is on a device basis for all glyphs |
8744 and every usage - and this would be extremely memory and cpu intensive. | 8745 and every usage - and this would be extremely memory and cpu intensive. |
8745 | 8746 |
8746 Widget-glyphs (a.k.a native widgets) are not cached in this way. This is | 8747 Widget-glyphs (a.k.a native widgets) are not cached in this way. This is |
8747 because widget-glyph image-instances on screen are toolkit windows, and | 8748 because widget-glyph image-instances on screen are toolkit windows, and |
8748 thus cannot be reused in multiple XEmacs domains. Thus widget-glyphs are | 8749 thus cannot be reused in multiple XEmacs domains. Thus widget-glyphs are |
8749 cached on a window basis. | 8750 cached on an XEmacs window basis. |
8750 | 8751 |
8751 Any action on a glyph first consults the cache before actually | 8752 Any action on a glyph first consults the cache before actually |
8752 instantiating a widget. | 8753 instantiating a widget. |
8753 | 8754 |
8754 @section Widget-Glyphs in the MS-Windows Environment | 8755 @section Widget-Glyphs in the MS-Windows Environment |
8755 | 8756 |
8756 To Do | 8757 To Do |
8757 | 8758 |
8758 @section Widget-Glyphs in the X Environment | 8759 @section Widget-Glyphs in the X Environment |
8759 | 8760 |
8760 Widget-glyphs under X make heavy use of lwlib for manipulating the | 8761 Widget-glyphs under X make heavy use of lwlib (@pxref{Lucid Widget |
8761 native toolkit objects. This is primarily so that different toolkits can | 8762 Library}) for manipulating the native toolkit objects. This is primarily |
8762 be supported for widget-glyphs, just as they are supported for features | 8763 so that different toolkits can be supported for widget-glyphs, just as |
8763 such as menubars etc. | 8764 they are supported for features such as menubars etc. |
8764 | |
8765 Lwlib is extremely poorly documented and quite hairy so here is my | |
8766 understanding of what goes on. | |
8767 | |
8768 Lwlib maintains a set of widget_instances which mirror the hierarchical | |
8769 state of Xt widgets. I think this is so that widgets can be updated and | |
8770 manipulated generically by the lwlib library. For instance | |
8771 update_one_widget_instance can cope with multiple types of widget and | |
8772 multiple types of toolkit. Each element in the widget hierarchy is updated | |
8773 from its corresponding widget_instance by walking the widget_instance | |
8774 tree recursively. | |
8775 | |
8776 This has desirable properties such as lw_modify_all_widgets which is | |
8777 called from @file{glyphs-x.c} and updates all the properties of a widget | |
8778 without having to know what the widget is or what toolkit it is from. | |
8779 Unfortunately this also has hairy properties such as making the lwlib | |
8780 code quite complex. And of course lwlib has to know at some level what | |
8781 the widget is and how to set its properties. | |
8782 | 8765 |
8783 @node Specifiers, Menus, Glyphs, Top | 8766 @node Specifiers, Menus, Glyphs, Top |
8784 @chapter Specifiers | 8767 @chapter Specifiers |
8785 | 8768 |
8786 Not yet documented. | 8769 Not yet documented. |
8835 @code{menubar_selection_callback()} enqueues a menu event, putting in it | 8818 @code{menubar_selection_callback()} enqueues a menu event, putting in it |
8836 a function to call (either @code{eval} or @code{call-interactively}) and | 8819 a function to call (either @code{eval} or @code{call-interactively}) and |
8837 its argument, which is the callback function or form given in the menu's | 8820 its argument, which is the callback function or form given in the menu's |
8838 description. | 8821 description. |
8839 | 8822 |
8840 @node Subprocesses, Interface to X Windows, Menus, Top | 8823 @node Subprocesses, Interface to the X Window System, Menus, Top |
8841 @chapter Subprocesses | 8824 @chapter Subprocesses |
8842 | 8825 |
8843 The fields of a process are: | 8826 The fields of a process are: |
8844 | 8827 |
8845 @table @code | 8828 @table @code |
8908 @item tty_name | 8891 @item tty_name |
8909 The name of the terminal that the subprocess is using, | 8892 The name of the terminal that the subprocess is using, |
8910 or @code{nil} if it is using pipes. | 8893 or @code{nil} if it is using pipes. |
8911 @end table | 8894 @end table |
8912 | 8895 |
8913 @node Interface to X Windows, Index , Subprocesses, Top | 8896 @node Interface to the X Window System, Index, Subprocesses, Top |
8914 @chapter Interface to X Windows | 8897 @chapter Interface to the X Window System |
8915 | 8898 |
8916 Not yet documented. | 8899 Mostly undocumented. |
8900 | |
8901 @menu | |
8902 * Lucid Widget Library:: An interface to various widget sets. | |
8903 @end menu | |
8904 | |
8905 @node Lucid Widget Library, , , Interface to the X Window System | |
8906 @section Lucid Widget Library | |
8907 | |
8908 Lwlib is extremely poorly documented and quite hairy. The author(s) | |
8909 blame that on X, Xt, and Motif, with some justice, but also sufficient | |
8910 hypocrisy to avoid drawing the obvious conclusion about their own work. | |
8911 | |
8912 The Lucid Widget Library is composed of two more or less independent | |
8913 pieces. The first, as the name suggests, is a set of widgets. These | |
8914 widgets are intended to resemble and improve on widgets provided in the | |
8915 Motif toolkit but not in the Athena widgets, including menubars and | |
8916 scrollbars. Recent additions by Andy Piper integrate some ``modern'' | |
8917 widgets by Edward Falk, including checkboxes, radio buttons, progress | |
8918 gauges, and index tab controls (aka notebooks). | |
8919 | |
8920 The second piece of the Lucid widget library is a generic interface to | |
8921 several toolkits for X (including Xt, the Athena widget set, and Motif, | |
8922 as well as the Lucid widgets themselves) so that core XEmacs code need | |
8923 not know which widget set has been used to build the graphical user | |
8924 interface. | |
8925 | |
8926 @menu | |
8927 * Generic Widget Interface:: The lwlib generic widget interface. | |
8928 * Scrollbars:: | |
8929 * Menubars:: | |
8930 * Checkboxes and Radio Buttons:: | |
8931 * Progress Bars:: | |
8932 * Tab Controls:: | |
8933 @end menu | |
8934 | |
8935 @node Generic Widget Interface, Scrollbars, , Lucid Widget Library | |
8936 @subsection Generic Widget Interface | |
8937 | |
8938 In general in any toolkit a widget may be a composite object. In Xt, | |
8939 all widgets have an X window that they manage, but typically a complex | |
8940 widget will have widget children, each of which manages a subwindow of | |
8941 the parent widget's X window. These children may themselves be | |
8942 composite widgets. Thus a widget is actually a tree or hierarchy of | |
8943 widgets. | |
8944 | |
8945 For each toolkit widget, lwlib maintains a tree of @code{widget_values} | |
8946 which mirror the hierarchical state of Xt widgets (including Motif, | |
8947 Athena, 3D Athena, and Falk's widget sets). Each @code{widget_value} | |
8948 has @code{contents} member, which points to the head of a linked list of | |
8949 its children. The linked list of siblings is chained through the | |
8950 @code{next} member of @code{widget_value}. | |
8951 | |
8952 @example | |
8953 +-----------+ | |
8954 | composite | | |
8955 +-----------+ | |
8956 | | |
8957 | contents | |
8958 V | |
8959 +-------+ next +-------+ next +-------+ | |
8960 | child |----->| child |----->| child | | |
8961 +-------+ +-------+ +-------+ | |
8962 | | |
8963 | contents | |
8964 V | |
8965 +-------------+ next +-------------+ | |
8966 | grand child |----->| grand child | | |
8967 +-------------+ +-------------+ | |
8968 | |
8969 The @code{widget_value} hierarchy of a composite widget with two simple | |
8970 children and one composite child. | |
8971 @end example | |
8972 | |
8973 The @code{widget_instance} structure maintains the inverse view of the | |
8974 tree. As for the @code{widget_value}, siblings are chained through the | |
8975 @code{next} member. However, rather than naming children, the | |
8976 @code{widget_instance} tree links to parents. | |
8977 | |
8978 @example | |
8979 +-----------+ | |
8980 | composite | | |
8981 +-----------+ | |
8982 A | |
8983 | parent | |
8984 | | |
8985 +-------+ next +-------+ next +-------+ | |
8986 | child |----->| child |----->| child | | |
8987 +-------+ +-------+ +-------+ | |
8988 A | |
8989 | parent | |
8990 | | |
8991 +-------------+ next +-------------+ | |
8992 | grand child |----->| grand child | | |
8993 +-------------+ +-------------+ | |
8994 | |
8995 The @code{widget_value} hierarchy of a composite widget with two simple | |
8996 children and one composite child. | |
8997 @end example | |
8998 | |
8999 This permits widgets derived from different toolkits to be updated and | |
9000 manipulated generically by the lwlib library. For instance | |
9001 @code{update_one_widget_instance} can cope with multiple types of widget | |
9002 and multiple types of toolkit. Each element in the widget hierarchy is | |
9003 updated from its corresponding @code{widget_value} by walking the | |
9004 @code{widget_value} tree. This has desirable properties. For example, | |
9005 @code{lw_modify_all_widgets} is called from @file{glyphs-x.c} and | |
9006 updates all the properties of a widget without having to know what the | |
9007 widget is or what toolkit it is from. Unfortunately this also has its | |
9008 hairy properties; the lwlib code quite complex. And of course lwlib has | |
9009 to know at some level what the widget is and how to set its properties. | |
9010 | |
9011 The @code{widget_instance} structure also contains a pointer to the root | |
9012 of its tree. Widget instances are further confi | |
9013 | |
9014 | |
9015 @node Scrollbars, Menubars, Generic Widget Interface, Lucid Widget Library | |
9016 @subsection Scrollbars | |
9017 | |
9018 @node Menubars, Checkboxes and Radio Buttons, Scrollbars, Lucid Widget Library | |
9019 @subsection Menubars | |
9020 | |
9021 @node Checkboxes and Radio Buttons, Progress Bars, Menubars, Lucid Widget Library | |
9022 @subsection Checkboxes and Radio Buttons | |
9023 | |
9024 @node Progress Bars, Tab Controls, Checkboxes and Radio Buttons, Lucid Widget Library | |
9025 @subsection Progress Bars | |
9026 | |
9027 @node Tab Controls, , Progress Bars, Lucid Widget Library | |
9028 @subsection Tab Controls | |
8917 | 9029 |
8918 @include index.texi | 9030 @include index.texi |
8919 | 9031 |
8920 @c Print the tables of contents | 9032 @c Print the tables of contents |
8921 @summarycontents | 9033 @summarycontents |