Mercurial > emacs
comparison src/nsterm.m @ 105083:544f5b209a5b
(ns_no_defaults): Remove. (ns_term_init): Switch ns_no_defaults -> inhibit_x_resources. (ns_use_qd_smoothing): Remove legacy variable.
author | Adrian Robert <Adrian.B.Robert@gmail.com> |
---|---|
date | Fri, 18 Sep 2009 15:12:15 +0000 |
parents | 7045e9821995 |
children | ec8c2bbf049e |
comparison
equal
deleted
inserted
replaced
105082:cdb51c560f44 | 105083:544f5b209a5b |
---|---|
142 static Lisp_Object Qmodifier_value; | 142 static Lisp_Object Qmodifier_value; |
143 /* TODO: unsure why these defined in term files, anyway we need in keymap.c */ | 143 /* TODO: unsure why these defined in term files, anyway we need in keymap.c */ |
144 Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper; | 144 Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper; |
145 extern Lisp_Object Qcursor_color, Qcursor_type, Qns; | 145 extern Lisp_Object Qcursor_color, Qcursor_type, Qns; |
146 | 146 |
147 | |
148 /* Some preferences equivalent to those set by X resources under X are | |
149 managed through the OpenStep defaults system. We depart from X | |
150 behavior and refuse to read defaults when started under these | |
151 options. */ | |
152 | |
153 /* Set in emacs.c. */ | |
154 char ns_no_defaults; | |
155 | |
156 /* Specifies which emacs modifier should be generated when NS receives | 147 /* Specifies which emacs modifier should be generated when NS receives |
157 the Alternate modifer. May be Qnone or any of the modifier lisp symbols. */ | 148 the Alternate modifer. May be Qnone or any of the modifier lisp symbols. */ |
158 Lisp_Object ns_alternate_modifier; | 149 Lisp_Object ns_alternate_modifier; |
159 | 150 |
160 /* Specifies which emacs modifier should be generated when NS receives | 151 /* Specifies which emacs modifier should be generated when NS receives |
174 | 165 |
175 /* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold, | 166 /* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold, |
176 the maximum font size to NOT antialias. On GNUstep there is currently | 167 the maximum font size to NOT antialias. On GNUstep there is currently |
177 no way to control this behavior. */ | 168 no way to control this behavior. */ |
178 float ns_antialias_threshold; | 169 float ns_antialias_threshold; |
179 | |
180 /* Controls use of an undocumented CG function to do Quickdraw-style font | |
181 smoothing (less heavy) instead of regular Quartz smoothing. */ | |
182 Lisp_Object ns_use_qd_smoothing; | |
183 | 170 |
184 /* Used to pick up AppleHighlightColor on OS X */ | 171 /* Used to pick up AppleHighlightColor on OS X */ |
185 NSString *ns_selection_color; | 172 NSString *ns_selection_color; |
186 | 173 |
187 /* Confirm on exit. */ | 174 /* Confirm on exit. */ |
3518 ns_command_modifier = Qsuper; | 3505 ns_command_modifier = Qsuper; |
3519 ns_control_modifier = Qcontrol; | 3506 ns_control_modifier = Qcontrol; |
3520 ns_function_modifier = Qnone; | 3507 ns_function_modifier = Qnone; |
3521 ns_antialias_text = Qt; | 3508 ns_antialias_text = Qt; |
3522 ns_antialias_threshold = 10.0; /* not exposed to lisp side */ | 3509 ns_antialias_threshold = 10.0; /* not exposed to lisp side */ |
3523 ns_use_qd_smoothing = Qnil; | |
3524 ns_confirm_quit = Qnil; | 3510 ns_confirm_quit = Qnil; |
3525 } | 3511 } |
3526 | 3512 |
3527 | 3513 |
3528 static void | 3514 static void |
3787 | 3773 |
3788 UNBLOCK_INPUT; | 3774 UNBLOCK_INPUT; |
3789 | 3775 |
3790 /* Read various user defaults. */ | 3776 /* Read various user defaults. */ |
3791 ns_set_default_prefs (); | 3777 ns_set_default_prefs (); |
3792 if (!ns_no_defaults) | 3778 if (!inhibit_x_resources) |
3793 { | 3779 { |
3794 ns_default ("GSFontAntiAlias", &ns_antialias_text, | 3780 ns_default ("GSFontAntiAlias", &ns_antialias_text, |
3795 Qt, Qnil, NO, NO); | 3781 Qt, Qnil, NO, NO); |
3796 tmp = Qnil; | 3782 tmp = Qnil; |
3797 /* this is a standard variable */ | 3783 /* this is a standard variable */ |
5019 xfree (old_title); | 5005 xfree (old_title); |
5020 old_title = 0; | 5006 old_title = 0; |
5021 } | 5007 } |
5022 #endif /* NS_IMPL_COCOA */ | 5008 #endif /* NS_IMPL_COCOA */ |
5023 | 5009 |
5024 // Calling x_set_window_size tends to get us into inf-loops | 5010 /* Avoid loop under GNUstep due to call at beginning of this function. |
5025 // (x_set_window_size causes a resize which causes | 5011 (x_set_window_size causes a resize which causes |
5026 // a "windowDidResize" which calls x_set_window_size). | 5012 a "windowDidResize" which calls x_set_window_size). */ |
5027 // At least with GNUStep, don't know about MacOSX. --Stef | |
5028 #ifndef NS_IMPL_GNUSTEP | 5013 #ifndef NS_IMPL_GNUSTEP |
5029 if (cols > 0 && rows > 0) | 5014 if (cols > 0 && rows > 0) |
5030 x_set_window_size (emacsframe, 0, cols, rows); | 5015 x_set_window_size (emacsframe, 0, cols, rows); |
5031 #endif | 5016 #endif |
5032 | 5017 |
5245 } else { | 5230 } else { |
5246 result.size.height = defaultFrame.size.height; | 5231 result.size.height = defaultFrame.size.height; |
5247 result.origin.y = defaultFrame.origin.y; | 5232 result.origin.y = defaultFrame.origin.y; |
5248 } | 5233 } |
5249 | 5234 |
5250 /* A windowWillResize does not get generated at least on Tiger. */ | 5235 /* A windowWillResize does not get generated on Tiger or Leopard. */ |
5251 [self windowWillResize: sender toSize: result.size]; | 5236 [self windowWillResize: sender toSize: result.size]; |
5252 return result; | 5237 return result; |
5253 } | 5238 } |
5254 | 5239 |
5255 | 5240 |
6234 allowing it to be used at a lower level for accented character entry."); | 6219 allowing it to be used at a lower level for accented character entry."); |
6235 | 6220 |
6236 DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text, | 6221 DEFVAR_LISP ("ns-antialias-text", &ns_antialias_text, |
6237 "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above."); | 6222 "Non-nil (the default) means to render text antialiased. Only has an effect on OS X Panther and above."); |
6238 | 6223 |
6239 DEFVAR_LISP ("ns-use-qd-smoothing", &ns_use_qd_smoothing, | |
6240 "Whether to render text using QuickDraw (less heavy) antialiasing. Only has an effect on OS X Panther and above. Default is nil (use Quartz smoothing)."); | |
6241 | |
6242 DEFVAR_LISP ("ns-confirm-quit", &ns_confirm_quit, | 6224 DEFVAR_LISP ("ns-confirm-quit", &ns_confirm_quit, |
6243 "Whether to confirm application quit using dialog."); | 6225 "Whether to confirm application quit using dialog."); |
6244 | 6226 |
6245 staticpro (&ns_display_name_list); | 6227 staticpro (&ns_display_name_list); |
6246 ns_display_name_list = Qnil; | 6228 ns_display_name_list = Qnil; |