1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
28 * CAVEAT: only works on a system with a GTK+ enabled gvim 6.0+ in PATH,
29 * and with a system() call that can start it! (relies upon gvim
30 * to fork itself into a new process).
31 * mailto:gtkvim@fnxweb.com
38 #include <gtk/gtksocket.h>
40 /* gtksocket.h doesn't as yet supply this */
41 #ifndef GTK_TYPE_SOCKET
42 #define GTK_TYPE_SOCKET (gtk_socket_get_type())
48 #endif /* __cplusplus */
51 #define GTK_TYPE_VIM (gtk_vim_get_type ())
52 #define GTK_VIM(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VIM, GtkVim))
53 #define GTK_VIM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VIM, GtkVimClass))
54 #define GTK_IS_VIM(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VIM))
55 #define GTK_IS_VIM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VIM))
58 typedef struct _GtkVim GtkVim
;
59 typedef struct _GtkVimClass GtkVimClass
;
62 * No public entities; use functions below to access data.
64 * GtkVim::server_name : STRING - Read Only
70 gint init_cols
, init_rows
;
76 GtkSocketClass parent_class
;
79 /* Standard type ID */
80 GtkType
gtk_vim_get_type (void);
83 * Args. are initial character cols/rows size of widget, plus NULL terminated
84 * list of filenames to edit and/or gvim arguments.
85 * You may of course give everything in one string with space separators.
86 * But you still need the NULL.
88 GtkWidget
* gtk_vim_new (gint init_cols
,
90 const gchar
*filename
,
93 /* Get the hopefully unique servername that gvim was started with */
94 gchar
* gtk_vim_get_server_name (GtkVim
*widget
);
97 * Pass NULL terminated list of files (may be space separated) to already
98 * started (i.e., realized) GtkVim widget for editing.
100 void gtk_vim_edit (GtkVim
*widget
,
101 const gchar
*filename
,
104 /* Send keypresses to vim process - read vim docs. ':help --remote-send' */
105 void gtk_vim_remote_send (GtkVim
*widget
,
109 * Set cursor position to line/column in named buffer.
110 * Use current buffer if buffername is NULL.
112 void gtk_vim_goto (GtkVim
*widget
,
119 #endif /* __cplusplus */
122 #endif /* __GTK_VIM_H__ */