comparison src/xfns.c @ 111170:93d41f7676cf

Sync docs of some W32 and X C functions. * src/w32fns.c (Fx_synchronize, Fx_change_window_property) (Fx_window_property, Fx_file_dialog): * src/xfns.c (Fx_synchronize, Fx_change_window_property) (Fx_window_property, Fx_file_dialog): Sync docs between w32 and X.
author Glenn Morris <rgm@gnu.org>
date Sun, 24 Oct 2010 15:45:10 -0700
parents 0c681b288c59
children b9e560ce3ab6
comparison
equal deleted inserted replaced
111169:d15bf0cd36e1 111170:93d41f7676cf
1 /* Functions for the X window system. 1 /* Functions for the X window system.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2
3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 3 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 Free Software Foundation, Inc. 4 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 Free Software Foundation, Inc.
5 6
6 This file is part of GNU Emacs. 7 This file is part of GNU Emacs.
7 8
8 GNU Emacs is free software: you can redistribute it and/or modify 9 GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
4179 return result; 4180 return result;
4180 } 4181 }
4181 4182
4182 DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0, 4183 DEFUN ("x-synchronize", Fx_synchronize, Sx_synchronize, 1, 2, 0,
4183 doc: /* If ON is non-nil, report X errors as soon as the erring request is made. 4184 doc: /* If ON is non-nil, report X errors as soon as the erring request is made.
4185 This function only has an effect on X Windows. With MS Windows, it is
4186 defined but does nothing.
4187
4184 If ON is nil, allow buffering of requests. 4188 If ON is nil, allow buffering of requests.
4185 Turning on synchronization prohibits the Xlib routines from buffering 4189 Turning on synchronization prohibits the Xlib routines from buffering
4186 requests and seriously degrades performance, but makes debugging much 4190 requests and seriously degrades performance, but makes debugging much
4187 easier. 4191 easier.
4188 The optional second argument TERMINAL specifies which display to act on. 4192 The optional second argument TERMINAL specifies which display to act on.
4213 ***********************************************************************/ 4217 ***********************************************************************/
4214 4218
4215 DEFUN ("x-change-window-property", Fx_change_window_property, 4219 DEFUN ("x-change-window-property", Fx_change_window_property,
4216 Sx_change_window_property, 2, 6, 0, 4220 Sx_change_window_property, 2, 6, 0,
4217 doc: /* Change window property PROP to VALUE on the X window of FRAME. 4221 doc: /* Change window property PROP to VALUE on the X window of FRAME.
4218 PROP must be a string. 4222 PROP must be a string. VALUE may be a string or a list of conses,
4219 VALUE may be a string or a list of conses, numbers and/or strings. 4223 numbers and/or strings. If an element in the list is a string, it is
4220 If an element in the list is a string, it is converted to 4224 converted to an atom and the value of the atom is used. If an element
4221 an Atom and the value of the Atom is used. If an element is a cons, 4225 is a cons, it is converted to a 32 bit number where the car is the 16
4222 it is converted to a 32 bit number where the car is the 16 top bits and the 4226 top bits and the cdr is the lower 16 bits.
4223 cdr is the lower 16 bits. 4227
4224 FRAME nil or omitted means use the selected frame. 4228 FRAME nil or omitted means use the selected frame.
4225 If TYPE is given and non-nil, it is the name of the type of VALUE. 4229 If TYPE is given and non-nil, it is the name of the type of VALUE.
4226 If TYPE is not given or nil, the type is STRING. 4230 If TYPE is not given or nil, the type is STRING.
4227 FORMAT gives the size in bits of each element if VALUE is a list. 4231 FORMAT gives the size in bits of each element if VALUE is a list.
4228 It must be one of 8, 16 or 32. 4232 It must be one of 8, 16 or 32.
4229 If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8. 4233 If VALUE is a string or FORMAT is nil or not given, FORMAT defaults to 8.
4230 If OUTER_P is non-nil, the property is changed for the outer X window of 4234 If OUTER_P is non-nil, the property is changed for the outer X window of
4231 FRAME. Default is to change on the edit X window. 4235 FRAME. Default is to change on the edit X window. */)
4232
4233 Value is VALUE. */)
4234 (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p) 4236 (Lisp_Object prop, Lisp_Object value, Lisp_Object frame, Lisp_Object type, Lisp_Object format, Lisp_Object outer_p)
4235 { 4237 {
4236 struct frame *f = check_x_frame (frame); 4238 struct frame *f = check_x_frame (frame);
4237 Atom prop_atom; 4239 Atom prop_atom;
4238 Atom target_type = XA_STRING; 4240 Atom target_type = XA_STRING;
4329 4331
4330 DEFUN ("x-window-property", Fx_window_property, Sx_window_property, 4332 DEFUN ("x-window-property", Fx_window_property, Sx_window_property,
4331 1, 6, 0, 4333 1, 6, 0,
4332 doc: /* Value is the value of window property PROP on FRAME. 4334 doc: /* Value is the value of window property PROP on FRAME.
4333 If FRAME is nil or omitted, use the selected frame. 4335 If FRAME is nil or omitted, use the selected frame.
4334 If TYPE is nil or omitted, get the property as a string. Otherwise TYPE 4336
4335 is the name of the Atom that denotes the type expected. 4337 On MS Windows, this function only accepts the PROP and FRAME arguments.
4338
4339 On X Windows, the following optional arguments are also accepted:
4340 If TYPE is nil or omitted, get the property as a string.
4341 Otherwise TYPE is the name of the atom that denotes the type expected.
4336 If SOURCE is non-nil, get the property on that window instead of from 4342 If SOURCE is non-nil, get the property on that window instead of from
4337 FRAME. The number 0 denotes the root window. 4343 FRAME. The number 0 denotes the root window.
4338 If DELETE_P is non-nil, delete the property after retreiving it. 4344 If DELETE_P is non-nil, delete the property after retreiving it.
4339 If VECTOR_RET_P is non-nil, don't return a string but a vector of values. 4345 If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
4340 4346
4341 Value is nil if FRAME hasn't a property with name PROP or if PROP has 4347 Value is nil if FRAME hasn't a property with name PROP or if PROP has
4342 no value of TYPE. */) 4348 no value of TYPE (always string in the MS Windows case). */)
4343 (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p) 4349 (Lisp_Object prop, Lisp_Object frame, Lisp_Object type, Lisp_Object source, Lisp_Object delete_p, Lisp_Object vector_ret_p)
4344 { 4350 {
4345 struct frame *f = check_x_frame (frame); 4351 struct frame *f = check_x_frame (frame);
4346 Atom prop_atom; 4352 Atom prop_atom;
4347 int rc; 4353 int rc;
5340 5346
5341 DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, 5347 DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0,
5342 doc: /* Read file name, prompting with PROMPT in directory DIR. 5348 doc: /* Read file name, prompting with PROMPT in directory DIR.
5343 Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file 5349 Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file
5344 selection box, if specified. If MUSTMATCH is non-nil, the returned file 5350 selection box, if specified. If MUSTMATCH is non-nil, the returned file
5345 or directory must exist. ONLY-DIR-P is ignored." */) 5351 or directory must exist.
5352
5353 This function is only defined on MS Windows, and X Windows with the
5354 Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored.
5355 Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
5346 (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) 5356 (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
5347 { 5357 {
5348 int result; 5358 int result;
5349 struct frame *f = SELECTED_FRAME (); 5359 struct frame *f = SELECTED_FRAME ();
5350 Lisp_Object file = Qnil; 5360 Lisp_Object file = Qnil;
5509 5519
5510 DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0, 5520 DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0,
5511 doc: /* Read file name, prompting with PROMPT in directory DIR. 5521 doc: /* Read file name, prompting with PROMPT in directory DIR.
5512 Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file 5522 Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file
5513 selection box, if specified. If MUSTMATCH is non-nil, the returned file 5523 selection box, if specified. If MUSTMATCH is non-nil, the returned file
5514 or directory must exist. If ONLY-DIR-P is non-nil, the user can only select 5524 or directory must exist.
5515 directories. */) 5525
5526 This function is only defined on MS Windows, and X Windows with the
5527 Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored.
5528 Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
5516 (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p) 5529 (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object only_dir_p)
5517 { 5530 {
5518 FRAME_PTR f = SELECTED_FRAME (); 5531 FRAME_PTR f = SELECTED_FRAME ();
5519 char *fn; 5532 char *fn;
5520 Lisp_Object file = Qnil; 5533 Lisp_Object file = Qnil;
6014 #endif 6027 #endif
6015 } 6028 }
6016 6029
6017 #endif /* HAVE_X_WINDOWS */ 6030 #endif /* HAVE_X_WINDOWS */
6018 6031
6019 /* arch-tag: 55040d02-5485-4d58-8b22-95a7a05f3288
6020 (do not change this comment) */