XEmacs 21.2.46 "Urania".
[chise/xemacs-chise.git.1] / src / emacs.c
index 2133082..33b515b 100644 (file)
@@ -1112,6 +1112,13 @@ main_1 (int argc, char **argv, char **envp, int restart)
        display_use = "x";
 
 #endif /* HAVE_X_WINDOWS */
+#ifdef HAVE_GTK
+      {
+       char *dpy = getenv ("DISPLAY");
+       if (dpy && dpy[0])
+         display_use = "gtk";
+      }
+#endif
 #ifdef HAVE_MS_WINDOWS
       if (strcmp(display_use, "x") != 0)
        display_use = "mswindows";
@@ -1262,6 +1269,9 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #ifdef HAVE_X_WINDOWS
       syms_of_event_Xt ();
 #endif
+#ifdef HAVE_GTK
+      syms_of_event_gtk ();
+#endif
 #ifdef HAVE_DRAGNDROP
       syms_of_dragdrop ();
 #endif
@@ -1337,6 +1347,26 @@ main_1 (int argc, char **argv, char **envp, int restart)
       syms_of_objects_tty ();
 #endif
 
+#ifdef HAVE_GTK
+      syms_of_device_gtk ();
+      syms_of_frame_gtk ();
+      syms_of_glyphs_gtk ();
+      syms_of_objects_gtk ();
+      syms_of_ui_gtk ();
+      syms_of_select_gtk ();
+#ifdef HAVE_DIALOGS
+      syms_of_dialog_gtk ();
+#endif
+#ifdef HAVE_MENUBARS
+      syms_of_menubar_gtk ();
+#endif
+      syms_of_select_gtk ();
+      
+#if defined (HAVE_MENUBARS) || defined(HAVE_SCROLLBARS) || defined(HAVE_DIALOGS) || defined(HAVE_TOOLBARS)
+      syms_of_gui_gtk ();
+#endif
+#endif /* HAVE_GTK */
+
 #ifdef HAVE_X_WINDOWS
 #ifdef HAVE_BALLOON_HELP
       syms_of_balloon_x ();
@@ -1469,6 +1499,28 @@ main_1 (int argc, char **argv, char **envp, int restart)
       console_type_create_redisplay_tty ();
 #endif
 
+#ifdef HAVE_GTK
+      console_type_create_gtk ();
+      console_type_create_select_gtk ();
+      console_type_create_device_gtk ();
+      console_type_create_frame_gtk ();
+      console_type_create_objects_gtk ();
+      console_type_create_glyphs_gtk ();
+      console_type_create_redisplay_gtk ();
+#ifdef HAVE_MENUBARS
+      console_type_create_menubar_gtk ();
+#endif
+#ifdef HAVE_SCROLLBARS
+      console_type_create_scrollbar_gtk ();
+#endif
+#ifdef HAVE_TOOLBARS
+      console_type_create_toolbar_gtk ();
+#endif
+#ifdef HAVE_DIALOGS
+      console_type_create_dialog_gtk ();
+#endif
+#endif /* HAVE_GTK */
+
 #ifdef HAVE_X_WINDOWS
       console_type_create_x ();
       console_type_create_device_x ();
@@ -1571,6 +1623,9 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #ifdef HAVE_MS_WINDOWS
       image_instantiator_format_create_glyphs_mswindows ();
 #endif /* HAVE_MSWINDOWS_WINDOWS */
+#ifdef HAVE_GTK
+      image_instantiator_format_create_glyphs_gtk ();
+#endif
 
       /* Now initialize the lstream types and associated symbols.
         Other than the first function below, the functions may
@@ -1773,6 +1828,28 @@ main_1 (int argc, char **argv, char **envp, int restart)
       vars_of_objects_tty ();
 #endif
 
+#ifdef HAVE_GTK
+      vars_of_device_gtk ();
+#ifdef HAVE_DIALOGS
+      vars_of_dialog_gtk ();
+#endif
+      vars_of_event_gtk ();
+      vars_of_frame_gtk ();
+      vars_of_glyphs_gtk ();
+      vars_of_ui_gtk ();
+#ifdef HAVE_MENUBARS
+      vars_of_menubar_gtk ();
+#endif
+      vars_of_objects_gtk ();
+      vars_of_select_gtk ();
+#ifdef HAVE_SCROLLBARS
+      vars_of_scrollbar_gtk ();
+#endif
+#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) || defined (HAVE_TOOLBARS)
+      vars_of_gui_gtk ();
+#endif
+#endif /* HAVE_GTK */
+
 #ifdef HAVE_X_WINDOWS
 #ifdef HAVE_BALLOON_HELP
       vars_of_balloon_x ();
@@ -1796,6 +1873,7 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #endif
 #endif /* HAVE_X_WINDOWS */
 
+
 #ifdef HAVE_MS_WINDOWS
       vars_of_device_mswindows ();
       vars_of_console_mswindows ();
@@ -1916,6 +1994,9 @@ main_1 (int argc, char **argv, char **envp, int restart)
       /* These rely on the glyphs just created in the previous function,
         and call Fadd_spec_to_specifier(), which relies on various
         variables initialized above. */
+#ifdef HAVE_GTK
+      complex_vars_of_glyphs_gtk ();
+#endif
 #ifdef HAVE_X_WINDOWS
       complex_vars_of_glyphs_x ();
 #endif
@@ -2002,6 +2083,9 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #ifdef HAVE_MS_WINDOWS
       reinit_console_type_create_mswindows ();
 #endif
+#ifdef HAVE_GTK
+      reinit_console_type_create_gtk ();
+#endif
 
       reinit_specifier_type_create ();
       reinit_specifier_type_create_image ();
@@ -2042,6 +2126,9 @@ main_1 (int argc, char **argv, char **envp, int restart)
 #ifdef HAVE_X_WINDOWS
       reinit_vars_of_event_Xt ();
 #endif
+#ifdef HAVE_GTK
+      reinit_vars_of_event_gtk ();
+#endif
 #if defined(HAVE_TTY) && (defined (DEBUG_TTY_EVENT_STREAM) || !defined (HAVE_X_WINDOWS))
       reinit_vars_of_event_tty ();
 #endif
@@ -2072,6 +2159,10 @@ main_1 (int argc, char **argv, char **envp, int restart)
       reinit_vars_of_frame_mswindows ();
 #endif
 
+#ifdef HAVE_GTK
+      reinit_vars_of_menubar_gtk ();
+#endif
+
 #ifdef HAVE_X_WINDOWS
       reinit_vars_of_device_x ();
 #ifdef HAVE_SCROLLBARS