Mercurial > hg > xemacs-beta
annotate src/EmacsFrame.c @ 5492:e82f5b7010fe
Merge some stuff in man, fix up Makefile
-------------------- ChangeLog entries follow: --------------------
man/ChangeLog addition:
2010-02-19 Ben Wing <ben@xemacs.org>
* widget.texi:
* widget.texi (Top):
* widget.texi (Introduction):
* widget.texi (User Interface):
* widget.texi (Programming Example):
* widget.texi (Setting Up the Buffer):
* widget.texi (Basic Types):
* widget.texi (link):
* widget.texi (url-link):
* widget.texi (info-link):
* widget.texi (push-button):
* widget.texi (editable-field):
* widget.texi (text):
* widget.texi (menu-choice):
* widget.texi (radio-button-choice):
* widget.texi (item):
* widget.texi (choice-item):
* widget.texi (toggle):
* widget.texi (checkbox):
* widget.texi (checklist):
* widget.texi (editable-list):
* widget.texi (group):
* widget.texi (Sexp Types):
* widget.texi (constants):
* widget.texi (generic):
* widget.texi (atoms):
* widget.texi (composite):
* widget.texi (Widget Properties):
* widget.texi (Defining New Widgets):
* widget.texi (Widget Browser):
* widget.texi (Widget Minor Mode):
* widget.texi (Utilities):
* widget.texi (Widget Wishlist):
* widget.texi (Widget Internals):
* widget.texi (GNU Free Documentation License):
* widget.texi (Index):
Sync with FSF 23.1.92.
2010-02-19 Ben Wing <ben@xemacs.org>
* texinfo/fdl.texi: New file.
* texinfo/texinfo.texi:
* texinfo/texinfo.texi (Top):
* texinfo/texinfo.texi (Copying Conditions):
* texinfo/texinfo.texi (Overview):
* texinfo/texinfo.texi (Reporting Bugs):
* texinfo/texinfo.texi (Using Texinfo):
* texinfo/texinfo.texi (Output Formats):
* texinfo/texinfo.texi (Info Files):
* texinfo/texinfo.texi (Printed Books):
* texinfo/texinfo.texi (Formatting Commands):
* texinfo/texinfo.texi (Conventions):
* texinfo/texinfo.texi (Comments):
* texinfo/texinfo.texi (Minimum):
* texinfo/texinfo.texi (Six Parts):
* texinfo/texinfo.texi (Short Sample):
* texinfo/texinfo.texi (History):
* texinfo/texinfo.texi (Texinfo Mode):
* texinfo/texinfo.texi (Texinfo Mode Overview):
* texinfo/texinfo.texi (XEmacs Editing):
* texinfo/texinfo.texi (Inserting):
* texinfo/texinfo.texi (Showing the Structure):
* texinfo/texinfo.texi (Updating Nodes and Menus):
* texinfo/texinfo.texi (Updating Commands):
* texinfo/texinfo.texi (Updating Requirements):
* texinfo/texinfo.texi (Other Updating Commands):
* texinfo/texinfo.texi (Info Formatting):
* texinfo/texinfo.texi (Printing):
* texinfo/texinfo.texi (Texinfo Mode Summary):
* texinfo/texinfo.texi (Beginning a File):
* texinfo/texinfo.texi (Sample Beginning):
* texinfo/texinfo.texi (Texinfo File Header):
* texinfo/texinfo.texi (First Line):
* texinfo/texinfo.texi (Start of Header):
* texinfo/texinfo.texi (setfilename):
* texinfo/texinfo.texi (settitle):
* texinfo/texinfo.texi (End of Header):
* texinfo/texinfo.texi (Document Permissions):
* texinfo/texinfo.texi (copying):
* texinfo/texinfo.texi (insertcopying):
* texinfo/texinfo.texi (Titlepage & Copyright Page):
* texinfo/texinfo.texi (titlepage):
* texinfo/texinfo.texi (titlefont center sp):
* texinfo/texinfo.texi (title subtitle author):
* texinfo/texinfo.texi (Copyright):
* texinfo/texinfo.texi (end titlepage):
* texinfo/texinfo.texi (headings on off):
* texinfo/texinfo.texi (Contents):
* texinfo/texinfo.texi (The Top Node):
* texinfo/texinfo.texi (Top Node Example):
* texinfo/texinfo.texi (Master Menu Parts):
* texinfo/texinfo.texi (Global Document Commands):
* texinfo/texinfo.texi (documentdescription):
* texinfo/texinfo.texi (setchapternewpage):
* texinfo/texinfo.texi (paragraphindent):
* texinfo/texinfo.texi (firstparagraphindent):
* texinfo/texinfo.texi (exampleindent):
* texinfo/texinfo.texi (Software Copying Permissions):
* texinfo/texinfo.texi (Ending a File):
* texinfo/texinfo.texi (Printing Indices & Menus):
* texinfo/texinfo.texi (File End):
* texinfo/texinfo.texi (Structuring):
* texinfo/texinfo.texi (Tree Structuring):
* texinfo/texinfo.texi (Structuring Command Types):
* texinfo/texinfo.texi (makeinfo top):
* texinfo/texinfo.texi (chapter):
* texinfo/texinfo.texi (unnumbered & appendix):
* texinfo/texinfo.texi (majorheading & chapheading):
* texinfo/texinfo.texi (section):
* texinfo/texinfo.texi (unnumberedsec appendixsec heading):
* texinfo/texinfo.texi (subsection):
* texinfo/texinfo.texi (unnumberedsubsec appendixsubsec subheading):
* texinfo/texinfo.texi (subsubsection):
* texinfo/texinfo.texi (Raise/lower sections):
* texinfo/texinfo.texi (Nodes):
* texinfo/texinfo.texi (Two Paths):
* texinfo/texinfo.texi (Node Menu Illustration):
* texinfo/texinfo.texi (node):
* texinfo/texinfo.texi (Node Names):
* texinfo/texinfo.texi (Writing a Node):
* texinfo/texinfo.texi (Node Line Tips):
* texinfo/texinfo.texi (Node Line Requirements):
* texinfo/texinfo.texi (First Node):
* texinfo/texinfo.texi (makeinfo top command):
* texinfo/texinfo.texi (makeinfo Pointer Creation):
* texinfo/texinfo.texi (anchor):
* texinfo/texinfo.texi (Menus):
* texinfo/texinfo.texi (Menu Location):
* texinfo/texinfo.texi (Writing a Menu):
* texinfo/texinfo.texi (Menu Parts):
* texinfo/texinfo.texi (Less Cluttered Menu Entry):
* texinfo/texinfo.texi (Menu Example):
* texinfo/texinfo.texi (Other Info Files):
* texinfo/texinfo.texi (Cross References):
* texinfo/texinfo.texi (References):
* texinfo/texinfo.texi (Cross Reference Commands):
* texinfo/texinfo.texi (Cross Reference Parts):
* texinfo/texinfo.texi (xref):
* texinfo/texinfo.texi (Reference Syntax):
* texinfo/texinfo.texi (One Argument):
* texinfo/texinfo.texi (Two Arguments):
* texinfo/texinfo.texi (Three Arguments):
* texinfo/texinfo.texi (Four and Five Arguments):
* texinfo/texinfo.texi (Top Node Naming):
* texinfo/texinfo.texi (ref):
* texinfo/texinfo.texi (pxref):
* texinfo/texinfo.texi (inforef):
* texinfo/texinfo.texi (uref):
* texinfo/texinfo.texi (cite):
* texinfo/texinfo.texi (Marking Text):
* texinfo/texinfo.texi (Indicating):
* texinfo/texinfo.texi (Useful Highlighting):
* texinfo/texinfo.texi (code):
* texinfo/texinfo.texi (kbd):
* texinfo/texinfo.texi (key):
* texinfo/texinfo.texi (samp):
* texinfo/texinfo.texi (verb):
* texinfo/texinfo.texi (var):
* texinfo/texinfo.texi (env):
* texinfo/texinfo.texi (file):
* texinfo/texinfo.texi (command):
* texinfo/texinfo.texi (option):
* texinfo/texinfo.texi (dfn):
* texinfo/texinfo.texi (abbr):
* texinfo/texinfo.texi (acronym):
* texinfo/texinfo.texi (indicateurl):
* texinfo/texinfo.texi (email):
* texinfo/texinfo.texi (Emphasis):
* texinfo/texinfo.texi (emph & strong):
* texinfo/texinfo.texi (Smallcaps):
* texinfo/texinfo.texi (Fonts):
* texinfo/texinfo.texi (Quotations and Examples):
* texinfo/texinfo.texi (Block Enclosing Commands):
* texinfo/texinfo.texi (quotation):
* texinfo/texinfo.texi (example):
* texinfo/texinfo.texi (verbatim):
* texinfo/texinfo.texi (verbatiminclude):
* texinfo/texinfo.texi (lisp):
* texinfo/texinfo.texi (small):
* texinfo/texinfo.texi (display):
* texinfo/texinfo.texi (format):
* texinfo/texinfo.texi (exdent):
* texinfo/texinfo.texi (flushleft & flushright):
* texinfo/texinfo.texi (noindent):
* texinfo/texinfo.texi (indent):
* texinfo/texinfo.texi (cartouche):
* texinfo/texinfo.texi (Lists and Tables):
* texinfo/texinfo.texi (Introducing Lists):
* texinfo/texinfo.texi (itemize):
* texinfo/texinfo.texi (enumerate):
* texinfo/texinfo.texi (Two-column Tables):
* texinfo/texinfo.texi (table):
* texinfo/texinfo.texi (ftable vtable):
* texinfo/texinfo.texi (itemx):
* texinfo/texinfo.texi (Multi-column Tables):
* texinfo/texinfo.texi (Multitable Column Widths):
* texinfo/texinfo.texi (Multitable Rows):
* texinfo/texinfo.texi (Special Displays):
* texinfo/texinfo.texi (Floats):
* texinfo/texinfo.texi (float):
* texinfo/texinfo.texi (caption shortcaption):
* texinfo/texinfo.texi (listoffloats):
* texinfo/texinfo.texi (Images):
* texinfo/texinfo.texi (Image Syntax):
* texinfo/texinfo.texi (Image Scaling):
* texinfo/texinfo.texi (Footnotes):
* texinfo/texinfo.texi (Footnote Commands):
* texinfo/texinfo.texi (Footnote Styles):
* texinfo/texinfo.texi (Indices):
* texinfo/texinfo.texi (Index Entries):
* texinfo/texinfo.texi (Predefined Indices):
* texinfo/texinfo.texi (Indexing Commands):
* texinfo/texinfo.texi (Combining Indices):
* texinfo/texinfo.texi (syncodeindex):
* texinfo/texinfo.texi (synindex):
* texinfo/texinfo.texi (New Indices):
* texinfo/texinfo.texi (Insertions):
* texinfo/texinfo.texi (Atsign Braces Comma):
* texinfo/texinfo.texi (Inserting an Atsign):
* texinfo/texinfo.texi (Inserting Braces):
* texinfo/texinfo.texi (Inserting a Comma):
* texinfo/texinfo.texi (Inserting Quote Characters):
* texinfo/texinfo.texi (Inserting Space):
* texinfo/texinfo.texi (Not Ending a Sentence):
* texinfo/texinfo.texi (Ending a Sentence):
* texinfo/texinfo.texi (Multiple Spaces):
* texinfo/texinfo.texi (frenchspacing):
* texinfo/texinfo.texi (dmn):
* texinfo/texinfo.texi (Inserting Accents):
* texinfo/texinfo.texi (Inserting Quotation Marks):
* texinfo/texinfo.texi (Dots Bullets):
* texinfo/texinfo.texi (dots):
* texinfo/texinfo.texi (bullet):
* texinfo/texinfo.texi (TeX and copyright):
* texinfo/texinfo.texi (tex):
* texinfo/texinfo.texi (copyright symbol):
* texinfo/texinfo.texi (registered symbol):
* texinfo/texinfo.texi (euro):
* texinfo/texinfo.texi (pounds):
* texinfo/texinfo.texi (textdegree):
* texinfo/texinfo.texi (minus):
* texinfo/texinfo.texi (geq leq):
* texinfo/texinfo.texi (math):
* texinfo/texinfo.texi (Click Sequences):
* texinfo/texinfo.texi (Glyphs):
* texinfo/texinfo.texi (Glyphs Summary):
* texinfo/texinfo.texi (result):
* texinfo/texinfo.texi (expansion):
* texinfo/texinfo.texi (Print Glyph):
* texinfo/texinfo.texi (Error Glyph):
* texinfo/texinfo.texi (Equivalence):
* texinfo/texinfo.texi (Point Glyph):
* texinfo/texinfo.texi (Breaks):
* texinfo/texinfo.texi (Break Commands):
* texinfo/texinfo.texi (Line Breaks):
* texinfo/texinfo.texi (- and hyphenation):
* texinfo/texinfo.texi (allowcodebreaks):
* texinfo/texinfo.texi (w):
* texinfo/texinfo.texi (tie):
* texinfo/texinfo.texi (sp):
* texinfo/texinfo.texi (page):
* texinfo/texinfo.texi (group):
* texinfo/texinfo.texi (need):
* texinfo/texinfo.texi (Definition Commands):
* texinfo/texinfo.texi (Def Cmd Template):
* texinfo/texinfo.texi (Def Cmd Continuation Lines):
* texinfo/texinfo.texi (Optional Arguments):
* texinfo/texinfo.texi (deffnx):
* texinfo/texinfo.texi (Def Cmds in Detail):
* texinfo/texinfo.texi (Functions Commands):
* texinfo/texinfo.texi (Variables Commands):
* texinfo/texinfo.texi (Typed Functions):
* texinfo/texinfo.texi (Typed Variables):
* texinfo/texinfo.texi (Data Types):
* texinfo/texinfo.texi (Abstract Objects):
* texinfo/texinfo.texi (Object-Oriented Variables):
* texinfo/texinfo.texi (Object-Oriented Methods):
* texinfo/texinfo.texi (Defining Macros):
* texinfo/texinfo.texi (Invoking Macros):
* texinfo/texinfo.texi (Macro Details):
* texinfo/texinfo.texi (alias):
* texinfo/texinfo.texi (definfoenclose):
* texinfo/texinfo.texi (Hardcopy):
* texinfo/texinfo.texi (Use TeX):
* texinfo/texinfo.texi (Format with tex/texindex):
* texinfo/texinfo.texi (Format with texi2dvi):
* texinfo/texinfo.texi (Print with lpr):
* texinfo/texinfo.texi (Within XEmacs):
* texinfo/texinfo.texi (Texinfo Mode Printing):
* texinfo/texinfo.texi (Compile-Command):
* texinfo/texinfo.texi (Requirements Summary):
* texinfo/texinfo.texi (Preparing for TeX):
* texinfo/texinfo.texi (Overfull hboxes):
* texinfo/texinfo.texi (smallbook):
* texinfo/texinfo.texi (A4 Paper):
* texinfo/texinfo.texi (pagesizes):
* texinfo/texinfo.texi (Cropmarks and Magnification):
* texinfo/texinfo.texi (PDF Output):
* texinfo/texinfo.texi (Obtaining TeX):
* texinfo/texinfo.texi (Creating and Installing Info Files):
* texinfo/texinfo.texi (Creating an Info File):
* texinfo/texinfo.texi (makeinfo advantages):
* texinfo/texinfo.texi (Invoking makeinfo):
* texinfo/texinfo.texi (makeinfo options):
* texinfo/texinfo.texi (Pointer Validation):
* texinfo/texinfo.texi (makeinfo in XEmacs):
* texinfo/texinfo.texi (texinfo-format commands):
* texinfo/texinfo.texi (Batch Formatting):
* texinfo/texinfo.texi (Tag and Split Files):
* texinfo/texinfo.texi (Installing an Info File):
* texinfo/texinfo.texi (Directory File):
* texinfo/texinfo.texi (New Info File):
* texinfo/texinfo.texi (Other Info Directories):
* texinfo/texinfo.texi (Installing Dir Entries):
* texinfo/texinfo.texi (Invoking install-info):
* texinfo/texinfo.texi (Generating HTML):
* texinfo/texinfo.texi (HTML Translation):
* texinfo/texinfo.texi (HTML Splitting):
* texinfo/texinfo.texi (HTML CSS):
* texinfo/texinfo.texi (HTML Xref):
* texinfo/texinfo.texi (HTML Xref Link Basics):
* texinfo/texinfo.texi (HTML Xref Node Name Expansion):
* texinfo/texinfo.texi (HTML Xref Command Expansion):
* texinfo/texinfo.texi (HTML Xref 8-bit Character Expansion):
* texinfo/texinfo.texi (HTML Xref Mismatch):
* texinfo/texinfo.texi (Command List):
* texinfo/texinfo.texi (Command Syntax):
* texinfo/texinfo.texi (Tips):
* texinfo/texinfo.texi (Sample Texinfo Files):
* texinfo/texinfo.texi (Short Sample Texinfo File):
* texinfo/texinfo.texi (GNU Sample Texts):
* texinfo/texinfo.texi (Invoking sample):
* texinfo/texinfo.texi (GNU Free Documentation License):
* texinfo/texinfo.texi (Index):
* texinfo/texinfo.texi (Verbatim Copying License):
* texinfo/texinfo.texi (All-permissive Copying License):
* texinfo/texinfo.texi (Include Files):
* texinfo/texinfo.texi (Using Include Files):
* texinfo/texinfo.texi (texinfo-multiple-files-update):
* texinfo/texinfo.texi (Include Files Requirements):
* texinfo/texinfo.texi (Sample Include File):
* texinfo/texinfo.texi (Include Files Evolution):
* texinfo/texinfo.texi (Headings):
* texinfo/texinfo.texi (Headings Introduced):
* texinfo/texinfo.texi (Heading Format):
* texinfo/texinfo.texi (Heading Choice):
* texinfo/texinfo.texi (Custom Headings):
* texinfo/texinfo.texi (Catching Mistakes):
* texinfo/texinfo.texi (makeinfo Preferred):
* texinfo/texinfo.texi (Debugging with Info):
* texinfo/texinfo.texi (Debugging with TeX):
* texinfo/texinfo.texi (Using texinfo-show-structure):
* texinfo/texinfo.texi (Using occur):
* texinfo/texinfo.texi (Running Info-Validate):
* texinfo/texinfo.texi (Using Info-validate):
* texinfo/texinfo.texi (Unsplit):
* texinfo/texinfo.texi (Tagifying):
* texinfo/texinfo.texi (Splitting):
* texinfo/texinfo.texi (Refilling Paragraphs):
* texinfo/texinfo.texi (Command and Variable Index):
* texinfo/texinfo.texi (General Index):
* texinfo/version.texi: New file.
Sync with FSF 23.1.92. Make new directory to hold the files needed
to generate texinfo.info, since there are three such files now.
2010-02-19 Ben Wing <ben@xemacs.org>
* Makefile:
* Makefile (src_files1):
* Makefile (DIR):
* Makefile (texinfo-srcs):
* Makefile ($(INFODIR)/widget.info):
* Makefile ($(INFODIR)/texinfo.info):
* Makefile (.PHONY):
* Makefile (texinfo.dvi):
* Makefile (texinfo.pdf):
* Makefile ($(HTMLDIR)/widget.html):
* Makefile ($(HTMLDIR)/texinfo.html):
Incorporate texinfo.texi moving to a subdirectory texinfo/.
Do some tricks to reduce the amount of duplication while still
maintaining compatible with non-GNU make (at least, with
Solaris make).
* doclicense.texi: New file.
* info.texi:
* info.texi (Top):
* info.texi (Getting Started):
* info.texi (Help-Small-Screen):
* info.texi (Help):
* info.texi (Help-P):
* info.texi (Help-^L):
* info.texi (Help-Inv):
* info.texi (Help-]):
* info.texi (Help-M):
* info.texi (Help-FOO):
* info.texi (Help-Xref):
* info.texi (Help-Int):
* info.texi (Help-Q):
* info.texi (Advanced):
* info.texi (Search Text):
* info.texi (Search Index):
* info.texi (Go to node):
* info.texi (Choose menu subtopic):
* info.texi (Create Info buffer):
* info.texi (XEmacs Info Variables):
* info.texi (Expert Info):
* info.texi (Add):
* info.texi (Menus):
* info.texi (Cross-refs):
* info.texi (Help-Cross):
* info.texi (Tags):
* info.texi (Checking):
* info.texi (Index):
* texinfo.tex:
* texinfo.tex (paragraphindent{%):
* texinfo.tex (sectionheading will have):
* texinfo.tex (chapterzzz{#3}%):
* texinfo.tex (subsubsection = \numberedsubsubsec):
* texinfo.tex (subsubsection = \appendixsubsubsec):
* texinfo.tex (subsubsection = \unnumberedsubsubsec):
* texinfo.tex (sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%):
* texinfo.tex (sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%):
* texinfo.tex (sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%):
* texinfo.tex (sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%):
* texinfo.tex (sectionheading{#1}{subsec}{Yappendix}%):
* texinfo.tex (sectionheading{#1}{subsec}{Ynothing}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Ynumbered}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Yappendix}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Ynothing}%):
* texinfo.tex (sectionheading{#1}{subsubsec}{Yomitfromtoc}{}):
* texinfo.tex (sectionheading to do the printing.):
* texinfo.tex (sectionlevel}{#1}{#4}%):
* texinfo.tex (sectionheading, q.v.):
Sync with FSF 23.1.92.
| author | Ben Wing <ben@xemacs.org> |
|---|---|
| date | Fri, 19 Feb 2010 22:39:19 -0600 |
| parents | 5460287a3327 |
| children | d0c14ea98592 6f2158fa75ed |
| rev | line source |
|---|---|
| 428 | 1 /* The emacs frame widget. |
| 2 Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. | |
| 3 Copyright (C) 1993-1995 Sun Microsystems, Inc. | |
| 4 Copyright (C) 1995 Ben Wing. | |
| 5 | |
| 6 This file is part of XEmacs. | |
| 7 | |
| 8 XEmacs is free software; you can redistribute it and/or modify it | |
| 9 under the terms of the GNU General Public License as published by the | |
| 10 Free Software Foundation; either version 2, or (at your option) any | |
| 11 later version. | |
| 12 | |
| 13 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
| 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 16 for more details. | |
| 17 | |
| 18 You should have received a copy of the GNU General Public License | |
| 19 along with XEmacs; see the file COPYING. If not, write to | |
| 20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 21 Boston, MA 02111-1307, USA. */ | |
| 22 | |
| 23 /* Synched up with: Not in FSF. */ | |
| 24 | |
| 25 /* #### Note to potential hackers: Don't mess with this unless you're | |
| 26 sure you know what you're doing! Xt is a lot more subtle than | |
| 27 you may think. */ | |
| 28 | |
| 29 #include <config.h> | |
| 30 #include "lisp.h" | |
| 31 | |
| 872 | 32 #include "device-impl.h" |
| 800 | 33 #include "faces.h" |
| 872 | 34 #include "frame-impl.h" |
| 800 | 35 #include "toolbar.h" |
| 36 #include "window.h" | |
| 37 | |
| 872 | 38 #include "console-x-impl.h" |
| 428 | 39 #include "glyphs-x.h" |
| 40 #include "objects-x.h" | |
| 800 | 41 |
| 428 | 42 #include <X11/Shell.h> |
|
4769
5460287a3327
Remove support for pre-X11R5 systems, including systems without Xmu. See
Jerry James <james@xemacs.org>
parents:
4528
diff
changeset
|
43 #include <X11/Xmu/CharSet.h> |
| 428 | 44 #include "EmacsFrameP.h" |
| 45 #include "EmacsManager.h" /* for EmacsManagerChangeSize */ | |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
46 #include "../lwlib/xt-wrappers.h" |
| 428 | 47 |
| 48 static void EmacsFrameClassInitialize (void); | |
| 49 static void EmacsFrameInitialize (Widget, Widget, ArgList, Cardinal *); | |
| 50 static void EmacsFrameRealize (Widget, XtValueMask*, XSetWindowAttributes*); | |
| 51 static void EmacsFrameResize (Widget widget); | |
| 52 static Boolean EmacsFrameSetValues (Widget, Widget, Widget, | |
| 53 ArgList, Cardinal *); | |
| 54 static XtGeometryResult EmacsFrameQueryGeometry (Widget, XtWidgetGeometry*, | |
| 55 XtWidgetGeometry*); | |
| 56 | |
| 57 extern void | |
| 58 emacs_Xt_mapping_action (Widget w, XEvent* event); | |
| 59 | |
| 60 #undef XtOffset | |
| 61 #define XtOffset(p_type,field) \ | |
| 62 ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0))) | |
| 440 | 63 #define offset(field) XtOffset (EmacsFrame, emacs_frame.field) |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
64 #define res(name,_class,intrepr,type,member,extrepr,value) \ |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
65 Xt_RESOURCE (name, _class, intrepr, type, offset(member), extrepr, value) |
| 428 | 66 static XtResource resources[] = { |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
67 res (XtNgeometry, XtCGeometry, XtRString, String, geometry, XtRString, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
68 res (XtNiconic, XtCIconic, XtRBoolean, Boolean, iconic, XtRImmediate, False), |
| 428 | 69 |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
70 res (XtNemacsFrame, XtCEmacsFrame, XtRPointer, XtPointer, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
71 frame, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
72 res (XtNmenubar, XtCMenubar, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
73 menubar_p, XtRImmediate, True), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
74 res (XtNinitiallyUnmapped, XtCInitiallyUnmapped, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
75 initially_unmapped, XtRImmediate, False), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
76 res (XtNminibuffer, XtCMinibuffer, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
77 minibuffer, XtRImmediate, True), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
78 res (XtNunsplittable, XtCUnsplittable, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
79 unsplittable, XtRImmediate, False), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
80 res (XtNinternalBorderWidth, XtCInternalBorderWidth, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
81 internal_border_width, XtRImmediate, 4), |
| 428 | 82 #ifdef HAVE_SCROLLBARS |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
83 res (XtNscrollBarWidth, XtCScrollBarWidth, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
84 scrollbar_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
85 res (XtNscrollBarHeight, XtCScrollBarHeight, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
86 scrollbar_height, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
87 res (XtNscrollBarPlacement, XtCScrollBarPlacement, XtRScrollBarPlacement, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
88 unsigned char, scrollbar_placement, XtRImmediate, |
| 428 | 89 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ |
| 90 defined (LWLIB_SCROLLBARS_ATHENA3D) | |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
91 XtBOTTOM_RIGHT |
| 428 | 92 #else |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
93 XtBOTTOM_LEFT |
| 428 | 94 #endif |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
95 ), |
| 428 | 96 #endif /* HAVE_SCROLLBARS */ |
| 440 | 97 |
| 428 | 98 #ifdef HAVE_TOOLBARS |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
99 res (XtNtopToolBarHeight, XtCTopToolBarHeight, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
100 top_toolbar_height, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
101 res (XtNbottomToolBarHeight, XtCBottomToolBarHeight, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
102 bottom_toolbar_height, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
103 res (XtNleftToolBarWidth, XtCLeftToolBarWidth, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
104 left_toolbar_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
105 res (XtNrightToolBarWidth, XtCRightToolBarWidth, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
106 right_toolbar_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
107 res (XtNtopToolBarBorderWidth, XtCTopToolBarBorderWidth, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
108 top_toolbar_border_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
109 res (XtNbottomToolBarBorderWidth, XtCBottomToolBarBorderWidth, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
110 bottom_toolbar_border_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
111 res (XtNleftToolBarBorderWidth, XtCLeftToolBarBorderWidth, XtRInt, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
112 int, left_toolbar_border_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
113 res (XtNrightToolBarBorderWidth, XtCRightToolBarBorderWidth, XtRInt, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
114 int, right_toolbar_border_width, XtRImmediate, -1), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
115 res (XtNtoolBarShadowThickness, XtCToolBarShadowThickness, XtRDimension, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
116 Dimension, toolbar_shadow_thickness, XtRImmediate, 2), |
| 428 | 117 #endif /* HAVE_TOOLBARS */ |
| 440 | 118 |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
119 res (XtNinterline, XtCInterline, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
120 interline, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
121 res (XtNfont, XtCFont, XtRFontStruct, XFontStruct *, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
122 font, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
123 res (XtNforeground, XtCForeground, XtRPixel, Pixel, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
124 foreground_pixel, XtRString, "Black"), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
125 res (XtNbackground, XtCBackground, XtRPixel, Pixel, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
126 background_pixel, XtRString, "Gray80"), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
127 res (XtNcursorColor, XtCForeground, XtRPixel, Pixel, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
128 cursor_color, XtRString, "XtDefaultForeground"), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
129 res (XtNbarCursor, XtCBarCursor, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
130 bar_cursor, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
131 res (XtNvisualBell, XtCVisualBell, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
132 visual_bell, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
133 res (XtNbellVolume, XtCBellVolume, XtRInt, int, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
134 bell_volume, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
135 res (XtNuseBackingStore, XtCUseBackingStore, XtRBoolean, Boolean, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
136 use_backing_store, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
137 res (XtNpreferredWidth, XtCPreferredWidth, XtRDimension, Dimension, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
138 preferred_width, XtRImmediate, 0), |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
139 res (XtNpreferredHeight, XtCPreferredHeight, XtRDimension, Dimension, |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
140 preferred_height, XtRImmediate, 0), |
| 428 | 141 }; |
| 142 | |
| 143 #undef offset | |
| 144 | |
| 145 /* Xt is stupid and dumb. | |
| 146 Xt is stupid and dumb. | |
| 147 Xt is stupid and dumb. */ | |
| 148 | |
| 149 static XtActionsRec | |
| 150 emacsFrameActionsTable [] = { | |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
151 { (String) "mapping", (XtActionProc) emacs_Xt_mapping_action}, |
| 428 | 152 }; |
| 153 | |
| 154 static char | |
| 155 emacsFrameTranslations [] = "\ | |
| 156 <Mapping>: mapping()\n\ | |
| 157 "; | |
| 158 | |
| 159 /* If we're running under Motif, make this widget a subclass | |
| 160 of XmPrimitive. It's not clear this is necessary, but it | |
| 161 may make focus behavior work better. */ | |
| 162 | |
| 163 EmacsFrameClassRec emacsFrameClassRec = { | |
| 164 { /* core fields */ | |
| 165 #ifdef LWLIB_USES_MOTIF | |
| 166 /* superclass */ (WidgetClass) &xmPrimitiveClassRec, | |
| 167 #else | |
| 168 /* superclass */ &widgetClassRec, | |
| 169 #endif | |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
170 /* class_name */ (String) "EmacsFrame", |
| 440 | 171 /* widget_size */ sizeof (EmacsFrameRec), |
| 428 | 172 /* class_initialize */ EmacsFrameClassInitialize, |
| 173 /* class_part_initialize */ 0, | |
| 174 /* class_inited */ FALSE, | |
| 175 /* initialize */ EmacsFrameInitialize, | |
| 176 /* initialize_hook */ 0, | |
| 177 /* realize */ EmacsFrameRealize, | |
| 178 /* actions */ emacsFrameActionsTable, | |
| 179 /* num_actions */ XtNumber (emacsFrameActionsTable), | |
| 180 /* resources */ resources, | |
| 440 | 181 /* resource_count */ XtNumber (resources), |
| 428 | 182 /* xrm_class */ NULLQUARK, |
| 183 /* compress_motion */ TRUE, | |
| 184 /* compress_exposure */ TRUE, | |
| 185 /* compress_enterleave */ TRUE, | |
| 186 /* visible_interest */ FALSE, | |
| 187 /* destroy */ NULL, | |
| 188 /* resize */ EmacsFrameResize, | |
| 189 /* expose */ XtInheritExpose, | |
| 190 /* set_values */ EmacsFrameSetValues, | |
| 191 /* set_values_hook */ 0, | |
| 192 /* set_values_almost */ XtInheritSetValuesAlmost, | |
| 193 /* get_values_hook */ 0, | |
| 194 /* accept_focus */ XtInheritAcceptFocus, | |
| 195 /* version */ XtVersion, | |
| 196 /* callback_private */ 0, | |
| 197 /* tm_table */ emacsFrameTranslations, | |
| 198 /* query_geometry */ EmacsFrameQueryGeometry, | |
| 199 /* display_accelerator */ XtInheritDisplayAccelerator, | |
| 200 /* extension */ 0 | |
| 201 }, | |
| 202 #ifdef LWLIB_USES_MOTIF | |
| 203 { /* XmPrimitiveClassPart | |
| 204 */ | |
| 205 (XtWidgetProc) _XtInherit, /* border_highlight */ | |
| 206 (XtWidgetProc) _XtInherit, /* border_unhighlight */ | |
| 207 /* Setting the following to NULL causes PrimitiveInitialize() | |
| 208 not to add traversal (TAB etc. to switch focus) and | |
| 209 focus-in/out (border highlight/unhighlight) translations. | |
| 210 If you want those translations, use the value XtInheritTranslations | |
| 211 instead. Doing this, however, will interfere with Emacs | |
| 212 focus handling (which highlights/unhighlights the text cursor), | |
| 213 and will lead to strange display results around the border of the | |
| 214 widget. */ | |
| 215 NULL, /* translations */ | |
| 216 NULL, /* arm_and_activate */ | |
| 217 NULL, /* get resources */ | |
| 218 0, /* num get_resources */ | |
| 219 NULL, /* extension */ | |
| 220 }, | |
| 221 #endif /* LWLIB_USES_MOTIF */ | |
| 222 { | |
| 223 0 | |
| 224 } | |
| 225 }; | |
| 226 WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec; | |
| 227 | |
| 228 static void | |
| 229 update_various_frame_slots (EmacsFrame ew) | |
| 230 { | |
| 231 ew->emacs_frame.frame->pixheight = ew->core.height; | |
| 232 ew->emacs_frame.frame->pixwidth = ew->core.width; | |
| 233 } | |
| 234 | |
| 235 static void | |
| 3025 | 236 EmacsFrameInitialize (Widget UNUSED (request), Widget new_, |
| 2286 | 237 ArgList UNUSED (unused1), Cardinal *UNUSED (unused2)) |
| 428 | 238 { |
| 3025 | 239 EmacsFrame ew = (EmacsFrame)new_; |
| 428 | 240 struct frame *f = ew->emacs_frame.frame; |
| 241 | |
| 242 if (!f) | |
| 243 fatal ("can't create an emacs frame widget without a frame."); | |
| 244 | |
| 245 ew->emacs_frame.frame->internal_border_width = | |
| 246 ew->emacs_frame.internal_border_width; | |
| 247 } | |
| 248 | |
| 249 void emacs_Xt_event_handler (Widget wid /* unused */, | |
| 250 XtPointer closure /* unused */, | |
| 251 XEvent *event, | |
| 252 Boolean *continue_to_dispatch /* unused */); | |
| 253 | |
| 254 static void | |
| 255 EmacsFrameRealize (Widget widget, XtValueMask *mask, | |
| 256 XSetWindowAttributes *attrs) | |
| 257 { | |
| 258 EmacsFrame ew = (EmacsFrame) widget; | |
| 259 struct frame *f = ew->emacs_frame.frame; | |
| 260 Widget shell_widget = FRAME_X_SHELL_WIDGET (f); | |
| 261 | |
| 262 attrs->event_mask = | |
| 263 ExposureMask | | |
| 264 VisibilityChangeMask | | |
| 265 PropertyChangeMask | | |
| 266 StructureNotifyMask | | |
| 267 SubstructureNotifyMask | | |
| 268 /*SubstructureRedirectMask |*/ /* Only for WMs! */ | |
| 269 KeyPressMask | | |
| 270 KeyReleaseMask | | |
| 271 ButtonPressMask | | |
| 272 ButtonReleaseMask | | |
| 273 FocusChangeMask | | |
| 274 PointerMotionHintMask | | |
| 275 PointerMotionMask | | |
| 276 LeaveWindowMask | | |
| 277 EnterWindowMask; | |
| 278 | |
| 279 | |
| 280 *mask |= CWEventMask; | |
| 281 | |
| 282 if (ew->emacs_frame.use_backing_store) | |
| 283 { | |
| 284 attrs->backing_store = Always; | |
| 285 *mask |= CWBackingStore; | |
| 286 } | |
| 287 XtCreateWindow (widget, InputOutput, (Visual *)CopyFromParent, *mask, | |
| 288 attrs); | |
| 289 | |
| 290 /* snarf the events we want. */ | |
| 291 XtInsertEventHandler (widget, attrs->event_mask, TRUE, | |
| 292 emacs_Xt_event_handler, NULL, XtListHead); | |
| 293 /* some events (e.g. map-notify and WM_DELETE_WINDOW) get sent | |
| 294 directly to the shell, and the above event handler won't see | |
| 295 them. So add a handler to get them. These events don't | |
| 296 propagate, so there's no danger of them being seen twice. */ | |
| 297 XtInsertEventHandler (shell_widget, | |
| 298 EnterWindowMask | LeaveWindowMask | | |
| 299 VisibilityChangeMask | StructureNotifyMask | | |
| 300 KeyPressMask, | |
| 301 TRUE, emacs_Xt_event_handler, NULL, XtListHead); | |
| 302 | |
| 303 #ifdef EXTERNAL_WIDGET | |
| 304 /* #### Not sure if this special case is necessary */ | |
| 305 if (!FRAME_X_EXTERNAL_WINDOW_P (f)) | |
| 306 #endif | |
| 307 /* This is necessary under Motif in order to make it possible to click in | |
| 308 a buffer and move focus out of a dialog box or control panel and back | |
| 309 into emacs-land; also necessary so that you can still type chars | |
| 310 if the cursor is over the menubar or scrollbar. */ | |
| 311 lw_set_keyboard_focus (shell_widget, FRAME_X_TEXT_WIDGET (f)); | |
| 312 } | |
| 313 | |
| 314 /* DO NOT CALL THIS FUNCTION! Only Xt is supposed to do this. */ | |
| 315 | |
| 316 static void | |
| 317 EmacsFrameResize (Widget widget) | |
| 318 { | |
| 319 EmacsFrame ew = (EmacsFrame)widget; | |
| 320 struct frame *f = ew->emacs_frame.frame; | |
| 321 int columns; | |
| 322 int rows; | |
| 323 XtWidgetGeometry req, repl; | |
| 324 | |
| 325 update_various_frame_slots (ew); | |
| 326 | |
| 327 pixel_to_char_size (f, ew->core.width, ew->core.height, &columns, &rows); | |
| 328 change_frame_size (f, rows, columns, 0); | |
| 329 | |
| 3381 | 330 /* The code below is just plain wrong. If the EmacsShell or EmacsManager |
| 331 needs to know, they should just ask. If needed information is being | |
| 332 updated here, then we should set a dirty flag and have it updated on an | |
| 333 as-needed basis. | |
| 334 For now, conditionalize so people can get work done if this breaks | |
| 335 something. */ | |
| 336 if (wedge_metacity) /* cf. x_set_frame_size */ | |
| 337 { | |
| 338 /* Now we tell the EmacsShell that we've changed the size of the | |
| 339 non-fixed portion of the frame. Note that, if the resize occurred | |
| 340 as a result of EmacsFrameSetCharSize(), this information will be | |
| 341 stored twice. This is not a big deal, as storing this information | |
| 342 doesn't actually do anything until the next resize. */ | |
| 343 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) | |
| 344 x_wm_set_variable_size (FRAME_X_SHELL_WIDGET (f), columns, rows); | |
| 428 | 345 |
| 3381 | 346 /* Kick the manager so that it knows we've changed size. |
| 347 #### No, no, no! If this does anything at all, it will involve | |
| 348 changing the manager's size. That's not something that a child | |
| 349 widget should initialize as part of a purely informational | |
| 350 method!! */ | |
| 351 req.request_mode = 0; | |
| 352 XtQueryGeometry (FRAME_X_CONTAINER_WIDGET (f), &req, &repl); | |
| 353 EmacsManagerChangeSize (FRAME_X_CONTAINER_WIDGET (f), | |
| 354 repl.width, repl.height); | |
| 355 } | |
| 428 | 356 } |
| 357 | |
| 358 static Boolean | |
| 2286 | 359 EmacsFrameSetValues (Widget cur_widget, Widget UNUSED (req_widget), |
| 360 Widget new_widget, ArgList argv, Cardinal *argc) | |
| 428 | 361 { |
| 362 EmacsFrame cur = (EmacsFrame) cur_widget; | |
| 3025 | 363 EmacsFrame new_ = (EmacsFrame) new_widget; |
| 364 struct frame *f = new_->emacs_frame.frame; | |
| 428 | 365 in_resource_setting++; |
| 366 /* This function does not need to do much. Pretty much everything | |
| 367 interesting will get done in the resize method, which will | |
| 368 (if necessary) get called by Xt when this function returns | |
| 369 (see below). | |
| 370 */ | |
| 371 | |
| 372 /* #### This function will not work if it is not called from | |
| 373 update_EmacsFrame(), called from SET_FACE_PROPERTY(). | |
| 374 The code located there should be moved inside of here instead, | |
| 375 so that things work if either SET_FACE_PROPERTY() is | |
| 376 called or XtSetValues() is called. | |
| 377 */ | |
| 378 | |
| 3025 | 379 if (cur->emacs_frame.iconic != new_->emacs_frame.iconic && |
| 380 FRAME_X_TOP_LEVEL_FRAME_P (new_->emacs_frame.frame)) | |
| 381 x_wm_set_shell_iconic_p (FRAME_X_SHELL_WIDGET (new_->emacs_frame.frame), | |
| 382 new_->emacs_frame.iconic); | |
| 428 | 383 |
| 384 /* If we got here, then we were likely called as a result of | |
| 385 the EditRes protocol, so go ahead and change scrollbar-width | |
| 386 and scrollbar-height. Otherwise, we're merely mirroring | |
| 387 a change made to scrollbar-width etc. so don't do anything | |
| 388 special. */ | |
| 389 if (cur->emacs_frame.internal_border_width != | |
| 3025 | 390 new_->emacs_frame.internal_border_width) |
| 428 | 391 { |
| 3025 | 392 f->internal_border_width = new_->emacs_frame.internal_border_width; |
| 428 | 393 MARK_FRAME_SIZE_SLIPPED (f); |
| 394 } | |
| 395 | |
| 396 #ifdef HAVE_SCROLLBARS | |
| 397 if (cur->emacs_frame.scrollbar_width != | |
| 3025 | 398 new_->emacs_frame.scrollbar_width) |
| 428 | 399 Fadd_spec_to_specifier |
| 400 (Vscrollbar_width, | |
| 3025 | 401 make_int (new_->emacs_frame.scrollbar_width), |
| 872 | 402 wrap_frame (f), Qnil, Qnil); |
| 428 | 403 if (cur->emacs_frame.scrollbar_height != |
| 3025 | 404 new_->emacs_frame.scrollbar_height) |
| 428 | 405 Fadd_spec_to_specifier |
| 406 (Vscrollbar_height, | |
| 3025 | 407 make_int (new_->emacs_frame.scrollbar_height), |
| 872 | 408 wrap_frame (f), Qnil, Qnil); |
| 428 | 409 #endif /* HAVE_SCROLLBARS */ |
| 410 #ifdef HAVE_TOOLBARS | |
| 411 if (cur->emacs_frame.top_toolbar_height != | |
| 3025 | 412 new_->emacs_frame.top_toolbar_height) |
| 428 | 413 Fadd_spec_to_specifier |
| 414 (Vtoolbar_size[TOP_TOOLBAR], | |
| 3025 | 415 make_int (new_->emacs_frame.top_toolbar_height), |
| 872 | 416 wrap_frame (f), Qnil, Qnil); |
| 428 | 417 if (cur->emacs_frame.bottom_toolbar_height != |
| 3025 | 418 new_->emacs_frame.bottom_toolbar_height) |
| 428 | 419 Fadd_spec_to_specifier |
| 420 (Vtoolbar_size[BOTTOM_TOOLBAR], | |
| 3025 | 421 make_int (new_->emacs_frame.bottom_toolbar_height), |
| 872 | 422 wrap_frame (f), Qnil, Qnil); |
| 428 | 423 if (cur->emacs_frame.left_toolbar_width != |
| 3025 | 424 new_->emacs_frame.left_toolbar_width) |
| 428 | 425 Fadd_spec_to_specifier |
| 426 (Vtoolbar_size[LEFT_TOOLBAR], | |
| 3025 | 427 make_int (new_->emacs_frame.left_toolbar_width), |
| 872 | 428 wrap_frame (f), Qnil, Qnil); |
| 428 | 429 if (cur->emacs_frame.right_toolbar_width != |
| 3025 | 430 new_->emacs_frame.right_toolbar_width) |
| 428 | 431 Fadd_spec_to_specifier |
| 432 (Vtoolbar_size[RIGHT_TOOLBAR], | |
| 3025 | 433 make_int (new_->emacs_frame.right_toolbar_width), |
| 872 | 434 wrap_frame (f), Qnil, Qnil); |
| 428 | 435 if (cur->emacs_frame.top_toolbar_border_width != |
| 3025 | 436 new_->emacs_frame.top_toolbar_border_width) |
| 428 | 437 Fadd_spec_to_specifier |
| 438 (Vtoolbar_border_width[TOP_TOOLBAR], | |
| 3025 | 439 make_int (new_->emacs_frame.top_toolbar_border_width), |
| 872 | 440 wrap_frame (f), Qnil, Qnil); |
| 428 | 441 if (cur->emacs_frame.bottom_toolbar_border_width != |
| 3025 | 442 new_->emacs_frame.bottom_toolbar_border_width) |
| 428 | 443 Fadd_spec_to_specifier |
| 444 (Vtoolbar_border_width[BOTTOM_TOOLBAR], | |
| 3025 | 445 make_int (new_->emacs_frame.bottom_toolbar_border_width), |
| 872 | 446 wrap_frame (f), Qnil, Qnil); |
| 428 | 447 if (cur->emacs_frame.left_toolbar_border_width != |
| 3025 | 448 new_->emacs_frame.left_toolbar_border_width) |
| 428 | 449 Fadd_spec_to_specifier |
| 450 (Vtoolbar_border_width[LEFT_TOOLBAR], | |
| 3025 | 451 make_int (new_->emacs_frame.left_toolbar_border_width), |
| 872 | 452 wrap_frame (f), Qnil, Qnil); |
| 428 | 453 if (cur->emacs_frame.right_toolbar_border_width != |
| 3025 | 454 new_->emacs_frame.right_toolbar_border_width) |
| 428 | 455 Fadd_spec_to_specifier |
| 456 (Vtoolbar_border_width[RIGHT_TOOLBAR], | |
| 3025 | 457 make_int (new_->emacs_frame.right_toolbar_border_width), |
| 872 | 458 wrap_frame (f), Qnil, Qnil); |
| 428 | 459 #endif /* HAVE_TOOLBARS */ |
| 460 | |
| 461 in_resource_setting--; | |
| 462 | |
| 463 /* If the request was to resize us, but the size has not changed, Xt | |
| 464 will do nothing, and won't call our resize callback. Since such a | |
| 465 request might be issued as a result of hiding/showing menubar or | |
| 466 changing toolbar placement, where we rely on relayout made by the | |
| 467 callback, we go ahead and simulate such a call */ | |
| 3025 | 468 if (cur->core.width == new_->core.width |
| 469 && cur->core.height == new_->core.height) | |
| 428 | 470 { |
| 471 int i; | |
| 647 | 472 for (i = 0; i < (int) *argc; i++) |
| 428 | 473 if (strcmp (argv[i].name, XtNwidth) == 0 |
| 474 || strcmp (argv[i].name, XtNheight) == 0) | |
| 475 { | |
| 476 EmacsFrameResize (new_widget); | |
| 477 break; | |
| 478 } | |
| 479 } | |
| 480 | |
| 481 return False; | |
| 482 | |
| 483 /* Note that if either (a) we return True, or (b) the width or | |
| 484 height has changed, an Expose event will be generated. The Xt | |
| 485 manual says you should not return True if the width or height has | |
| 486 changed, because then two Expose events will be generated. | |
| 487 | |
| 488 In any case, there is no need to return True because | |
| 489 SET_FACE_PROPERTY(), which does the resource | |
| 490 setting, automatically forces a redisplay as necessary. */ | |
| 491 } | |
| 492 | |
| 493 static XtGeometryResult | |
| 494 EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, | |
| 495 XtWidgetGeometry *result) | |
| 496 { | |
| 497 EmacsFrame ew = (EmacsFrame) widget; | |
| 498 int mask = request->request_mode; | |
| 499 Dimension width, height; | |
| 500 int ok_width_int, ok_height_int; | |
| 501 Dimension ok_width, ok_height; | |
| 502 | |
| 503 /* We have a definite preference for what size we would like | |
| 504 to be. | |
| 505 | |
| 506 1) If a preferred size was specified for us, use it. | |
| 507 (This is not currently used) | |
| 508 2) If a proposed size was given, round it to the nearest | |
| 509 multiple of the default char size and return it. | |
| 510 3) Otherwise, take our current size and round it to the | |
| 511 nearest multiple of the default char size. */ | |
| 512 | |
| 513 width = mask & CWWidth ? request->width : ew->core.width; | |
| 514 height = mask & CWHeight ? request->height : ew->core.height; | |
| 515 round_size_to_char (ew->emacs_frame.frame, width, height, | |
| 516 &ok_width_int, &ok_height_int); | |
| 517 ok_width = (Dimension) ok_width_int; | |
| 518 ok_height = (Dimension) ok_height_int; | |
| 519 if (ew->emacs_frame.preferred_width) | |
| 520 ok_width = ew->emacs_frame.preferred_width; | |
| 521 if (ew->emacs_frame.preferred_height) | |
| 522 ok_height = ew->emacs_frame.preferred_height; | |
| 523 result->request_mode |= CWWidth | CWHeight; | |
| 524 result->width = ok_width; | |
| 525 result->height = ok_height; | |
| 526 if (((mask & CWWidth) && ok_width != request->width) | |
| 527 || ((mask & CWHeight) && ok_height != request->height)) | |
| 528 return XtGeometryAlmost; | |
| 529 else | |
| 530 return XtGeometryYes; | |
| 531 } | |
| 532 | |
| 533 /* Xt string-to-scrollbar-placement converter */ | |
| 440 | 534 /* #### Convert this to a `new-style' converter (See XtAddTypeConverter) */ |
| 428 | 535 |
| 536 /* This variable cannot be a stack variable. */ | |
| 537 static unsigned char cvt_string_scrollbar_placement; | |
| 538 | |
| 539 /* ARGSUSED */ | |
| 540 static void | |
| 2286 | 541 Xt_StringToScrollBarPlacement (XrmValuePtr UNUSED (args), |
| 542 Cardinal *UNUSED (num_args), | |
| 543 XrmValuePtr fromVal, | |
| 544 XrmValuePtr toVal) | |
| 428 | 545 { |
| 2367 | 546 /* !!#### needs work */ |
| 428 | 547 XrmQuark q; |
| 851 | 548 char *lowerName = (char *) ALLOCA (strlen ((char *) fromVal->addr) + 1); |
| 428 | 549 |
| 550 XmuCopyISOLatin1Lowered (lowerName, (char *) fromVal->addr); | |
| 551 q = XrmStringToQuark (lowerName); | |
| 552 | |
| 553 toVal->size = sizeof (cvt_string_scrollbar_placement); | |
| 554 toVal->addr = (XPointer) &cvt_string_scrollbar_placement; | |
| 555 | |
| 556 if (q == XrmStringToQuark ("top-left") | |
| 557 || q == XrmStringToQuark ("top_left")) | |
| 558 cvt_string_scrollbar_placement = XtTOP_LEFT; | |
| 559 else if (q == XrmStringToQuark ("bottom-left") | |
| 560 || q == XrmStringToQuark ("bottom_left")) | |
| 561 cvt_string_scrollbar_placement = XtBOTTOM_LEFT; | |
| 562 else if (q == XrmStringToQuark ("top-right") | |
| 563 || q == XrmStringToQuark ("top_right")) | |
| 564 cvt_string_scrollbar_placement = XtTOP_RIGHT; | |
| 565 else if (q == XrmStringToQuark ("bottom-right") | |
| 566 || q == XrmStringToQuark ("bottom_right")) | |
| 567 cvt_string_scrollbar_placement = XtBOTTOM_RIGHT; | |
| 568 else | |
| 569 { | |
| 570 XtStringConversionWarning (fromVal->addr, "scrollBarPlacement"); | |
| 571 toVal->addr = NULL; | |
| 572 toVal->size = 0; | |
| 573 } | |
| 574 } | |
| 575 | |
| 576 static void | |
| 577 EmacsFrameClassInitialize (void) | |
| 578 { | |
| 579 XtAddConverter (XtRString, XtRScrollBarPlacement, | |
| 580 Xt_StringToScrollBarPlacement, NULL, 0); | |
| 581 } | |
| 582 | |
| 583 /********************* Special entrypoints *******************/ | |
| 584 | |
| 585 void | |
| 586 EmacsFrameRecomputeCellSize (Widget w) | |
| 587 { | |
| 588 EmacsFrame ew = (EmacsFrame) w; | |
| 589 int cw, ch; | |
| 590 struct frame *f = ew->emacs_frame.frame; | |
| 591 | |
| 592 if (! XtIsSubclass (w, emacsFrameClass)) | |
| 2500 | 593 ABORT (); |
| 428 | 594 |
| 771 | 595 default_face_height_and_width (wrap_frame (f), &ch, &cw); |
| 428 | 596 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) |
| 597 x_wm_set_cell_size (FRAME_X_SHELL_WIDGET (f), cw, ch); | |
| 598 } | |
| 599 | |
| 600 /* Set the size of the widget to have the number of rows and columns | |
| 601 specified. This both causes the X window to change and the | |
| 602 internal frame structures to get modified to match. */ | |
| 603 | |
| 604 void | |
| 605 EmacsFrameSetCharSize (Widget widget, int columns, int rows) | |
| 606 { | |
| 607 EmacsFrame ew = (EmacsFrame) widget; | |
| 608 int pixel_width, pixel_height; | |
| 609 struct frame *f = ew->emacs_frame.frame; | |
| 610 | |
| 611 if (columns < 3) | |
| 612 columns = 3; /* no way buddy */ | |
| 613 if (rows < 1) | |
| 614 rows = 1; | |
| 615 | |
| 616 char_to_pixel_size (f, columns, rows, &pixel_width, &pixel_height); | |
| 617 | |
| 618 if (FRAME_X_TOP_LEVEL_FRAME_P (f)) | |
| 619 x_wm_set_variable_size (FRAME_X_SHELL_WIDGET (f), columns, rows); | |
| 620 | |
| 621 { | |
| 622 Arg al [2]; | |
|
4528
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
623 Xt_SET_ARG (al [0], XtNwidth, pixel_width); |
|
726060ee587c
First draft of g++ 4.3 warning removal patch. Builds. *Needs ChangeLogs.*
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4522
diff
changeset
|
624 Xt_SET_ARG (al [1], XtNheight, pixel_height); |
| 428 | 625 XtSetValues ((Widget) ew, al, countof (al)); |
| 626 } | |
| 627 } |
