ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.39 by pcg, Sat Feb 21 22:14:00 2004 UTC vs.
Revision 1.43 by pcg, Tue Feb 24 00:02:44 2004 UTC

80 vt_ev (this, &rxvt_term::x_cb), 80 vt_ev (this, &rxvt_term::x_cb),
81#ifdef HAVE_SCROLLBARS 81#ifdef HAVE_SCROLLBARS
82 scrollbar_ev (this, &rxvt_term::x_cb), 82 scrollbar_ev (this, &rxvt_term::x_cb),
83#endif 83#endif
84#ifdef MENUBAR 84#ifdef MENUBAR
85 menubar_ev (this, &rxvt_term::x_cb), fixme 85 menubar_ev (this, &rxvt_term::x_cb),
86#endif 86#endif
87#ifdef CURSOR_BLINK 87#ifdef CURSOR_BLINK
88 cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), 88 cursor_blink_ev (this, &rxvt_term::cursor_blink_cb),
89#endif 89#endif
90#ifdef TEXT_BLINK 90#ifdef TEXT_BLINK
262 create_windows (argc, argv); 262 create_windows (argc, argv);
263 263
264 init_xlocale (); 264 init_xlocale ();
265 265
266 scr_reset (); /* initialize screen */ 266 scr_reset (); /* initialize screen */
267#ifdef RXVT_GRAPHICS
268 Gr_reset (); /* reset graphics */
269#endif
270 267
271#if 0 268#if 0
272 XSynchronize (display->display, True); 269 XSynchronize (display->display, True);
273#endif 270#endif
274 271
275#ifdef HAVE_SCROLLBARS 272#ifdef HAVE_SCROLLBARS
276 if (Options & Opt_scrollBar) 273 if (Options & Opt_scrollBar)
277 resize_scrollbar (); /* create and map scrollbar */ 274 resize_scrollbar (); /* create and map scrollbar */
278#endif 275#endif
279#if (MENUBAR_MAX) 276#if (MENUBAR_MAX)
280 if (menubar_visible (r)) 277 if (menubar_visible ())
281 XMapWindow (display->display, menuBar.win); 278 XMapWindow (display->display, menuBar.win);
282#endif 279#endif
283#ifdef TRANSPARENT 280#ifdef TRANSPARENT
284 if (Options & Opt_transparent) 281 if (Options & Opt_transparent)
285 { 282 {
718 * init = 1 - initialize 715 * init = 1 - initialize
719 * 716 *
720 * fontname == FONT_UP - switch to bigger font 717 * fontname == FONT_UP - switch to bigger font
721 * fontname == FONT_DN - switch to smaller font 718 * fontname == FONT_DN - switch to smaller font
722 */ 719 */
723void 720bool
724rxvt_term::change_font (int init, const char *fontname) 721rxvt_term::change_font (const char *fontname)
725{} 722{
723 if (fontname == FONT_UP)
724 {
725 // TODO
726 }
727 else if (fontname == FONT_DN)
728 {
729 // TODO
730 }
731 else
732 {
733 rxvt_fontset *fs = new rxvt_fontset (this);
726 734
727void 735 if (fs && fs->populate (fontname))
736 {
737 delete TermWin.fontset;
738 TermWin.fontset = fs;
739 TermWin.fwidth = fs->base_font ()->width;
740 TermWin.fheight = fs->base_font ()->height;
741 TermWin.fbase = fs->base_font ()->ascent;
742
743 // TODO: screen needs to be told about new fonts
744
745 if (TermWin.parent[0])
746 {
747 resize_all_windows (0, 0, 0);
748 scr_remap_chars ();
749 scr_touch (true);
750 }
751
752 return true;
753 }
754 }
755
756 return false;
757}
758
759bool
728rxvt_term::font_up_down (int n, int direction) 760rxvt_term::font_up_down (int n, int direction)
729{} 761{
762 return false;
763}
730 764
731/*----------------------------------------------------------------------*/ 765/*----------------------------------------------------------------------*/
732/*----------------------------------------------------------------------*/ 766/*----------------------------------------------------------------------*/
733/* xterm sequences - title, iconName, color (exptl) */ 767/* xterm sequences - title, iconName, color (exptl) */
734void 768void
995 0, TermWin_TotalWidth (), menuBar_TotalHeight ()); 1029 0, TermWin_TotalWidth (), menuBar_TotalHeight ());
996 1030
997 XMoveResizeWindow (display->display, TermWin.vt, window_vt_x, 1031 XMoveResizeWindow (display->display, TermWin.vt, window_vt_x,
998 window_vt_y, TermWin_TotalWidth (), 1032 window_vt_y, TermWin_TotalWidth (),
999 TermWin_TotalHeight ()); 1033 TermWin_TotalHeight ());
1000#ifdef RXVT_GRAPHICS
1001 if (old_height)
1002 Gr_Resize (old_width - szHint.base_width,
1003 old_height - szHint.base_height);
1004#endif
1005 scr_clear (); 1034 scr_clear ();
1006#ifdef XPM_BACKGROUND 1035#ifdef XPM_BACKGROUND
1007 resize_pixmap (); 1036 resize_pixmap ();
1008#endif 1037#endif
1009 1038

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines