X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fconsole.c;h=5b8e670fababaca98074cfc66aee3c647307af97;hb=ac1a09d5cc4d3b19765457fb32d6db89dde8f745;hp=0c7c2ad0b68bfc9a5a199324e4fea310d54fab4a;hpb=3e447015251ce6dcde843cbed10d9033d5538622;p=chise%2Fxemacs-chise.git.1 diff --git a/src/console.c b/src/console.c index 0c7c2ad..5b8e670 100644 --- a/src/console.c +++ b/src/console.c @@ -196,7 +196,7 @@ valid_console_type_p (Lisp_Object type) } DEFUN ("valid-console-type-p", Fvalid_console_type_p, 1, 1, 0, /* -Given a CONSOLE-TYPE, return t if it is valid. +Return t if CONSOLE-TYPE is a valid console type. Valid types are 'x, 'tty, and 'stream. */ (console_type)) @@ -216,9 +216,9 @@ DEFUN ("cdfw-console", Fcdfw_console, 1, 1, 0, /* Given a console, device, frame, or window, return the associated console. Return nil otherwise. */ - (obj)) + (object)) { - return CDFW_CONSOLE (obj); + return CDFW_CONSOLE (object); } @@ -244,6 +244,11 @@ select_console_1 (Lisp_Object console) Vwindow_system = Qx; else #endif +#ifdef HAVE_GTK + if (CONSOLE_GTK_P (XCONSOLE (console))) + Vwindow_system = Qgtk; + else +#endif #ifdef HAVE_MS_WINDOWS if (CONSOLE_MSWINDOWS_P (XCONSOLE (console))) Vwindow_system = Qmswindows; @@ -307,7 +312,7 @@ Return non-nil if OBJECT is a console that has not been deleted. } DEFUN ("console-type", Fconsole_type, 0, 1, 0, /* -Return the type of the specified console (e.g. `x' or `tty'). +Return the console type (e.g. `x' or `tty') of CONSOLE. Value is `tty' for a tty console (a character-only terminal), `x' for a console that is an X display, `mswindows' for a console that is a Windows NT/95/97 connection, @@ -327,7 +332,7 @@ Value is `tty' for a tty console (a character-only terminal), } DEFUN ("console-name", Fconsole_name, 0, 1, 0, /* -Return the name of the specified console. +Return the name of CONSOLE. */ (console)) { @@ -750,7 +755,7 @@ Return a list of all consoles. DEFUN ("console-device-list", Fconsole_device_list, 0, 1, 0, /* Return a list of all devices on CONSOLE. -If CONSOLE is nil, the selected console will be used. +If CONSOLE is nil, the selected console is used. */ (console)) { @@ -780,7 +785,8 @@ Disable input on console CONSOLE. } DEFUN ("console-on-window-system-p", Fconsole_on_window_system_p, 0, 1, 0, /* -Return non-nil if this console is on a window system. +Return t if CONSOLE is on a window system. +If CONSOLE is nil, the selected console is used. This generally means that there is support for the mouse, the menubar, the toolbar, glyphs, etc. */ @@ -1023,6 +1029,7 @@ See also `current-input-mode'. TTY_FLAGS (con).flow_control = !NILP (flow); TTY_FLAGS (con).meta_key = meta_key; init_one_console (con); + MARK_FRAME_CHANGED (XFRAME (CONSOLE_SELECTED_FRAME (con))); } #endif @@ -1073,6 +1080,8 @@ The elements of this list correspond to the arguments of void syms_of_console (void) { + INIT_LRECORD_IMPLEMENTATION (console); + DEFSUBR (Fvalid_console_type_p); DEFSUBR (Fconsole_type_list); DEFSUBR (Fcdfw_console); @@ -1146,7 +1155,7 @@ void console_type_create (void) { the_console_type_entry_dynarr = Dynarr_new (console_type_entry); - dumpstruct(&the_console_type_entry_dynarr, &cted_description); + dump_add_root_struct_ptr (&the_console_type_entry_dynarr, &cted_description); Vconsole_type_list = Qnil; staticpro (&Vconsole_type_list); @@ -1195,20 +1204,16 @@ One argument, the to-be-deleted console. } /* The docstrings for DEFVAR_* are recorded externally by make-docfile. */ - -/* Declaring this stuff as const produces 'Cannot reinitialize' messages - from SunPro C's fix-and-continue feature (a way neato feature that - makes debugging unbelievably more bearable) */ #define DEFVAR_CONSOLE_LOCAL_1(lname, field_name, forward_type, magicfun) do { \ - static CONST_IF_NOT_DEBUG struct symbol_value_forward I_hate_C = \ + static const struct symbol_value_forward I_hate_C = \ { /* struct symbol_value_forward */ \ { /* struct symbol_value_magic */ \ { /* struct lcrecord_header */ \ { /* struct lrecord_header */ \ - 1, /* type - index into lrecord_implementations_table */ \ - 0, /* mark bit */ \ - 0, /* c_readonly bit */ \ - 0 /* lisp_readonly bit */ \ + lrecord_type_symbol_value_forward, /* lrecord_type_index */ \ + 1, /* mark bit */ \ + 1, /* c_readonly bit */ \ + 1 /* lisp_readonly bit */ \ }, \ 0, /* next */ \ 0, /* uid */ \ @@ -1368,8 +1373,8 @@ complex_vars_of_console (void) syms = XCONSOLE (Vconsole_local_symbols); console_defaults_saved_slots = &defs->CONSOLE_SLOTS_FIRST_NAME; console_local_symbols_saved_slots = &syms->CONSOLE_SLOTS_FIRST_NAME; - dumpstruct (&console_defaults_saved_slots, &console_slots_description); - dumpstruct (&console_local_symbols_saved_slots, &console_slots_description); + dump_add_root_struct_ptr (&console_defaults_saved_slots, &console_slots_description); + dump_add_root_struct_ptr (&console_local_symbols_saved_slots, &console_slots_description); DEFVAR_CONSOLE_DEFAULTS ("default-function-key-map", function_key_map /* Default value of `function-key-map' for consoles that don't override it. @@ -1412,11 +1417,11 @@ consoles, for example), it is set to nil. /* While this should be const it can't be because some things (i.e. edebug) do manipulate it. */ DEFVAR_CONSOLE_LOCAL ("defining-kbd-macro", defining_kbd_macro /* -Non-nil while a console macro is being defined. Don't set this! +Non-nil while a keyboard macro is being defined. Don't set this! */ ); DEFVAR_CONSOLE_LOCAL ("last-kbd-macro", last_kbd_macro /* -Last kbd macro defined, as a vector of events; nil if none defined. +Last keyboard macro defined, as a vector of events; nil if none defined. */ ); DEFVAR_CONSOLE_LOCAL ("prefix-arg", prefix_arg /*