Updated Spanish translation
[anjuta-git-plugin.git] / plugins / gvim / gtkvim.h
blob7ac815aae19107eb2c7fc16e3557f5cb972741ef
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
34 #ifndef __GTK_VIM_H__
35 #define __GTK_VIM_H__
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())
43 #endif
46 #ifdef __cplusplus
47 extern "C" {
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.
63 * Widgets args:
64 * GtkVim::server_name : STRING - Read Only
66 struct _GtkVim
68 GtkSocket socket;
69 gchar* server_name;
70 gint init_cols, init_rows;
71 gchar* init_files;
74 struct _GtkVimClass
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,
89 gint init_rows,
90 const gchar *filename,
91 ...);
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,
102 ...);
104 /* Send keypresses to vim process - read vim docs. ':help --remote-send' */
105 void gtk_vim_remote_send (GtkVim *widget,
106 const gchar *keys);
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,
113 const gchar *buffer,
114 gint line,
115 gint column );
117 #ifdef __cplusplus
119 #endif /* __cplusplus */
122 #endif /* __GTK_VIM_H__ */