Mercurial > hg > xemacs-beta
view src/bitmaps.h @ 5043:d0c14ea98592
various frame-geometry fixes
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-15 Ben Wing <ben@xemacs.org>
* EmacsFrame.c:
* EmacsFrame.c (EmacsFrameResize):
* console-msw-impl.h:
* console-msw-impl.h (struct mswindows_frame):
* console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT):
* device-tty.c:
* device-tty.c (tty_asynch_device_change):
* event-msw.c:
* event-msw.c (mswindows_wnd_proc):
* faces.c (Fface_list):
* faces.h:
* frame-gtk.c:
* frame-gtk.c (gtk_set_initial_frame_size):
* frame-gtk.c (gtk_set_frame_size):
* frame-msw.c:
* frame-msw.c (mswindows_init_frame_1):
* frame-msw.c (mswindows_set_frame_size):
* frame-msw.c (mswindows_size_frame_internal):
* frame-msw.c (msprinter_init_frame_3):
* frame.c:
* frame.c (enum):
* frame.c (Fmake_frame):
* frame.c (adjust_frame_size):
* frame.c (store_minibuf_frame_prop):
* frame.c (Fframe_property):
* frame.c (Fframe_properties):
* frame.c (Fframe_displayable_pixel_height):
* frame.c (Fframe_displayable_pixel_width):
* frame.c (internal_set_frame_size):
* frame.c (Fset_frame_height):
* frame.c (Fset_frame_pixel_height):
* frame.c (Fset_frame_displayable_pixel_height):
* frame.c (Fset_frame_width):
* frame.c (Fset_frame_pixel_width):
* frame.c (Fset_frame_displayable_pixel_width):
* frame.c (Fset_frame_size):
* frame.c (Fset_frame_pixel_size):
* frame.c (Fset_frame_displayable_pixel_size):
* frame.c (frame_conversion_internal_1):
* frame.c (get_frame_displayable_pixel_size):
* frame.c (change_frame_size_1):
* frame.c (change_frame_size):
* frame.c (generate_title_string):
* frame.h:
* gtk-xemacs.c:
* gtk-xemacs.c (gtk_xemacs_size_request):
* gtk-xemacs.c (gtk_xemacs_size_allocate):
* gtk-xemacs.c (gtk_xemacs_paint):
* gutter.c:
* gutter.c (update_gutter_geometry):
* redisplay.c (end_hold_frame_size_changes):
* redisplay.c (redisplay_frame):
* toolbar.c:
* toolbar.c (update_frame_toolbars_geometry):
* window.c:
* window.c (frame_pixsize_valid_p):
* window.c (check_frame_size):
Various fixes to frame geometry to make it a bit easier to understand
and fix some bugs.
1. IMPORTANT: Some renamings. Will need to be applied carefully to
the carbon repository, in the following order:
-- pixel_to_char_size -> pixel_to_frame_unit_size
-- char_to_pixel_size -> frame_unit_to_pixel_size
-- pixel_to_real_char_size -> pixel_to_char_size
-- char_to_real_pixel_size -> char_to_pixel_size
-- Reverse second and third arguments of change_frame_size() and
change_frame_size_1() to try to make functions consistent in
putting width before height.
-- Eliminate old round_size_to_char, because it didn't really
do anything differently from round_size_to_real_char()
-- round_size_to_real_char -> round_size_to_char; any places that
called the old round_size_to_char should just call the new one.
2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed
sizes in "frame units", like all other frame-sizing functions,
rather than some hacked-up combination of char-cell units and
total pixel size. This only affects window systems that use
"pixelated geometry", and I'm not sure if Carbon is one of them.
MS Windows is pixelated, X and GTK are not. For pixelated-geometry
systems, the size in set_frame_size() is in displayable pixels
rather than total pixels and needs to be converted appropriately;
take a look at the changes made to mswindows_set_frame_size()
method if necessary.
3. Add a big long comment in frame.c describing how frame geometry
works.
4. Remove MS Windows-specific character height and width fields,
duplicative and unused.
5. frame-displayable-pixel-* and set-frame-displayable-pixel-*
didn't use to work on MS Windows, but they do now.
6. In general, clean up the handling of "pixelated geometry" so
that fewer functions have to worry about this. This is really
an abomination that should be removed entirely but that will
have to happen later. Fix some buggy code in
frame_conversion_internal() that happened to "work" because it
was countered by oppositely buggy code in change_frame_size().
7. Clean up some frame-size code in toolbar.c and use functions
already provided in frame.c instead of rolling its own.
8. Fix check_frame_size() in window.c, which formerly didn't take
pixelated geometry into account.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 15 Feb 2010 22:14:11 -0600 |
parents | 8de8e3f6228a |
children | 308d34e9f07d |
line wrap: on
line source
/* This file is part of XEmacs. XEmacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. XEmacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with XEmacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ /* Authorship: JWZ (?): 1992?. */ #ifndef INCLUDED_bitmaps_h_ #define INCLUDED_bitmaps_h_ #if 0 /* A gnu, like on the back of the emacs manual, for icons. */ #include "../etc/gnu.xbm" /* The kitchen-sink icon. */ #include "../etc/sink.xbm" #endif /* 0 */ #include "../etc/xemacs.xbm" #if 0 /* Vertical bars */ #define compress_width 16 #define compress_height 10 static unsigned char compress_bits[] = { 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66}; /* Bracketed dash */ #define compress_width 15 #define compress_height 10 static unsigned char compress_bits[] = { 0x1f, 0x7c, 0x1f, 0x7c, 0x03, 0x60, 0x03, 0x60, 0xe3, 0x63, 0xe3, 0x63, 0x03, 0x60, 0x03, 0x60, 0x1f, 0x7c, 0x1f, 0x7c}; #endif #if 0 /* Rectangled dash */ #define compress_width 15 #define compress_height 10 static unsigned char compress_bits[] = { 0xff, 0x7f, 0xff, 0x7f, 0x03, 0x60, 0x03, 0x60, 0xe3, 0x63, 0xe3, 0x63, 0x03, 0x60, 0x03, 0x60, 0xff, 0x7f, 0xff, 0x7f}; #endif #if 0 #define extent_begin_width 18 #define extent_begin_height 10 static unsigned char extent_begin_bits[] = { 0x0c, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0x0c, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0x0c, 0x00, 0xcc, 0x00, 0x00, 0x0c, 0x00, 0x00}; #define extent_end_width 18 #define extent_end_height 10 static unsigned char extent_end_bits[] = { 0x00, 0xc0, 0x00, 0x00, 0xcc, 0x00, 0xc0, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0x00, 0xc0, 0xcc, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xc0, 0x00}; #endif #if 0 /* A diamond. */ #define continuer_width 8 #define continuer_height 10 static unsigned char continuer_bits[] = { 0x18, 0x18, 0x34, 0x34, 0x62, 0x62, 0x34, 0x34, 0x18, 0x18}; /* A left-pointing triangle. */ #define truncator_width 8 #define truncator_height 10 static unsigned char truncator_bits[] = { 0x40, 0x60, 0x70, 0x78, 0x7c, 0x7c, 0x78, 0x70, 0x60, 0x40}; #endif /* An arrow pointing to the next line */ #define continuer_width 7 #define continuer_height 10 static unsigned char continuer_bits[] = { 0x00, 0xbc, 0xfc, 0xe0, 0xe0, 0x72, 0x3e, 0x1e, 0x1e, 0x3e}; #if 0 /* Three dots indicating truncation */ #define truncator_width 7 #define truncator_height 8 static unsigned char truncator_bits[] = { 0x06, 0x06, 0x00, 0x18, 0x18, 0x00, 0x60, 0x60}; #endif /* A Right pointing Arrow */ #define truncator_width 8 #define truncator_height 10 static unsigned char truncator_bits[] = { 0x00, 0x18, 0x30, 0x60, 0xff, 0xff, 0x60, 0x30, 0x18, 0x00}; /* A Left pointing Arrow */ #define hscroll_width 8 #define hscroll_height 10 static unsigned char hscroll_bits[] = { 0x00, 0x18, 0x0c, 0x06, 0xff, 0xff, 0x06, 0x0c, 0x18, 0x00}; #if 0 #define rarrow_width 12 #define rarrow_height 10 static unsigned char rarrow_bits[] = { 0x40, 0x00, 0xc0, 0x00, 0x80, 0x01, 0x80, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0x80, 0x03, 0x80, 0x01, 0xc0, 0x00, 0x40, 0x00}; #endif /* Stipples */ #if 0 /* A stipple for hilighting. */ #define selection_width 16 #define selection_height 16 static unsigned char selection_bits[] = { 0x04, 0x84, 0x80, 0x00, 0x00, 0x20, 0x02, 0x04, 0x40, 0x00, 0x08, 0x82, 0x00, 0x10, 0x40, 0x00, 0x02, 0x40, 0x00, 0x02, 0x10, 0x00, 0x80, 0x80, 0x00, 0x08, 0x08, 0x00, 0x01, 0x02, 0x40, 0x20}; #define secondary_selection_width 16 #define secondary_selection_height 16 static unsigned char secondary_selection_bits[] = { 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10}; #define overlap_selection_width 16 #define overlap_selection_height 16 static unsigned char overlap_selection_bits[] = { 0x09, 0x88, 0x84, 0x04, 0x02, 0x22, 0x01, 0x05, 0x80, 0x80, 0x48, 0x42, 0x20, 0x20, 0x50, 0x10, 0x0a, 0x48, 0x04, 0x04, 0x12, 0x02, 0x01, 0x01, 0x80, 0x88, 0x48, 0x40, 0x21, 0xa2, 0x50, 0x10}; #define default0_stipple_width 16 #define default0_stipple_height 16 static unsigned char default0_stipple_bits[] = { 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00}; #define default1_stipple_width 16 #define default1_stipple_height 16 static unsigned char default1_stipple_bits[] = { 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00}; #endif #endif /* INCLUDED_bitmaps_h_ */