1 /* Console functions for X windows.
2 Copyright (C) 1996 Ben Wing.
4 This file is part of SXEmacs
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* Synched up with: Not in FSF. */
24 Ben Wing: January 1996, for 19.14.
25 William Perry: April 2000, for 21.1 (Gtk version)
31 #include "console-gtk.h"
32 #include "process.h" /* canonicalize_host_name */
33 #include "ui/redisplay.h" /* for display_arg */
35 DEFINE_CONSOLE_TYPE(gtk);
37 static int gtk_initially_selected_for_input(struct console *con)
42 /* Remember, in all of the following functions, we have to verify
43 the integrity of our input, because the generic functions don't. */
46 gtk_device_to_console_connection(Lisp_Object connection, Error_behavior errb)
48 /* Strip the trailing .# off of the connection, if it's there. */
53 connection = build_string("gtk");
59 gtk_semi_canonicalize_console_connection(Lisp_Object connection,
66 connection = build_string("gtk");
68 RETURN_UNGCPRO(connection);
72 gtk_canonicalize_console_connection(Lisp_Object connection, Error_behavior errb)
74 Lisp_Object hostname = Qnil;
75 struct gcpro gcpro1, gcpro2;
77 GCPRO2(connection, hostname);
79 connection = build_string("gtk");
81 RETURN_UNGCPRO(connection);
85 gtk_semi_canonicalize_device_connection(Lisp_Object connection,
92 connection = build_string("gtk");
94 RETURN_UNGCPRO(connection);
98 gtk_canonicalize_device_connection(Lisp_Object connection, Error_behavior errb)
103 connection = build_string("gtk");
105 RETURN_UNGCPRO(connection);
108 void console_type_create_gtk(void)
110 INITIALIZE_CONSOLE_TYPE(gtk, "gtk", "console-gtk-p");
112 CONSOLE_HAS_METHOD(gtk, semi_canonicalize_console_connection);
113 CONSOLE_HAS_METHOD(gtk, canonicalize_console_connection);
114 CONSOLE_HAS_METHOD(gtk, semi_canonicalize_device_connection);
115 CONSOLE_HAS_METHOD(gtk, canonicalize_device_connection);
116 CONSOLE_HAS_METHOD(gtk, device_to_console_connection);
117 CONSOLE_HAS_METHOD(gtk, initially_selected_for_input);
118 /* CONSOLE_HAS_METHOD (gtk, delete_console); */
121 void reinit_console_type_create_gtk(void)
123 REINITIALIZE_CONSOLE_TYPE(gtk);