1 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/Makefile vim/src/Makefile
2 --- vimcopy/src/Makefile Mon Jun 2 09:32:18 2003
3 +++ vim/src/Makefile Sat Jul 26 13:16:46 2003
8 + objects/gtkhtml_editor.o \
9 + objects/gtkhtml_editor_common.o \
10 + objects/gtkhtml_editor_skels.o \
11 + objects/gtkhtml_editor_stubs.o \
14 objects/if_xcmdsrv.o \
19 + objects/vim_bonobo_main.o \
20 + objects/vim_bonobo_factory.o \
21 + objects/vim_bonobo_control.o \
34 @@ -2132,6 +2139,18 @@
35 objects/gui_photon.o: gui_photon.c
36 $(CCC) -o $@ gui_photon.c
38 +objects/gtkhtml_editor.o: gtkhtml_editor.c
39 + $(CCC) -o $@ gtkhtml_editor.c
41 +objects/gtkhtml_editor_common.o: gtkhtml_editor_common.c
42 + $(CCC) -o $@ gtkhtml_editor_common.c
44 +objects/gtkhtml_editor_skels.o: gtkhtml_editor_skels.c
45 + $(CCC) -o $@ gtkhtml_editor_skels.c
47 +objects/gtkhtml_editor_stubs.o: gtkhtml_editor_stubs.c
48 + $(CCC) -o $@ gtkhtml_editor_stubs.c
50 objects/hangulin.o: hangulin.c
51 $(CCC) -o $@ hangulin.c
53 @@ -2251,6 +2270,15 @@
55 objects/undo.o: undo.c
58 +objects/vim_bonobo_control.o: vim_bonobo_control.c
59 + $(CCC) -o $@ vim_bonobo_control.c
61 +objects/vim_bonobo_factory.o: vim_bonobo_factory.c
62 + $(CCC) -o $@ vim_bonobo_factory.c
64 +objects/vim_bonobo_main.o: vim_bonobo_main.c
65 + $(CCC) -o $@ vim_bonobo_main.c
67 objects/window.o: window.c
69 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/Vim_Control.server vim/src/Vim_Control.server
70 --- vimcopy/src/Vim_Control.server Wed Dec 31 18:00:00 1969
71 +++ vim/src/Vim_Control.server Sat Jul 26 13:16:46 2003
75 +<oaf_server iid="OAFIID:Vim_Control_Factory" type="exe" location="/home/jdhildeb/projects/gnome-vim/vim/src/vim">
76 + <oaf_attribute name="repo_ids" type="stringv">
77 + <item value="IDL:Bonobo/GenericFactory:1.0"/>
79 + <oaf_attribute name="name" type="string" value="Vim Control factory"/>
80 + <oaf_attribute name="description" type="string" value="Vim Control factory"/>
83 +<oaf_server iid="OAFIID:Vim_Control" type="factory"
84 + location="OAFIID:Vim_Control_Factory">
85 + <oaf_attribute name="repo_ids" type="stringv">
86 + <item value="IDL:Bonobo/Unknown:1.0"/>
87 + <item value="IDL:Bonobo/Control:1.0"/>
88 + <item value="IDL:Bonobo/ItemContainer:1.0"/>
89 + <item value="IDL:Bonobo/PersistStream:1.0"/>
90 + <item value="IDL:Bonobo/PersistFile:1.0"/>
91 + <item value="IDL:Bonobo/Persist:1.0"/>
92 + <item value="IDL:Nautilus/View:1.0"/>
94 + <oaf_attribute name="name" type="string" value="Vim Control"/>
95 + <oaf_attribute name="description" type="string" value="Vim Control"/>
96 + <oaf_attribute name="bonobo:editable" type="boolean" value="false"/>
97 + <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
98 + <item value="text/plain"/>
99 + <item value="text/*"/>
101 + <oaf_attribute name="nautilus:view_as_name" type="string" value="Text"/>
102 + <oaf_attribute name="nautilus:view_as_label" type="string" value="View/Edit in Vim"/>
103 + <oaf_attribute name="nautilus:viewer_label" type="string" value="Vim"/>
107 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/buffer.c vim/src/buffer.c
108 --- vimcopy/src/buffer.c Mon May 26 23:04:33 2003
109 +++ vim/src/buffer.c Sat Jul 26 16:36:29 2003
114 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
115 +#include "vim_bonobo_control.h"
118 #if defined(FEAT_CMDL_COMPL) || defined(FEAT_LISTCMDS) || defined(FEAT_EVAL) || defined(FEAT_PERL)
119 static char_u *buflist_match __ARGS((regprog_T *prog, buf_T *buf));
120 # define HAVE_BUFLIST_MATCH
121 @@ -132,10 +136,20 @@
125 - else if (read_stdin)
126 + else if (read_stdin
127 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
128 + || read_from_container
132 int save_bin = curbuf->b_p_bin;
134 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
135 + int flags = READ_NEW + READ_EMB_STREAM;
136 + curbuf->emb_buffer = TRUE;
138 + int flags = READ_NEW + READ_STDIN;
142 * First read the text in binary mode into the buffer.
145 curbuf->b_p_bin = TRUE;
146 retval = readfile(NULL, NULL, (linenr_T)0,
147 - (linenr_T)0, (linenr_T)MAXLNUM, eap, READ_NEW + READ_STDIN);
148 + (linenr_T)0, (linenr_T)MAXLNUM, eap, flags);
149 curbuf->b_p_bin = save_bin;
152 @@ -167,14 +181,21 @@
153 /* Put the cursor on the first line. */
154 curwin->w_cursor.lnum = 1;
155 curwin->w_cursor.col = 0;
156 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
162 - apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
163 + apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE,
166 - apply_autocmds(EVENT_STDINREADPOST, NULL, NULL, FALSE, curbuf);
167 + apply_autocmds(EVENT_STDINREADPOST, NULL, NULL, FALSE, curbuf);
170 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
176 @@ -4510,6 +4531,11 @@
177 if (buf->b_sfname != NULL)
178 return (char *)buf->b_sfname;
182 +#if defined(FEAT_QUICKFIX) && defined(FEAT_GUI_COMPONENT)
183 + if ( buf->emb_buffer ) {
184 + return "[Embedded File]";
187 if (buf->b_fname == NULL)
188 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/config.h.in vim/src/config.h.in
189 --- vimcopy/src/config.h.in Mon May 26 10:45:01 2003
190 +++ vim/src/config.h.in Sat Jul 26 13:16:46 2003
192 /* Define if GTK+ multihead support is available (requires GTK+ >= 2.1.1). */
193 #undef HAVE_GTK_MULTIHEAD
195 +/* Define if you want component (i.e. Bonobo) support. */
196 +#undef FEAT_GUI_COMPONENT
198 /* Define if your X has own locale library */
201 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/configure.in vim/src/configure.in
202 --- vimcopy/src/configure.in Mon Jun 2 09:32:19 2003
203 +++ vim/src/configure.in Sat Jul 26 13:16:46 2003
204 @@ -1131,9 +1131,9 @@
205 AC_MSG_CHECKING(for libgnomeui-2.0)
206 if $PKG_CONFIG --exists libgnomeui-2.0; then
208 - GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
209 - GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
210 - GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
211 + GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0 libnautilus`
212 + GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0 libnautilus`
213 + GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0 libnautilus`
216 AC_MSG_RESULT(not found)
217 @@ -1301,6 +1301,20 @@
218 AC_DEFINE(FEAT_GUI_GNOME)
219 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
220 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
221 + AC_MSG_CHECKING(whether or not to include bonobo support)
222 + AC_ARG_ENABLE(bonobo,
223 + [ --enable-bonobo If using GNOME, enable bonobo support [default=no]],
224 + , enable_bonobo="no")
225 + if test "x$enable_bonobo" = "xno"; then
226 + AC_MSG_RESULT($enable_bonobo);
228 + if test "x$SKIP_BONOBO" != "xYES" -a $gtk_major_version -ge 2; then
229 + AC_MSG_RESULT(yes);
230 + AC_DEFINE(FEAT_GUI_COMPONENT)
232 + AC_MSG_RESULT(no (bonobo requires Gnome 2));
238 Binary files vimcopy/src/container and vim/src/container differ
239 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/container.c vim/src/container.c
240 --- vimcopy/src/container.c Wed Dec 31 18:00:00 1969
241 +++ vim/src/container.c Sat Jul 26 13:16:46 2003
247 +BonoboControlFrame *ctrl_frame;
248 +BonoboUIComponent *ui_comp;
252 +GtkWidget *ctrl_widget;
256 +static Bonobo_Control
257 +instantiate_control()
259 + Bonobo_Control control;
260 + Bonobo_PersistFile pfile;
261 + Bonobo_PersistStream pstream;
262 + CORBA_Environment ev;
263 + Bonobo_Stream stream;
265 + CORBA_exception_init (&ev);
267 + /* get control component */
268 + control = bonobo_get_object ("OAFIID:Vim_Control",
269 + "Bonobo/Control", &ev);
270 + if (BONOBO_EX (&ev) || (control == CORBA_OBJECT_NIL))
272 + CORBA_exception_free (&ev);
277 + /* get PersistFile interface */
278 + pfile = Bonobo_Unknown_queryInterface (control, "IDL:Bonobo/PersistFile:1.0", &ev);
279 + if (BONOBO_EX (&ev) || (pfile == CORBA_OBJECT_NIL))
282 + /* load the file */
283 + Bonobo_PersistFile_load (pfile, filename, &ev);
284 + bonobo_object_release_unref (pfile, NULL);
287 + /* get PersistStream interface */
288 + pstream = Bonobo_Unknown_queryInterface (control, "IDL:Bonobo/PersistStream:1.0", &ev);
289 + if (BONOBO_EX (&ev) || (pstream == CORBA_OBJECT_NIL))
291 + CORBA_exception_free (&ev);
295 + /* load the file */
296 + stream = bonobo_get_object(filename, "IDL:Bonobo/Stream:1.0", &ev);
297 + if (ev._major != CORBA_NO_EXCEPTION) {
298 + g_warning("Error getting stream interface");
299 + bonobo_object_unref (BONOBO_OBJECT (stream));
300 + CORBA_exception_free (&ev);
303 + Bonobo_PersistStream_load (pstream, stream, "text/plain", &ev);
304 + if (ev._major != CORBA_NO_EXCEPTION) {
305 + g_warning("Error loading stream!");
306 + bonobo_object_unref (BONOBO_OBJECT (stream));
307 + CORBA_exception_free (&ev);
310 + bonobo_object_release_unref (pstream, NULL);
315 +verb_FileNewWindow (BonoboUIComponent *uic, gpointer user_data, const char *cname)
317 + printf("Got New Window!\n");
321 +verb_DoNothing (BonoboUIComponent *uic, gpointer user_data, const char *cname)
325 +static BonoboUIVerb app_verbs[] = {
326 + BONOBO_UI_VERB ("FileNewWindow", verb_FileNewWindow),
327 + BONOBO_UI_VERB ("FileOpen", verb_DoNothing),
328 + BONOBO_UI_VERB ("FileCloseWindow", verb_DoNothing),
329 + BONOBO_UI_VERB ("FileExit", verb_DoNothing),
330 + BONOBO_UI_VERB ("Preferences", verb_DoNothing),
331 + BONOBO_UI_VERB ("HelpAbout", verb_DoNothing),
332 + BONOBO_UI_VERB ("Help", verb_DoNothing),
333 + BONOBO_UI_VERB ("DnDNewWindow", verb_DoNothing),
334 + BONOBO_UI_VERB ("DnDSameWindow", verb_DoNothing),
335 + BONOBO_UI_VERB ("DnDCancel", verb_DoNothing),
340 +add_control_to_ui (BonoboWindow *window, Bonobo_Control control)
342 + CORBA_Environment ev;
343 + Bonobo_PropertyControl prop_control;
344 + BonoboUIContainer *ui_container;
347 + g_return_if_fail (window != NULL);
348 + g_return_if_fail (BONOBO_IS_WINDOW (window));
350 + CORBA_exception_init (&ev);
352 + ui_container = bonobo_window_get_ui_container (BONOBO_WINDOW (window));
353 + ctrl_frame = bonobo_control_frame_new (BONOBO_OBJREF (ui_container));
355 + /* bind and view new control widget */
356 + bonobo_control_frame_bind_to_control (ctrl_frame, control, &ev);
357 + bonobo_control_frame_control_activate (ctrl_frame);
358 + if (control != CORBA_OBJECT_NIL && ctrl_widget == NULL) {
359 + ctrl_widget = bonobo_control_frame_get_widget (ctrl_frame);
361 + g_assert_not_reached ();
363 + bonobo_window_set_contents (BONOBO_WINDOW(window), GTK_WIDGET(ctrl_widget));
364 + gtk_widget_show (ctrl_widget);
367 + ui_comp = bonobo_ui_component_new ("vim-container");
368 + bonobo_ui_component_set_container (ui_comp, BONOBO_OBJREF (ui_container), NULL);
370 + curdir = (char *)getcwd(NULL, 0);
371 + bonobo_ui_util_set_ui (ui_comp, curdir, "vim-container.xml", "Vim", NULL);
373 + bonobo_ui_component_add_verb_list_with_data (ui_comp, app_verbs, window);
375 + /* update sensitivity of the properties menu item */
376 + prop_control = Bonobo_Unknown_queryInterface (control,
377 + "IDL:Bonobo/PropertyControl:1.0", &ev);
378 + bonobo_ui_component_set_prop (ui_comp,
379 + "/commands/Preferences",
381 + prop_control == CORBA_OBJECT_NIL ? "0" : "1",
384 + bonobo_object_release_unref (prop_control, &ev);
386 + /* enable view menu */
387 + /* FIXME: We should check if the component adds anything to
388 + * the menu, so that we don't view an empty menu.
390 + /*bonobo_ui_component_set_prop (ui_comp, "/menu/View", "hidden", "0", &ev);*/
392 + CORBA_exception_free (&ev);
394 + /* retrieve control properties and install listeners */
395 + //check_for_control_properties (window);
398 +static void write_stream_to_file(Bonobo_Control control)
400 + Bonobo_Storage storage;
403 + CORBA_Environment ev;
404 + Bonobo_PersistStream pstream;
405 + Bonobo_Stream stream;
407 + g_warning("write stream to file!");
408 + CORBA_exception_init (&ev);
410 + dirname = g_path_get_dirname(filename);
411 + storage = bonobo_get_object(dirname, "IDL:Bonobo/Storage:1.0", &ev);
413 + if (BONOBO_EX (&ev) || (storage == CORBA_OBJECT_NIL))
415 + CORBA_exception_free (&ev);
419 + pstream = Bonobo_Unknown_queryInterface (control, "IDL:Bonobo/PersistStream:1.0", &ev);
420 + if (BONOBO_EX (&ev) || (pstream == CORBA_OBJECT_NIL))
422 + bonobo_object_release_unref(storage, NULL);
423 + CORBA_exception_free (&ev);
427 + basename = g_path_get_basename(filename);
428 + stream = Bonobo_Storage_openStream(storage, basename, Bonobo_Storage_WRITE, &ev );
430 + if (BONOBO_EX (&ev) || (stream == CORBA_OBJECT_NIL))
432 + bonobo_object_release_unref(pstream, NULL);
433 + bonobo_object_release_unref(storage, NULL);
434 + CORBA_exception_free (&ev);
438 + Bonobo_PersistStream_save (pstream, stream, "text/plain", &ev);
439 + if (ev._major != CORBA_NO_EXCEPTION) {
440 + g_warning("Error saving stream!");
441 + bonobo_object_unref (BONOBO_OBJECT (stream));
442 + bonobo_object_release_unref(pstream, NULL);
443 + bonobo_object_release_unref(storage, NULL);
444 + CORBA_exception_free (&ev);
447 + bonobo_object_release_unref(stream, NULL);
448 + bonobo_object_release_unref(pstream, NULL);
449 + bonobo_object_release_unref(storage, NULL);
454 +window_destroyed (GtkWindow *window, char * data)
456 + Bonobo_Control control;
458 + control = bonobo_control_frame_get_control(ctrl_frame);
459 + write_stream_to_file(control);
460 + bonobo_control_frame_control_deactivate(ctrl_frame);
461 + bonobo_object_release_unref( control, NULL );
462 + bonobo_main_quit();
465 +int main(int argc, char * argv[] )
468 + BonoboWindow *window;
469 + BonoboUIEngine *engine;
470 + BonoboUIContainer *container;
471 + Bonobo_Control control;
475 + fprintf(stderr, "%s: not enough args\n", argv[0] );
476 + fprintf(stderr, "Usage: %s <text file>\n", argv[0]);
479 + cwd = g_get_current_dir();
480 + filename = g_build_filename( "file:", cwd, argv[1], NULL );
483 + bonobo_ui_init ("container", "1.0", &argc, argv);
485 + if(gnome_vfs_init () == FALSE)
486 + g_error (_("Could not initialize GnomeVFS!\n"));
488 + window = BONOBO_WINDOW ( bonobo_window_new ("Window", "Vim Test Container"));
490 + // instantiate a control
491 + control = instantiate_control();
492 + if( control == NULL )
495 + // put it into our window
496 + add_control_to_ui (window, control);
498 + g_signal_connect (window, "destroy",
499 + G_CALLBACK (window_destroyed),
503 + gtk_widget_show_all( GTK_WIDGET( window ));
509 Binary files vimcopy/src/container.o and vim/src/container.o differ
510 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/ex_cmds2.c vim/src/ex_cmds2.c
511 --- vimcopy/src/ex_cmds2.c Wed Jul 9 09:23:22 2003
512 +++ vim/src/ex_cmds2.c Sat Jul 26 13:16:47 2003
515 int allbuf; /* may write all buffers */
517 +#ifdef FEAT_GUI_COMPONENT
518 + if ( buf->emb_buffer ) {
519 + EMSG(_("E467: Cannot close embedded file"));
525 && (mult_win || buf->b_nwindows <= 1)
526 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/ex_docmd.c vim/src/ex_docmd.c
527 --- vimcopy/src/ex_docmd.c Mon May 26 10:45:01 2003
528 +++ vim/src/ex_docmd.c Sat Jul 26 13:16:47 2003
529 @@ -5348,8 +5348,13 @@
533 +#ifdef FEAT_GUI_COMPONENT
534 + EMSG(_(e_compnoquit));
539 - if (only_one_window()) /* quit last window */
540 + if (only_one_window()) /* quit last window */
544 @@ -5370,8 +5375,12 @@
548 +#ifdef FEAT_GUI_COMPONENT
549 + EMSG(_(e_compnoquit));
552 getout(1); /* this does not always pass on the exit code to the Manx
558 @@ -5391,6 +5400,10 @@
562 +#ifdef FEAT_GUI_COMPONENT
563 + EMSG(_(e_compnoquit));
567 if (eap->forceit || !check_changed_any(FALSE))
569 @@ -5585,8 +5598,13 @@
573 +#ifdef FEAT_GUI_COMPONENT
574 + EMSG(_(e_compnoquit));
579 - if (only_one_window()) /* quit last window, exit Vim */
580 + if ( only_one_window()) /* quit last window, exit Vim */
584 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/fileio.c vim/src/fileio.c
585 --- vimcopy/src/fileio.c Fri Jul 25 11:04:42 2003
586 +++ vim/src/fileio.c Sat Jul 26 13:16:47 2003
588 # define CRYPT_MAGIC_LEN 12 /* must be multiple of 4! */
591 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
592 +#include "vim_bonobo_control.h"
595 /* Is there any system that doesn't have access()? */
596 #ifndef MACOS_CLASSIC /* Not available on MacOS 9 */
597 # define USE_MCH_ACCESS
599 * READ_BUFFER read from curbuf instead of a file (converting after reading
601 * READ_DUMMY read into a dummy buffer (to check if file contents changed)
602 + * READ_EMB_STREAM read from a bonobo persist stream
604 * return FAIL for failure, OK otherwise
607 int filtering = (flags & READ_FILTER);
608 int read_stdin = (flags & READ_STDIN);
609 int read_buffer = (flags & READ_BUFFER);
610 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
611 + int read_pstream = (flags & READ_EMB_STREAM);
613 +#define read_pstream 0
615 linenr_T read_buf_lnum = 1; /* next line to read from curbuf */
616 colnr_T read_buf_col = 0; /* next char to read from this line */
619 * The BufReadCmd and FileReadCmd events intercept the reading process by
620 * executing the associated commands instead.
622 - if (!filtering && !read_stdin && !read_buffer)
623 + if (!filtering && !read_stdin && !read_buffer && !read_pstream)
628 * On Unix it is possible to read a directory, so we have to
629 * check for it before the mch_open().
631 - if (!read_stdin && !read_buffer)
632 + if (!read_stdin && !read_buffer && !read_pstream)
634 perm = mch_getperm(fname);
635 if (perm >= 0 && !S_ISREG(perm) /* not a regular file ... */
637 if (check_readonly && !readonlymode) /* default: set file not readonly */
638 curbuf->b_p_ro = FALSE;
640 - if (newfile && !read_stdin && !read_buffer)
641 + if (newfile && !read_stdin && !read_buffer && !read_pstream)
643 /* Remember time of file.
644 * For RISCOS, also remember the filetype.
646 setmode(0, O_BINARY);
649 +#ifdef FEAT_GUI_COMPONENT
650 + else if (read_pstream)
654 else if (!read_buffer)
656 #ifdef USE_MCH_ACCESS
658 /* If "Quit" selected at ATTENTION dialog, don't load the file */
659 if (swap_exists_action == SEA_QUIT)
661 - if (!read_buffer && !read_stdin)
662 + if (!read_buffer && !read_stdin && !read_pstream)
667 * The file must be closed again, the autocommands may want to change
668 * the file before reading it.
671 + if (!read_stdin && !read_pstream)
672 close(fd); /* ignore errors */
676 * Don't allow the autocommands to change the current buffer.
677 * Try to re-open the file.
679 - if (!read_stdin && (curbuf != old_curbuf
680 + if (!read_stdin && !read_pstream && (curbuf != old_curbuf
681 || (fd = mch_open((char *)fname, O_RDONLY | O_EXTRA, 0)) < 0))
688 - else if (!read_buffer)
689 + else if (!read_buffer && !read_pstream)
690 filemess(curbuf, sfname, (char_u *)"", 0);
697 - else if (read_stdin || lseek(fd, (off_t)0L, SEEK_SET) != 0)
698 + else if (read_stdin || read_pstream || lseek(fd, (off_t)0L, SEEK_SET) != 0)
700 /* Can't rewind the file, give up. */
703 * Use the 'charconvert' expression when conversion is required
704 * and we can't do it internally or with iconv().
706 - if (fio_flags == 0 && !read_stdin && !read_buffer && *p_ccv != NUL
707 + if (fio_flags == 0 && !read_stdin && !read_buffer && !read_pstream && *p_ccv != NUL
709 && iconv_fd == (iconv_t)-1
712 /* Set can_retry when it's possible to rewind the file and try with
713 * another "fenc" value. It's FALSE when no other "fenc" to try, reading
714 * stdin or "fenc" was specified with "++enc=". */
715 - can_retry = (*fenc != NUL && !read_stdin
716 + can_retry = (*fenc != NUL && !read_stdin && !read_pstream
717 && (eap == NULL || eap->force_enc == 0));
720 @@ -1120,6 +1135,11 @@
724 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
725 + else if( read_pstream ) {
726 + size = vim_control_persist_stream_read(ptr, size);
732 @@ -1713,7 +1733,7 @@
733 else if (ff_error != EOL_DOS)
737 + && !read_stdin && !read_pstream
739 || lseek(fd, (off_t)0L, SEEK_SET) == 0))
741 @@ -1802,7 +1822,7 @@
745 - if (!read_buffer && !read_stdin)
746 + if (!read_buffer && !read_stdin && !read_pstream)
747 close(fd); /* errors are ignored */
750 @@ -1991,7 +2011,7 @@
751 #ifdef ALWAYS_USE_GUI
752 /* Don't show the message when reading stdin, it would end up in a
753 * message box (which might be shown when exiting!) */
754 - if (read_stdin || read_buffer)
755 + if (read_stdin || read_buffer )
756 p = msg_may_trunc(FALSE, IObuff);
759 @@ -2057,7 +2077,7 @@
761 write_no_eol_lnum = read_no_eol_lnum;
763 - if (!read_stdin && !read_buffer)
764 + if (!read_stdin && !read_buffer && !read_pstream)
767 int n = msg_scrolled;
768 @@ -2383,6 +2403,11 @@
769 int prev_got_int = got_int;
770 int file_readonly = FALSE; /* overwritten file is read-only */
771 static char *err_readonly = "is read-only (cannot override: \"W\" in 'cpoptions')";
772 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
773 + int write_pstream = write_to_container;
775 +#define write_pstream 0
777 #if defined(UNIX) || defined(__EMX__XX) /*XXX fix me sometime? */
778 int made_writable = FALSE; /* 'w' bit has been set */
780 @@ -2795,6 +2820,10 @@
781 if (dobackup && *p_bsk != NUL && match_file_list(p_bsk, sfname, ffname))
784 +#ifdef FEAT_GUI_COMPONENT
785 + if( write_pstream )
790 * Save the value of got_int and reset it. We don't want a previous
791 @@ -3398,7 +3427,7 @@
792 * (this may happen when the user reached his quotum for number of files).
793 * Appending will fail if the file does not exist and forceit is FALSE.
795 - while ((fd = mch_open((char *)wfname, O_WRONLY | O_EXTRA | (append
796 + while (write_pstream && (fd = mch_open((char *)wfname, O_WRONLY | O_EXTRA | (append
797 ? (forceit ? (O_APPEND | O_CREAT) : O_APPEND)
798 : (O_CREAT | O_TRUNC))
800 @@ -3670,7 +3699,7 @@
804 - if (close(fd) != 0)
805 + if (!write_pstream && close(fd) != 0)
807 errmsg = (char_u *)_("E512: Close failed");
809 @@ -4088,6 +4117,10 @@
813 +#ifdef FEAT_GUI_COMPONENT
814 + if (buf->emb_buffer)
815 + fname = (char_u *)"[Embedded File]";
818 fname = (char_u *)"-stdin-";
819 home_replace(buf, fname, IObuff + 1, IOSIZE - 4, TRUE);
820 @@ -4476,7 +4509,12 @@
821 /* Repeat the write(), it may be interrupted by a signal. */
824 - wlen = vim_write(ip->bw_fd, buf, len);
825 +#if defined(FEAT_GUI_COMPONENT) && defined(FEAT_GUI_GNOME)
826 + if( write_to_container )
827 + wlen = vim_control_persist_stream_write(buf, len);
830 + wlen = vim_write(ip->bw_fd, buf, len);
831 if (wlen <= 0) /* error! */
834 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/globals.h vim/src/globals.h
835 --- vimcopy/src/globals.h Mon Jun 2 09:32:19 2003
836 +++ vim/src/globals.h Sat Jul 26 13:16:47 2003
838 EXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */
839 EXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */
841 +#ifdef FEAT_GUI_COMPONENT
842 +EXTERN int read_from_container INIT(= 0); /* read the buffer from the container app */
843 +EXTERN int write_to_container INIT(= 0); /* write the buffer to the container app */
846 EXTERN struct buffheader stuffbuff /* stuff buffer */
848 = {{NULL, {NUL}}, NULL, 0, 0}
849 @@ -1321,6 +1326,9 @@
851 #ifdef FEAT_NETBEANS_INTG
852 EXTERN char_u e_guarded[] INIT(=N_("E463: Region is guarded, cannot modify"));
854 +#ifdef FEAT_GUI_COMPONENT
855 +EXTERN char_u e_compnoquit[] INIT(=N_("E464: Quit not allowed from embedded component"));
858 EXTERN short disallow_gui INIT(= FALSE);
859 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gtkhtml.h vim/src/gtkhtml.h
860 --- vimcopy/src/gtkhtml.h Wed Dec 31 18:00:00 1969
861 +++ vim/src/gtkhtml.h Sat Jul 26 13:16:47 2003
864 + * This file was generated by orbit-idl-2 - DO NOT EDIT!
870 +#define ORBIT_IDL_SERIAL 19
871 +#include <orbit/orbit-types.h>
876 +#endif /* __cplusplus */
879 +#include <bonobo/Bonobo.h>
880 +#if !defined(ORBIT_DECL_GNOME_GtkHTML_Editor_Listener) && !defined(_GNOME_GtkHTML_Editor_Listener_defined)
881 +#define ORBIT_DECL_GNOME_GtkHTML_Editor_Listener 1
882 +#define _GNOME_GtkHTML_Editor_Listener_defined 1
883 +#define GNOME_GtkHTML_Editor_Listener__freekids CORBA_Object__freekids
884 + typedef CORBA_Object GNOME_GtkHTML_Editor_Listener;
885 + extern CORBA_unsigned_long GNOME_GtkHTML_Editor_Listener__classid;
886 +#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0)
887 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0 'E'
888 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_1 'd'
889 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_2 'i'
890 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_3 't'
891 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_4 'o'
892 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_5 'r'
893 +#ifdef ORBIT_IDL_C_IMODULE
898 + const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Listener_struct;
899 +#define TC_GNOME_GtkHTML_Editor_Listener ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_Listener_struct)
902 +#if !defined(ORBIT_DECL_GNOME_GtkHTML_Editor_Engine) && !defined(_GNOME_GtkHTML_Editor_Engine_defined)
903 +#define ORBIT_DECL_GNOME_GtkHTML_Editor_Engine 1
904 +#define _GNOME_GtkHTML_Editor_Engine_defined 1
905 +#define GNOME_GtkHTML_Editor_Engine__freekids CORBA_Object__freekids
906 + typedef CORBA_Object GNOME_GtkHTML_Editor_Engine;
907 + extern CORBA_unsigned_long GNOME_GtkHTML_Editor_Engine__classid;
908 +#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0)
909 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0 'E'
910 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_1 'd'
911 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_2 'i'
912 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_3 't'
913 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_4 'o'
914 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_5 'r'
915 +#ifdef ORBIT_IDL_C_IMODULE
920 + const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Engine_struct;
921 +#define TC_GNOME_GtkHTML_Editor_Engine ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_Engine_struct)
924 +#if !defined(_GNOME_GtkHTML_Editor_URLRequestEvent_defined)
925 +#define _GNOME_GtkHTML_Editor_URLRequestEvent_defined 1
926 + typedef struct GNOME_GtkHTML_Editor_URLRequestEvent_type
927 + GNOME_GtkHTML_Editor_URLRequestEvent;
928 + struct GNOME_GtkHTML_Editor_URLRequestEvent_type
931 + Bonobo_Stream stream;
934 +#if !defined(TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0)
935 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0 'E'
936 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_1 'd'
937 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_2 'i'
938 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_3 't'
939 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_4 'o'
940 +#define TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_5 'r'
941 +#ifdef ORBIT_IDL_C_IMODULE
946 + const struct CORBA_TypeCode_struct
947 + TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct;
948 +#define TC_GNOME_GtkHTML_Editor_URLRequestEvent ((CORBA_TypeCode)&TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct)
950 +#define GNOME_GtkHTML_Editor_URLRequestEvent__alloc() ((GNOME_GtkHTML_Editor_URLRequestEvent *)ORBit_small_alloc (TC_GNOME_GtkHTML_Editor_URLRequestEvent))
951 +#define GNOME_GtkHTML_Editor_URLRequestEvent__freekids(m,d) ORBit_small_freekids (TC_GNOME_GtkHTML_Editor_URLRequestEvent,(m),(d))
954 +/** POA structures **/
955 +#ifndef _defined_POA_GNOME_GtkHTML_Editor_Listener
956 +#define _defined_POA_GNOME_GtkHTML_Editor_Listener 1
960 + CORBA_any *(*event) (PortableServer_Servant _servant,
961 + const CORBA_char * name, const CORBA_any * arg,
962 + CORBA_Environment * ev);
964 + POA_GNOME_GtkHTML_Editor_Listener__epv;
967 + PortableServer_ServantBase__epv *_base_epv;
968 + POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv;
969 + POA_GNOME_GtkHTML_Editor_Listener__epv
970 + *GNOME_GtkHTML_Editor_Listener_epv;
972 + POA_GNOME_GtkHTML_Editor_Listener__vepv;
976 + POA_GNOME_GtkHTML_Editor_Listener__vepv *vepv;
978 + POA_GNOME_GtkHTML_Editor_Listener;
979 + extern void POA_GNOME_GtkHTML_Editor_Listener__init(PortableServer_Servant
981 + CORBA_Environment *
983 + extern void POA_GNOME_GtkHTML_Editor_Listener__fini(PortableServer_Servant
985 + CORBA_Environment *
987 +#endif /* _defined_POA_GNOME_GtkHTML_Editor_Listener */
988 +#ifndef _defined_POA_GNOME_GtkHTML_Editor_Engine
989 +#define _defined_POA_GNOME_GtkHTML_Editor_Engine 1
993 + GNOME_GtkHTML_Editor_Listener(*_get_listener) (PortableServer_Servant
995 + CORBA_Environment * ev);
996 + void (*_set_listener) (PortableServer_Servant _servant,
997 + const GNOME_GtkHTML_Editor_Listener value,
998 + CORBA_Environment * ev);
999 + CORBA_boolean(*runCommand) (PortableServer_Servant _servant,
1000 + const CORBA_char * command,
1001 + CORBA_Environment * ev);
1002 + CORBA_string(*getParagraphData) (PortableServer_Servant _servant,
1003 + const CORBA_char * key,
1004 + CORBA_Environment * ev);
1005 + void (*setParagraphData) (PortableServer_Servant _servant,
1006 + const CORBA_char * key,
1007 + const CORBA_char * value,
1008 + CORBA_Environment * ev);
1009 + void (*setObjectDataByType) (PortableServer_Servant _servant,
1010 + const CORBA_char * type_name,
1011 + const CORBA_char * key,
1012 + const CORBA_char * data,
1013 + CORBA_Environment * ev);
1014 + CORBA_boolean(*searchByData) (PortableServer_Servant _servant,
1015 + const CORBA_long level,
1016 + const CORBA_char * klass,
1017 + const CORBA_char * key,
1018 + const CORBA_char * value,
1019 + CORBA_Environment * ev);
1020 + CORBA_boolean(*isParagraphEmpty) (PortableServer_Servant _servant,
1021 + CORBA_Environment * ev);
1022 + CORBA_boolean(*isPreviousParagraphEmpty) (PortableServer_Servant
1024 + CORBA_Environment * ev);
1025 + void (*insertHTML) (PortableServer_Servant _servant,
1026 + const CORBA_char * html, CORBA_Environment * ev);
1027 + void (*freeze) (PortableServer_Servant _servant,
1028 + CORBA_Environment * ev);
1029 + void (*thaw) (PortableServer_Servant _servant, CORBA_Environment * ev);
1030 + void (*undoBegin) (PortableServer_Servant _servant,
1031 + const CORBA_char * undo_name,
1032 + const CORBA_char * redo_name,
1033 + CORBA_Environment * ev);
1034 + void (*undoEnd) (PortableServer_Servant _servant,
1035 + CORBA_Environment * ev);
1036 + void (*ignoreWord) (PortableServer_Servant _servant,
1037 + const CORBA_char * word, CORBA_Environment * ev);
1038 + void (*dropUndo) (PortableServer_Servant _servant,
1039 + CORBA_Environment * ev);
1040 + CORBA_boolean(*hasUndo) (PortableServer_Servant _servant,
1041 + CORBA_Environment * ev);
1043 + POA_GNOME_GtkHTML_Editor_Engine__epv;
1046 + PortableServer_ServantBase__epv *_base_epv;
1047 + POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv;
1048 + POA_GNOME_GtkHTML_Editor_Engine__epv *GNOME_GtkHTML_Editor_Engine_epv;
1050 + POA_GNOME_GtkHTML_Editor_Engine__vepv;
1054 + POA_GNOME_GtkHTML_Editor_Engine__vepv *vepv;
1056 + POA_GNOME_GtkHTML_Editor_Engine;
1057 + extern void POA_GNOME_GtkHTML_Editor_Engine__init(PortableServer_Servant
1059 + CORBA_Environment * ev);
1060 + extern void POA_GNOME_GtkHTML_Editor_Engine__fini(PortableServer_Servant
1062 + CORBA_Environment * ev);
1063 +#endif /* _defined_POA_GNOME_GtkHTML_Editor_Engine */
1065 +/** skel prototypes **/
1067 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event
1068 + (POA_GNOME_GtkHTML_Editor_Listener * _ORBIT_servant,
1069 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1070 + CORBA_Environment * ev,
1071 + CORBA_any * (*_impl_event) (PortableServer_Servant _servant,
1072 + const CORBA_char * name,
1073 + const CORBA_any * arg,
1074 + CORBA_Environment * ev));
1076 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener
1077 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1078 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1079 + CORBA_Environment * ev,
1080 + GNOME_GtkHTML_Editor_Listener(*_impl__get_listener)
1081 + (PortableServer_Servant _servant, CORBA_Environment * ev));
1083 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener
1084 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1085 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1086 + CORBA_Environment * ev,
1087 + void (*_impl__set_listener) (PortableServer_Servant _servant,
1088 + const GNOME_GtkHTML_Editor_Listener value,
1089 + CORBA_Environment * ev));
1091 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand
1092 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1093 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1094 + CORBA_Environment * ev,
1095 + CORBA_boolean(*_impl_runCommand) (PortableServer_Servant _servant,
1096 + const CORBA_char * command,
1097 + CORBA_Environment * ev));
1099 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData
1100 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1101 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1102 + CORBA_Environment * ev,
1103 + CORBA_string(*_impl_getParagraphData) (PortableServer_Servant _servant,
1104 + const CORBA_char * key,
1105 + CORBA_Environment * ev));
1107 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData
1108 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1109 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1110 + CORBA_Environment * ev,
1111 + void (*_impl_setParagraphData) (PortableServer_Servant _servant,
1112 + const CORBA_char * key,
1113 + const CORBA_char * value,
1114 + CORBA_Environment * ev));
1116 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType
1117 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1118 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1119 + CORBA_Environment * ev,
1120 + void (*_impl_setObjectDataByType) (PortableServer_Servant _servant,
1121 + const CORBA_char * type_name,
1122 + const CORBA_char * key,
1123 + const CORBA_char * data,
1124 + CORBA_Environment * ev));
1126 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData
1127 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1128 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1129 + CORBA_Environment * ev,
1130 + CORBA_boolean(*_impl_searchByData) (PortableServer_Servant _servant,
1131 + const CORBA_long level,
1132 + const CORBA_char * klass,
1133 + const CORBA_char * key,
1134 + const CORBA_char * value,
1135 + CORBA_Environment * ev));
1137 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty
1138 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1139 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1140 + CORBA_Environment * ev,
1141 + CORBA_boolean(*_impl_isParagraphEmpty) (PortableServer_Servant
1143 + CORBA_Environment * ev));
1145 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty
1146 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1147 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1148 + CORBA_Environment * ev,
1149 + CORBA_boolean(*_impl_isPreviousParagraphEmpty) (PortableServer_Servant
1151 + CORBA_Environment *
1154 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML
1155 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1156 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1157 + CORBA_Environment * ev,
1158 + void (*_impl_insertHTML) (PortableServer_Servant _servant,
1159 + const CORBA_char * html,
1160 + CORBA_Environment * ev));
1162 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze
1163 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1164 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1165 + CORBA_Environment * ev,
1166 + void (*_impl_freeze) (PortableServer_Servant _servant,
1167 + CORBA_Environment * ev));
1169 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw
1170 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1171 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1172 + CORBA_Environment * ev,
1173 + void (*_impl_thaw) (PortableServer_Servant _servant,
1174 + CORBA_Environment * ev));
1176 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin
1177 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1178 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1179 + CORBA_Environment * ev,
1180 + void (*_impl_undoBegin) (PortableServer_Servant _servant,
1181 + const CORBA_char * undo_name,
1182 + const CORBA_char * redo_name,
1183 + CORBA_Environment * ev));
1185 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd
1186 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1187 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1188 + CORBA_Environment * ev,
1189 + void (*_impl_undoEnd) (PortableServer_Servant _servant,
1190 + CORBA_Environment * ev));
1192 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord
1193 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1194 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1195 + CORBA_Environment * ev,
1196 + void (*_impl_ignoreWord) (PortableServer_Servant _servant,
1197 + const CORBA_char * word,
1198 + CORBA_Environment * ev));
1200 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo
1201 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1202 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1203 + CORBA_Environment * ev,
1204 + void (*_impl_dropUndo) (PortableServer_Servant _servant,
1205 + CORBA_Environment * ev));
1207 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo
1208 + (POA_GNOME_GtkHTML_Editor_Engine * _ORBIT_servant,
1209 + gpointer _ORBIT_retval, gpointer * _ORBIT_args, CORBA_Context ctx,
1210 + CORBA_Environment * ev,
1211 + CORBA_boolean(*_impl_hasUndo) (PortableServer_Servant _servant,
1212 + CORBA_Environment * ev));
1214 +/** stub prototypes **/
1215 +#define GNOME_GtkHTML_Editor_Listener_ref Bonobo_Unknown_ref
1216 +#define GNOME_GtkHTML_Editor_Listener_unref Bonobo_Unknown_unref
1217 +#define GNOME_GtkHTML_Editor_Listener_queryInterface Bonobo_Unknown_queryInterface
1219 + *GNOME_GtkHTML_Editor_Listener_event(GNOME_GtkHTML_Editor_Listener _obj,
1220 + const CORBA_char * name,
1221 + const CORBA_any * arg,
1222 + CORBA_Environment * ev);
1223 +#define GNOME_GtkHTML_Editor_Engine_ref Bonobo_Unknown_ref
1224 +#define GNOME_GtkHTML_Editor_Engine_unref Bonobo_Unknown_unref
1225 +#define GNOME_GtkHTML_Editor_Engine_queryInterface Bonobo_Unknown_queryInterface
1226 + GNOME_GtkHTML_Editor_Listener
1227 + GNOME_GtkHTML_Editor_Engine__get_listener(GNOME_GtkHTML_Editor_Engine
1228 + _obj, CORBA_Environment * ev);
1229 + void GNOME_GtkHTML_Editor_Engine__set_listener(GNOME_GtkHTML_Editor_Engine
1232 + GNOME_GtkHTML_Editor_Listener
1234 + CORBA_Environment * ev);
1236 + GNOME_GtkHTML_Editor_Engine_runCommand(GNOME_GtkHTML_Editor_Engine _obj,
1237 + const CORBA_char * command,
1238 + CORBA_Environment * ev);
1240 + GNOME_GtkHTML_Editor_Engine_getParagraphData(GNOME_GtkHTML_Editor_Engine
1242 + const CORBA_char * key,
1243 + CORBA_Environment * ev);
1245 + GNOME_GtkHTML_Editor_Engine_setParagraphData(GNOME_GtkHTML_Editor_Engine
1247 + const CORBA_char * key,
1248 + const CORBA_char * value,
1249 + CORBA_Environment * ev);
1251 + GNOME_GtkHTML_Editor_Engine_setObjectDataByType
1252 + (GNOME_GtkHTML_Editor_Engine _obj, const CORBA_char * type_name,
1253 + const CORBA_char * key, const CORBA_char * data,
1254 + CORBA_Environment * ev);
1256 + GNOME_GtkHTML_Editor_Engine_searchByData(GNOME_GtkHTML_Editor_Engine
1257 + _obj, const CORBA_long level,
1258 + const CORBA_char * klass,
1259 + const CORBA_char * key,
1260 + const CORBA_char * value,
1261 + CORBA_Environment * ev);
1263 + GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(GNOME_GtkHTML_Editor_Engine
1265 + CORBA_Environment * ev);
1267 + GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty
1268 + (GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev);
1269 + void GNOME_GtkHTML_Editor_Engine_insertHTML(GNOME_GtkHTML_Editor_Engine
1270 + _obj, const CORBA_char * html,
1271 + CORBA_Environment * ev);
1272 + void GNOME_GtkHTML_Editor_Engine_freeze(GNOME_GtkHTML_Editor_Engine _obj,
1273 + CORBA_Environment * ev);
1274 + void GNOME_GtkHTML_Editor_Engine_thaw(GNOME_GtkHTML_Editor_Engine _obj,
1275 + CORBA_Environment * ev);
1276 + void GNOME_GtkHTML_Editor_Engine_undoBegin(GNOME_GtkHTML_Editor_Engine
1278 + const CORBA_char * undo_name,
1279 + const CORBA_char * redo_name,
1280 + CORBA_Environment * ev);
1281 + void GNOME_GtkHTML_Editor_Engine_undoEnd(GNOME_GtkHTML_Editor_Engine _obj,
1282 + CORBA_Environment * ev);
1283 + void GNOME_GtkHTML_Editor_Engine_ignoreWord(GNOME_GtkHTML_Editor_Engine
1284 + _obj, const CORBA_char * word,
1285 + CORBA_Environment * ev);
1286 + void GNOME_GtkHTML_Editor_Engine_dropUndo(GNOME_GtkHTML_Editor_Engine _obj,
1287 + CORBA_Environment * ev);
1289 + GNOME_GtkHTML_Editor_Engine_hasUndo(GNOME_GtkHTML_Editor_Engine _obj,
1290 + CORBA_Environment * ev);
1292 +/** more internals **/
1293 +#if !defined(MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_0)
1294 +#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_0 'E'
1295 +#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_1 'd'
1296 +#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_2 'i'
1297 +#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_3 't'
1298 +#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_4 'o'
1299 +#define MARSHAL_IMPL_GNOME_GtkHTML_Editor_URLRequestEvent_5 'r'
1301 +#include <orbit/orb-core/orbit-interface.h>
1303 +#ifdef ORBIT_IDL_C_IMODULE
1308 + ORBit_IInterface GNOME_GtkHTML_Editor_Listener__iinterface;
1309 +#define GNOME_GtkHTML_Editor_Listener_IMETHODS_LEN 1
1310 +#ifdef ORBIT_IDL_C_IMODULE
1316 + GNOME_GtkHTML_Editor_Listener__imethods
1317 + [GNOME_GtkHTML_Editor_Listener_IMETHODS_LEN];
1318 +#ifdef ORBIT_IDL_C_IMODULE
1323 + ORBit_IInterface GNOME_GtkHTML_Editor_Engine__iinterface;
1324 +#define GNOME_GtkHTML_Editor_Engine_IMETHODS_LEN 17
1325 +#ifdef ORBIT_IDL_C_IMODULE
1331 + GNOME_GtkHTML_Editor_Engine__imethods
1332 + [GNOME_GtkHTML_Editor_Engine_IMETHODS_LEN];
1335 +#endif /* __cplusplus */
1337 +#ifndef EXCLUDE_ORBIT_H
1338 +#include <orbit/orbit.h>
1340 +#endif /* EXCLUDE_ORBIT_H */
1342 +#undef ORBIT_IDL_SERIAL
1343 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gtkhtml_editor.c vim/src/gtkhtml_editor.c
1344 --- vimcopy/src/gtkhtml_editor.c Wed Dec 31 18:00:00 1969
1345 +++ vim/src/gtkhtml_editor.c Sat Jul 26 13:16:47 2003
1347 +#include <bonobo.h>
1349 +#include "gtkhtml_editor.h"
1351 +static BonoboObjectClass *engine_parent_class;
1353 +inline static EditorEngine *
1354 +gtkhtml_editor_engine_from_servant (PortableServer_Servant servant)
1356 + return EDITOR_ENGINE (bonobo_object_from_servant (servant));
1359 +static CORBA_char *
1360 +impl_get_paragraph_data (PortableServer_Servant servant, const CORBA_char * key, CORBA_Environment * ev)
1362 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1366 +impl_set_paragraph_data (PortableServer_Servant servant,
1367 + const CORBA_char * key, const CORBA_char * value,
1368 + CORBA_Environment * ev)
1370 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1374 +impl_set_object_data_by_type (PortableServer_Servant servant,
1375 + const CORBA_char * type_name, const CORBA_char * key, const CORBA_char * value,
1376 + CORBA_Environment * ev)
1378 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1382 +impl_set_listener (PortableServer_Servant servant, const GNOME_GtkHTML_Editor_Listener value, CORBA_Environment * ev)
1384 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1386 + bonobo_object_release_unref (e->listener, NULL);
1387 + e->listener = bonobo_object_dup_ref (value, NULL);
1390 +static GNOME_GtkHTML_Editor_Listener
1391 +impl_get_listener (PortableServer_Servant servant, CORBA_Environment * ev)
1393 + return gtkhtml_editor_engine_from_servant (servant)->listener;
1396 +static CORBA_boolean
1397 +impl_run_command (PortableServer_Servant servant, const CORBA_char * command, CORBA_Environment * ev)
1399 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1400 + printf ("command: %s\n", command);
1401 + return CORBA_TRUE;
1404 +static CORBA_boolean
1405 +impl_is_paragraph_empty (PortableServer_Servant servant, CORBA_Environment * ev)
1407 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1408 + return CORBA_FALSE;
1411 +static CORBA_boolean
1412 +impl_is_previous_paragraph_empty (PortableServer_Servant servant, CORBA_Environment * ev)
1414 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1415 + return CORBA_FALSE;
1419 +impl_insert_html (PortableServer_Servant servant, const CORBA_char * html, CORBA_Environment * ev)
1421 + printf ("impl_insert_html\n");
1424 +static CORBA_boolean
1425 +impl_search_by_data (PortableServer_Servant servant, const CORBA_long level, const CORBA_char * klass,
1426 + const CORBA_char * key, const CORBA_char * value, CORBA_Environment * ev)
1432 +impl_freeze (PortableServer_Servant servant, CORBA_Environment * ev)
1437 +impl_thaw (PortableServer_Servant servant, CORBA_Environment * ev)
1442 +impl_undo_begin (PortableServer_Servant servant, const CORBA_char * undo_name, const CORBA_char * redo_name,
1443 + CORBA_Environment * ev)
1448 +impl_undo_end (PortableServer_Servant servant, CORBA_Environment * ev)
1453 +impl_ignore_word (PortableServer_Servant servant, const CORBA_char * word, CORBA_Environment * ev)
1455 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1458 +static CORBA_boolean
1459 +impl_has_undo (PortableServer_Servant servant, CORBA_Environment * ev)
1461 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1463 + printf ("hasUndo\n");
1464 + return CORBA_FALSE;
1468 +impl_drop_undo (PortableServer_Servant servant, CORBA_Environment * ev)
1470 + EditorEngine *e = gtkhtml_editor_engine_from_servant (servant);
1472 + printf ("dropUndo\n");
1476 +engine_object_finalize (GObject *object)
1478 + EditorEngine *e = EDITOR_ENGINE (object);
1480 + bonobo_object_release_unref (e->listener, NULL);
1482 + G_OBJECT_CLASS (engine_parent_class)->finalize (object);
1486 +editor_engine_init (GObject *object)
1488 + EditorEngine *e = EDITOR_ENGINE (object);
1490 + e->listener = CORBA_OBJECT_NIL;
1494 +editor_engine_class_init (EditorEngineClass *klass)
1496 + GObjectClass *object_class = G_OBJECT_CLASS (klass);
1497 + POA_GNOME_GtkHTML_Editor_Engine__epv *epv = &klass->epv;
1499 + engine_parent_class = g_type_class_peek_parent (klass);
1500 + object_class->finalize = engine_object_finalize;
1502 + epv->_set_listener = impl_set_listener;
1503 + epv->_get_listener = impl_get_listener;
1504 + epv->setParagraphData = impl_set_paragraph_data;
1505 + epv->getParagraphData = impl_get_paragraph_data;
1506 + epv->setObjectDataByType = impl_set_object_data_by_type;
1507 + epv->runCommand = impl_run_command;
1508 + epv->isParagraphEmpty = impl_is_paragraph_empty;
1509 + epv->isPreviousParagraphEmpty = impl_is_previous_paragraph_empty;
1510 + epv->searchByData = impl_search_by_data;
1511 + epv->insertHTML = impl_insert_html;
1512 + epv->freeze = impl_freeze;
1513 + epv->thaw = impl_thaw;
1514 + epv->undoBegin = impl_undo_begin;
1515 + epv->undoEnd = impl_undo_end;
1516 + epv->ignoreWord = impl_ignore_word;
1517 + epv->hasUndo = impl_has_undo;
1518 + epv->dropUndo = impl_drop_undo;
1521 +BONOBO_TYPE_FUNC_FULL (
1522 + EditorEngine, /* Glib class name */
1523 + GNOME_GtkHTML_Editor_Engine, /* CORBA interface name */
1524 + BONOBO_TYPE_OBJECT, /* parent type */
1525 + editor_engine); /* local prefix ie. 'echo'_class_init */
1528 +editor_engine_new (void)
1532 + ee = g_object_new (EDITOR_ENGINE_TYPE, NULL);
1536 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gtkhtml_editor.h vim/src/gtkhtml_editor.h
1537 --- vimcopy/src/gtkhtml_editor.h Wed Dec 31 18:00:00 1969
1538 +++ vim/src/gtkhtml_editor.h Sat Jul 26 13:16:47 2003
1540 +#ifndef GTKHTML_ENGINE_H_
1541 +#define GTKHTML_ENGINE_H_
1545 +typedef struct _EditorEngine EditorEngine;
1547 +#include <gtk/gtktypeutils.h>
1548 +#include <bonobo/bonobo-object.h>
1549 +#include "gtkhtml.h"
1551 +#define EDITOR_ENGINE_TYPE (editor_engine_get_type ())
1552 +#define EDITOR_ENGINE(o) (GTK_CHECK_CAST ((o), EDITOR_ENGINE_TYPE, EditorEngine))
1553 +#define EDITOR_ENGINE_CLASS(k) (GTK_CHECK_CLASS_CAST((k), EDITOR_ENGINE_TYPE, EditorEngineClass))
1554 +#define IS_EDITOR_ENGINE(o) (GTK_CHECK_TYPE ((o), EDITOR_ENGINE_TYPE))
1555 +#define IS_EDITOR_ENGINE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), EDITOR_ENGINE_TYPE))
1557 +struct _EditorEngine {
1558 + BonoboObject parent;
1559 + GNOME_GtkHTML_Editor_Listener listener;
1563 + BonoboObjectClass parent_class;
1564 + POA_GNOME_GtkHTML_Editor_Engine__epv epv;
1565 +} EditorEngineClass;
1567 +GtkType editor_engine_get_type (void);
1568 +EditorEngine *editor_engine_new (void);
1569 +POA_GNOME_GtkHTML_Editor_Engine__epv *editor_engine_get_epv (void);
1573 +#endif /* GTKHTML_ENGINE_H_ */
1574 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gtkhtml_editor_common.c vim/src/gtkhtml_editor_common.c
1575 --- vimcopy/src/gtkhtml_editor_common.c Wed Dec 31 18:00:00 1969
1576 +++ vim/src/gtkhtml_editor_common.c Sat Jul 26 13:16:47 2003
1579 + * This file was generated by orbit-idl-2 - DO NOT EDIT!
1582 +#include <string.h>
1583 +#define ORBIT2_STUBS_API
1584 +#define ORBIT_IDL_C_COMMON
1585 +#define Editor_COMMON
1586 +#include "gtkhtml.h"
1588 +static const CORBA_unsigned_long ORBit_zero_int = 0;
1590 +#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_0 == 'E') \
1591 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_1 == 'd') \
1592 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_2 == 'i') \
1593 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_3 == 't') \
1594 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_4 == 'o') \
1595 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Listener_5 == 'r') \
1596 +) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_Listener)
1597 +#define TC_DEF_TC_GNOME_GtkHTML_Editor_Listener 1
1598 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1601 +const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Listener_struct = {
1602 + {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC},
1606 + ORBIT_ALIGNOF_CORBA_POINTER,
1612 + "IDL:GNOME/GtkHTML/Editor/Listener:1.0",
1620 +#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_0 == 'E') \
1621 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_1 == 'd') \
1622 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_2 == 'i') \
1623 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_3 == 't') \
1624 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_4 == 'o') \
1625 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_Engine_5 == 'r') \
1626 +) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_Engine)
1627 +#define TC_DEF_TC_GNOME_GtkHTML_Editor_Engine 1
1628 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1631 +const struct CORBA_TypeCode_struct TC_GNOME_GtkHTML_Editor_Engine_struct = {
1632 + {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC},
1636 + ORBIT_ALIGNOF_CORBA_POINTER,
1642 + "IDL:GNOME/GtkHTML/Editor/Engine:1.0",
1650 +#if ( (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_0 == 'E') \
1651 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_1 == 'd') \
1652 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_2 == 'i') \
1653 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_3 == 't') \
1654 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_4 == 'o') \
1655 +&& (TC_IMPL_TC_GNOME_GtkHTML_Editor_URLRequestEvent_5 == 'r') \
1656 +) && !defined(TC_DEF_TC_GNOME_GtkHTML_Editor_URLRequestEvent)
1657 +#define TC_DEF_TC_GNOME_GtkHTML_Editor_URLRequestEvent 1
1658 +static const char *anon_subnames_array6[] = { "url", "stream" };
1659 +static const CORBA_TypeCode anon_subtypes_array7[] =
1660 + { (CORBA_TypeCode) & TC_CORBA_string_struct,
1661 + (CORBA_TypeCode) & TC_Bonobo_Stream_struct };
1663 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1666 +const struct CORBA_TypeCode_struct
1667 + TC_GNOME_GtkHTML_Editor_URLRequestEvent_struct = {
1668 + {&ORBit_TypeCode_epv, ORBIT_REFCOUNT_STATIC},
1672 + ORBIT_ALIGNOF_CORBA_POINTER,
1675 + (CORBA_TypeCode *) anon_subtypes_array7,
1677 + "URLRequestEvent",
1678 + "IDL:GNOME/GtkHTML/Editor/URLRequestEvent:1.0",
1679 + (char **) anon_subnames_array6,
1687 +#ifndef ORBIT_IDL_C_IMODULE_Editor
1688 +CORBA_unsigned_long GNOME_GtkHTML_Editor_Listener__classid = 0;
1691 +#ifndef ORBIT_IDL_C_IMODULE_Editor
1692 +CORBA_unsigned_long GNOME_GtkHTML_Editor_Engine__classid = 0;
1695 +/* Interface type data */
1697 +static ORBit_IArg GNOME_GtkHTML_Editor_Listener_event__arginfo[] = {
1698 + {TC_CORBA_string, ORBit_I_ARG_IN, "name"},
1699 + {TC_CORBA_any, ORBit_I_ARG_IN, "arg"}
1702 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1705 +ORBit_IMethod GNOME_GtkHTML_Editor_Listener__imethods[] = {
1707 + {2, 2, GNOME_GtkHTML_Editor_Listener_event__arginfo, FALSE},
1708 + {0, 0, NULL, FALSE},
1709 + {0, 0, NULL, FALSE},
1710 + TC_CORBA_any, "event", 5,
1713 +static CORBA_string GNOME_GtkHTML_Editor_Listener__base_itypes[] = {
1714 + "IDL:Bonobo/Unknown:1.0",
1715 + "IDL:omg.org/CORBA/Object:1.0"
1718 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1721 +ORBit_IInterface GNOME_GtkHTML_Editor_Listener__iinterface = {
1722 + TC_GNOME_GtkHTML_Editor_Listener, {1, 1,
1723 + GNOME_GtkHTML_Editor_Listener__imethods,
1725 + {2, 2, GNOME_GtkHTML_Editor_Listener__base_itypes, FALSE}
1728 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine__set_listener__arginfo[] = {
1729 + {TC_GNOME_GtkHTML_Editor_Listener, ORBit_I_ARG_IN, "value"}
1731 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_runCommand__arginfo[] = {
1732 + {TC_CORBA_string, ORBit_I_ARG_IN, "command"}
1734 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_getParagraphData__arginfo[] = {
1735 + {TC_CORBA_string, ORBit_I_ARG_IN, "key"}
1737 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_setParagraphData__arginfo[] = {
1738 + {TC_CORBA_string, ORBit_I_ARG_IN, "key"},
1739 + {TC_CORBA_string, ORBit_I_ARG_IN, "value"}
1741 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_setObjectDataByType__arginfo[] = {
1742 + {TC_CORBA_string, ORBit_I_ARG_IN, "type_name"},
1743 + {TC_CORBA_string, ORBit_I_ARG_IN, "key"},
1744 + {TC_CORBA_string, ORBit_I_ARG_IN, "data"}
1746 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_searchByData__arginfo[] = {
1747 + {TC_CORBA_long, ORBit_I_ARG_IN | ORBit_I_COMMON_FIXED_SIZE, "level"},
1748 + {TC_CORBA_string, ORBit_I_ARG_IN, "klass"},
1749 + {TC_CORBA_string, ORBit_I_ARG_IN, "key"},
1750 + {TC_CORBA_string, ORBit_I_ARG_IN, "value"}
1752 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_insertHTML__arginfo[] = {
1753 + {TC_CORBA_string, ORBit_I_ARG_IN, "html"}
1755 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_undoBegin__arginfo[] = {
1756 + {TC_CORBA_string, ORBit_I_ARG_IN, "undo_name"},
1757 + {TC_CORBA_string, ORBit_I_ARG_IN, "redo_name"}
1759 +static ORBit_IArg GNOME_GtkHTML_Editor_Engine_ignoreWord__arginfo[] = {
1760 + {TC_CORBA_string, ORBit_I_ARG_IN, "word"}
1763 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1766 +ORBit_IMethod GNOME_GtkHTML_Editor_Engine__imethods[] = {
1768 + {0, 0, NULL, FALSE},
1769 + {0, 0, NULL, FALSE},
1770 + {0, 0, NULL, FALSE},
1771 + TC_GNOME_GtkHTML_Editor_Listener, "_get_listener", 13,
1774 + {1, 1, GNOME_GtkHTML_Editor_Engine__set_listener__arginfo, FALSE},
1775 + {0, 0, NULL, FALSE},
1776 + {0, 0, NULL, FALSE},
1777 + TC_void, "_set_listener", 13,
1780 + {1, 1, GNOME_GtkHTML_Editor_Engine_runCommand__arginfo, FALSE},
1781 + {0, 0, NULL, FALSE},
1782 + {0, 0, NULL, FALSE},
1783 + TC_CORBA_boolean, "runCommand", 10,
1784 + 0 | ORBit_I_COMMON_FIXED_SIZE}
1786 + {1, 1, GNOME_GtkHTML_Editor_Engine_getParagraphData__arginfo, FALSE},
1787 + {0, 0, NULL, FALSE},
1788 + {0, 0, NULL, FALSE},
1789 + TC_CORBA_string, "getParagraphData", 16,
1792 + {2, 2, GNOME_GtkHTML_Editor_Engine_setParagraphData__arginfo, FALSE},
1793 + {0, 0, NULL, FALSE},
1794 + {0, 0, NULL, FALSE},
1795 + TC_void, "setParagraphData", 16,
1798 + {3, 3, GNOME_GtkHTML_Editor_Engine_setObjectDataByType__arginfo, FALSE},
1799 + {0, 0, NULL, FALSE},
1800 + {0, 0, NULL, FALSE},
1801 + TC_void, "setObjectDataByType", 19,
1804 + {4, 4, GNOME_GtkHTML_Editor_Engine_searchByData__arginfo, FALSE},
1805 + {0, 0, NULL, FALSE},
1806 + {0, 0, NULL, FALSE},
1807 + TC_CORBA_boolean, "searchByData", 12,
1808 + 0 | ORBit_I_COMMON_FIXED_SIZE}
1810 + {0, 0, NULL, FALSE},
1811 + {0, 0, NULL, FALSE},
1812 + {0, 0, NULL, FALSE},
1813 + TC_CORBA_boolean, "isParagraphEmpty", 16,
1814 + 0 | ORBit_I_COMMON_FIXED_SIZE}
1816 + {0, 0, NULL, FALSE},
1817 + {0, 0, NULL, FALSE},
1818 + {0, 0, NULL, FALSE},
1819 + TC_CORBA_boolean, "isPreviousParagraphEmpty", 24,
1820 + 0 | ORBit_I_COMMON_FIXED_SIZE}
1822 + {1, 1, GNOME_GtkHTML_Editor_Engine_insertHTML__arginfo, FALSE},
1823 + {0, 0, NULL, FALSE},
1824 + {0, 0, NULL, FALSE},
1825 + TC_void, "insertHTML", 10,
1828 + {0, 0, NULL, FALSE},
1829 + {0, 0, NULL, FALSE},
1830 + {0, 0, NULL, FALSE},
1831 + TC_void, "freeze", 6,
1834 + {0, 0, NULL, FALSE},
1835 + {0, 0, NULL, FALSE},
1836 + {0, 0, NULL, FALSE},
1837 + TC_void, "thaw", 4,
1840 + {2, 2, GNOME_GtkHTML_Editor_Engine_undoBegin__arginfo, FALSE},
1841 + {0, 0, NULL, FALSE},
1842 + {0, 0, NULL, FALSE},
1843 + TC_void, "undoBegin", 9,
1846 + {0, 0, NULL, FALSE},
1847 + {0, 0, NULL, FALSE},
1848 + {0, 0, NULL, FALSE},
1849 + TC_void, "undoEnd", 7,
1852 + {1, 1, GNOME_GtkHTML_Editor_Engine_ignoreWord__arginfo, FALSE},
1853 + {0, 0, NULL, FALSE},
1854 + {0, 0, NULL, FALSE},
1855 + TC_void, "ignoreWord", 10,
1858 + {0, 0, NULL, FALSE},
1859 + {0, 0, NULL, FALSE},
1860 + {0, 0, NULL, FALSE},
1861 + TC_void, "dropUndo", 8,
1864 + {0, 0, NULL, FALSE},
1865 + {0, 0, NULL, FALSE},
1866 + {0, 0, NULL, FALSE},
1867 + TC_CORBA_boolean, "hasUndo", 7,
1868 + 0 | ORBit_I_COMMON_FIXED_SIZE}
1870 +static CORBA_string GNOME_GtkHTML_Editor_Engine__base_itypes[] = {
1871 + "IDL:Bonobo/Unknown:1.0",
1872 + "IDL:omg.org/CORBA/Object:1.0"
1875 +#ifdef ORBIT_IDL_C_IMODULE_Editor
1878 +ORBit_IInterface GNOME_GtkHTML_Editor_Engine__iinterface = {
1879 + TC_GNOME_GtkHTML_Editor_Engine, {17, 17,
1880 + GNOME_GtkHTML_Editor_Engine__imethods,
1882 + {2, 2, GNOME_GtkHTML_Editor_Engine__base_itypes, FALSE}
1884 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gtkhtml_editor_skels.c vim/src/gtkhtml_editor_skels.c
1885 --- vimcopy/src/gtkhtml_editor_skels.c Wed Dec 31 18:00:00 1969
1886 +++ vim/src/gtkhtml_editor_skels.c Sat Jul 26 13:16:47 2003
1889 + * This file was generated by orbit-idl-2 - DO NOT EDIT!
1892 +#include <string.h>
1893 +#define ORBIT2_STUBS_API
1894 +#include "gtkhtml.h"
1897 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event
1898 + (POA_GNOME_GtkHTML_Editor_Listener * _o_servant, gpointer _o_retval,
1899 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1900 + CORBA_any * (*_impl_event) (PortableServer_Servant _servant,
1901 + const CORBA_char * name,
1902 + const CORBA_any * arg,
1903 + CORBA_Environment * ev))
1905 + *(CORBA_any * *)_o_retval =
1906 + _impl_event(_o_servant, *(const CORBA_char * *) _o_args[0],
1907 + (const CORBA_any *) _o_args[1], _o_ev);
1911 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener
1912 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1913 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1914 + GNOME_GtkHTML_Editor_Listener(*_impl__get_listener)
1915 + (PortableServer_Servant _servant, CORBA_Environment * ev))
1917 + *(GNOME_GtkHTML_Editor_Listener *) _o_retval =
1918 + _impl__get_listener(_o_servant, _o_ev);
1922 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener
1923 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1924 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1925 + void (*_impl__set_listener) (PortableServer_Servant _servant,
1926 + const GNOME_GtkHTML_Editor_Listener value,
1927 + CORBA_Environment * ev))
1929 + _impl__set_listener(_o_servant,
1930 + *(const GNOME_GtkHTML_Editor_Listener *) _o_args[0],
1935 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand
1936 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1937 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1938 + CORBA_boolean(*_impl_runCommand) (PortableServer_Servant _servant,
1939 + const CORBA_char * command,
1940 + CORBA_Environment * ev))
1942 + *(CORBA_boolean *) _o_retval =
1943 + _impl_runCommand(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev);
1947 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData
1948 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1949 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1950 + CORBA_string(*_impl_getParagraphData) (PortableServer_Servant _servant,
1951 + const CORBA_char * key,
1952 + CORBA_Environment * ev))
1954 + *(CORBA_string *) _o_retval =
1955 + _impl_getParagraphData(_o_servant, *(const CORBA_char * *) _o_args[0],
1960 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData
1961 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1962 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1963 + void (*_impl_setParagraphData) (PortableServer_Servant _servant,
1964 + const CORBA_char * key,
1965 + const CORBA_char * value,
1966 + CORBA_Environment * ev))
1968 + _impl_setParagraphData(_o_servant, *(const CORBA_char * *) _o_args[0],
1969 + *(const CORBA_char * *) _o_args[1], _o_ev);
1973 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType
1974 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1975 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1976 + void (*_impl_setObjectDataByType) (PortableServer_Servant _servant,
1977 + const CORBA_char * type_name,
1978 + const CORBA_char * key,
1979 + const CORBA_char * data,
1980 + CORBA_Environment * ev))
1982 + _impl_setObjectDataByType(_o_servant, *(const CORBA_char * *) _o_args[0],
1983 + *(const CORBA_char * *) _o_args[1],
1984 + *(const CORBA_char * *) _o_args[2], _o_ev);
1988 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData
1989 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
1990 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
1991 + CORBA_boolean(*_impl_searchByData) (PortableServer_Servant _servant,
1992 + const CORBA_long level,
1993 + const CORBA_char * klass,
1994 + const CORBA_char * key,
1995 + const CORBA_char * value,
1996 + CORBA_Environment * ev))
1998 + *(CORBA_boolean *) _o_retval =
1999 + _impl_searchByData(_o_servant, *(const CORBA_long *) _o_args[0],
2000 + *(const CORBA_char * *) _o_args[1],
2001 + *(const CORBA_char * *) _o_args[2],
2002 + *(const CORBA_char * *) _o_args[3], _o_ev);
2006 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty
2007 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2008 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2009 + CORBA_boolean(*_impl_isParagraphEmpty) (PortableServer_Servant _servant,
2010 + CORBA_Environment * ev))
2012 + *(CORBA_boolean *) _o_retval = _impl_isParagraphEmpty(_o_servant, _o_ev);
2016 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty
2017 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2018 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2019 + CORBA_boolean(*_impl_isPreviousParagraphEmpty) (PortableServer_Servant
2021 + CORBA_Environment * ev))
2023 + *(CORBA_boolean *) _o_retval =
2024 + _impl_isPreviousParagraphEmpty(_o_servant, _o_ev);
2028 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML
2029 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2030 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2031 + void (*_impl_insertHTML) (PortableServer_Servant _servant,
2032 + const CORBA_char * html,
2033 + CORBA_Environment * ev))
2035 + _impl_insertHTML(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev);
2039 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze
2040 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2041 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2042 + void (*_impl_freeze) (PortableServer_Servant _servant,
2043 + CORBA_Environment * ev))
2045 + _impl_freeze(_o_servant, _o_ev);
2049 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw
2050 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2051 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2052 + void (*_impl_thaw) (PortableServer_Servant _servant,
2053 + CORBA_Environment * ev))
2055 + _impl_thaw(_o_servant, _o_ev);
2059 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin
2060 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2061 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2062 + void (*_impl_undoBegin) (PortableServer_Servant _servant,
2063 + const CORBA_char * undo_name,
2064 + const CORBA_char * redo_name,
2065 + CORBA_Environment * ev))
2067 + _impl_undoBegin(_o_servant, *(const CORBA_char * *) _o_args[0],
2068 + *(const CORBA_char * *) _o_args[1], _o_ev);
2072 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd
2073 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2074 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2075 + void (*_impl_undoEnd) (PortableServer_Servant _servant,
2076 + CORBA_Environment * ev))
2078 + _impl_undoEnd(_o_servant, _o_ev);
2082 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord
2083 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2084 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2085 + void (*_impl_ignoreWord) (PortableServer_Servant _servant,
2086 + const CORBA_char * word,
2087 + CORBA_Environment * ev))
2089 + _impl_ignoreWord(_o_servant, *(const CORBA_char * *) _o_args[0], _o_ev);
2093 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo
2094 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2095 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2096 + void (*_impl_dropUndo) (PortableServer_Servant _servant,
2097 + CORBA_Environment * ev))
2099 + _impl_dropUndo(_o_servant, _o_ev);
2103 +_ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo
2104 + (POA_GNOME_GtkHTML_Editor_Engine * _o_servant, gpointer _o_retval,
2105 + gpointer * _o_args, CORBA_Context _o_ctx, CORBA_Environment * _o_ev,
2106 + CORBA_boolean(*_impl_hasUndo) (PortableServer_Servant _servant,
2107 + CORBA_Environment * ev))
2109 + *(CORBA_boolean *) _o_retval = _impl_hasUndo(_o_servant, _o_ev);
2111 +static ORBitSmallSkeleton
2112 +get_skel_small_GNOME_GtkHTML_Editor_Listener(POA_GNOME_GtkHTML_Editor_Listener
2113 + * servant, const char *opname,
2114 + gpointer * m_data,
2117 + switch (opname[0]) {
2119 + if (strcmp((opname + 1), "vent"))
2122 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Listener_epv->event;
2124 + (gpointer) & GNOME_GtkHTML_Editor_Listener__iinterface.methods.
2126 + return (ORBitSmallSkeleton)
2127 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Listener_event;
2130 + if (strcmp((opname + 1), "ueryInterface"))
2132 + *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->queryInterface;
2133 + *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[2];
2134 + return (ORBitSmallSkeleton)
2135 + _ORBIT_skel_small_Bonobo_Unknown_queryInterface;
2138 + if (strcmp((opname + 1), "ef"))
2140 + *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->ref;
2141 + *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[0];
2142 + return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_ref;
2145 + if (strcmp((opname + 1), "nref"))
2147 + *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->unref;
2148 + *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[1];
2149 + return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_unref;
2158 +POA_GNOME_GtkHTML_Editor_Listener__init(PortableServer_Servant servant,
2159 + CORBA_Environment * env)
2161 + static PortableServer_ClassInfo class_info =
2163 +(ORBit_small_impl_finder) & get_skel_small_GNOME_GtkHTML_Editor_Listener,
2164 + "IDL:GNOME/GtkHTML/Editor/Listener:1.0",
2165 + &GNOME_GtkHTML_Editor_Listener__classid, NULL,
2166 + &GNOME_GtkHTML_Editor_Listener__iinterface };
2167 + POA_GNOME_GtkHTML_Editor_Listener__vepv *fakevepv = NULL;
2169 + if (((PortableServer_ServantBase *) servant)->vepv[0]->finalize == 0) {
2170 + ((PortableServer_ServantBase *) servant)->vepv[0]->finalize =
2171 + POA_GNOME_GtkHTML_Editor_Listener__fini;
2173 + PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant),
2175 + POA_Bonobo_Unknown__init(servant, env);
2176 + ORBit_classinfo_register(&class_info);
2177 + ORBIT_SERVANT_SET_CLASSINFO(servant, &class_info);
2179 + if (!class_info.vepvmap) {
2180 + class_info.vepvmap =
2181 + g_new0(ORBit_VepvIdx, GNOME_GtkHTML_Editor_Listener__classid + 1);
2182 + class_info.vepvmap[Bonobo_Unknown__classid] =
2183 + (((char *) &(fakevepv->Bonobo_Unknown_epv)) -
2184 + ((char *) (fakevepv))) / sizeof(GFunc);
2185 + class_info.vepvmap[GNOME_GtkHTML_Editor_Listener__classid] =
2186 + (((char *) &(fakevepv->GNOME_GtkHTML_Editor_Listener_epv)) -
2187 + ((char *) (fakevepv))) / sizeof(GFunc);
2192 +POA_GNOME_GtkHTML_Editor_Listener__fini(PortableServer_Servant servant,
2193 + CORBA_Environment * env)
2195 + POA_Bonobo_Unknown__fini(servant, env);
2196 + PortableServer_ServantBase__fini(servant, env);
2199 +static ORBitSmallSkeleton
2200 +get_skel_small_GNOME_GtkHTML_Editor_Engine(POA_GNOME_GtkHTML_Editor_Engine *
2201 + servant, const char *opname,
2202 + gpointer * m_data, gpointer * impl)
2204 + switch (opname[0]) {
2206 + switch (opname[1]) {
2208 + if (strcmp((opname + 2), "et_listener"))
2211 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2214 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2216 + return (ORBitSmallSkeleton)
2217 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__get_listener;
2220 + if (strcmp((opname + 2), "et_listener"))
2223 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2226 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2228 + return (ORBitSmallSkeleton)
2229 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine__set_listener;
2236 + if (strcmp((opname + 1), "ropUndo"))
2239 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->dropUndo;
2241 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2243 + return (ORBitSmallSkeleton)
2244 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_dropUndo;
2247 + if (strcmp((opname + 1), "reeze"))
2250 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->freeze;
2252 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2254 + return (ORBitSmallSkeleton)
2255 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_freeze;
2258 + if (strcmp((opname + 1), "etParagraphData"))
2261 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2264 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2266 + return (ORBitSmallSkeleton)
2267 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_getParagraphData;
2270 + if (strcmp((opname + 1), "asUndo"))
2273 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->hasUndo;
2275 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2277 + return (ORBitSmallSkeleton)
2278 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_hasUndo;
2281 + switch (opname[1]) {
2283 + if (strcmp((opname + 2), "noreWord"))
2286 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2289 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2291 + return (ORBitSmallSkeleton)
2292 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_ignoreWord;
2295 + if (strcmp((opname + 2), "sertHTML"))
2298 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2301 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2303 + return (ORBitSmallSkeleton)
2304 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_insertHTML;
2307 + switch (opname[2]) {
2309 + switch (opname[3]) {
2311 + if (strcmp((opname + 4), "ragraphEmpty"))
2314 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2317 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.
2318 + methods._buffer[7];
2319 + return (ORBitSmallSkeleton)
2320 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isParagraphEmpty;
2323 + if (strcmp((opname + 4), "eviousParagraphEmpty"))
2326 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2327 + isPreviousParagraphEmpty;
2329 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.
2330 + methods._buffer[8];
2331 + return (ORBitSmallSkeleton)
2332 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty;
2347 + if (strcmp((opname + 1), "ueryInterface"))
2349 + *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->queryInterface;
2350 + *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[2];
2351 + return (ORBitSmallSkeleton)
2352 + _ORBIT_skel_small_Bonobo_Unknown_queryInterface;
2355 + switch (opname[1]) {
2357 + if (strcmp((opname + 2), "f"))
2359 + *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->ref;
2360 + *m_data = (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[0];
2361 + return (ORBitSmallSkeleton) _ORBIT_skel_small_Bonobo_Unknown_ref;
2364 + if (strcmp((opname + 2), "nCommand"))
2367 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2370 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2372 + return (ORBitSmallSkeleton)
2373 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_runCommand;
2380 + switch (opname[1]) {
2382 + switch (opname[2]) {
2384 + if (strcmp((opname + 3), "rchByData"))
2387 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2390 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2392 + return (ORBitSmallSkeleton)
2393 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_searchByData;
2396 + switch (opname[3]) {
2398 + if (strcmp((opname + 4), "bjectDataByType"))
2401 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2402 + setObjectDataByType;
2404 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.
2405 + methods._buffer[5];
2406 + return (ORBitSmallSkeleton)
2407 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setObjectDataByType;
2410 + if (strcmp((opname + 4), "aragraphData"))
2413 + (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->
2416 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.
2417 + methods._buffer[4];
2418 + return (ORBitSmallSkeleton)
2419 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_setParagraphData;
2434 + if (strcmp((opname + 1), "haw"))
2436 + *impl = (gpointer) servant->vepv->GNOME_GtkHTML_Editor_Engine_epv->thaw;
2438 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.methods.
2440 + return (ORBitSmallSkeleton)
2441 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_thaw;
2444 + switch (opname[1]) {
2446 + switch (opname[2]) {
2448 + switch (opname[3]) {
2450 + switch (opname[4]) {
2452 + if (strcmp((opname + 5), "egin"))
2455 + (gpointer) servant->vepv->
2456 + GNOME_GtkHTML_Editor_Engine_epv->undoBegin;
2458 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.
2459 + methods._buffer[12];
2460 + return (ORBitSmallSkeleton)
2461 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoBegin;
2464 + if (strcmp((opname + 5), "nd"))
2467 + (gpointer) servant->vepv->
2468 + GNOME_GtkHTML_Editor_Engine_epv->undoEnd;
2470 + (gpointer) & GNOME_GtkHTML_Editor_Engine__iinterface.
2471 + methods._buffer[13];
2472 + return (ORBitSmallSkeleton)
2473 + _ORBIT_skel_small_GNOME_GtkHTML_Editor_Engine_undoEnd;
2484 + if (strcmp((opname + 3), "ef"))
2486 + *impl = (gpointer) servant->vepv->Bonobo_Unknown_epv->unref;
2488 + (gpointer) & Bonobo_Unknown__iinterface.methods._buffer[1];
2489 + return (ORBitSmallSkeleton)
2490 + _ORBIT_skel_small_Bonobo_Unknown_unref;
2507 +POA_GNOME_GtkHTML_Editor_Engine__init(PortableServer_Servant servant,
2508 + CORBA_Environment * env)
2510 + static PortableServer_ClassInfo class_info =
2512 +(ORBit_small_impl_finder) & get_skel_small_GNOME_GtkHTML_Editor_Engine, "IDL:GNOME/GtkHTML/Editor/Engine:1.0",
2513 + &GNOME_GtkHTML_Editor_Engine__classid, NULL,
2514 + &GNOME_GtkHTML_Editor_Engine__iinterface };
2515 + POA_GNOME_GtkHTML_Editor_Engine__vepv *fakevepv = NULL;
2517 + if (((PortableServer_ServantBase *) servant)->vepv[0]->finalize == 0) {
2518 + ((PortableServer_ServantBase *) servant)->vepv[0]->finalize =
2519 + POA_GNOME_GtkHTML_Editor_Engine__fini;
2521 + PortableServer_ServantBase__init(((PortableServer_ServantBase *) servant),
2523 + POA_Bonobo_Unknown__init(servant, env);
2524 + ORBit_classinfo_register(&class_info);
2525 + ORBIT_SERVANT_SET_CLASSINFO(servant, &class_info);
2527 + if (!class_info.vepvmap) {
2528 + class_info.vepvmap =
2529 + g_new0(ORBit_VepvIdx, GNOME_GtkHTML_Editor_Engine__classid + 1);
2530 + class_info.vepvmap[Bonobo_Unknown__classid] =
2531 + (((char *) &(fakevepv->Bonobo_Unknown_epv)) -
2532 + ((char *) (fakevepv))) / sizeof(GFunc);
2533 + class_info.vepvmap[GNOME_GtkHTML_Editor_Engine__classid] =
2534 + (((char *) &(fakevepv->GNOME_GtkHTML_Editor_Engine_epv)) -
2535 + ((char *) (fakevepv))) / sizeof(GFunc);
2540 +POA_GNOME_GtkHTML_Editor_Engine__fini(PortableServer_Servant servant,
2541 + CORBA_Environment * env)
2543 + POA_Bonobo_Unknown__fini(servant, env);
2544 + PortableServer_ServantBase__fini(servant, env);
2546 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gtkhtml_editor_stubs.c vim/src/gtkhtml_editor_stubs.c
2547 --- vimcopy/src/gtkhtml_editor_stubs.c Wed Dec 31 18:00:00 1969
2548 +++ vim/src/gtkhtml_editor_stubs.c Sat Jul 26 13:16:47 2003
2551 + * This file was generated by orbit-idl-2 - DO NOT EDIT!
2554 +#include <string.h>
2555 +#define ORBIT2_STUBS_API
2556 +#include "gtkhtml.h"
2559 +GNOME_GtkHTML_Editor_Listener_event(GNOME_GtkHTML_Editor_Listener _obj,
2560 + const CORBA_char * name,
2561 + const CORBA_any * arg,
2562 + CORBA_Environment * ev)
2564 + CORBA_any *_ORBIT_retval;
2565 + POA_GNOME_GtkHTML_Editor_Listener__epv *_ORBIT_epv;
2567 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2568 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Listener__classid) &&
2570 + (POA_GNOME_GtkHTML_Editor_Listener__epv *) ORBIT_STUB_GetEpv(_obj,
2571 + GNOME_GtkHTML_Editor_Listener__classid))->
2573 + ORBIT_STUB_PreCall(_obj);
2575 + _ORBIT_epv->event(ORBIT_STUB_GetServant(_obj), name, arg, ev);
2576 + ORBIT_STUB_PostCall(_obj);
2577 + } else { /* remote marshal */
2578 + gpointer _args[2];
2580 + _args[0] = (gpointer) & name;
2581 + _args[1] = (gpointer) arg;
2582 + ORBit_small_invoke_stub_n(_obj,
2583 + &GNOME_GtkHTML_Editor_Listener__iinterface.
2584 + methods, 0, &_ORBIT_retval, _args, NULL, ev);
2587 + return _ORBIT_retval;
2590 +GNOME_GtkHTML_Editor_Listener
2591 +GNOME_GtkHTML_Editor_Engine__get_listener(GNOME_GtkHTML_Editor_Engine _obj,
2592 + CORBA_Environment * ev)
2594 + GNOME_GtkHTML_Editor_Listener _ORBIT_retval;
2595 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2597 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2598 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2600 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2601 + GNOME_GtkHTML_Editor_Engine__classid))->
2603 + ORBIT_STUB_PreCall(_obj);
2605 + _ORBIT_epv->_get_listener(ORBIT_STUB_GetServant(_obj), ev);
2606 + ORBIT_STUB_PostCall(_obj);
2607 + } else { /* remote marshal */
2608 + ORBit_small_invoke_stub_n(_obj,
2609 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2610 + methods, 0, &_ORBIT_retval, NULL, NULL, ev);
2613 + return _ORBIT_retval;
2617 +GNOME_GtkHTML_Editor_Engine__set_listener(GNOME_GtkHTML_Editor_Engine _obj,
2618 + const GNOME_GtkHTML_Editor_Listener
2619 + value, CORBA_Environment * ev)
2621 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2623 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2624 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2626 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2627 + GNOME_GtkHTML_Editor_Engine__classid))->
2629 + ORBIT_STUB_PreCall(_obj);
2630 + _ORBIT_epv->_set_listener(ORBIT_STUB_GetServant(_obj), value, ev);
2631 + ORBIT_STUB_PostCall(_obj);
2632 + } else { /* remote marshal */
2633 + gpointer _args[1];
2635 + _args[0] = (gpointer) & value;
2636 + ORBit_small_invoke_stub_n(_obj,
2637 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2638 + methods, 1, NULL, _args, NULL, ev);
2643 +GNOME_GtkHTML_Editor_Engine_runCommand(GNOME_GtkHTML_Editor_Engine _obj,
2644 + const CORBA_char * command,
2645 + CORBA_Environment * ev)
2647 + CORBA_boolean _ORBIT_retval;
2648 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2650 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2651 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2653 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2654 + GNOME_GtkHTML_Editor_Engine__classid))->
2656 + ORBIT_STUB_PreCall(_obj);
2658 + _ORBIT_epv->runCommand(ORBIT_STUB_GetServant(_obj), command, ev);
2659 + ORBIT_STUB_PostCall(_obj);
2660 + } else { /* remote marshal */
2661 + gpointer _args[1];
2663 + _args[0] = (gpointer) & command;
2664 + ORBit_small_invoke_stub_n(_obj,
2665 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2666 + methods, 2, &_ORBIT_retval, _args, NULL, ev);
2669 + return _ORBIT_retval;
2673 +GNOME_GtkHTML_Editor_Engine_getParagraphData(GNOME_GtkHTML_Editor_Engine _obj,
2674 + const CORBA_char * key,
2675 + CORBA_Environment * ev)
2677 + CORBA_string _ORBIT_retval;
2678 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2680 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2681 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2683 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2684 + GNOME_GtkHTML_Editor_Engine__classid))->
2685 + getParagraphData) {
2686 + ORBIT_STUB_PreCall(_obj);
2688 + _ORBIT_epv->getParagraphData(ORBIT_STUB_GetServant(_obj), key, ev);
2689 + ORBIT_STUB_PostCall(_obj);
2690 + } else { /* remote marshal */
2691 + gpointer _args[1];
2693 + _args[0] = (gpointer) & key;
2694 + ORBit_small_invoke_stub_n(_obj,
2695 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2696 + methods, 3, &_ORBIT_retval, _args, NULL, ev);
2699 + return _ORBIT_retval;
2703 +GNOME_GtkHTML_Editor_Engine_setParagraphData(GNOME_GtkHTML_Editor_Engine _obj,
2704 + const CORBA_char * key,
2705 + const CORBA_char * value,
2706 + CORBA_Environment * ev)
2708 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2710 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2711 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2713 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2714 + GNOME_GtkHTML_Editor_Engine__classid))->
2715 + setParagraphData) {
2716 + ORBIT_STUB_PreCall(_obj);
2717 + _ORBIT_epv->setParagraphData(ORBIT_STUB_GetServant(_obj), key, value,
2719 + ORBIT_STUB_PostCall(_obj);
2720 + } else { /* remote marshal */
2721 + gpointer _args[2];
2723 + _args[0] = (gpointer) & key;
2724 + _args[1] = (gpointer) & value;
2725 + ORBit_small_invoke_stub_n(_obj,
2726 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2727 + methods, 4, NULL, _args, NULL, ev);
2732 +GNOME_GtkHTML_Editor_Engine_setObjectDataByType(GNOME_GtkHTML_Editor_Engine
2734 + const CORBA_char * type_name,
2735 + const CORBA_char * key,
2736 + const CORBA_char * data,
2737 + CORBA_Environment * ev)
2739 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2741 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2742 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2744 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2745 + GNOME_GtkHTML_Editor_Engine__classid))->
2746 + setObjectDataByType) {
2747 + ORBIT_STUB_PreCall(_obj);
2748 + _ORBIT_epv->setObjectDataByType(ORBIT_STUB_GetServant(_obj), type_name,
2750 + ORBIT_STUB_PostCall(_obj);
2751 + } else { /* remote marshal */
2752 + gpointer _args[3];
2754 + _args[0] = (gpointer) & type_name;
2755 + _args[1] = (gpointer) & key;
2756 + _args[2] = (gpointer) & data;
2757 + ORBit_small_invoke_stub_n(_obj,
2758 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2759 + methods, 5, NULL, _args, NULL, ev);
2764 +GNOME_GtkHTML_Editor_Engine_searchByData(GNOME_GtkHTML_Editor_Engine _obj,
2765 + const CORBA_long level,
2766 + const CORBA_char * klass,
2767 + const CORBA_char * key,
2768 + const CORBA_char * value,
2769 + CORBA_Environment * ev)
2771 + CORBA_boolean _ORBIT_retval;
2772 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2774 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2775 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2777 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2778 + GNOME_GtkHTML_Editor_Engine__classid))->
2780 + ORBIT_STUB_PreCall(_obj);
2782 + _ORBIT_epv->searchByData(ORBIT_STUB_GetServant(_obj), level, klass,
2784 + ORBIT_STUB_PostCall(_obj);
2785 + } else { /* remote marshal */
2786 + gpointer _args[4];
2788 + _args[0] = (gpointer) & level;
2789 + _args[1] = (gpointer) & klass;
2790 + _args[2] = (gpointer) & key;
2791 + _args[3] = (gpointer) & value;
2792 + ORBit_small_invoke_stub_n(_obj,
2793 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2794 + methods, 6, &_ORBIT_retval, _args, NULL, ev);
2797 + return _ORBIT_retval;
2801 +GNOME_GtkHTML_Editor_Engine_isParagraphEmpty(GNOME_GtkHTML_Editor_Engine _obj,
2802 + CORBA_Environment * ev)
2804 + CORBA_boolean _ORBIT_retval;
2805 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2807 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2808 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2810 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2811 + GNOME_GtkHTML_Editor_Engine__classid))->
2812 + isParagraphEmpty) {
2813 + ORBIT_STUB_PreCall(_obj);
2815 + _ORBIT_epv->isParagraphEmpty(ORBIT_STUB_GetServant(_obj), ev);
2816 + ORBIT_STUB_PostCall(_obj);
2817 + } else { /* remote marshal */
2818 + ORBit_small_invoke_stub_n(_obj,
2819 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2820 + methods, 7, &_ORBIT_retval, NULL, NULL, ev);
2823 + return _ORBIT_retval;
2827 +GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty
2828 + (GNOME_GtkHTML_Editor_Engine _obj, CORBA_Environment * ev)
2830 + CORBA_boolean _ORBIT_retval;
2831 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2833 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2834 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2836 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2837 + GNOME_GtkHTML_Editor_Engine__classid))->
2838 + isPreviousParagraphEmpty) {
2839 + ORBIT_STUB_PreCall(_obj);
2841 + _ORBIT_epv->isPreviousParagraphEmpty(ORBIT_STUB_GetServant(_obj),
2843 + ORBIT_STUB_PostCall(_obj);
2844 + } else { /* remote marshal */
2845 + ORBit_small_invoke_stub_n(_obj,
2846 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2847 + methods, 8, &_ORBIT_retval, NULL, NULL, ev);
2850 + return _ORBIT_retval;
2854 +GNOME_GtkHTML_Editor_Engine_insertHTML(GNOME_GtkHTML_Editor_Engine _obj,
2855 + const CORBA_char * html,
2856 + CORBA_Environment * ev)
2858 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2860 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2861 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2863 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2864 + GNOME_GtkHTML_Editor_Engine__classid))->
2866 + ORBIT_STUB_PreCall(_obj);
2867 + _ORBIT_epv->insertHTML(ORBIT_STUB_GetServant(_obj), html, ev);
2868 + ORBIT_STUB_PostCall(_obj);
2869 + } else { /* remote marshal */
2870 + gpointer _args[1];
2872 + _args[0] = (gpointer) & html;
2873 + ORBit_small_invoke_stub_n(_obj,
2874 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2875 + methods, 9, NULL, _args, NULL, ev);
2880 +GNOME_GtkHTML_Editor_Engine_freeze(GNOME_GtkHTML_Editor_Engine _obj,
2881 + CORBA_Environment * ev)
2883 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2885 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2886 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2888 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2889 + GNOME_GtkHTML_Editor_Engine__classid))->
2891 + ORBIT_STUB_PreCall(_obj);
2892 + _ORBIT_epv->freeze(ORBIT_STUB_GetServant(_obj), ev);
2893 + ORBIT_STUB_PostCall(_obj);
2894 + } else { /* remote marshal */
2895 + ORBit_small_invoke_stub_n(_obj,
2896 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2897 + methods, 10, NULL, NULL, NULL, ev);
2902 +GNOME_GtkHTML_Editor_Engine_thaw(GNOME_GtkHTML_Editor_Engine _obj,
2903 + CORBA_Environment * ev)
2905 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2907 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2908 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2910 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2911 + GNOME_GtkHTML_Editor_Engine__classid))->
2913 + ORBIT_STUB_PreCall(_obj);
2914 + _ORBIT_epv->thaw(ORBIT_STUB_GetServant(_obj), ev);
2915 + ORBIT_STUB_PostCall(_obj);
2916 + } else { /* remote marshal */
2917 + ORBit_small_invoke_stub_n(_obj,
2918 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2919 + methods, 11, NULL, NULL, NULL, ev);
2924 +GNOME_GtkHTML_Editor_Engine_undoBegin(GNOME_GtkHTML_Editor_Engine _obj,
2925 + const CORBA_char * undo_name,
2926 + const CORBA_char * redo_name,
2927 + CORBA_Environment * ev)
2929 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2931 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2932 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2934 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2935 + GNOME_GtkHTML_Editor_Engine__classid))->
2937 + ORBIT_STUB_PreCall(_obj);
2938 + _ORBIT_epv->undoBegin(ORBIT_STUB_GetServant(_obj), undo_name, redo_name,
2940 + ORBIT_STUB_PostCall(_obj);
2941 + } else { /* remote marshal */
2942 + gpointer _args[2];
2944 + _args[0] = (gpointer) & undo_name;
2945 + _args[1] = (gpointer) & redo_name;
2946 + ORBit_small_invoke_stub_n(_obj,
2947 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2948 + methods, 12, NULL, _args, NULL, ev);
2953 +GNOME_GtkHTML_Editor_Engine_undoEnd(GNOME_GtkHTML_Editor_Engine _obj,
2954 + CORBA_Environment * ev)
2956 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2958 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2959 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2961 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2962 + GNOME_GtkHTML_Editor_Engine__classid))->
2964 + ORBIT_STUB_PreCall(_obj);
2965 + _ORBIT_epv->undoEnd(ORBIT_STUB_GetServant(_obj), ev);
2966 + ORBIT_STUB_PostCall(_obj);
2967 + } else { /* remote marshal */
2968 + ORBit_small_invoke_stub_n(_obj,
2969 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2970 + methods, 13, NULL, NULL, NULL, ev);
2975 +GNOME_GtkHTML_Editor_Engine_ignoreWord(GNOME_GtkHTML_Editor_Engine _obj,
2976 + const CORBA_char * word,
2977 + CORBA_Environment * ev)
2979 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
2981 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
2982 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
2984 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
2985 + GNOME_GtkHTML_Editor_Engine__classid))->
2987 + ORBIT_STUB_PreCall(_obj);
2988 + _ORBIT_epv->ignoreWord(ORBIT_STUB_GetServant(_obj), word, ev);
2989 + ORBIT_STUB_PostCall(_obj);
2990 + } else { /* remote marshal */
2991 + gpointer _args[1];
2993 + _args[0] = (gpointer) & word;
2994 + ORBit_small_invoke_stub_n(_obj,
2995 + &GNOME_GtkHTML_Editor_Engine__iinterface.
2996 + methods, 14, NULL, _args, NULL, ev);
3001 +GNOME_GtkHTML_Editor_Engine_dropUndo(GNOME_GtkHTML_Editor_Engine _obj,
3002 + CORBA_Environment * ev)
3004 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
3006 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
3007 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
3009 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
3010 + GNOME_GtkHTML_Editor_Engine__classid))->
3012 + ORBIT_STUB_PreCall(_obj);
3013 + _ORBIT_epv->dropUndo(ORBIT_STUB_GetServant(_obj), ev);
3014 + ORBIT_STUB_PostCall(_obj);
3015 + } else { /* remote marshal */
3016 + ORBit_small_invoke_stub_n(_obj,
3017 + &GNOME_GtkHTML_Editor_Engine__iinterface.
3018 + methods, 15, NULL, NULL, NULL, ev);
3023 +GNOME_GtkHTML_Editor_Engine_hasUndo(GNOME_GtkHTML_Editor_Engine _obj,
3024 + CORBA_Environment * ev)
3026 + CORBA_boolean _ORBIT_retval;
3027 + POA_GNOME_GtkHTML_Editor_Engine__epv *_ORBIT_epv;
3029 + if (ORBit_small_flags & ORBIT_SMALL_FAST_LOCALS &&
3030 + ORBIT_STUB_IsBypass(_obj, GNOME_GtkHTML_Editor_Engine__classid) &&
3032 + (POA_GNOME_GtkHTML_Editor_Engine__epv *) ORBIT_STUB_GetEpv(_obj,
3033 + GNOME_GtkHTML_Editor_Engine__classid))->
3035 + ORBIT_STUB_PreCall(_obj);
3036 + _ORBIT_retval = _ORBIT_epv->hasUndo(ORBIT_STUB_GetServant(_obj), ev);
3037 + ORBIT_STUB_PostCall(_obj);
3038 + } else { /* remote marshal */
3039 + ORBit_small_invoke_stub_n(_obj,
3040 + &GNOME_GtkHTML_Editor_Engine__iinterface.
3041 + methods, 16, &_ORBIT_retval, NULL, NULL, ev);
3044 + return _ORBIT_retval;
3046 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gui.c vim/src/gui.c
3047 --- vimcopy/src/gui.c Mon May 19 09:43:43 2003
3048 +++ vim/src/gui.c Sat Jul 26 13:16:47 2003
3049 @@ -439,8 +439,12 @@
3050 * Create the GUI shell.
3052 gui.in_use = TRUE; /* Must be set after menus have been set up */
3053 +#ifdef FEAT_GUI_COMPONENT
3054 + vim_bonobo_wait_for_instantiation();
3056 if (gui_mch_init() == FAIL)
3060 /* Avoid a delay for an error message that was printed in the terminal
3061 * where Vim was started. */
3062 @@ -4055,8 +4059,8 @@
3065 /* Need to wake up the main loop */
3066 - if (gtk_main_level() > 0)
3068 + if (MAIN_LEVEL() > 0)
3073 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gui.h vim/src/gui.h
3074 --- vimcopy/src/gui.h Tue May 6 12:02:22 2003
3075 +++ vim/src/gui.h Sat Jul 26 13:16:47 2003
3077 # include <gtk/gtk.h>
3080 +# if defined(FEAT_GUI_GNOME) && defined(FEAT_GUI_COMPONENT)
3081 + #include "libbonoboui.h"
3082 + #include "vim_bonobo_main.h"
3083 + #include "vim_bonobo_factory.h"
3084 + #define MAIN vim_bonobo_main
3085 + #define MAIN_LEVEL vim_bonobo_main_level
3086 + #define MAIN_QUIT vim_bonobo_main_quit
3087 + #define MAIN_ITERATION_DO vim_bonobo_main_iteration_do
3089 + #define MAIN gtk_main
3090 + #define MAIN_LEVEL gtk_main_level
3091 + #define MAIN_QUIT gtk_main_quit
3092 + #define MAIN_ITERATION_DO gtk_main_iteration_do
3095 #ifdef FEAT_GUI_BEOS
3096 # include "gui_beos.h"
3098 @@ -392,6 +407,11 @@
3099 GtkWidget *toolbar; /* toolbar */
3101 # ifdef FEAT_GUI_GNOME
3102 +# ifdef FEAT_GUI_COMPONENT
3105 + BonoboControl *control;
3107 GtkWidget *menubar_h; /* menubar handle */
3108 GtkWidget *toolbar_h; /* toolbar handle */
3110 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gui_gtk.c vim/src/gui_gtk.c
3111 --- vimcopy/src/gui_gtk.c Tue Jun 3 13:26:44 2003
3112 +++ vim/src/gui_gtk.c Sat Jul 26 14:19:38 2003
3117 -#ifdef FEAT_GUI_GNOME
3119 /* Gnome redefines _() and N_(). Grrr... */
3122 @@ -545,9 +545,302 @@
3124 # endif /* !HAVE_GTK2 */
3126 +#ifdef FEAT_GUI_COMPONENT
3130 +verb_activate( BonoboUIComponent *uic, gpointer data, const char *cname )
3132 + gui_menu_cb((vimmenu_T *) data);
3134 + /* make sure the menu action is taken immediately */
3135 + if (MAIN_LEVEL() > 0)
3139 +static void g_string_append_normalized_name( GString * dest, char_u * name )
3143 + if( name == NULL )
3148 + while( *cur != '\0' ) {
3150 + wc = g_utf8_get_char(cur);
3151 + if( g_unichar_isalnum( wc ) ) {
3152 + g_string_append_unichar( dest, wc );
3154 + cur = g_utf8_next_char(cur);
3159 +char * menu_xml_path( vimmenu_T * menu, int only_parent )
3161 + GString * normname;
3165 + normname = g_string_sized_new( 64 );
3166 + path = g_string_sized_new( 128 );
3168 + if( menu_is_toolbar(menu->name) ) {
3169 + /* "Toolbar" is a standard Bonobo UI element, but Vim uses "ToolBar", so we
3170 + * have to check for this. */
3171 + g_string_prepend( path, "/Toolbar");
3173 + g_string_assign( normname, "" );
3174 + g_string_append_normalized_name( normname, menu->dname );
3175 + g_string_prepend( path, normname->str );
3176 + g_string_prepend( path, "/" );
3178 + if( menu->parent == NULL ) {
3179 + if( menu && menu_is_menubar( menu->name ) ) {
3180 + g_string_prepend( path, "/menu" );
3184 + menu = menu->parent;
3186 + g_string_free( normname, TRUE );
3187 + retpath = path->str;
3188 + g_string_free( path, FALSE );
3190 + if( only_parent ) {
3192 + slash = g_strrstr(retpath, "/");
3193 + if( slash == retpath )
3198 + return( retpath );
3202 +gtk_image_to_xml_attrs( GtkImage * image)
3204 + GString * xml = g_string_sized_new(32);
3205 + GtkImageType type = gtk_image_get_storage_type(image);
3209 + if( type == GTK_IMAGE_STOCK ) {
3211 + GtkIconSet * iconset;
3212 + gchar * stockname;
3213 + GdkPixbuf * pixbuf;
3215 + gtk_image_get_stock(image, &stockname, &size);
3216 + pixbuf = gtk_widget_render_icon(gui.drawarea, stockname, size, NULL);
3217 + imagexml = bonobo_ui_util_pixbuf_to_xml(pixbuf);
3218 + g_string_append_printf(xml, " pixtype=\"pixbuf\" pixname=\"%s\"", imagexml);
3219 + g_object_unref(pixbuf);
3221 + } else if( type == GTK_IMAGE_PIXBUF ) {
3222 + imagexml = bonobo_ui_util_pixbuf_to_xml(gtk_image_get_pixbuf(image));
3223 + g_string_append_printf(xml, " pixtype=\"pixbuf\" pixname=\"%s\"", imagexml);
3227 + g_string_free(xml, FALSE);
3232 +void generate_gui_xml_recurse( vimmenu_T * menu, GString * xml, GSList ** commands, int do_siblings)
3234 + GString * normname = g_string_sized_new(16);
3235 + GString * verbname = g_string_sized_new(32);
3238 + BonoboUIComponent *uic;
3241 + uic = bonobo_control_get_ui_component (BONOBO_CONTROL (gui.control));
3245 + use_mnemonic = (p_wak[0] != 'n' );
3246 + label = translate_mnemonic_tag( menu->name, use_mnemonic );
3247 + g_string_assign( normname, "" );
3248 + g_string_append_normalized_name( normname, menu->dname );
3249 + if( menu->children ) {
3250 + if( menu_is_toolbar( menu->name )) {
3251 + g_string_append( xml, "<dockitem name=\"Toolbar\" look=\"icon\" tips=\"1\">");
3252 + generate_gui_xml_recurse( menu->children, xml, commands, TRUE );
3253 + g_string_append( xml, "</dockitem>");
3255 + g_string_append_printf( xml, "<submenu name=\"%s\" label=\"%s\">\n", normname->str, label);
3257 + generate_gui_xml_recurse( menu->children, xml, commands, TRUE );
3258 + g_string_append( xml, "</submenu>\n");
3260 + } else if( menu_is_separator(menu->name)) {
3261 + g_string_append( xml, "<separator />\n" );
3262 + } else if( menu->parent && menu_is_toolbar(menu->parent->name)) {
3263 + char * menupath = menu_xml_path(menu, FALSE);
3264 + GtkImage *image = NULL;
3268 + g_string_assign(verbname, "");
3269 + g_string_append_normalized_name(verbname, menupath);
3270 + vim_free(menupath);
3271 + image = GTK_IMAGE(create_menu_icon(menu, GTK_ICON_SIZE_SMALL_TOOLBAR));
3272 + imagexml = gtk_image_to_xml_attrs(image);
3273 + tooltip = CONVERT_TO_UTF8(menu->strings[MENU_INDEX_TIP]);
3274 + g_string_append_printf( xml, "<toolitem name=\"%s\" label=\"%s\" verb=\"%s\" tip=\"%s\" %s />\n", normname->str, label, verbname->str, tooltip, imagexml);
3275 + gtk_object_sink(GTK_OBJECT(image));
3277 + CONVERT_TO_UTF8_FREE(tooltip);
3279 + command = g_strdup_printf( "<cmd name=\"%s\" sensitive=\"%c\" />\n", verbname->str, menu->sensitive ? '1' : '0');
3280 + *commands = g_slist_prepend( *commands, command );
3281 + bonobo_ui_component_add_verb(uic, verbname->str, verb_activate, menu);
3282 + } else if( menu_is_menubar(menu->name)) {
3283 + char * menupath = menu_xml_path(menu, FALSE);
3285 + g_string_assign(verbname, "");
3286 + g_string_append_normalized_name(verbname, menupath);
3287 + vim_free(menupath);
3289 + g_string_append_printf( xml, "<menuitem name=\"%s\" label=\"%s\" verb=\"%s\" />\n", normname->str, label, verbname->str);
3291 + command = g_strdup_printf( "<cmd name=\"%s\" sensitive=\"%c\" />\n", verbname->str, menu->sensitive ? '1' : '0');
3292 + *commands = g_slist_prepend( *commands, command );
3293 + bonobo_ui_component_add_verb(uic, verbname->str, verb_activate, menu);
3296 + vim_free( label );
3298 + if( do_siblings ) {
3299 + menu = menu->next;
3304 + g_string_free( normname, TRUE );
3308 +void set_gui_xml(vimmenu_T * menu)
3310 + GSList * commands = NULL;
3312 + BonoboUIComponent *uic;
3313 + GString * xml = g_string_sized_new(1024);
3315 + uic = bonobo_control_get_ui_component (BONOBO_CONTROL (gui.control));
3317 + if( bonobo_ui_component_get_container(uic) == CORBA_OBJECT_NIL ) {
3322 + if( menu->dirty ) {
3323 + if (menu_is_popup(menu->name)) {
3325 + } else if( menu_is_menubar(menu->name)) {
3326 + char * menupath = menu_xml_path(menu, TRUE);
3327 + path_exists = bonobo_ui_component_path_exists(uic, menupath, NULL);
3328 + g_string_assign(xml, "");
3329 + generate_gui_xml_recurse (menu, xml, &commands, FALSE);
3330 + /*fprintf(stdout, "set %s\n", menupath);*/
3331 + /*fprintf(stdout, "set %s\n%s", menupath, xml->str);*/
3332 + /*fflush(stdout);*/
3333 + bonobo_ui_component_set(uic, menupath, xml->str, NULL);
3335 + } else if( menu_is_toolbar(menu->name)) {
3336 + char * menupath = menu_xml_path(menu, TRUE);
3337 + path_exists = bonobo_ui_component_path_exists(uic, menupath, NULL);
3338 + g_string_assign(xml, "");
3339 + generate_gui_xml_recurse (menu, xml, &commands, FALSE);
3340 + /*fprintf(stdout, "set %s\n", menupath);*/
3341 + /*fprintf(stdout, "set %s\n%s", menupath, xml->str);*/
3342 + /*fflush(stdout);*/
3343 + bonobo_ui_component_set(uic, menupath, xml->str, NULL);
3346 + menu->dirty = FALSE;
3348 + menu = menu->next;
3350 + /* the commands are inserted separately into a list, and set one by one,
3351 + * otherwise it's not possible to update a subtree of the UI
3353 + command = commands;
3354 + while( command ) {
3355 + /*fprintf(stdout, "set %s\n%s", "/commands", command->data);
3357 + bonobo_ui_component_set(uic, "/commands", command->data, NULL);
3358 + g_free(command->data);
3359 + command = command->next;
3361 + g_slist_free( commands );
3364 +static gboolean update_gui_idle_installed = FALSE;
3367 +update_gui_idle(gpointer data)
3369 + BonoboUIComponent *uic;
3371 + uic = bonobo_control_get_ui_component (BONOBO_CONTROL (gui.control));
3372 + if( bonobo_ui_component_get_container(uic) == CORBA_OBJECT_NIL ) {
3373 + /* we aren't in a container yet; try again later... */
3374 + g_timeout_add(100, &update_gui_idle, NULL);
3377 + bonobo_ui_component_freeze(uic, NULL);
3378 + set_gui_xml( (vimmenu_T *)root_menu );
3379 + update_gui_idle_installed = FALSE;
3380 + bonobo_ui_component_thaw(uic, NULL);
3381 + return FALSE; /* don't call me again */
3385 +update_menu_later(vimmenu_T *menu)
3387 + if (!update_gui_idle_installed)
3389 + update_gui_idle_installed = TRUE;
3390 + g_idle_add_full(GDK_PRIORITY_EVENTS + 10,
3391 + &update_gui_idle, NULL, NULL);
3393 + while( menu->parent )
3394 + menu = menu->parent;
3395 + menu->dirty = TRUE;
3398 +void update_ui_later()
3400 + vimmenu_T *menu = root_menu;
3402 + if (!update_gui_idle_installed)
3404 + update_gui_idle_installed = TRUE;
3405 + g_idle_add_full(GDK_PRIORITY_EVENTS + 10,
3406 + &update_gui_idle, NULL, NULL);
3409 + menu->dirty = TRUE;
3410 + menu = menu->next;
3416 gui_mch_add_menu(vimmenu_T *menu, int idx)
3418 +#ifdef FEAT_GUI_COMPONENT
3419 + update_menu_later(menu);
3423 GtkWidget *parent_widget;
3426 if (vim_strchr(p_go, GO_TEAROFF) != NULL)
3427 gtk_widget_show(menu->tearoff_handle);
3428 gtk_menu_prepend(GTK_MENU(menu->submenu_id), menu->tearoff_handle);
3436 /* make sure the menu action is taken immediately */
3437 - if (gtk_main_level() > 0)
3439 + if (MAIN_LEVEL() > 0)
3443 # if defined(FEAT_TOOLBAR) && !defined(HAVE_GTK2)
3444 @@ -715,6 +1009,10 @@
3446 gui_mch_add_menu_item(vimmenu_T *menu, int idx)
3448 +#ifdef FEAT_GUI_COMPONENT
3449 + update_menu_later(menu);
3454 parent = menu->parent;
3455 @@ -817,6 +1115,7 @@
3456 gtk_signal_connect(GTK_OBJECT(menu->id), "activate",
3457 GTK_SIGNAL_FUNC(menu_item_activate), menu);
3461 #endif /* FEAT_MENU */
3463 @@ -841,6 +1140,10 @@
3467 +#ifdef FEAT_GUI_COMPONENT
3471 for (menu = root_menu; menu != NULL; menu = menu->next)
3473 if (menu->id == NULL)
3474 @@ -897,6 +1200,9 @@
3476 gui_mch_toggle_tearoffs(int enable)
3478 +#ifdef FEAT_GUI_COMPONENT
3481 recurse_tearoffs(root_menu, enable);
3483 #endif /* FEAT_MENU */
3484 @@ -1001,6 +1307,9 @@
3486 gui_mch_destroy_menu(vimmenu_T *menu)
3488 +#ifdef FEAT_GUI_COMPONENT
3491 # ifdef FEAT_TOOLBAR
3492 if (menu->parent != NULL && menu_is_toolbar(menu->parent->name))
3494 @@ -1115,8 +1424,8 @@
3496 gui_drag_scrollbar(sb, value, dragging);
3498 - if (gtk_main_level() > 0)
3500 + if (MAIN_LEVEL() > 0)
3504 /* SBAR_VERT or SBAR_HORIZ */
3505 @@ -1175,8 +1484,8 @@
3506 vw->browse_fname = (char_u *)g_strdup(gtk_file_selection_get_filename(
3507 GTK_FILE_SELECTION(vw->filedlg)));
3508 gtk_widget_hide(vw->filedlg);
3509 - if (gtk_main_level() > 0)
3511 + if (MAIN_LEVEL() > 0)
3516 @@ -1191,8 +1500,8 @@
3517 vw->browse_fname = NULL;
3519 gtk_widget_hide(vw->filedlg);
3520 - if (gtk_main_level() > 0)
3522 + if (MAIN_LEVEL() > 0)
3527 @@ -1206,8 +1515,8 @@
3531 - if (gtk_main_level() > 0)
3533 + if (MAIN_LEVEL() > 0)
3538 @@ -1290,7 +1599,7 @@
3540 gtk_widget_show(gui.filedlg);
3541 while (gui.filedlg && GTK_WIDGET_DRAWABLE(gui.filedlg))
3542 - gtk_main_iteration_do(TRUE);
3543 + MAIN_ITERATION_DO(TRUE);
3545 if (gui.browse_fname == NULL)
3547 @@ -1510,8 +1819,8 @@
3548 dlg_destroy_cb(int *p)
3550 *p = TRUE; /* set dialog_destroyed to break out of the loop */
3551 - if (gtk_main_level() > 0)
3553 + if (MAIN_LEVEL() > 0)
3558 @@ -1811,7 +2120,7 @@
3559 /* loop here until the dialog goes away */
3560 while (dialog_status == -1 && !dialog_destroyed
3561 && GTK_WIDGET_DRAWABLE(dialog))
3562 - gtk_main_iteration_do(TRUE);
3563 + MAIN_ITERATION_DO(TRUE);
3565 if (dialog_status < 0)
3567 @@ -2795,8 +3104,8 @@
3568 CONVERT_FROM_UTF8_FREE(find_text);
3571 - if (rc && gtk_main_level() > 0)
3572 - gtk_main_quit(); /* make sure cmd will be handled immediately */
3573 + if (rc && MAIN_LEVEL() > 0)
3574 + MAIN_QUIT(); /* make sure cmd will be handled immediately */
3577 /* our usual callback function */
3578 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/gui_gtk_x11.c vim/src/gui_gtk_x11.c
3579 --- vimcopy/src/gui_gtk_x11.c Tue Jun 3 13:19:03 2003
3580 +++ vim/src/gui_gtk_x11.c Sat Jul 26 16:53:24 2003
3582 xev.xproperty.state = PropertyNewValue;
3583 serverEventProc(GDK_WINDOW_XDISPLAY(widget->window), &xev);
3585 - if (gtk_main_level() > 0)
3587 + if (MAIN_LEVEL() > 0)
3592 @@ -756,6 +756,10 @@
3593 if (blink_state == BLINK_NONE)
3594 gui_mch_start_blink();
3596 +#ifdef FEAT_GUI_COMPONENT
3597 + /*gtk_plug_grab_focus(GTK_PLUG(gui.plug));*/
3598 + /*gtk_window_set_focus(GTK_WINDOW(gui.plug), gui.drawarea);*/
3600 /* make sure keyboard input goes there */
3601 if (gtk_socket_id == 0 || !GTK_WIDGET_HAS_FOCUS(gui.drawarea))
3602 gtk_widget_grab_focus(gui.drawarea);
3603 @@ -767,6 +771,11 @@
3605 leave_notify_event(GtkWidget *widget, GdkEventCrossing *event, gpointer data)
3607 +#ifdef FEAT_GUI_COMPONENT
3608 + /*gtk_plug_ungrab_focus(GTK_PLUG(gui.plug));*/
3609 + /*gdk_display_keyboard_ungrab (gtk_widget_get_display (gui.drawarea),
3610 + gtk_get_current_event_time ());*/
3612 if (blink_state != BLINK_NONE)
3613 gui_mch_stop_blink();
3615 @@ -777,8 +786,16 @@
3617 focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
3619 + GdkEventMask mask;
3620 gui_focus_change(TRUE);
3622 +#ifdef FEAT_GUI_COMPONENT
3623 + gtk_widget_grab_focus(gui.drawarea);
3624 + mask = gdk_window_get_events(gui.drawarea->window);
3625 + mask |= GDK_KEY_PRESS | GDK_KEY_RELEASE;
3626 + gdk_window_set_events(gui.drawarea->window, mask);
3629 if (blink_state == BLINK_NONE)
3630 gui_mch_start_blink();
3634 focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer data)
3636 +#ifdef FEAT_GUI_COMPONENT
3637 +/* gtk_plug_ungrab_focus(GTK_PLUG(gui.plug));*/
3639 gui_focus_change(FALSE);
3641 if (blink_state != BLINK_NONE)
3642 @@ -1134,8 +1154,8 @@
3644 gui_mch_mousehide(TRUE);
3646 - if (gtk_main_level() > 0)
3648 + if (MAIN_LEVEL() > 0)
3653 @@ -1170,8 +1190,8 @@
3655 clip_lose_selection(&clip_star);
3657 - if (gtk_main_level() > 0)
3659 + if (MAIN_LEVEL() > 0)
3664 @@ -1211,9 +1231,8 @@
3665 received_selection = RS_FAIL;
3666 /* clip_free_selection(cbd); ??? */
3668 - if (gtk_main_level() > 0)
3671 + if (MAIN_LEVEL() > 0)
3672 + MAIN_QUIT(); /* make sure the above will be handled immediately */
3676 @@ -1294,8 +1313,8 @@
3677 g_free(tmpbuf_utf8);
3680 - if (gtk_main_level() > 0)
3682 + if (MAIN_LEVEL() > 0)
3683 + MAIN_QUIT(); /* make sure the above will be handled immediately */
3687 @@ -1455,6 +1474,15 @@
3692 +#ifdef FEAT_GUI_COMPONENT
3693 + if( !vim_bonobo_init(&gui_argc, gui_argv))
3695 + /* in component mode, we don't care about trying to continue without
3696 + * a gui; if we can't create the factory, we might as well quit. */
3700 /* Don't use gtk_init() or gnome_init(), it exits on failure. */
3701 if (!gtk_init_check(&gui_argc, &gui_argv))
3703 @@ -1462,10 +1490,29 @@
3704 EMSG(_(e_opendisp));
3712 +#if FEAT_GUI_COMPONENT
3714 +control_activate_event(BonoboControl *control, gboolean activated)
3718 + gui_focus_change (TRUE);
3719 + if (blink_state == BLINK_NONE)
3720 + gui_mch_start_blink();
3722 + gui_focus_change (FALSE);
3723 + if (blink_state != BLINK_NONE)
3724 + gui_mch_stop_blink();
3731 /****************************************************************************
3732 * Mouse handling callbacks
3733 @@ -1526,8 +1573,8 @@
3734 /* inform the editor engine about the occurence of this event */
3735 gui_send_mouse_event(button, x, y, FALSE, vim_modifiers);
3737 - if (gtk_main_level() > 0)
3739 + if (MAIN_LEVEL() > 0)
3743 * Auto repeat timer handling.
3744 @@ -1722,8 +1769,8 @@
3745 vim_modifiers |= MOUSE_ALT;
3747 gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers);
3748 - if (gtk_main_level() > 0)
3749 - gtk_main_quit(); /* make sure the above will be handled immediately */
3750 + if (MAIN_LEVEL() > 0)
3751 + MAIN_QUIT(); /* make sure the above will be handled immediately */
3755 @@ -1771,8 +1818,8 @@
3756 gui_send_mouse_event(button, (int)event->x, (int)event->y,
3757 FALSE, vim_modifiers);
3759 - if (gtk_main_level() > 0)
3760 - gtk_main_quit(); /* make sure the above will be handled immediately */
3761 + if (MAIN_LEVEL() > 0)
3762 + MAIN_QUIT(); /* make sure the above will be handled immediately */
3766 @@ -1807,8 +1854,8 @@
3767 vim_modifiers |= MOUSE_ALT;
3769 gui_send_mouse_event(MOUSE_RELEASE, x, y, FALSE, vim_modifiers);
3770 - if (gtk_main_level() > 0)
3771 - gtk_main_quit(); /* make sure it will be handled immediately */
3772 + if (MAIN_LEVEL() > 0)
3773 + MAIN_QUIT(); /* make sure the above will be handled immediately */
3777 @@ -2031,8 +2078,8 @@
3779 add_to_input_buf(dropkey + 3, (int)(sizeof(dropkey) - 3));
3781 - if (gtk_main_level() > 0)
3783 + if (MAIN_LEVEL() > 0)
3784 + MAIN_QUIT(); /* make sure the above will be handled immediately */
3788 @@ -2498,6 +2545,7 @@
3790 mainwin_realize(GtkWidget *widget, gpointer data)
3792 +#ifndef FEAT_GUI_COMPONENT
3793 /* If you get an error message here, you still need to unpack the runtime
3796 @@ -2581,6 +2629,7 @@
3798 #endif /* !HAVE_GTK2 */
3800 +#endif /* FEAT_GUI_COMPONENT */
3802 #if !(defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION))
3803 /* Register a handler for WM_SAVE_YOURSELF with GDK's low-level X I/F */
3804 @@ -2599,7 +2648,7 @@
3806 setup_save_yourself();
3808 -#ifdef FEAT_CLIENTSERVER
3809 +#if defined(FEAT_CLIENTSERVER) &&!defined(FEAT_GUI_COMPONENT)
3810 if (serverName == NULL && serverDelayedStartName != NULL)
3812 /* This is a :gui command in a plain vim with no previous server */
3813 @@ -2647,7 +2696,7 @@
3817 -#ifdef HAVE_GTK_MULTIHEAD
3818 +#if defined(GTK2_MULTIHEAD) && !defined(FEAT_GUI_COMPONENT)
3821 mainwin_screen_changed_cb(GtkWidget *widget,
3822 @@ -2972,7 +3021,11 @@
3823 #ifdef FEAT_GUI_GNOME
3826 - gui.mainwin = gnome_app_new("Vim", NULL);
3827 +# if defined(FEAT_GUI_COMPONENT)
3828 + gui.mainwin = NULL;
3830 + gui.mainwin = gnome_app_new("vim", NULL);
3833 /* Use the GNOME save-yourself functionality now. */
3835 @@ -2983,14 +3036,27 @@
3836 gui.mainwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
3839 +#ifndef FEAT_GUI_COMPONENT
3840 gtk_widget_set_name(gui.mainwin, "vim-main-window");
3842 + vbox = gtk_vbox_new(FALSE, 0);
3846 /* Create the PangoContext used for drawing all text. */
3847 +#ifdef FEAT_GUI_COMPONENT
3848 + gui.text_context = gtk_widget_create_pango_context(GTK_WIDGET(gui.vbox));
3850 gui.text_context = gtk_widget_create_pango_context(gui.mainwin);
3852 pango_context_set_base_dir(gui.text_context, PANGO_DIRECTION_LTR);
3855 +#ifdef FEAT_GUI_COMPONENT
3856 + bonobo_control_construct (BONOBO_CONTROL (gui.control), GTK_WIDGET(gui.vbox));
3857 + gtk_widget_add_events(GTK_WIDGET(gui.drawarea), GDK_VISIBILITY_NOTIFY_MASK);
3858 + gtk_widget_show_all(GTK_WIDGET(gui.vbox));
3861 gtk_window_set_policy(GTK_WINDOW(gui.mainwin), TRUE, TRUE, TRUE);
3863 @@ -3013,8 +3079,6 @@
3864 gui.accel_group = gtk_accel_group_get_default();
3867 - vbox = gtk_vbox_new(FALSE, 0);
3869 #ifdef FEAT_GUI_GNOME
3872 @@ -3030,6 +3094,9 @@
3873 gtk_container_add(GTK_CONTAINER(gui.mainwin), vbox);
3874 gtk_widget_show(vbox);
3878 +#ifndef FEAT_GUI_COMPONENT
3882 @@ -3135,6 +3202,7 @@
3883 gtk_box_pack_start(GTK_BOX(vbox), gui.toolbar, FALSE, FALSE, 0);
3885 #endif /* FEAT_TOOLBAR */
3886 +#endif /* FEAT_GUI_COMPONENT */
3888 gui.formwin = gtk_form_new();
3889 gtk_container_border_width(GTK_CONTAINER(gui.formwin), 0);
3890 @@ -3162,6 +3230,11 @@
3891 gtk_widget_show(gui.formwin);
3892 gtk_box_pack_start(GTK_BOX(vbox), gui.formwin, TRUE, TRUE, 0);
3894 +#ifdef FEAT_GUI_COMPONENT
3895 + GTK_WIDGET_SET_FLAGS (gui.drawarea, GTK_CAN_FOCUS);
3896 + g_signal_connect(G_OBJECT(gui.drawarea), "key_press_event",
3897 + G_CALLBACK(key_press_event), NULL);
3899 /* For GtkSockets, key-presses must go to the focus widget (drawarea)
3900 * and not the window. */
3901 gtk_signal_connect((gtk_socket_id == 0) ? GTK_OBJECT(gui.mainwin)
3902 @@ -3176,6 +3249,7 @@
3903 "key_release_event",
3904 G_CALLBACK(&key_release_event), NULL);
3906 +#endif /* FEAT_GUI_COMPONENT */
3907 gtk_signal_connect(GTK_OBJECT(gui.drawarea), "realize",
3908 GTK_SIGNAL_FUNC(drawarea_realize_cb), NULL);
3909 gtk_signal_connect(GTK_OBJECT(gui.drawarea), "unrealize",
3910 @@ -3207,16 +3281,27 @@
3912 gui.border_offset = gui.border_width;
3914 +#ifdef FEAT_GUI_COMPONENT
3915 + gtk_signal_connect(GTK_OBJECT(gui.drawarea), "visibility_notify_event",
3916 + GTK_SIGNAL_FUNC(visibility_event), NULL);
3918 gtk_signal_connect(GTK_OBJECT(gui.mainwin), "visibility_notify_event",
3919 GTK_SIGNAL_FUNC(visibility_event), NULL);
3921 gtk_signal_connect(GTK_OBJECT(gui.drawarea), "expose_event",
3922 GTK_SIGNAL_FUNC(expose_event), NULL);
3925 * Only install these enter/leave callbacks when 'p' in 'guioptions'.
3926 * Only needed for some window managers.
3928 + * Force this on for bonobo, otherwise the toolbar gets the focus
3929 + * after you click a button, and you can't get the focus back to the
3932 +#ifndef FEAT_GUI_COMPONENT
3933 if (vim_strchr(p_go, GO_POINTER) != NULL)
3936 gtk_signal_connect(GTK_OBJECT(gui.drawarea), "leave_notify_event",
3937 GTK_SIGNAL_FUNC(leave_notify_event), NULL);
3938 @@ -3224,10 +3309,19 @@
3939 GTK_SIGNAL_FUNC(enter_notify_event), NULL);
3942 +#ifdef FEAT_GUI_COMPONENT
3943 + g_signal_connect(G_OBJECT(gui.control), "activate",
3944 + G_CALLBACK (control_activate_event), NULL);
3945 + gtk_signal_connect(GTK_OBJECT(gui.drawarea), "focus_out_event",
3946 + GTK_SIGNAL_FUNC(focus_out_event), NULL);
3947 + gtk_signal_connect(GTK_OBJECT(gui.drawarea), "focus_in_event",
3948 + GTK_SIGNAL_FUNC(focus_in_event), NULL);
3950 gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_out_event",
3951 GTK_SIGNAL_FUNC(focus_out_event), NULL);
3952 gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_in_event",
3953 GTK_SIGNAL_FUNC(focus_in_event), NULL);
3956 gtk_signal_connect(GTK_OBJECT(gui.drawarea), "motion_notify_event",
3957 GTK_SIGNAL_FUNC(motion_notify_event), NULL);
3958 @@ -3400,7 +3494,7 @@
3959 * otherwise the hints don't work. */
3960 width = gui_get_base_width();
3961 height = gui_get_base_height();
3963 +# if defined( HAVE_GTK2 ) && !defined(FEAT_GUI_COMPONENT)
3964 width += get_menu_tool_width();
3965 height += get_menu_tool_height();
3967 @@ -3447,8 +3541,18 @@
3968 form_configure_event(GtkWidget *widget, GdkEventConfigure *event,
3973 gtk_form_freeze(GTK_FORM(gui.formwin));
3974 - gui_resize_shell(event->width, event->height);
3975 +#ifdef FEAT_GUI_COMPONENT
3976 + /* width_inc and height_inc (see window manager hints, above) aren't
3977 + * respected for embedded controls, so we have to make a slight adjustment
3978 + * to make sure the bottom line doesn't get clipped. */
3979 + height = gui.char_height * ((event->height - 2 )/ gui.char_height);
3981 + height = event->height;
3983 + gui_resize_shell(event->width, height);
3984 gtk_form_thaw(GTK_FORM(gui.formwin));
3987 @@ -3580,8 +3684,10 @@
3989 highlight_gui_started(); /* re-init colors and fonts */
3991 +#ifndef FEAT_GUI_COMPONENT
3992 gtk_signal_connect(GTK_OBJECT(gui.mainwin), "destroy",
3993 GTK_SIGNAL_FUNC(mainwin_destroy_cb), NULL);
3996 #ifdef FEAT_HANGULIN
3997 hangul_keyboard_set();
3998 @@ -3649,7 +3755,9 @@
4002 - gtk_widget_show(gui.mainwin);
4003 +#ifndef FEAT_GUI_COMPONENT
4004 + gtk_widget_show(gui.mainwin);
4007 #if defined(FEAT_GUI_GNOME) && defined(HAVE_GTK2) && defined(FEAT_MENU)
4008 if (menu_handler != 0)
4009 @@ -3679,8 +3787,8 @@
4010 if (gui.mainwin != NULL)
4011 gtk_widget_destroy(gui.mainwin);
4013 - if (gtk_main_level() > 0)
4015 + if (MAIN_LEVEL() > 0)
4016 + MAIN_QUIT(); /* make sure the above will be handled immediately */
4020 @@ -3727,6 +3835,7 @@
4022 force_shell_resize_idle(gpointer data)
4024 + g_warning("force_shell_resize_idle called!");
4025 if (gui.mainwin != NULL
4026 && GTK_WIDGET_REALIZED(gui.mainwin)
4027 && GTK_WIDGET_VISIBLE(gui.mainwin))
4028 @@ -3775,7 +3884,7 @@
4029 /* this will cause the proper resizement to happen too */
4030 update_window_manager_hints();
4033 +#if defined( HAVE_GTK2 ) && !defined(FEAT_GUI_COMPONENT)
4034 /* With GTK+ 2, changing the size of the form widget doesn't resize
4035 * the window. So lets do it the other way around and resize the
4036 * main window instead. */
4037 @@ -3866,6 +3975,7 @@
4041 +#ifndef FEAT_GUI_COMPONENT
4042 # ifdef FEAT_GUI_GNOME
4044 widget = gui.menubar_h;
4045 @@ -3882,6 +3992,7 @@
4047 update_window_manager_hints();
4051 #endif /* FEAT_MENU */
4053 @@ -3933,8 +4044,8 @@
4055 vw->fontname = (char_u *)gtk_font_selection_dialog_get_font_name(fs);
4056 gtk_widget_hide(vw->fontdlg);
4057 - if (gtk_main_level() > 0)
4059 + if (MAIN_LEVEL() > 0)
4060 + MAIN_QUIT(); /* make sure the above will be handled immediately */
4064 @@ -3944,8 +4055,8 @@
4065 gui_T *vw = (gui_T *)cbdata;
4067 gtk_widget_hide(vw->fontdlg);
4068 - if (gtk_main_level() > 0)
4070 + if (MAIN_LEVEL() > 0)
4071 + MAIN_QUIT(); /* make sure the above will be handled immediately */
4075 @@ -3955,8 +4066,8 @@
4076 gui_T *vw = (gui_T *)cbdata;
4079 - if (gtk_main_level() > 0)
4081 + if (MAIN_LEVEL() > 0)
4082 + MAIN_QUIT(); /* make sure the above will be handled immediately */
4084 #endif /* !HAVE_GTK2 */
4086 @@ -4123,7 +4234,7 @@
4088 /* Wait for the font dialog to be closed. */
4089 while (gui.fontdlg && GTK_WIDGET_DRAWABLE(gui.fontdlg))
4090 - gtk_main_iteration_do(TRUE);
4091 + MAIN_ITERATION_DO(TRUE);
4093 if (gui.fontname != NULL)
4095 @@ -5637,7 +5748,7 @@
4096 gui_mch_update(void)
4098 while (gtk_events_pending() && !vim_is_input_buf_full())
4099 - gtk_main_iteration_do(FALSE);
4100 + MAIN_ITERATION_DO(TRUE);
4104 @@ -5648,8 +5759,8 @@
4105 /* Just inform the caller about the occurence of it */
4108 - if (gtk_main_level() > 0)
4110 + if (MAIN_LEVEL() > 0)
4111 + MAIN_QUIT(); /* make sure the above will be handled immediately */
4113 return FALSE; /* don't happen again */
4115 @@ -5669,8 +5780,8 @@
4117 add_to_input_buf(bytes, 3);
4119 - if (gtk_main_level() > 0)
4121 + if (MAIN_LEVEL() > 0)
4126 @@ -5737,7 +5848,7 @@
4128 * Loop in GTK+ processing until a timeout or input occurs.
4133 /* Got char, return immediately */
4134 if (input_available())
4135 @@ -5812,6 +5923,7 @@
4136 gdk_window_clear(gui.drawarea->window);
4141 * Redraw any text revealed by scrolling up/down.
4143 @@ -5926,7 +6038,7 @@
4144 (guint32)GDK_CURRENT_TIME);
4146 while (received_selection == RS_NONE)
4147 - gtk_main(); /* wait for selection_received_cb */
4148 + MAIN(); /* wait for selection_received_cb */
4150 if (received_selection != RS_FAIL)
4152 @@ -5994,6 +6106,13 @@
4154 gui_mch_menu_grey(vimmenu_T *menu, int grey)
4156 +#ifdef FEAT_GUI_COMPONENT
4157 + if( menu->sensitive != !grey ) {
4158 + menu->sensitive = !grey;
4159 + update_menu_later(menu);
4163 if (menu->id == NULL)
4166 @@ -6129,6 +6248,40 @@
4167 /* The last set mouse pointer shape is remembered, to be used when it goes
4168 * from hidden to not hidden. */
4169 static int last_shape = 0;
4173 +static BonoboWindow *
4174 +bonobo_create_window(void)
4176 + BonoboWindow *win;
4177 + BonoboUIContainer *ui_container;
4178 + BonoboUIComponent *ui_component;
4180 + win = BONOBO_WINDOW (bonobo_window_new ("vim", "vim"));
4181 + ui_container = bonobo_window_get_ui_container (win);
4182 + bonobo_ui_engine_config_set_path (bonobo_window_get_ui_engine (win),
4183 + "/gnome-vim/UIConfig/kvps");
4185 + /* Create a UI component with which to communicate with the window */
4186 + ui_component = bonobo_ui_component_new_default ();
4188 + gui.component = ui_component;
4190 + /* Associate the BonoboUIComponent with the container */
4191 + bonobo_ui_component_set_container (
4192 + ui_component, BONOBO_OBJREF (ui_container), NULL);
4194 + //bonobo_ui_util_set_ui (ui_component, "",
4195 + //HELLO_SRCDIR HELLO_UI_XML,
4196 + //"bonobo-hello", NULL);
4198 + /* Associate our verb -> callback mapping with the BonoboWindow */
4199 + /* All the callback's user_data pointers will be set to 'win' */
4200 + //bonobo_ui_component_add_verb_list_with_data (ui_component, hello_verbs, win);
4207 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/main.c vim/src/main.c
4208 --- vimcopy/src/main.c Tue Jun 3 13:32:56 2003
4209 +++ vim/src/main.c Sat Jul 26 13:16:48 2003
4214 -# ifdef FEAT_GUI_MSWIN
4215 +# if defined(FEAT_GUI_MSWIN)
4216 # ifdef __BORLANDC__
4219 @@ -239,8 +239,12 @@
4220 TIME_MSG("locale set");
4224 +#if defined(FEAT_GUI_COMPONENT)
4225 + gui.dofork = FALSE; /* don't use fork when running as component */
4227 +# if defined(FEAT_GUI) && !defined(FEAT_GUI_COMPONENT)
4228 gui.dofork = TRUE; /* default is to use fork() */
4232 #if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER)
4233 @@ -439,6 +443,10 @@
4237 +#ifdef FEAT_GUI_COMPONENT
4241 if (TOLOWER_ASC(initstr[0]) == 'g')
4244 @@ -1760,6 +1768,9 @@
4247 curbuf = curwin->w_buffer;
4249 +#ifdef FEAT_GUI_COMPONENT
4250 + set_curbuf_persistent();
4253 TIME_MSG("opening buffers");
4254 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/mbyte.c vim/src/mbyte.c
4255 --- vimcopy/src/mbyte.c Wed Jun 4 10:26:32 2003
4256 +++ vim/src/mbyte.c Sat Jul 26 13:16:48 2003
4257 @@ -3120,8 +3120,8 @@
4259 im_add_to_input((char_u *)str, (int)strlen(str));
4261 - if (gtk_main_level() > 0)
4263 + if (MAIN_LEVEL() > 0)
4268 @@ -4125,7 +4125,11 @@
4269 if (gui.fontset != NOFONTSET
4270 && gui.fontset->type == GDK_FONT_FONTSET)
4272 +#ifdef FEAT_GUI_COMPONENT
4273 + widget = gui.drawarea;
4275 widget = gui.mainwin;
4277 gdk_window_get_size(widget->window, &width, &height);
4279 attrmask |= (int)GDK_IC_STATUS_AREA;
4280 @@ -4706,9 +4710,15 @@
4281 while (event_queue != NULL && processing_queued_event)
4283 GdkEvent *ev = event_queue->data;
4285 + GtkWidget *output;
4288 - gtk_signal_emit_by_name((GtkObject*)gui.mainwin, "key_press_event",
4289 +#ifdef FEAT_GUI_COMPONENT
4290 + output = gui.drawarea;
4292 + output = gui.mainwin;
4294 + gtk_signal_emit_by_name((GtkObject*)output, "key_press_event",
4297 event_queue = event_queue->next;
4298 @@ -4720,8 +4730,8 @@
4299 key_press_event_queue = NULL;
4302 - if (gtk_main_level() > 0)
4304 + if (MAIN_LEVEL() > 0)
4309 @@ -4856,7 +4866,11 @@
4310 GtkWidget *widget = gui.drawarea;
4312 attr->style = (GdkIMStyle)xim_input_style;
4313 +#ifdef FEAT_GUI_COMPONENT
4314 + attr->client_window = gui.drawarea->window;
4316 attr->client_window = gui.mainwin->window;
4319 if ((colormap = gtk_widget_get_colormap(widget)) !=
4320 gtk_widget_get_default_colormap())
4321 @@ -4903,7 +4917,11 @@
4325 +#ifdef FEAT_GUI_COMPONENT
4326 + gdk_window_get_size(gui.drawarea->window, &width, &height);
4328 gdk_window_get_size(gui.mainwin->window, &width, &height);
4330 attrmask |= (int)GDK_IC_STATUS_AREA_REQ;
4331 attr->status_area.x = 0;
4332 attr->status_area.y = height - gui.char_height - 1;
4333 Binary files vimcopy/src/objects/buffer.o and vim/src/objects/buffer.o differ
4334 Binary files vimcopy/src/objects/charset.o and vim/src/objects/charset.o differ
4335 Binary files vimcopy/src/objects/diff.o and vim/src/objects/diff.o differ
4336 Binary files vimcopy/src/objects/digraph.o and vim/src/objects/digraph.o differ
4337 Binary files vimcopy/src/objects/edit.o and vim/src/objects/edit.o differ
4338 Binary files vimcopy/src/objects/eval.o and vim/src/objects/eval.o differ
4339 Binary files vimcopy/src/objects/ex_cmds.o and vim/src/objects/ex_cmds.o differ
4340 Binary files vimcopy/src/objects/ex_cmds2.o and vim/src/objects/ex_cmds2.o differ
4341 Binary files vimcopy/src/objects/ex_docmd.o and vim/src/objects/ex_docmd.o differ
4342 Binary files vimcopy/src/objects/ex_eval.o and vim/src/objects/ex_eval.o differ
4343 Binary files vimcopy/src/objects/ex_getln.o and vim/src/objects/ex_getln.o differ
4344 Binary files vimcopy/src/objects/fileio.o and vim/src/objects/fileio.o differ
4345 Binary files vimcopy/src/objects/fold.o and vim/src/objects/fold.o differ
4346 Binary files vimcopy/src/objects/getchar.o and vim/src/objects/getchar.o differ
4347 Binary files vimcopy/src/objects/gtkhtml_editor.o and vim/src/objects/gtkhtml_editor.o differ
4348 Binary files vimcopy/src/objects/gtkhtml_editor_common.o and vim/src/objects/gtkhtml_editor_common.o differ
4349 Binary files vimcopy/src/objects/gtkhtml_editor_skels.o and vim/src/objects/gtkhtml_editor_skels.o differ
4350 Binary files vimcopy/src/objects/gtkhtml_editor_stubs.o and vim/src/objects/gtkhtml_editor_stubs.o differ
4351 Binary files vimcopy/src/objects/gui.o and vim/src/objects/gui.o differ
4352 Binary files vimcopy/src/objects/gui_beval.o and vim/src/objects/gui_beval.o differ
4353 Binary files vimcopy/src/objects/gui_gtk.o and vim/src/objects/gui_gtk.o differ
4354 Binary files vimcopy/src/objects/gui_gtk_f.o and vim/src/objects/gui_gtk_f.o differ
4355 Binary files vimcopy/src/objects/gui_gtk_x11.o and vim/src/objects/gui_gtk_x11.o differ
4356 Binary files vimcopy/src/objects/if_cscope.o and vim/src/objects/if_cscope.o differ
4357 Binary files vimcopy/src/objects/if_xcmdsrv.o and vim/src/objects/if_xcmdsrv.o differ
4358 Binary files vimcopy/src/objects/main.o and vim/src/objects/main.o differ
4359 Binary files vimcopy/src/objects/mark.o and vim/src/objects/mark.o differ
4360 Binary files vimcopy/src/objects/mbyte.o and vim/src/objects/mbyte.o differ
4361 Binary files vimcopy/src/objects/memfile.o and vim/src/objects/memfile.o differ
4362 Binary files vimcopy/src/objects/memline.o and vim/src/objects/memline.o differ
4363 Binary files vimcopy/src/objects/menu.o and vim/src/objects/menu.o differ
4364 Binary files vimcopy/src/objects/message.o and vim/src/objects/message.o differ
4365 Binary files vimcopy/src/objects/misc1.o and vim/src/objects/misc1.o differ
4366 Binary files vimcopy/src/objects/misc2.o and vim/src/objects/misc2.o differ
4367 Binary files vimcopy/src/objects/move.o and vim/src/objects/move.o differ
4368 Binary files vimcopy/src/objects/netbeans.o and vim/src/objects/netbeans.o differ
4369 Binary files vimcopy/src/objects/normal.o and vim/src/objects/normal.o differ
4370 Binary files vimcopy/src/objects/ops.o and vim/src/objects/ops.o differ
4371 Binary files vimcopy/src/objects/option.o and vim/src/objects/option.o differ
4372 Binary files vimcopy/src/objects/os_unix.o and vim/src/objects/os_unix.o differ
4373 Binary files vimcopy/src/objects/pathdef.o and vim/src/objects/pathdef.o differ
4374 Binary files vimcopy/src/objects/pty.o and vim/src/objects/pty.o differ
4375 Binary files vimcopy/src/objects/quickfix.o and vim/src/objects/quickfix.o differ
4376 Binary files vimcopy/src/objects/regexp.o and vim/src/objects/regexp.o differ
4377 Binary files vimcopy/src/objects/screen.o and vim/src/objects/screen.o differ
4378 Binary files vimcopy/src/objects/search.o and vim/src/objects/search.o differ
4379 Binary files vimcopy/src/objects/syntax.o and vim/src/objects/syntax.o differ
4380 Binary files vimcopy/src/objects/tag.o and vim/src/objects/tag.o differ
4381 Binary files vimcopy/src/objects/term.o and vim/src/objects/term.o differ
4382 Binary files vimcopy/src/objects/ui.o and vim/src/objects/ui.o differ
4383 Binary files vimcopy/src/objects/undo.o and vim/src/objects/undo.o differ
4384 Binary files vimcopy/src/objects/version.o and vim/src/objects/version.o differ
4385 Binary files vimcopy/src/objects/vim_bonobo_control.o and vim/src/objects/vim_bonobo_control.o differ
4386 Binary files vimcopy/src/objects/vim_bonobo_factory.o and vim/src/objects/vim_bonobo_factory.o differ
4387 Binary files vimcopy/src/objects/vim_bonobo_main.o and vim/src/objects/vim_bonobo_main.o differ
4388 Binary files vimcopy/src/objects/window.o and vim/src/objects/window.o differ
4389 Binary files vimcopy/src/po/af.mo and vim/src/po/af.mo differ
4390 Binary files vimcopy/src/po/cs.cp1250.mo and vim/src/po/cs.cp1250.mo differ
4391 Binary files vimcopy/src/po/cs.mo and vim/src/po/cs.mo differ
4392 Binary files vimcopy/src/po/de.mo and vim/src/po/de.mo differ
4393 Binary files vimcopy/src/po/en_gb.mo and vim/src/po/en_gb.mo differ
4394 Binary files vimcopy/src/po/es.mo and vim/src/po/es.mo differ
4395 Binary files vimcopy/src/po/fr.mo and vim/src/po/fr.mo differ
4396 Binary files vimcopy/src/po/it.mo and vim/src/po/it.mo differ
4397 Binary files vimcopy/src/po/ja.mo and vim/src/po/ja.mo differ
4398 Binary files vimcopy/src/po/ja.sjis.mo and vim/src/po/ja.sjis.mo differ
4399 Binary files vimcopy/src/po/ko.mo and vim/src/po/ko.mo differ
4400 Binary files vimcopy/src/po/no.mo and vim/src/po/no.mo differ
4401 Binary files vimcopy/src/po/pl.cp1250.mo and vim/src/po/pl.cp1250.mo differ
4402 Binary files vimcopy/src/po/pl.mo and vim/src/po/pl.mo differ
4403 Binary files vimcopy/src/po/sk.cp1250.mo and vim/src/po/sk.cp1250.mo differ
4404 Binary files vimcopy/src/po/sk.mo and vim/src/po/sk.mo differ
4405 Binary files vimcopy/src/po/uk.mo and vim/src/po/uk.mo differ
4406 Binary files vimcopy/src/po/zh_CN.UTF-8.mo and vim/src/po/zh_CN.UTF-8.mo differ
4407 Binary files vimcopy/src/po/zh_CN.cp936.mo and vim/src/po/zh_CN.cp936.mo differ
4408 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/po/zh_CN.cp936.po vim/src/po/zh_CN.cp936.po
4409 --- vimcopy/src/po/zh_CN.cp936.po Mon Jun 2 09:32:25 2003
4410 +++ vim/src/po/zh_CN.cp936.po Sat Jul 26 15:06:40 2003
4411 @@ -3007,7 +3007,7 @@
4414 msgid "-foreground <color>\tUse <color> for normal text (also: -fg)"
4415 -msgstr "-foreground <color>\tÉ趨 <color> Ϊһ°ãÎÄ×ÖÑÕÉ« (Ò²¿ÉÓà -fg)"
4416 +msgstr "-foreground <color>\tÉ趨 <color> Ϊһ°ãÎÄ×ÖÑÕÉ« (Ò²ÉÓà -fg)"
4418 #: main.c:2316 main.c:2336
4419 msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
4420 Binary files vimcopy/src/po/zh_CN.mo and vim/src/po/zh_CN.mo differ
4421 Binary files vimcopy/src/po/zh_TW.UTF-8.mo and vim/src/po/zh_TW.UTF-8.mo differ
4422 Binary files vimcopy/src/po/zh_TW.mo and vim/src/po/zh_TW.mo differ
4423 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/structs.h vim/src/structs.h
4424 --- vimcopy/src/structs.h Tue May 27 11:22:01 2003
4425 +++ vim/src/structs.h Sat Jul 26 13:16:48 2003
4426 @@ -1036,6 +1036,10 @@
4427 char_u *b_p_bh; /* 'bufhidden' */
4428 char_u *b_p_bt; /* 'buftype' */
4430 +#if defined(FEAT_GUI_COMPONENT)
4431 + int emb_buffer; /* this buffer is associated with the container application,
4432 + and cannot be removed */
4434 int b_p_bl; /* 'buflisted' */
4436 int b_p_cin; /* 'cindent' */
4437 @@ -1713,8 +1717,11 @@
4438 GtkWidget *tearoff_handle;
4439 GtkWidget *label; /* Used by "set wak=" code. */
4441 -#ifdef FEAT_GUI_MOTIF
4442 +#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_COMPONENT)
4443 int sensitive; /* turn button on/off */
4444 +#if defined(FEAT_GUI_COMPONENT)
4445 + int dirty; /* menu item has been updated; container needs to know */
4448 #if defined(FEAT_GUI_ATHENA) || defined(FEAT_GUI_MOTIF)
4449 Pixmap image; /* Toolbar image */
4450 Binary files vimcopy/src/vim and vim/src/vim differ
4451 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim-container.xml vim/src/vim-container.xml
4452 --- vimcopy/src/vim-container.xml Wed Dec 31 18:00:00 1969
4453 +++ vim/src/vim-container.xml Sat Jul 26 13:16:48 2003
4458 + <cmd name="FileNewWindow" _label="_New Window" _tip="Open a new window"
4459 + pixtype="stock" pixname="gtk-new" accel="*Control*n"/>
4461 + <cmd name="FileOpen" _label="_Open..." _tip="Open a file"
4462 + pixtype="stock" pixname="gtk-open" accel="*Control*o"/>
4464 + <cmd name="FileCloseWindow" _label="_Close" _tip="Close window"
4465 + pixtype="stock" pixname="gtk-close" accel="*Control*w"/>
4467 + <cmd name="FileExit" _label="_Quit" _tip="Quit the program"
4468 + pixtype="stock" pixname="gtk-quit" accel="*Control*q"/>
4470 + <cmd name="Preferences" _label="_Preferences..." _tip="Change preferences" sensitive="0"
4471 + pixtype="stock" pixname="gtk-preferences"/>
4473 + <cmd name="HelpAbout" _label="_About" _tip="About this application"
4474 + pixtype="stock" pixname="About"/>
4475 + <cmd name="Help" _label="Contents" _tip="Help On this application"
4476 + pixtype="stock" pixname="Help" accel="F1"/>
4479 + <cmd name="DnDNewWindow" _label="Open in new window"/>
4480 + <cmd name="DnDSameWindow" _label="Open in this window"/>
4481 + <cmd name="DnDCancel" _label="Cancel"
4482 + pixtype="stock" pixname="Cancel"/>
4486 + <submenu name="File" _label="_File">
4488 + <menuitem name="FileNewWindow" verb=""/>
4490 + <placeholder name="Open Placeholder" delimit="top">
4491 + <menuitem name="FileOpen" verb=""/>
4494 + <placeholder name="File Items Placeholder" delimit="top"/>
4498 + <menuitem name="FileCloseWindow" verb=""/>
4500 + <menuitem name="FileExit" verb=""/>
4504 + <submenu name="Edit" _label="_Edit">
4505 + <menuitem name="Preferences" verb=""/>
4508 + <submenu name="View" _label="_View" hidden="1">
4509 + <placeholder name="View Preferences Placeholder"/>
4510 + <placeholder name="View Items Placeholder" delimit="top"/>
4513 + <submenu name="Help" _label="_Help">
4514 + <menuitem name="Help" verb=""/>
4515 + <menuitem name="HelpAbout" verb=""/>
4519 +<dockitem name="Toolbar" relief="none" homogeneous="1" behavior="exclusive">
4521 + <toolitem name="TBOpen" _label="Open" pixtype="stock"
4522 + pixname="Open" verb="FileOpen"/>
4524 + <toolitem name="TBCloseWindow" _label="Close" pixtype="stock"
4525 + pixname="Close" verb="FileCloseWindow"/>
4529 + <popup name="dragndrop">
4530 + <menuitem name="DnDNewWindow" verb=""/>
4531 + <menuitem name="DnDSameWindow" verb=""/>
4533 + <menuitem name="DnDCancel" verb=""/>
4538 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim.h vim/src/vim.h
4539 --- vimcopy/src/vim.h Thu May 29 10:18:40 2003
4540 +++ vim/src/vim.h Sat Jul 26 13:16:48 2003
4541 @@ -738,6 +738,10 @@
4542 #define READ_STDIN 0x04 /* read from stdin */
4543 #define READ_BUFFER 0x08 /* read from curbuf (converting stdin) */
4544 #define READ_DUMMY 0x10 /* reading into a dummy buffer */
4545 +#define READ_EMB_STREAM 0x20 /* read from container stream object
4546 + (i.e. Bonobo Persist Stream) */
4547 +#define READ_EMB_FILE 0x40 /* read from container file object
4548 + (i.e. Bonobo Persist File) */
4550 /* Values for change_indent() */
4551 #define INDENT_SET 1 /* set indent */
4552 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim_bonobo_control.c vim/src/vim_bonobo_control.c
4553 --- vimcopy/src/vim_bonobo_control.c Wed Dec 31 18:00:00 1969
4554 +++ vim/src/vim_bonobo_control.c Sat Jul 26 13:16:48 2003
4557 + * vim_bonobo_control.c
4560 + * Jason Hildebrand <jason@peaceworks.ca>
4566 +#include "vim_bonobo_control.h"
4567 +#include "gtkhtml_editor.h"
4570 +#include <libbonoboui.h>
4571 +#include <libbonobo.h>
4572 +#include <libnautilus/nautilus-view.h>
4575 +struct _VimControlPrivate {
4576 + BonoboUIComponent *component;
4579 +static GObjectClass *vim_control_parent_class;
4582 +quit_vim(gpointer data)
4589 +vim_control_destroy (BonoboObject *control)
4591 + BonoboUIComponent *uic;
4593 + g_return_if_fail (control != NULL);
4594 + g_return_if_fail (VIM_IS_CONTROL (control));
4596 + g_message ("Destroying VimControl...");
4598 + uic = bonobo_control_get_ui_component (BONOBO_CONTROL (control));
4599 + if( uic != CORBA_OBJECT_NIL )
4600 + bonobo_ui_component_unset_container (uic, NULL);
4602 + BONOBO_OBJECT_CLASS (vim_control_parent_class)->destroy (control);
4604 + /* we only support creating one vim control per process, so when this one
4605 + * is finished, we're done. */
4606 + /* BONOBO_FIXME: shut down vim cleanly! */
4607 + g_timeout_add(100, &quit_vim, NULL);
4611 +vim_control_finalize (GObject *object)
4613 + VimControl *control;
4615 + g_return_if_fail (object != NULL);
4616 + g_return_if_fail (VIM_IS_CONTROL (object));
4618 + control = VIM_CONTROL (object);
4620 + g_free (control->priv);
4622 + G_OBJECT_CLASS (vim_control_parent_class)->finalize (object);
4626 +vim_control_set_ui_container (VimControl *control,
4627 + Bonobo_UIContainer ui_container)
4629 + BonoboUIComponent *uic;
4631 + g_return_if_fail (control != NULL);
4632 + g_return_if_fail (VIM_IS_CONTROL (control));
4633 + g_return_if_fail (ui_container != CORBA_OBJECT_NIL);
4635 + uic = bonobo_control_get_ui_component (BONOBO_CONTROL (control));
4636 + bonobo_ui_component_set_container (uic, ui_container, NULL);
4638 + /* update vim's UI now */
4639 + update_ui_later();
4643 +vim_control_unset_ui_container (VimControl *control)
4645 + BonoboUIComponent *uic;
4647 + g_return_if_fail (control != NULL);
4648 + g_return_if_fail (VIM_IS_CONTROL (control));
4650 + uic = bonobo_control_get_ui_component (BONOBO_CONTROL (control));
4651 + bonobo_ui_component_unset_container (uic, NULL);
4654 +static grab_keys = 0;
4656 +static GdkFilterReturn
4657 +filter_key_events (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
4659 + /* GdkScreen *screen = gdk_drawable_get_screen (event->any.window);
4660 + GdkDisplay *display = gdk_screen_get_display (screen);*/
4661 + XEvent *xevent = (XEvent *)gdk_xevent;
4663 + GdkFilterReturn return_val;
4665 + return_val = GDK_FILTER_CONTINUE;
4667 + switch (xevent->type)
4670 + g_warning("Key press!");
4674 + g_warning("Key release!");
4680 + return return_val;
4685 +set_frame_cb (BonoboControl *object, gpointer data)
4687 + Bonobo_ControlFrame frame;
4688 + BonoboPlug * plug;
4689 + VimControl *control;
4690 + GdkEventMask mask;
4692 + g_return_if_fail (object != NULL);
4693 + g_return_if_fail (VIM_IS_CONTROL (object));
4695 + frame = bonobo_control_get_control_frame (object, NULL);
4696 + if (frame == CORBA_OBJECT_NIL)
4698 + CORBA_Object_release (frame, NULL);
4700 + control = VIM_CONTROL (object);
4702 + Bonobo_UIContainer ui_container;
4704 + ui_container = bonobo_control_get_remote_ui_container (BONOBO_CONTROL (control), NULL);
4705 + if (ui_container != CORBA_OBJECT_NIL) {
4706 + vim_control_set_ui_container (control, ui_container);
4707 + bonobo_object_release_unref (ui_container, NULL);
4710 + /*plug = (BonoboPlug *)bonobo_control_get_plug(control);*/
4711 + /*gdk_window_add_filter (NULL, filter_key_events, NULL);*/
4715 +vim_control_class_init (VimControl *klass)
4717 + GObjectClass *gobject_class = (GObjectClass *)klass;
4718 + BonoboObjectClass *bonobo_object_class = (BonoboObjectClass *)klass;
4719 + BonoboControlClass *control_class = (BonoboControlClass *)klass;
4721 + vim_control_parent_class= g_type_class_peek_parent (klass);
4723 + bonobo_object_class->destroy = vim_control_destroy;
4724 + gobject_class->finalize = vim_control_finalize;
4727 +static int persistent_buffer;
4728 +static char_u * stream_buffer = NULL;
4729 +static int stream_offset = 0;
4730 +static CORBA_long stream_length = 0;
4731 +static Bonobo_Stream current_stream;
4734 +set_curbuf_persistent(void)
4736 + persistent_buffer = curbuf->b_fnum;
4739 +/* It seems like it's an error to attempt to read more data
4740 + * than is available from a bonobo stream. So we slurp in
4741 + * the entire file in one chunk, and then pass it back in
4742 + * pieces to the caller.
4745 +vim_control_persist_stream_read(char_u * buffer, int reqsize)
4749 + if( stream_offset >= stream_length ) {
4752 + read_size = stream_length - stream_offset >= reqsize ?
4753 + reqsize : stream_length - stream_offset;
4754 + mch_memmove(buffer, &stream_buffer[stream_offset], read_size);
4755 + stream_offset += read_size;
4760 +vim_control_persist_stream_write(char_u * buffer, int reqsize)
4762 + CORBA_Environment ev;
4764 + CORBA_exception_init(&ev);
4765 + bonobo_stream_client_write(current_stream, buffer, reqsize, &ev);
4766 + if (ev._major != CORBA_NO_EXCEPTION || stream_buffer == NULL) {
4767 + g_warning("Error writing to stream");
4768 + CORBA_exception_free (&ev);
4771 + CORBA_exception_free (&ev);
4775 +static void load_buffer_from_stream(BonoboPersistStream *ps,
4776 + const Bonobo_Stream stream,
4777 + Bonobo_Persist_ContentType type,
4779 + CORBA_Environment *ev)
4781 + exarg_T ea; /* Ex command arguments */
4783 + g_warning ("load_buffer_from_stream");
4785 + stream_buffer = bonobo_stream_client_read( stream, -1, &stream_length, ev);
4786 + if (ev->_major != CORBA_NO_EXCEPTION || stream_buffer == NULL) {
4787 + g_warning("Error reading from stream");
4790 + stream_offset = 0;
4792 + vim_memset(&ea, 0, sizeof(ea));
4793 + ea.cmd = "e ++enc=utf-8";
4794 + ea.force_enc = 8; /* this is the offset of "utf-8" in the cmd */
4796 + read_from_container = PERSIST_STREAM_IO;
4797 + do_ecmd(0, NULL, NULL, &ea, 1, 0);
4798 + read_from_container = NORMAL_IO;
4800 + /* remember this buffer */
4801 + persistent_buffer = curbuf->b_fnum;
4802 + ga_clear(&error_ga);
4803 + g_free(stream_buffer);
4808 +save_buffer_to_stream(BonoboPersistStream *ps,
4809 + const Bonobo_Stream stream,
4810 + Bonobo_Persist_ContentType type,
4812 + CORBA_Environment *ev)
4815 + exarg_T ea; /* Ex command arguments */
4817 + g_warning ("save_buffer_to_stream");
4819 + current_stream = stream;
4820 + write_to_container = PERSIST_STREAM_IO;
4822 + vim_memset(&ea, 0, sizeof(ea));
4823 + ea.cmd = "e ++enc=utf-8";
4824 + ea.force_enc = 8; /* this is the offset of "utf-8" in the cmd */
4826 + buf = buflist_findnr(persistent_buffer);
4828 + buf_write(buf, "dummy", "dummy", 1, buf->b_ml.ml_line_count, &ea, FALSE, FALSE,
4831 + write_to_container = NORMAL_IO;
4832 + ga_clear(&error_ga);
4836 +Bonobo_Persist_ContentTypeList *
4837 +persist_stream_types( BonoboPersistStream * ps, void * closure, CORBA_Environment *ev )
4839 + g_warning ("persist_stream_types");
4840 + return bonobo_persist_generate_content_types(1, "text/plain", "text/html");
4845 +nv_load_location_cb (NautilusView *view, const char *location, gpointer user_data)
4847 + g_return_if_fail (NAUTILUS_IS_VIEW (view));
4848 + g_return_if_fail (location != NULL);
4850 + nautilus_view_report_load_underway (NAUTILUS_VIEW (view));
4852 + /* FIXME: load the file here (using gnome-vfs)! */
4853 + nautilus_view_report_load_complete (NAUTILUS_VIEW (view));
4857 +vim_control_init (VimControl *control)
4859 + control->priv = g_new0 (VimControlPrivate, 1);
4862 +BONOBO_TYPE_FUNC (VimControl, BONOBO_TYPE_CONTROL, vim_control);
4865 +vim_control_add_interfaces (VimControl *control,
4866 + BonoboObject *to_aggregate)
4868 + //BonoboPersistFile *file;
4870 + BonoboPersistStream *stream;
4871 + EditorEngine *engine; /* GtkHTML editor engine interface */
4872 + //BonoboItemContainer *item_container;
4874 + g_return_val_if_fail (VIM_IS_CONTROL (control), NULL);
4875 + g_return_val_if_fail (BONOBO_IS_OBJECT (to_aggregate), NULL);
4877 + /* Interface Bonobo::PersistFile */
4879 + file = bonobo_persist_file_new (load_vim_from_file,
4880 + NULL, VIM_OAFIID, control);
4882 + bonobo_object_unref (BONOBO_OBJECT (to_aggregate));
4887 + stream = bonobo_persist_stream_new (load_buffer_from_stream,
4888 + save_buffer_to_stream,
4889 + persist_stream_types,
4893 + bonobo_object_unref (BONOBO_OBJECT (to_aggregate));
4896 + bonobo_object_add_interface (BONOBO_OBJECT (to_aggregate),
4897 + BONOBO_OBJECT (stream));
4899 + nv = nautilus_view_new_from_bonobo_control(BONOBO_CONTROL(control));
4901 + bonobo_object_unref (BONOBO_OBJECT(to_aggregate));
4904 + bonobo_object_add_interface (BONOBO_OBJECT (to_aggregate),
4905 + BONOBO_OBJECT (nv));
4907 + g_signal_connect (G_OBJECT (nv), "load_location",
4908 + G_CALLBACK (nv_load_location_cb), NULL);
4910 + engine = editor_engine_new();
4912 + bonobo_object_unref (BONOBO_OBJECT(to_aggregate));
4915 + bonobo_object_add_interface (BONOBO_OBJECT (to_aggregate),
4916 + BONOBO_OBJECT (engine));
4918 + return to_aggregate;
4922 +vim_control_construct (VimControl *control)
4924 + GtkWidget *button;
4927 + GtkAccelGroup *group;
4928 + GClosure *closure;
4929 + //VimControlPrivate *priv;
4931 + g_return_val_if_fail (control != NULL, NULL);
4932 + g_return_val_if_fail (VIM_IS_CONTROL (control), NULL);
4935 + if (!vim_control_add_interfaces (control, BONOBO_OBJECT (control)))
4938 + gui.control = BONOBO_CONTROL(control);
4939 + gui.plug = (BonoboPlug *)bonobo_control_get_plug(control);
4940 + gui.mainwin = GTK_WIDGET(gui.plug);
4943 + g_signal_connect (control, "set_frame", G_CALLBACK (set_frame_cb), NULL);
4945 + /* Create the vim-view */
4946 + //priv->image_view = vim_image_view_new (vim, FALSE);
4947 + //if (!priv->image_view) {
4948 + //bonobo_object_unref (BONOBO_OBJECT (control));
4956 +vim_control_new (void)
4958 + VimControl *control;
4960 + g_message ("Creating VimControl...");
4962 + control = g_object_new (VIM_CONTROL_TYPE, NULL);
4964 + return vim_control_construct (control);
4967 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim_bonobo_control.h vim/src/vim_bonobo_control.h
4968 --- vimcopy/src/vim_bonobo_control.h Wed Dec 31 18:00:00 1969
4969 +++ vim/src/vim_bonobo_control.h Sat Jul 26 13:16:48 2003
4972 + * vim_bonobo_control.h
4975 + * Jason Hildebrand (jason@peaceworks.ca)
4979 +#ifndef _VIM_CONTROL_H_
4980 +#define _VIM_CONTROL_H_
4982 +#include <bonobo/bonobo-control.h>
4983 +#define VIM_OAFIID "OAFIID:Vim_Control"
4984 +#define NORMAL_IO 0
4985 +#define PERSIST_STREAM_IO 1
4986 +#define PERSIST_FILE_IO 2
4990 +#define VIM_CONTROL_TYPE (vim_control_get_type ())
4991 +#define VIM_CONTROL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), VIM_CONTROL_TYPE, VimControl))
4992 +#define VIM_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), VIM_CONTROL_TYPE, VimControlClass))
4994 +#define VIM_IS_CONTROL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), VIM_CONTROL_TYPE))
4995 +#define VIM_IS_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), VIM_CONTROL_TYPE))
4996 +#define VIM_CONTROL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), VIM_CONTROL_TYPE, VimControlClass))
4998 +typedef struct _VimControl VimControl;
4999 +typedef struct _VimControlClass VimControlClass;
5000 +typedef struct _VimControlPrivate VimControlPrivate;
5002 +struct _VimControl {
5003 + BonoboControl control;
5005 + VimControlPrivate *priv;
5008 +struct _VimControlClass {
5009 + BonoboControlClass parent_class;
5012 +GType vim_control_get_type (void);
5013 +VimControl *vim_control_new (void);
5014 +VimControl *vim_control_construct (VimControl *control);
5016 +void set_curbuf_persistent(void);
5020 +#endif /* _VIM_CONTROL_H_*/
5021 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim_bonobo_factory.c vim/src/vim_bonobo_factory.c
5022 --- vimcopy/src/vim_bonobo_factory.c Wed Dec 31 18:00:00 1969
5023 +++ vim/src/vim_bonobo_factory.c Sat Jul 26 13:42:10 2003
5026 + * vim_bonobo_factory.c
5029 + * Jason Hildebrand (jason@peaceworks.ca)
5034 +#include "version.h"
5035 +#include <bonobo/bonobo-generic-factory.h>
5036 +#include "vim_bonobo_control.h"
5038 +static BonoboGenericFactory *factory = NULL;
5039 +static int vim_instantiated = 0;
5041 +static BonoboObject *
5042 +vim_bonobo_factory(BonoboGenericFactory *this,
5043 + const char *oaf_iid,
5047 + BonoboObject *retval;
5049 + g_return_val_if_fail (this != NULL, NULL);
5050 + g_return_val_if_fail (oaf_iid != NULL, NULL);
5052 + if( vim_instantiated ) {
5053 + /* we cannot instantiate more than one control from this process,
5054 + * because of all of vim's global variables */
5058 + g_message ("Trying to produce a '%s'...", oaf_iid);
5060 + if (strcmp (oaf_iid, VIM_OAFIID) == 0) {
5061 + vim = vim_control_new ();
5064 + retval = BONOBO_OBJECT (vim);
5066 + g_warning ("Unknown IID `%s' requested", oaf_iid);
5069 + vim_instantiated = 1;
5074 +/* wait until this component is instantiated */
5075 +int vim_bonobo_wait_for_instantiation()
5077 + while( !vim_instantiated) {
5078 + MAIN_ITERATION_DO(TRUE);
5083 +int vim_bonobo_init(int *argc, char *argv[])
5085 + if (!bonobo_ui_init ("gnome-vim", VIM_VERSION_SHORT, argc, argv))
5086 + g_error (_("Could not initialize Bonobo"));
5088 + factory = bonobo_generic_factory_new (
5089 + "OAFIID:Vim_Control_Factory", vim_bonobo_factory, NULL);
5091 + if (factory == NULL) {
5092 + g_error ("Couldn't create factory.\n");
5098 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim_bonobo_factory.h vim/src/vim_bonobo_factory.h
5099 --- vimcopy/src/vim_bonobo_factory.h Wed Dec 31 18:00:00 1969
5100 +++ vim/src/vim_bonobo_factory.h Sat Jul 26 13:16:48 2003
5103 + * vim_bonobo_factory.h
5106 + * Jason Hildebrand (jason@peaceworks.ca)
5110 +#if !defined( _VIM_BONOBO_FACTORY_H)
5111 +#define _VIM_BONOBO_FACTORY_H
5113 +void gui_component_init(int *argc, char *argv []);
5114 +int gui_component_wait_for_instantiation(void);
5117 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim_bonobo_main.c vim/src/vim_bonobo_main.c
5118 --- vimcopy/src/vim_bonobo_main.c Wed Dec 31 18:00:00 1969
5119 +++ vim/src/vim_bonobo_main.c Sat Jul 26 13:16:48 2003
5121 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
5123 +#include <glib/gmain.h>
5124 +#include <glib-object.h>
5126 +static guint bonobo_main_loop_level = 0;
5127 +static GSList * bonobo_main_loops = NULL;
5133 + * Activates the Bonobo POA Manager and enters the main event loop.
5136 +vim_bonobo_main (void)
5140 + bonobo_activate ();
5142 + bonobo_main_loop_level++;
5144 + loop = g_main_loop_new (NULL, TRUE);
5145 + bonobo_main_loops = g_slist_prepend (bonobo_main_loops, loop);
5147 + if (g_main_loop_is_running (bonobo_main_loops->data))
5148 + g_main_loop_run (loop);
5150 + bonobo_main_loops = g_slist_remove (bonobo_main_loops, loop);
5152 + g_main_loop_unref (loop);
5154 + bonobo_main_loop_level--;
5158 + * bonobo_main_quit:
5160 + * Quits the main event loop.
5163 +vim_bonobo_main_quit (void)
5165 + g_return_if_fail (bonobo_main_loops != NULL);
5167 + g_main_loop_quit (bonobo_main_loops->data);
5171 +vim_bonobo_main_level(void)
5173 + return bonobo_main_loop_level;
5177 +vim_bonobo_main_iteration_do(may_block)
5179 + g_main_context_iteration(NULL, may_block);
5181 diff --new-file -u -r --exclude-from=excludelist vimcopy/src/vim_bonobo_main.h vim/src/vim_bonobo_main.h
5182 --- vimcopy/src/vim_bonobo_main.h Wed Dec 31 18:00:00 1969
5183 +++ vim/src/vim_bonobo_main.h Sat Jul 26 13:16:48 2003
5185 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
5187 +#ifndef __VIM_BONOBO_MAIN_H__
5188 +#define __VIM_BONOBO_MAIN_H__
5190 +#include <glib-object.h>
5191 +#include <bonobo/Bonobo.h>
5193 +void vim_bonobo_main (void);
5194 +void vim_bonobo_main_quit (void);
5195 +int vim_bonobo_level(void);
5196 +gboolean vim_bonobo_main_iteration_do(int may_block);
5198 +#endif /* __VIM_BONOBO_MAIN_H__ */
5199 Binary files vimcopy/src/xxd/xxd and vim/src/xxd/xxd differ
5200 diff --new-file -u -r --exclude-from=excludelist vimcopy/vim/src/Make_container.mak vim/vim/src/Make_container.mak
5201 --- vimcopy/vim/src/Make_container.mak Wed Dec 31 18:00:00 1969
5202 +++ vim/vim/src/Make_container.mak Sat Jul 26 13:16:48 2003
5204 +gnomeccFlags = `pkg-config --cflags libgnomeui-2.0 libgnome-2.0`
5205 +ccFlags = -g -c ${gnomeccFlags}
5206 +ldFlags = `pkg-config --libs libgnomeui-2.0 libgnome-2.0`
5210 +container: container.o
5211 + gcc -o container ${ldFlags} container.o
5214 + gcc ${ccFlags} $< -o $@