[anjuta] add Vala support plugin
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] add Vala support plugin
- Date: Mon, 7 Jun 2010 18:31:54 +0000 (UTC)
commit cd62d326c7e302409015e0fc9faa658a723eeee9
Author: Abderrahim Kitouni <a kitouni gmail com>
Date: Sat Jun 5 16:43:02 2010 +0100
add Vala support plugin
configure.in | 6 +-
plugins/Makefile.am | 3 +-
plugins/language-support-vala/Makefile.am | 63 +
.../language-support-vala/anjuta-vala.plugin.in | 10 +
plugins/language-support-vala/libanjuta-1.0.deps | 9 +
plugins/language-support-vala/libanjuta-1.0.vapi | 1790 ++++++++++++++++++++
plugins/language-support-vala/locator.vala | 105 ++
plugins/language-support-vala/plugin.vala | 352 ++++
plugins/language-support-vala/provider.vala | 145 ++
plugins/language-support-vala/report.vala | 92 +
10 files changed, 2572 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index 113018f..f2b841b 100644
--- a/configure.in
+++ b/configure.in
@@ -951,6 +951,7 @@ plugins/language-support-cpp-java/cxxparser/Makefile
plugins/run-program/Makefile
plugins/starter/Makefile
plugins/language-support-js/Makefile
+plugins/language-support-vala/Makefile
anjuta.desktop.in
manuals/Makefile
manuals/reference/Makefile
@@ -997,9 +998,10 @@ else
echo "Building GtkSourceView based editor: ...................NO"
fi
if [ test x$enable_vala = xyes ]; then
- echo "Building Vala ctags parser (requires vala):.............YES"
+ echo "Building Vala support: .................................YES"
else
- echo "Building Vala ctags parser (requires vala):.............NO"
+ echo "Building Vala support: .................................NO"
+ echo " Requires libvala (>= $VALA_REQUIRED)"
fi
if [ test x$libgraphviz_found = xyes ]; then
echo "Building class inheritance plugin: .....................YES"
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 13ba3da..ed7161b 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -35,6 +35,7 @@ SUBDIRS = . \
dir-project \
starter \
js-debugger \
- language-support-js
+ language-support-js \
+ language-support-vala
-include $(top_srcdir)/git.mk
diff --git a/plugins/language-support-vala/Makefile.am b/plugins/language-support-vala/Makefile.am
new file mode 100644
index 0000000..e2cd984
--- /dev/null
+++ b/plugins/language-support-vala/Makefile.am
@@ -0,0 +1,63 @@
+if ENABLE_VALA
+
+# Where to install the plugin
+plugindir = $(anjuta_plugin_dir)
+
+# Plugin description file
+plugin_in_files = anjuta-vala.plugin.in
+%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
+
+# NOTE :
+# The naming convention is very intentional
+# We are forced to use the prefix 'lib' by automake and libtool
+# There is probably a way to avoid it but it is not worth to effort
+# to find out.
+# The 'anjuta_' prfix is a safety measure to avoid conflicts where the
+# plugin 'libpython.so' needs to link with the real 'libpython.so'
+
+# Include paths
+AM_CPPFLAGS = \
+ $(WARN_CFLAGS) \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DANJUTA_DATA_DIR=\"$(anjuta_data_dir)\" \
+ -DANJUTA_PLUGIN_DIR=\"$(anjuta_plugin_dir)\" \
+ -DANJUTA_IMAGE_DIR=\"$(anjuta_image_dir)\" \
+ -DANJUTA_GLADE_DIR=\"$(anjuta_glade_dir)\" \
+ -DANJUTA_UI_DIR=\"$(anjuta_ui_dir)\" \
+ $(LIBANJUTA_CFLAGS) \
+ $(VALA_CFLAGS) \
+ -DPACKAGE_SRC_DIR=\"$(srcdir)\" \
+ -DG_LOG_DOMAIN=\"language-support-vala\" \
+ --no-warn
+
+# The plugin
+plugin_LTLIBRARIES = libanjuta-vala.la
+
+# Plugin sources
+libanjuta_vala_la_VALASOURCES = locator.vala plugin.vala provider.vala report.vala
+libanjuta_vala_la_SOURCES = plugin.vala.stamp $(libanjuta_vala_la_VALASOURCES:.vala=.c)
+
+
+plugin.vala.stamp: $(libanjuta_vala_la_VALASOURCES)
+ $(VALAC) --disable-warnings --vapidir $(srcdir) --pkg vala-1.0 --pkg libanjuta-1.0 -C $^
+ @touch $@
+
+
+libanjuta_vala_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+# Plugin dependencies
+libanjuta_vala_la_LIBADD = \
+ $(LIBANJUTA_LIBS) \
+ $(VALA_LIBS)
+
+BUILT_SOURCES = plugin.vala.stamp
+endif # ENABLE_VALA
+
+EXTRA_DIST = \
+ $(plugin_in_files) \
+ $(libanjuta_vala_la_VALASOURCES:.vala=.c)
+
+-include $(top_srcdir)/git.mk
+
diff --git a/plugins/language-support-vala/anjuta-vala.plugin.in b/plugins/language-support-vala/anjuta-vala.plugin.in
new file mode 100644
index 0000000..c448cfc
--- /dev/null
+++ b/plugins/language-support-vala/anjuta-vala.plugin.in
@@ -0,0 +1,10 @@
+[Anjuta Plugin]
+Location=anjuta-language-vala:ValaPlugin
+Name=Vala support Plugin
+Description=Vala support plugin, adds code completion.
+Interfaces=IAnjutaLanguageSupport
+UserActivatable=no
+
+[Language Support]
+Languages=Vala
+MimeTypes=text/x-vala
diff --git a/plugins/language-support-vala/libanjuta-1.0.deps b/plugins/language-support-vala/libanjuta-1.0.deps
new file mode 100644
index 0000000..a670ce9
--- /dev/null
+++ b/plugins/language-support-vala/libanjuta-1.0.deps
@@ -0,0 +1,9 @@
+gtk+-2.0
+gdk-pixbuf-2.0
+gdk-2.0
+gconf-2.0
+libglade-2.0
+gio-2.0
+atk
+pango
+cairo
diff --git a/plugins/language-support-vala/libanjuta-1.0.vapi b/plugins/language-support-vala/libanjuta-1.0.vapi
new file mode 100644
index 0000000..3ee7dbd
--- /dev/null
+++ b/plugins/language-support-vala/libanjuta-1.0.vapi
@@ -0,0 +1,1790 @@
+/* libanjuta.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Anjuta", lower_case_cprefix = "anjuta_")]
+namespace Anjuta {
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class AsyncCommand : Anjuta.Command {
+ public static unowned string get_error_message (Anjuta.Command command);
+ public void @lock ();
+ public static void set_error_message (Anjuta.Command command, string error_message);
+ public void unlock ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class AsyncNotify : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public AsyncNotify ();
+ public void get_error () throws GLib.Error;
+ public void notify_finished ();
+ public void set_error (GLib.Error error);
+ public virtual signal void finished ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Command : GLib.Object {
+ public virtual void cancel ();
+ public virtual unowned string get_error_message ();
+ public virtual void notify_complete (uint return_code);
+ public virtual void notify_data_arrived ();
+ public virtual void notify_progress (float progress);
+ [NoWrapper]
+ public virtual uint run ();
+ public virtual void set_error_message (string error_message);
+ public virtual void start ();
+ public virtual signal void command_finished (uint p0);
+ public virtual signal void data_arrived ();
+ public virtual signal void progress (float progress);
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class CommandQueue : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public CommandQueue ();
+ public void push (Anjuta.Command command);
+ }
+ [Compact]
+ [CCode (copy_function = "anjuta_encoding_copy", type_id = "ANJUTA_TYPE_ENCODING", cheader_filename = "libanjuta/libanjuta.h")]
+ public class Encoding {
+ public unowned Anjuta.Encoding copy ();
+ public unowned string get_charset ();
+ public static unowned Anjuta.Encoding get_current ();
+ public static unowned Anjuta.Encoding get_from_charset (string charset);
+ public static unowned Anjuta.Encoding get_from_index (int index);
+ public unowned string get_name ();
+ public static unowned Anjuta.Encoding get_utf8 ();
+ public unowned string to_string ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Launcher : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Launcher ();
+ public bool execute (string command_str, Anjuta.LauncherOutputCallback callback, void* callback_data);
+ public bool execute_v (string dir, string[] argv, string[] envp, Anjuta.LauncherOutputCallback callback, void* callback_data);
+ public int get_child_pid ();
+ public bool is_busy ();
+ public void reset ();
+ public void send_ptyin (string input_str);
+ public void send_stdin (string input_str);
+ public void send_stdin_eof ();
+ public bool set_buffered_output (bool buffered);
+ public bool set_check_passwd_prompt (bool check_passwd);
+ public void set_encoding (string charset);
+ public bool set_terminal_echo (bool echo_on);
+ public bool set_terminate_on_exit (bool terminate_on_exit);
+ public void @signal (int sig);
+ public virtual signal void busy (bool busy_flag);
+ public virtual signal void child_exited (int child_pid, int exit_status, ulong time_taken_in_seconds);
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Plugin : GLib.Object {
+ public virtual bool activate ();
+ public uint add_watch (string name, [CCode (delegate_target_pos = 3.1)] Anjuta.PluginValueAdded added, Anjuta.PluginValueRemoved removed);
+ public virtual bool deactivate ();
+ public bool is_active ();
+ public void remove_watch (uint id, bool send_remove);
+ [NoAccessorMethod]
+ public Anjuta.Shell shell { owned get; set; }
+ public virtual signal void activated ();
+ public virtual signal void deactivated ();
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class PluginDescription {
+ [CCode (has_construct_function = false)]
+ public PluginDescription (string filename) throws GLib.Error;
+ public void foreach_key (string section_name, bool include_localized, Anjuta.PluginDescriptionLineFunc func);
+ public void foreach_section (Anjuta.PluginDescriptionSectionFunc func);
+ [CCode (has_construct_function = false)]
+ public PluginDescription.from_string (string data) throws GLib.Error;
+ public bool get_boolean (string section, string keyname, bool val);
+ public bool get_integer (string section, string keyname, int val);
+ public bool get_locale_string (string section, string keyname, string val);
+ public bool get_raw (string section_name, string keyname, string locale, string val);
+ public bool get_string (string section, string keyname, string val);
+ public static GLib.Quark parse_error_quark ();
+ public unowned string to_string ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class PluginHandle : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public PluginHandle (string plugin_desc_path);
+ public unowned string get_about ();
+ public bool get_can_load ();
+ public bool get_checked ();
+ public unowned GLib.HashTable get_dependencies ();
+ public unowned GLib.List get_dependency_names ();
+ public unowned GLib.HashTable get_dependents ();
+ public unowned Anjuta.PluginDescription get_description ();
+ public unowned string get_icon_path ();
+ public unowned string get_id ();
+ public unowned GLib.List get_interfaces ();
+ public unowned string get_language ();
+ public unowned string get_name ();
+ public unowned string get_path ();
+ public bool get_resident ();
+ public int get_resolve_pass ();
+ public bool get_user_activatable ();
+ public void set_can_load (bool can_load);
+ public void set_checked (bool checked);
+ public void set_resolve_pass (bool resolve_pass);
+ public void unresolve_dependencies ();
+ public string about { get; }
+ public bool can_load { get; }
+ public bool checked { get; }
+ public void* dependencies { get; }
+ public void* dependency_names { get; }
+ public void* dependents { get; }
+ public void* description { get; }
+ public string icon_path { get; }
+ public string id { get; }
+ public void* interfaces { get; }
+ public string language { get; }
+ public string name { get; }
+ public string path { get; }
+ public bool resident { get; }
+ public int resolve_pass { get; }
+ public bool user_activatable { get; }
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class PluginManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public PluginManager (GLib.Object shell, Anjuta.Status status, GLib.List plugin_search_paths);
+ public void activate_plugins (GLib.List plugin_descs);
+ public static GLib.Quark error_quark ();
+ public unowned GLib.List get_active_plugin_objects ();
+ public unowned GLib.List get_active_plugins ();
+ public unowned GLib.Object get_plugin (string iface_name);
+ public unowned GLib.Object get_plugin_by_id (string plugin_id);
+ public unowned Gtk.Widget get_plugins_page ();
+ public unowned string get_remembered_plugins ();
+ public unowned Gtk.Widget get_remembered_plugins_page ();
+ public bool is_active_plugin (string iface_name);
+ public unowned GLib.List list_query (GLib.List section_names, GLib.List attribute_names, GLib.List attribute_values);
+ public unowned GLib.List query (string section_names, string attribute_names, string attribute_values);
+ public unowned Anjuta.PluginDescription select (string title, string description, GLib.List plugin_descriptions);
+ public unowned GLib.Object select_and_activate (string title, string description, GLib.List plugin_descriptions);
+ public void set_remembered_plugins (string remembered_plugins);
+ public void unload_all_plugins ();
+ public bool unload_plugin (GLib.Object plugin);
+ public bool unload_plugin_by_id (string plugin_id);
+ [NoAccessorMethod]
+ public void* activated_plugins { get; }
+ [NoAccessorMethod]
+ public void* available_plugins { get; }
+ [NoAccessorMethod]
+ public void* profiles { get; }
+ [NoAccessorMethod]
+ public GLib.Object shell { owned get; set construct; }
+ [NoAccessorMethod]
+ public Anjuta.Status status { owned get; set construct; }
+ public virtual signal void plugin_activated (void* plugin_desc, Anjuta.Plugin plugin);
+ public virtual signal void plugin_deactivated (void* plugin_desc, Anjuta.Plugin plugin);
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Preferences : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Preferences (Anjuta.PluginManager plugin_manager);
+ public void add_from_builder (Gtk.Builder builder, string glade_widget_name, string title, string icon_filename);
+ public static unowned Anjuta.Preferences @default ();
+ public unowned string default_get (string key);
+ public int default_get_bool (string key);
+ public int default_get_int (string key);
+ public void @foreach (Anjuta.PreferencesCallback callback, void* data);
+ public unowned string @get (string key);
+ public bool get_bool (string key);
+ public int get_bool_with_default (string key, int default_value);
+ public unowned Gtk.Widget get_dialog ();
+ public int get_int (string key);
+ public int get_int_with_default (string key, int default_value);
+ public unowned string get_prefix ();
+ public bool is_dialog_created ();
+ public uint notify_add_bool (string key, Anjuta.PreferencesNotifyBool func, void* data, GLib.FreeFunc destroy_notify);
+ public uint notify_add_int (string key, Anjuta.PreferencesNotifyInt func, void* data, GLib.FreeFunc destroy_notify);
+ public uint notify_add_string (string key, Anjuta.PreferencesNotify func, void* data, GLib.FreeFunc destroy_notify);
+ public void notify_remove (uint notify_id);
+ public void register_all_properties_from_builder_xml (Gtk.Builder builder, Gtk.Widget parent);
+ public bool register_property_custom (Gtk.Widget object, string key, string default_value, Anjuta.PropertyDataType data_type, uint flags, GLib.Callback set_property, GLib.Callback get_property);
+ public bool register_property_from_string (Gtk.Widget object, string property_desc);
+ public bool register_property_raw (Gtk.Widget object, string key, string default_value, uint flags, Anjuta.PropertyObjectType object_type, Anjuta.PropertyDataType data_type);
+ public void remove_page (string page_name);
+ public void reset_defaults ();
+ public void @set (string key, string value);
+ public void set_bool (string key, bool value);
+ public void set_int (string key, int value);
+ public void sync_to_session ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class PreferencesDialog : Gtk.Dialog, Gtk.Buildable, Atk.Implementor {
+ [CCode (type = "GtkWidget*", has_construct_function = false)]
+ public PreferencesDialog ();
+ public void add_page (string name, string title, Gdk.Pixbuf icon, Gtk.Widget page);
+ public void remove_page (string title);
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Profile : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Profile (string name, Anjuta.PluginManager plugin_manager);
+ public void add_plugin (Anjuta.PluginDescription plugin);
+ public bool add_plugins_from_xml (GLib.File profile_xml_file, bool exclude_from_sync) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public unowned string get_name ();
+ public unowned GLib.List get_plugins ();
+ public bool has_plugin (Anjuta.PluginDescription plugin);
+ public void remove_plugin (Anjuta.PluginDescription plugin);
+ public void set_sync_file (GLib.File sync_file);
+ public bool sync () throws GLib.Error;
+ [NoAccessorMethod]
+ public Anjuta.PluginManager plugin_manager { owned get; set construct; }
+ [NoAccessorMethod]
+ public void* plugins { get; set construct; }
+ [NoAccessorMethod]
+ public string profile_name { owned get; set construct; }
+ [NoAccessorMethod]
+ public GLib.File sync_file { owned get; set construct; }
+ public virtual signal void changed (void* plugins);
+ public virtual signal void plugin_added (void* plugin);
+ public virtual signal void plugin_removed (void* plugin);
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProfileManager : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public ProfileManager (Anjuta.PluginManager plugin_manager);
+ public void freeze ();
+ public unowned Anjuta.Profile get_current ();
+ public bool pop (string profile_name) throws GLib.Error;
+ public bool push (Anjuta.Profile profile) throws GLib.Error;
+ public bool thaw () throws GLib.Error;
+ [NoAccessorMethod]
+ public Anjuta.PluginManager plugin_manager { owned get; set construct; }
+ public virtual signal void profile_descoped (Anjuta.Profile profile);
+ public virtual signal void profile_popped (Anjuta.Profile profile);
+ public virtual signal void profile_pushed (Anjuta.Profile profile);
+ public virtual signal void profile_scoped (Anjuta.Profile profile);
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectGroup {
+ public unowned GLib.File get_directory ();
+ public unowned Anjuta.ProjectGroup get_node_from_file (GLib.File directory);
+ public unowned Anjuta.ProjectGroup get_node_from_uri (string uri);
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectGroupData {
+ public weak GLib.File directory;
+ public weak Anjuta.ProjectNodeData node;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectNode {
+ public void all_foreach (Anjuta.ProjectNodeFunc func, void* data);
+ public unowned Anjuta.ProjectNode append (Anjuta.ProjectNode node);
+ public void children_foreach (Anjuta.ProjectNodeFunc func, void* data);
+ public unowned Anjuta.ProjectNode first_child ();
+ public unowned GLib.File get_file ();
+ public unowned string get_name ();
+ public unowned string get_uri ();
+ public unowned Anjuta.ProjectNode insert_after (Anjuta.ProjectNode sibling, Anjuta.ProjectNode node);
+ public unowned Anjuta.ProjectNode insert_before (Anjuta.ProjectNode sibling, Anjuta.ProjectNode node);
+ public unowned Anjuta.ProjectNode last_child ();
+ public unowned Anjuta.ProjectNode next_sibling ();
+ public unowned Anjuta.ProjectNode nth_child (uint n);
+ public unowned Anjuta.ProjectNode parent ();
+ public unowned Anjuta.ProjectNode prepend (Anjuta.ProjectNode node);
+ public unowned Anjuta.ProjectNode prev_sibling ();
+ public Anjuta.ProjectNodeType type ();
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectNodeData {
+ public Anjuta.ProjectNodeType type;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectSource {
+ public unowned GLib.File get_file ();
+ public static unowned Anjuta.ProjectSource get_node_from_file (Anjuta.ProjectNode parent, GLib.File file);
+ public static unowned Anjuta.ProjectSource get_node_from_uri (Anjuta.ProjectNode parent, string uri);
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectSourceData {
+ public weak GLib.File file;
+ public weak Anjuta.ProjectNodeData node;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectTarget {
+ public unowned string get_name ();
+ public static unowned Anjuta.ProjectTarget get_node_from_name (Anjuta.ProjectGroup parent, string name);
+ public unowned Anjuta.ProjectTargetType type ();
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectTargetData {
+ public weak string name;
+ public weak Anjuta.ProjectNodeData node;
+ public weak Anjuta.ProjectTargetType type;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectTargetInformation {
+ public Anjuta.ProjectTargetClass @base;
+ public weak string mime_type;
+ public weak string name;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class ProjectTargetType {
+ public Anjuta.ProjectTargetClass @class ();
+ public unowned string mime ();
+ public unowned string name ();
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Property {
+ public unowned Gtk.Widget get_widget ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class SavePrompt : Gtk.MessageDialog, Gtk.Buildable, Atk.Implementor {
+ [CCode (has_construct_function = false)]
+ public SavePrompt (Gtk.Window parent);
+ public void add_item (string item_name, string item_detail, void* item, Anjuta.SavePromptSaveFunc item_save_func);
+ public int get_items_count ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Serializer : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Serializer (string filepath, Anjuta.SerializerMode mode);
+ public bool read_float (string name, float value);
+ public bool read_int (string name, int value);
+ public bool read_string (string name, string value, bool replace);
+ public bool write_float (string name, float value);
+ public bool write_int (string name, int value);
+ public bool write_string (string name, string value);
+ [NoAccessorMethod]
+ public string filepath { owned get; construct; }
+ [NoAccessorMethod]
+ public Anjuta.SerializerMode mode { get; construct; }
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Session : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public Session (string session_directory);
+ public void clear ();
+ public void clear_section (string section);
+ public float get_float (string section, string key);
+ public int get_int (string section, string key);
+ public unowned string get_session_directory ();
+ public unowned string get_session_filename ();
+ public unowned string get_string (string section, string key);
+ public unowned GLib.List get_string_list (string section, string key);
+ public void set_float (string section, string key, float value);
+ public void set_int (string section, string key, int value);
+ public void set_string (string section, string key, string value);
+ public void set_string_list (string section, string key, GLib.List value);
+ public void sync ();
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class Status : Gtk.HBox, Gtk.Buildable, Atk.Implementor, Gtk.Orientable {
+ [CCode (type = "GtkWidget*", has_construct_function = false)]
+ public Status ();
+ public void add_widget (Gtk.Widget widget);
+ public void busy_pop ();
+ public void busy_push ();
+ public void clear_stack ();
+ public void disable_splash (bool disable_splash);
+ public void pop ();
+ public void progress_add_ticks (int ticks);
+ public void progress_increment_ticks (int ticks, string text);
+ public void progress_pulse (string text);
+ public void progress_reset ();
+ public void progress_tick (Gdk.Pixbuf icon, string text);
+ public void push (string mesg, ...);
+ public void @set (string mesg, ...);
+ public void set_default (string label, string value_format, ...);
+ public void set_splash (string splash_file, int splash_progress_position);
+ public void set_title (string title);
+ public void set_title_window (Gtk.Widget window);
+ public virtual signal void busy (bool state);
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class SyncCommand : Anjuta.Command {
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class UI : Gtk.UIManager, Gtk.Buildable {
+ [CCode (has_construct_function = false)]
+ public UI ();
+ public void activate_action_by_group (Gtk.ActionGroup action_group, string action_name);
+ public void activate_action_by_path (string action_path);
+ public void add_action_group (string action_group_name, string action_group_label, Gtk.ActionGroup action_group, bool can_customize);
+ public unowned Gtk.ActionGroup add_action_group_entries (string action_group_name, string action_group_label, Gtk.ActionEntry[] entries, string translation_domain, bool can_customize, void* user_data);
+ public unowned Gtk.ActionGroup add_toggle_action_group_entries (string action_group_name, string action_group_label, Gtk.ToggleActionEntry entries, int num_entries, string translation_domain, bool can_customize);
+ public void dump_tree ();
+ public unowned Gtk.Widget get_accel_editor ();
+ public unowned Gtk.AccelGroup get_accel_group ();
+ public unowned Gtk.Action get_action (string action_group_name, string action_name);
+ public unowned Gtk.IconFactory get_icon_factory ();
+ public static void load_accels (string filename);
+ public int merge (string ui_filename);
+ public void remove_action_group (Gtk.ActionGroup action_group);
+ public static void save_accels (string filename);
+ public void unload_accels ();
+ public void unmerge (int id);
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class UtilStringMap {
+ public weak string name;
+ public int type;
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public class VcsStatusTreeView : Gtk.TreeView, Gtk.Buildable, Atk.Implementor {
+ [CCode (type = "GtkWidget*", has_construct_function = false)]
+ public VcsStatusTreeView ();
+ public void add (string path, Anjuta.VcsStatus status, bool selected);
+ public void destroy ();
+ public unowned GLib.List get_selected ();
+ public void select_all ();
+ public void unselect_all ();
+ [NoAccessorMethod]
+ public bool conflicted_selectable { get; construct; }
+ [NoAccessorMethod]
+ public bool show_status { get; set; }
+ [NoAccessorMethod]
+ public Anjuta.VcsStatus status_codes { get; construct; }
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public interface Shell : GLib.Object {
+ public void add (string first_name, ...);
+ public void add_valist (string first_name, GLib.Type first_type, void* var_args);
+ public abstract void add_value (string name, GLib.Value value) throws GLib.Error;
+ public void add_widget (Gtk.Widget widget, string name, string title, string stock_id, Anjuta.ShellPlacement placement) throws GLib.Error;
+ public abstract void add_widget_custom (Gtk.Widget widget, string name, string title, string stock_id, Gtk.Widget label, Anjuta.ShellPlacement placement) throws GLib.Error;
+ public abstract void add_widget_full (Gtk.Widget widget, string name, string title, string stock_id, Anjuta.ShellPlacement placement, bool locked) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public void freeze () throws GLib.Error;
+ public void @get (string first_name, ...);
+ public abstract unowned GLib.Object get_object (string iface_name) throws GLib.Error;
+ public abstract unowned Anjuta.PluginManager get_plugin_manager () throws GLib.Error;
+ public abstract unowned Anjuta.Preferences get_preferences () throws GLib.Error;
+ public abstract unowned Anjuta.ProfileManager get_profile_manager () throws GLib.Error;
+ public abstract unowned Anjuta.Status get_status () throws GLib.Error;
+ public abstract unowned Anjuta.UI get_ui () throws GLib.Error;
+ public void get_valist (string first_name, GLib.Type first_type, void* var_args);
+ public abstract void get_value (string name, GLib.Value value) throws GLib.Error;
+ public void notify_exit () throws GLib.Error;
+ public abstract void present_widget (Gtk.Widget widget) throws GLib.Error;
+ public abstract void remove_value (string name) throws GLib.Error;
+ public abstract void remove_widget (Gtk.Widget widget) throws GLib.Error;
+ public abstract void saving_pop ();
+ public abstract void saving_push ();
+ public void session_load (string session_directory) throws GLib.Error;
+ public void session_save (string session_directory) throws GLib.Error;
+ public void thaw () throws GLib.Error;
+ public signal void exiting ();
+ public signal void load_session (int phase, GLib.Object session);
+ [HasEmitter]
+ public signal void save_prompt (GLib.Object save_prompt);
+ public signal void save_session (int phase, GLib.Object session);
+ public signal void value_added (string name, GLib.Value value);
+ public signal void value_removed (string name);
+ }
+ [CCode (cprefix = "ANJUTA_CONVERT_ERROR_AUTO_DETECTION_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum ConvertError {
+ FAILED
+ }
+ [CCode (cprefix = "GBF_PROJECT_CAN_", cheader_filename = "libanjuta/libanjuta.h")]
+ [Flags]
+ public enum GbfProjectCapabilities {
+ ADD_NONE,
+ ADD_GROUP,
+ ADD_TARGET,
+ ADD_SOURCE,
+ PACKAGES
+ }
+ [CCode (cprefix = "GBF_PROJECT_ERROR_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum GbfProjectError {
+ SUCCESS,
+ DOESNT_EXIST,
+ ALREADY_EXISTS,
+ VALIDATION_FAILED,
+ PROJECT_MALFORMED,
+ GENERAL_FAILURE
+ }
+ [CCode (cprefix = "ANJUTA_LAUNCHER_OUTPUT_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum LauncherOutputType {
+ STDOUT,
+ STDERR,
+ PTY
+ }
+ [CCode (cprefix = "ANJUTA_PLUGIN_DESCRIPTION_PARSE_ERROR_INVALID_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum PluginDescriptionParseError {
+ SYNTAX,
+ ESCAPES,
+ CHARS
+ }
+ [CCode (cprefix = "ANJUTA_PLUGIN_MANAGER_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum PluginManagerError {
+ MISSING_FACTORY,
+ ERROR_UNKNOWN
+ }
+ [CCode (cprefix = "ANJUTA_PROFILE_ERROR_URI_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum ProfileError {
+ READ_FAILED,
+ WRITE_FAILED
+ }
+ [CCode (cprefix = "ANJUTA_PROJECT_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum ProjectNodeType {
+ UNKNOWN,
+ GROUP,
+ TARGET,
+ SOURCE,
+ VARIABLE
+ }
+ [CCode (cprefix = "ANJUTA_TARGET_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum ProjectTargetClass {
+ UNKNOWN,
+ SHAREDLIB,
+ STATICLIB,
+ EXECUTABLE,
+ PYTHON,
+ JAVA,
+ LISP,
+ HEADER,
+ MAN,
+ INFO,
+ GENERIC,
+ DATA,
+ EXTRA,
+ INTLTOOL,
+ CONFIGURE,
+ IDL,
+ MKENUMS,
+ GENMARSHAL
+ }
+ [CCode (cprefix = "ANJUTA_PROPERTY_DATA_TYPE_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum PropertyDataType {
+ BOOL,
+ INT,
+ TEXT,
+ COLOR,
+ FONT
+ }
+ [CCode (cprefix = "ANJUTA_PROPERTY_OBJECT_TYPE_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum PropertyObjectType {
+ TOGGLE,
+ SPIN,
+ ENTRY,
+ COMBO,
+ TEXT,
+ COLOR,
+ FONT,
+ FILE,
+ FOLDER
+ }
+ [CCode (cprefix = "ANJUTA_SERIALIZER_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum SerializerMode {
+ READ,
+ WRITE
+ }
+ [CCode (cprefix = "ANJUTA_SESSION_PHASE_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum SessionPhase {
+ START,
+ FIRST,
+ NORMAL,
+ LAST,
+ END
+ }
+ [CCode (cprefix = "ANJUTA_SHELL_ERROR_DOESNT_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum ShellError {
+ EXIST
+ }
+ [CCode (cprefix = "ANJUTA_SHELL_PLACEMENT_", cheader_filename = "libanjuta/libanjuta.h")]
+ public enum ShellPlacement {
+ NONE,
+ TOP,
+ BOTTOM,
+ RIGHT,
+ LEFT,
+ CENTER,
+ FLOATING
+ }
+ [CCode (cprefix = "ANJUTA_VCS_STATUS_", cheader_filename = "libanjuta/libanjuta.h")]
+ [Flags]
+ public enum VcsStatus {
+ MODIFIED,
+ ADDED,
+ DELETED,
+ CONFLICTED,
+ UPTODATE,
+ LOCKED,
+ MISSING,
+ UNVERSIONED,
+ IGNORED
+ }
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void LauncherOutputCallback (Anjuta.Launcher launcher, Anjuta.LauncherOutputType output_type, string chars);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PluginDescriptionLineFunc (Anjuta.PluginDescription df, string key, string locale, string value);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PluginDescriptionSectionFunc (Anjuta.PluginDescription df, string name);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PluginValueAdded (Anjuta.Plugin plugin, string name, GLib.Value value);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PluginValueRemoved (Anjuta.Plugin plugin, string name);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate bool PreferencesCallback (Anjuta.Preferences pr, string key);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PreferencesNotify (Anjuta.Preferences pr, string key, string value);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PreferencesNotifyBool (Anjuta.Preferences pr, string key, bool value);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void PreferencesNotifyInt (Anjuta.Preferences pr, string key, int value);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate void ProjectNodeFunc (Anjuta.ProjectNode node);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public delegate bool SavePromptSaveFunc (Anjuta.SavePrompt save_prompt, void* item);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public const int LIBANJUTA_MAJOR_VERSION;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public const int LIBANJUTA_MICRO_VERSION;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public const int LIBANJUTA_MINOR_VERSION;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public const int LIBANJUTA_VERSION_HEX;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public const string LIBANJUTA_VERSION_S;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public const int VCS_DEFAULT_STATUS_CODES;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static GLib.Quark convert_error_quark ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string convert_from_utf8 (string content, size_t len, Anjuta.Encoding encoding, size_t new_len) throws GLib.Error;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string convert_to_utf8 (string content, size_t len, out unowned Anjuta.Encoding encoding, size_t new_len) throws GLib.Error;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void debug_init ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_data_dir ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_data_file (string pixfile);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_doc_dir ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_doc_file (string docfile);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_help_dir ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_help_dir_locale (string locale);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_help_file (string helpfile);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_help_file_locale (string helpfile, string locale);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned Gtk.Widget res_get_image (string filename);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned Gtk.Widget res_get_image_sized (string filename, int width, int height);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_pixmap_dir ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string res_get_pixmap_file (string pixfile);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void res_help_search (string word);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned Gtk.Widget res_lookup_widget (Gtk.Widget widget, string widget_name);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void res_url_show (string url);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void status (Anjuta.Status status, string mesg, int timeout);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_builder_get_objects (Gtk.Builder builder, ...);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned Gtk.Builder util_builder_new (string filename) throws GLib.Error;
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned Gtk.Widget util_button_new_with_stock_image (string text, string stock_id);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_color_from_string (string val, uint16 r, uint16 g, uint16 b);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_convert_gfile_list_to_path_list (GLib.List list);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_convert_gfile_list_to_relative_path_list (GLib.List list, string parent);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_convert_to_utf8 (string str);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_copy_file (string src, string dest, bool show_error);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_create_dir (string d);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned Gtk.Widget util_dialog_add_button (Gtk.Dialog dialog, string text, string stock_id, int response_id);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_dialog_boolean_question (Gtk.Window parent, string mesg);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_dialog_error (Gtk.Window parent, string mesg);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_dialog_error_system (Gtk.Window parent, int errnum, string mesg);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_dialog_info (Gtk.Window parent, string mesg);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_dialog_input (Gtk.Window parent, string label, string default_value, string value);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_dialog_warning (Gtk.Window parent, string mesg);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_diff (string uri, string text);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_escape_quotes (string str);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static int util_execute_shell (string dir, string command);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static int util_execute_terminal_shell (string dir, string command);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_a_tmp_file ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_file_mime_type (GLib.File file);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_local_path_from_uri (string uri);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_real_path (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.File util_get_user_cache_file (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_user_cache_file_path (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.File util_get_user_config_file (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_user_config_file_path (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.File util_get_user_data_file (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_get_user_data_file_path (string path);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_glist_from_map (Anjuta.UtilStringMap map);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_glist_from_string (string id);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_glist_path_dedup (GLib.List list);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_glist_strings_dup (GLib.List list);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_glist_strings_free (GLib.List list);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_glist_strings_join (GLib.List list, string delimiter);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_glist_strings_prefix (GLib.List list, string prefix);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_glist_strings_sort (GLib.List list);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_glist_strings_sufix (GLib.List list, string sufix);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static void util_help_display (Gtk.Widget parent, string doc_id, string file_name);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_install_files (string names);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_is_project_file (string filename);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_package_is_installed (string lib, bool show);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_parse_args_from_string (string str);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static bool util_prog_is_installed (string prog, bool show);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_replace_home_dir_with_tilde (string uri);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_shell_expand (string str);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_str_middle_truncate (string str, uint truncate_length);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_string_from_color (uint16 r, uint16 g, uint16 b);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_string_from_type (Anjuta.UtilStringMap map, int type);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static int util_type_from_string (Anjuta.UtilStringMap map, string str);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.List util_update_string_list (GLib.List p_list, string p_str, int length);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_uri_get_dirname (string uri);
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_user_shell ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned string util_user_terminal ();
+ [CCode (cheader_filename = "libanjuta/libanjuta.h")]
+ public static unowned GLib.SList utils_drop_get_files (Gtk.SelectionData selection_data);
+}
+/* libanjuta-interfaces.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "IAnjuta", lower_case_cprefix = "ianjuta_")]
+namespace IAnjuta {
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class BuilderHandle {
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerBreakpointItem {
+ public ulong address;
+ public weak string condition;
+ public bool enable;
+ public weak string file;
+ public weak string function;
+ public uint id;
+ public uint ignore;
+ public uint line;
+ public bool temporary;
+ public uint times;
+ public int type;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerFrame {
+ public ulong address;
+ public weak string args;
+ public weak string file;
+ public weak string function;
+ public uint level;
+ public weak string library;
+ public uint line;
+ public int thread;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerInstructionALine {
+ public ulong address;
+ public weak string label;
+ public weak string text;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerInstructionDisassembly {
+ [CCode (array_length = false)]
+ public weak IAnjuta.DebuggerInstructionALine[] data;
+ public uint size;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerMemoryBlock {
+ public ulong address;
+ public weak string data;
+ public uint length;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerRegisterData {
+ public weak string name;
+ public uint num;
+ public weak string value;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class DebuggerVariableObject {
+ public bool changed;
+ public int children;
+ public bool deleted;
+ public bool exited;
+ public weak string expression;
+ public weak string name;
+ public weak string type;
+ public weak string value;
+ }
+ [Compact]
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public class LanguageId {
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Buildable : GLib.Object {
+ public abstract void build (string uri) throws GLib.Error;
+ public abstract void clean (string uri) throws GLib.Error;
+ public abstract void configure (string uri) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void execute (string uri) throws GLib.Error;
+ public abstract void generate (string uri) throws GLib.Error;
+ public abstract unowned string get_command (IAnjuta.BuildableCommand command_id) throws GLib.Error;
+ public abstract void install (string uri) throws GLib.Error;
+ public abstract void reset_commands () throws GLib.Error;
+ public abstract void set_command (IAnjuta.BuildableCommand command_id, string command) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Builder : GLib.Object {
+ public abstract unowned IAnjuta.BuilderHandle build (string uri, IAnjuta.BuilderCallback callback) throws GLib.Error;
+ public abstract void cancel (IAnjuta.BuilderHandle handle) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_uri_configuration (string uri) throws GLib.Error;
+ public abstract unowned IAnjuta.BuilderHandle is_built (string uri, IAnjuta.BuilderCallback callback) throws GLib.Error;
+ public abstract unowned GLib.List list_configuration () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DebugManager : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract bool quit () throws GLib.Error;
+ public abstract bool start (string uri) throws GLib.Error;
+ public abstract bool start_remote (string server, string uri) throws GLib.Error;
+ public signal void breakpoint_changed (void* breakpoint);
+ public signal void debugger_started ();
+ public signal void debugger_stopped (GLib.Error err);
+ public signal void frame_changed (uint frame, int thread);
+ public signal void location_changed (ulong address, string uri, uint line);
+ public signal void program_exited ();
+ public signal void program_loaded ();
+ public signal void program_moved (int pid, int tid, ulong address, string file, uint line);
+ public signal void program_running ();
+ public signal void program_started ();
+ public signal void program_stopped ();
+ public signal void program_unloaded ();
+ public signal void sharedlib_event ();
+ public signal void signal_received (string name, string description);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Debugger : GLib.Object {
+ public abstract bool abort () throws GLib.Error;
+ public abstract bool attach (int pid, GLib.List source_search_directories) throws GLib.Error;
+ public abstract bool callback (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool connect (string server, string args, bool terminal, bool stop) throws GLib.Error;
+ public abstract void disable_log () throws GLib.Error;
+ public abstract void enable_log (IAnjuta.MessageView log) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool evaluate (string name, string value, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool exit () throws GLib.Error;
+ public abstract IAnjuta.DebuggerState get_state () throws GLib.Error;
+ public abstract bool handle_signal (string name, bool stop, bool print, bool ignore) throws GLib.Error;
+ public abstract bool info_args (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_frame (uint frame, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_program (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_sharedlib (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_signal (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_target (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_thread (int thread, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_udot (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool info_variables (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool inspect (string name, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool interrupt () throws GLib.Error;
+ public abstract bool list_argument (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool list_frame (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool list_local (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool list_register (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool list_thread (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool load (string file, string mime_type, GLib.List source_search_directories) throws GLib.Error;
+ public abstract bool print (string variable, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool quit () throws GLib.Error;
+ public abstract bool run () throws GLib.Error;
+ public abstract bool run_to (string file, int line) throws GLib.Error;
+ public abstract bool send_command (string command) throws GLib.Error;
+ public abstract bool set_environment (string env) throws GLib.Error;
+ public abstract bool set_frame (uint frame) throws GLib.Error;
+ public abstract bool set_thread (int thread) throws GLib.Error;
+ public abstract bool set_working_directory (string dir) throws GLib.Error;
+ public abstract bool start (string args, bool terminal, bool stop) throws GLib.Error;
+ public abstract bool step_in () throws GLib.Error;
+ public abstract bool step_out () throws GLib.Error;
+ public abstract bool step_over () throws GLib.Error;
+ public abstract bool unload () throws GLib.Error;
+ public signal void debugger_ready (IAnjuta.DebuggerState state);
+ public signal void debugger_started ();
+ public signal void debugger_stopped (GLib.Error err);
+ public signal void frame_changed (uint frame, int thread);
+ public signal void program_exited ();
+ public signal void program_loaded ();
+ public signal void program_moved (int pid, int tid, ulong address, string file, uint line);
+ public signal void program_running ();
+ public signal void program_stopped ();
+ public signal void sharedlib_event ();
+ public signal void signal_received (string name, string description);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DebuggerBreakpoint : IAnjuta.Debugger, GLib.Object {
+ public abstract bool clear_breakpoint (uint id, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool condition_breakpoint (uint id, string condition, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool enable_breakpoint (uint id, bool enable, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool ignore_breakpoint (uint id, uint ignore, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract int implement_breakpoint () throws GLib.Error;
+ public abstract bool list_breakpoint (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool set_breakpoint_at_address (ulong address, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool set_breakpoint_at_function (string file, string function, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool set_breakpoint_at_line (string file, uint line, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DebuggerInstruction : IAnjuta.Debugger, GLib.Object {
+ public abstract bool disassemble (ulong address, uint length, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool run_to_address (ulong address) throws GLib.Error;
+ public abstract bool step_in_instruction () throws GLib.Error;
+ public abstract bool step_over_instruction () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DebuggerMemory : IAnjuta.Debugger, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract bool inspect (ulong address, uint length, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DebuggerRegister : IAnjuta.Debugger, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract bool list_register (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool update_register (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool write_register (IAnjuta.DebuggerRegisterData value) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DebuggerVariable : IAnjuta.Debugger, GLib.Object {
+ public abstract bool assign (string name, string value) throws GLib.Error;
+ public abstract bool create (string expression, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool destroy (string name) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool evaluate (string name, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool list_children (string name, IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ public abstract bool update (IAnjuta.DebuggerCallback callback) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Document : GLib.Object {
+ public abstract void begin_undo_action () throws GLib.Error;
+ public abstract bool can_redo () throws GLib.Error;
+ public abstract bool can_undo () throws GLib.Error;
+ public abstract void clear () throws GLib.Error;
+ public abstract void copy () throws GLib.Error;
+ public abstract void cut () throws GLib.Error;
+ public abstract void end_undo_action () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_filename () throws GLib.Error;
+ public abstract void grab_focus () throws GLib.Error;
+ public abstract void paste () throws GLib.Error;
+ public abstract void redo () throws GLib.Error;
+ public abstract void undo () throws GLib.Error;
+ public signal void update_ui ();
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface DocumentManager : GLib.Object {
+ public abstract void add_bookmark (GLib.File file, int line) throws GLib.Error;
+ public abstract unowned IAnjuta.Editor add_buffer (string name, string content) throws GLib.Error;
+ public abstract void add_document (IAnjuta.Document document) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract unowned IAnjuta.Document find_document_with_file (GLib.File file) throws GLib.Error;
+ public abstract unowned IAnjuta.Document get_current_document () throws GLib.Error;
+ public abstract unowned GLib.List get_doc_widgets () throws GLib.Error;
+ public abstract unowned GLib.File get_file (string filename) throws GLib.Error;
+ public abstract unowned IAnjuta.Editor goto_file_line (GLib.File file, int lineno) throws GLib.Error;
+ public abstract unowned IAnjuta.Editor goto_file_line_mark (GLib.File file, int lineno, bool mark) throws GLib.Error;
+ public abstract bool remove_document (IAnjuta.Document document, bool save_before) throws GLib.Error;
+ public abstract void set_current_document (IAnjuta.Document document) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Editor : GLib.Object {
+ public abstract void append (string text, int length) throws GLib.Error;
+ public abstract void erase (IAnjuta.Iterable position_start, IAnjuta.Iterable position_end) throws GLib.Error;
+ public abstract void erase_all () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract int get_column () throws GLib.Error;
+ public abstract unowned string get_current_word () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_end_position () throws GLib.Error;
+ public abstract int get_length () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_line_begin_position (int line) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_line_end_position (int line) throws GLib.Error;
+ public abstract int get_line_from_position (IAnjuta.Iterable position) throws GLib.Error;
+ public abstract int get_lineno () throws GLib.Error;
+ public abstract int get_offset () throws GLib.Error;
+ public abstract bool get_overwrite () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_position () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_position_from_offset (int offset) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_start_position () throws GLib.Error;
+ public abstract int get_tabsize () throws GLib.Error;
+ public abstract unowned string get_text (IAnjuta.Iterable begin, IAnjuta.Iterable end) throws GLib.Error;
+ public abstract unowned string get_text_all () throws GLib.Error;
+ public abstract bool get_use_spaces () throws GLib.Error;
+ [NoWrapper]
+ public abstract void goto_end () throws GLib.Error;
+ [NoWrapper]
+ public abstract void goto_line (int lineno) throws GLib.Error;
+ [NoWrapper]
+ public abstract void goto_position (IAnjuta.Iterable position) throws GLib.Error;
+ [NoWrapper]
+ public abstract void goto_start () throws GLib.Error;
+ public abstract void insert (IAnjuta.Iterable position, string text, int length) throws GLib.Error;
+ public abstract void set_auto_indent (bool auto_indent) throws GLib.Error;
+ public abstract void set_popup_menu (Gtk.Widget menu) throws GLib.Error;
+ public abstract void set_tabsize (int tabsize) throws GLib.Error;
+ public abstract void set_use_spaces (bool use_spaces) throws GLib.Error;
+ public signal void backspace ();
+ public signal void changed (GLib.Object position, bool added, int length, int lines, string text);
+ public signal void char_added (GLib.Object position, char ch);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorAssist : IAnjuta.Editor, GLib.Object {
+ public abstract void add (IAnjuta.Provider provider) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void invoke (IAnjuta.Provider provider) throws GLib.Error;
+ public abstract void proposals (IAnjuta.Provider provider, GLib.List proposals, bool finished) throws GLib.Error;
+ public abstract void remove (IAnjuta.Provider provider) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorCell : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract IAnjuta.EditorAttribute get_attribute () throws GLib.Error;
+ public abstract char get_char (int char_index) throws GLib.Error;
+ public abstract unowned string get_character () throws GLib.Error;
+ public abstract int get_length () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorCellStyle : IAnjuta.EditorCell, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_background_color () throws GLib.Error;
+ public abstract unowned string get_color () throws GLib.Error;
+ public abstract unowned string get_font_description () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorComment : IAnjuta.Editor, GLib.Object {
+ public abstract void block () throws GLib.Error;
+ public abstract void box () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void stream () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorConvert : IAnjuta.Editor, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void to_lower (IAnjuta.Iterable start_position, IAnjuta.Iterable end_position) throws GLib.Error;
+ public abstract void to_upper (IAnjuta.Iterable start_position, IAnjuta.Iterable end_position) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorFactory : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned IAnjuta.Editor new_editor (GLib.File file, string filename) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorFolds : IAnjuta.Editor, GLib.Object {
+ public abstract void close_all () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void open_all () throws GLib.Error;
+ public abstract void toggle_current () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorGoto : IAnjuta.Editor, GLib.Object {
+ public static void end (IAnjuta.Editor obj) throws GLib.Error;
+ public abstract void end_block () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public static void line (IAnjuta.Editor obj, int lineno) throws GLib.Error;
+ public abstract void matching_brace () throws GLib.Error;
+ public static void position (IAnjuta.Editor obj, IAnjuta.Iterable position) throws GLib.Error;
+ public static void start (IAnjuta.Editor obj) throws GLib.Error;
+ public abstract void start_block () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorHover : IAnjuta.Editor, GLib.Object {
+ public abstract void display (IAnjuta.Iterable position, string info) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public signal void hover_leave (GLib.Object position);
+ public signal void hover_over (GLib.Object position);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorLanguage : IAnjuta.Editor, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_language () throws GLib.Error;
+ public abstract unowned string get_language_name (string language) throws GLib.Error;
+ public abstract unowned GLib.List get_supported_languages () throws GLib.Error;
+ public abstract void set_language (string language) throws GLib.Error;
+ public signal void language_changed (string language);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorLineMode : IAnjuta.Editor, GLib.Object {
+ public abstract void convert (IAnjuta.EditorLineModeType mode) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void fix () throws GLib.Error;
+ public abstract IAnjuta.EditorLineModeType @get () throws GLib.Error;
+ public abstract void @set (IAnjuta.EditorLineModeType mode) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorSearch : IAnjuta.Editor, GLib.Object {
+ public abstract bool backward (string search, bool case_sensitive, IAnjuta.EditorCell start, IAnjuta.EditorCell end, out unowned IAnjuta.EditorCell result_start, out unowned IAnjuta.EditorCell result_end) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool forward (string search, bool case_sensitive, IAnjuta.EditorCell start, IAnjuta.EditorCell end, out unowned IAnjuta.EditorCell result_start, out unowned IAnjuta.EditorCell result_end) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorSelection : IAnjuta.Editor, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned string @get () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_end () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_start () throws GLib.Error;
+ public abstract bool has_selection () throws GLib.Error;
+ public abstract void replace (string text, int length) throws GLib.Error;
+ public abstract void select_all () throws GLib.Error;
+ public abstract void select_block () throws GLib.Error;
+ public abstract void select_function () throws GLib.Error;
+ public abstract void @set (IAnjuta.Iterable start, IAnjuta.Iterable end, bool scroll) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorTip : IAnjuta.Editor, GLib.Object {
+ public abstract void cancel () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void show (GLib.List tips, IAnjuta.Iterable position) throws GLib.Error;
+ public abstract bool visible () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorView : IAnjuta.Editor, GLib.Object {
+ public abstract void create () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract int get_count () throws GLib.Error;
+ public abstract void remove_current () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface EditorZoom : IAnjuta.Editor, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void @in () throws GLib.Error;
+ public abstract void @out () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Environment : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_real_directory (string dir) throws GLib.Error;
+ public abstract bool @override (string dirp, string argvp, string envp) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface File : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.File get_file () throws GLib.Error;
+ public abstract void open (GLib.File file) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface FileLoader : IAnjuta.Loader, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.Object load (GLib.File file, bool readonly) throws GLib.Error;
+ public abstract unowned string peek_interface (GLib.File file) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface FileManager : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.File get_selected () throws GLib.Error;
+ public abstract void set_root (string root_uri) throws GLib.Error;
+ public abstract void set_selected (GLib.File file) throws GLib.Error;
+ public signal void section_changed (GLib.Object file);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface FileSavable : IAnjuta.File, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract bool is_conflict () throws GLib.Error;
+ public abstract bool is_dirty () throws GLib.Error;
+ public abstract bool is_read_only () throws GLib.Error;
+ public abstract void save () throws GLib.Error;
+ public abstract void save_as (GLib.File file) throws GLib.Error;
+ public abstract void set_dirty (bool dirty) throws GLib.Error;
+ public signal void saved (GLib.Object file);
+ public signal void update_save_ui ();
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Help : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void search (string query) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Indicable : GLib.Object {
+ public abstract void clear () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void @set (IAnjuta.Iterable begin_location, IAnjuta.Iterable end_location, IAnjuta.IndicableIndicator indicator) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Iterable : GLib.Object {
+ public abstract void assign (IAnjuta.Iterable src_iter) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable clone () throws GLib.Error;
+ public abstract int compare (IAnjuta.Iterable iter2) throws GLib.Error;
+ public abstract int diff (IAnjuta.Iterable iter2) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool first () throws GLib.Error;
+ public abstract void @foreach (GLib.Func callback) throws GLib.Error;
+ public abstract int get_length () throws GLib.Error;
+ public abstract int get_position () throws GLib.Error;
+ public abstract bool last () throws GLib.Error;
+ public abstract bool next () throws GLib.Error;
+ public abstract bool previous () throws GLib.Error;
+ public abstract bool set_position (int position) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface IterableTree : IAnjuta.Iterable, GLib.Object {
+ public abstract bool children () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void foreach_post (GLib.Func callback) throws GLib.Error;
+ public abstract void foreach_pre (GLib.Func callback) throws GLib.Error;
+ public abstract bool has_children () throws GLib.Error;
+ public abstract bool parent () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Language : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned IAnjuta.LanguageId get_from_editor (IAnjuta.EditorLanguage editor) throws GLib.Error;
+ public abstract unowned IAnjuta.LanguageId get_from_mime_type (string mime_type) throws GLib.Error;
+ public abstract unowned IAnjuta.LanguageId get_from_string (string str) throws GLib.Error;
+ public abstract unowned GLib.List get_languages () throws GLib.Error;
+ public abstract unowned string get_make_target (IAnjuta.LanguageId id) throws GLib.Error;
+ public abstract unowned string get_name (IAnjuta.LanguageId id) throws GLib.Error;
+ public abstract unowned string get_name_from_editor (IAnjuta.EditorLanguage editor) throws GLib.Error;
+ public abstract unowned GLib.List get_strings (IAnjuta.LanguageId id) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface LanguageSupport : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.List get_supported_languages () throws GLib.Error;
+ public abstract bool supports (string language) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Loader : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.List find_plugins () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Macro : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void insert (string key) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Markable : GLib.Object {
+ public abstract void delete_all_markers (IAnjuta.MarkableMarker marker) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract bool is_marker_set (int location, IAnjuta.MarkableMarker marker) throws GLib.Error;
+ public abstract int location_from_handle (int handle) throws GLib.Error;
+ public abstract int mark (int location, IAnjuta.MarkableMarker marker) throws GLib.Error;
+ public abstract void unmark (int location, IAnjuta.MarkableMarker marker) throws GLib.Error;
+ public signal void marker_clicked (bool double_click, int location);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface MessageManager : GLib.Object {
+ public abstract unowned IAnjuta.MessageView add_view (string name, string icon) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.List get_all_views () throws GLib.Error;
+ public abstract unowned IAnjuta.MessageView get_current_view () throws GLib.Error;
+ public abstract unowned IAnjuta.MessageView get_view_by_name (string name) throws GLib.Error;
+ public abstract void remove_view (IAnjuta.MessageView view) throws GLib.Error;
+ public abstract void set_current_view (IAnjuta.MessageView view) throws GLib.Error;
+ public abstract void set_view_icon (IAnjuta.MessageView view, Gdk.PixbufAnimation icon) throws GLib.Error;
+ public abstract void set_view_icon_from_stock (IAnjuta.MessageView view, string icon) throws GLib.Error;
+ public abstract void set_view_title (IAnjuta.MessageView view, string title) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface MessageView : GLib.Object {
+ public abstract void append (IAnjuta.MessageViewType type, string summary, string details) throws GLib.Error;
+ public abstract void buffer_append (string text) throws GLib.Error;
+ public abstract void clear () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.List get_all_messages () throws GLib.Error;
+ public abstract unowned string get_current_message () throws GLib.Error;
+ public abstract void select_next () throws GLib.Error;
+ public abstract void select_previous () throws GLib.Error;
+ public signal void buffer_flushed (string line);
+ public signal void message_clicked (string message);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface PluginFactory : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned Anjuta.Plugin new_plugin (Anjuta.PluginHandle handle, Anjuta.Shell shell) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Preferences : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void merge (Anjuta.Preferences prefs) throws GLib.Error;
+ public abstract void unmerge (Anjuta.Preferences prefs) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Print : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void print () throws GLib.Error;
+ public abstract void print_preview () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Project : GLib.Object {
+ public abstract unowned Anjuta.ProjectGroup add_group (Anjuta.ProjectGroup parent, string name) throws GLib.Error;
+ public abstract unowned Anjuta.ProjectSource add_source (Anjuta.ProjectTarget parent, GLib.File file) throws GLib.Error;
+ public abstract unowned Anjuta.ProjectTarget add_target (Anjuta.ProjectGroup parent, string name, Anjuta.ProjectTargetType type) throws GLib.Error;
+ public abstract unowned Gtk.Widget configure () throws GLib.Error;
+ public abstract unowned Gtk.Widget configure_node (Anjuta.ProjectNode node) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract uint get_capabilities () throws GLib.Error;
+ public abstract GLib.List<string> get_packages () throws GLib.Error;
+ public abstract unowned Anjuta.ProjectGroup get_root () throws GLib.Error;
+ public abstract unowned GLib.List get_target_types () throws GLib.Error;
+ public abstract bool load (GLib.File file) throws GLib.Error;
+ public abstract bool refresh () throws GLib.Error;
+ public abstract bool remove_node (Anjuta.ProjectNode node) throws GLib.Error;
+ public signal void project_updated ();
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface ProjectBackend : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract IAnjuta.Project new_project () throws GLib.Error;
+ public abstract int probe (GLib.File directory) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface ProjectManager : GLib.Object {
+ public abstract unowned GLib.File add_group (string name, GLib.File default_group) throws GLib.Error;
+ public abstract unowned GLib.File add_source (string name, GLib.File default_target) throws GLib.Error;
+ public abstract unowned GLib.File add_source_quiet (string name, GLib.File target) throws GLib.Error;
+ public abstract unowned GLib.List add_sources (GLib.List names, GLib.File default_target) throws GLib.Error;
+ public abstract unowned GLib.File add_target (string name, GLib.File default_group) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract uint get_capabilities () throws GLib.Error;
+ public abstract unowned GLib.List get_children (GLib.File element) throws GLib.Error;
+ public abstract unowned GLib.List get_elements (Anjuta.ProjectNodeType element_type) throws GLib.Error;
+ public abstract unowned GLib.List get_packages () throws GLib.Error;
+ public abstract unowned GLib.File get_parent (GLib.File element) throws GLib.Error;
+ public abstract unowned GLib.File get_selected () throws GLib.Error;
+ public abstract Anjuta.ProjectTargetClass get_target_type (GLib.File target) throws GLib.Error;
+ public abstract unowned GLib.List get_targets (Anjuta.ProjectTargetClass target_type) throws GLib.Error;
+ public abstract bool is_open () throws GLib.Error;
+ public signal void element_added (GLib.Object element);
+ public signal void element_removed (GLib.Object element);
+ public signal void element_selected (GLib.Object element);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Provider : GLib.Object {
+ public abstract void activate (IAnjuta.Iterable iter, void* data) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_name () throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_start_iter () throws GLib.Error;
+ public abstract void populate (IAnjuta.Iterable iter) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Stream : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void open (GLib.FileStream stream) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface StreamLoader : IAnjuta.Loader, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned GLib.Object load (GLib.FileStream stream, bool readonly) throws GLib.Error;
+ public abstract unowned string peek_interface (GLib.FileStream stream) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface StreamSavable : IAnjuta.Stream, GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void save (GLib.FileStream stream) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Symbol : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned string get_args () throws GLib.Error;
+ public abstract unowned string get_extra_info_string (IAnjuta.SymbolField sym_info) throws GLib.Error;
+ public abstract unowned GLib.File get_file () throws GLib.Error;
+ public abstract unowned Gdk.Pixbuf get_icon () throws GLib.Error;
+ public abstract int get_id () throws GLib.Error;
+ public abstract ulong get_line () throws GLib.Error;
+ public abstract unowned string get_name () throws GLib.Error;
+ public abstract unowned string get_returntype () throws GLib.Error;
+ public abstract IAnjuta.SymbolType get_sym_type () throws GLib.Error;
+ public abstract bool is_local () throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface SymbolManager : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract unowned IAnjuta.Iterable get_class_parents (IAnjuta.Symbol symbol, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_members (IAnjuta.Symbol symbol, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_parent_scope (IAnjuta.Symbol symbol, string filename, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_scope (string filename, ulong line, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_scope_chain (string filename, ulong line, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Symbol get_symbol_by_id (int symbol_id, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable get_symbol_more_info (IAnjuta.Symbol symbol, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable search (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string match_name, bool partial_name_match, IAnjuta.SymbolManagerSearchFileScope filescope_search, bool global_tags_search, int results_limit, int results_offset) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable search_file (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string pattern, GLib.File file, int results_limit, int results_offset) throws GLib.Error;
+ public abstract uint search_file_async (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string pattern, GLib.File file, int results_limit, int results_offset, GLib.Cancellable cancel, Anjuta.AsyncNotify notify, IAnjuta.SymbolManagerSearchCallback callback, void* callback_user_data) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable search_project (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string pattern, IAnjuta.SymbolManagerSearchFileScope filescope_search, int results_limit, int results_offset) throws GLib.Error;
+ public abstract uint search_project_async (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string pattern, IAnjuta.SymbolManagerSearchFileScope filescope_search, int results_limit, int results_offset, GLib.Cancellable cancel, Anjuta.AsyncNotify notify, IAnjuta.SymbolManagerSearchCallback callback, void* callback_user_data) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable search_symbol_in_scope (string pattern, IAnjuta.Symbol container_symbol, IAnjuta.SymbolType match_types, bool include_types, int results_limit, int results_offset, IAnjuta.SymbolField info_fields) throws GLib.Error;
+ public abstract unowned IAnjuta.Iterable search_system (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string pattern, IAnjuta.SymbolManagerSearchFileScope filescope_search, int results_limit, int results_offset) throws GLib.Error;
+ public abstract uint search_system_async (IAnjuta.SymbolType match_types, bool include_types, IAnjuta.SymbolField info_fields, string pattern, IAnjuta.SymbolManagerSearchFileScope filescope_search, int results_limit, int results_offset, GLib.Cancellable cancel, Anjuta.AsyncNotify notify, IAnjuta.SymbolManagerSearchCallback callback, void* callback_user_data) throws GLib.Error;
+ public signal void prj_scan_end (int process_id);
+ public signal void prj_symbol_inserted (int symbol_id);
+ public signal void prj_symbol_removed (int symbol_id);
+ public signal void prj_symbol_updated (int symbol_id);
+ public signal void sys_scan_end (int process_id);
+ public signal void sys_symbol_inserted (int symbol_id);
+ public signal void sys_symbol_removed (int symbol_id);
+ public signal void sys_symbol_updated (int symbol_id);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Terminal : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract int execute_command (string directory, string command, string environment) throws GLib.Error;
+ public signal void child_exited (int pid, int status);
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Todo : GLib.Object {
+ public static GLib.Quark error_quark ();
+ public abstract void load (GLib.File file) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Vcs : GLib.Object {
+ public abstract void add (GLib.List files, Anjuta.AsyncNotify notify) throws GLib.Error;
+ public abstract void checkout (string repository_location, GLib.File dest, GLib.Cancellable cancel, Anjuta.AsyncNotify notify) throws GLib.Error;
+ public abstract void diff (GLib.File file, IAnjuta.VcsDiffCallback callback, GLib.Cancellable cancel, Anjuta.AsyncNotify notify) throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ public abstract void query_status (GLib.File file, IAnjuta.VcsStatusCallback callback, GLib.Cancellable cancel, Anjuta.AsyncNotify notify) throws GLib.Error;
+ public abstract void remove (GLib.List files, Anjuta.AsyncNotify notify) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public interface Wizard : GLib.Object {
+ public abstract void activate () throws GLib.Error;
+ public static GLib.Quark error_quark ();
+ }
+ [CCode (type_id = "IANJUTA_TYPE_EDITOR_ASSIST_PROPOSAL", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public struct EditorAssistProposal {
+ public weak string label;
+ public weak string markup;
+ public weak string info;
+ public weak string text;
+ public weak Gdk.Pixbuf icon;
+ public void* data;
+ }
+ [CCode (cprefix = "IANJUTA_BUILDABLE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum BuildableCommand {
+ COMMAND_COMPILE,
+ COMMAND_BUILD,
+ COMMAND_BUILD_TARBALL,
+ COMMAND_INSTALL,
+ COMMAND_CONFIGURE,
+ COMMAND_GENERATE,
+ COMMAND_CLEAN,
+ COMMAND_EXECUTE,
+ COMMAND_IS_BUILT,
+ COMMAND_AUTORECONF,
+ COMMAND_DISTCLEAN,
+ N_COMMANDS
+ }
+ [CCode (cprefix = "IANJUTA_BUILDER_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum BuilderError {
+ SUCCEED,
+ FAILED,
+ CANCELED,
+ ABORTED,
+ INTERRUPTED,
+ TERMINATED,
+ UNKNOWN_TARGET,
+ UNKNOWN_ERROR,
+ OTHER_ERROR
+ }
+ [CCode (cprefix = "IANJUTA_DEBUGGER_BREAKPOINT_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DebuggerBreakpointMethod {
+ SET_AT_ADDRESS,
+ SET_AT_FUNCTION,
+ ENABLE,
+ IGNORE,
+ CONDITION
+ }
+ [CCode (cprefix = "IANJUTA_DEBUGGER_BREAKPOINT_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DebuggerBreakpointType {
+ REMOVED,
+ UPDATED,
+ ON_LINE,
+ ON_ADDRESS,
+ ON_FUNCTION,
+ ON_READ,
+ ON_WRITE,
+ WITH_ENABLE,
+ WITH_IGNORE,
+ WITH_TIME,
+ WITH_CONDITION,
+ WITH_TEMPORARY
+ }
+ [CCode (cprefix = "IANJUTA_DEBUGGER_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DebuggerData {
+ INFORMATION,
+ BREAKPOINT,
+ FRAME,
+ VARIABLE,
+ REGISTER
+ }
+ [CCode (cprefix = "IANJUTA_DEBUGGER_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DebuggerError {
+ OK,
+ NOT_READY,
+ NOT_RUNNING,
+ NOT_STOPPED,
+ NOT_LOADED,
+ NOT_STARTED,
+ NOT_CONNECTED,
+ NOT_IMPLEMENTED,
+ CANCEL,
+ UNABLE_TO_CREATE_VARIABLE,
+ UNABLE_TO_ACCESS_MEMORY,
+ UNABLE_TO_OPEN_FILE,
+ UNSUPPORTED_FILE_TYPE,
+ UNSUPPORTED_VERSION,
+ UNABLE_TO_FIND_DEBUGGER,
+ ALREADY_DONE,
+ PROGRAM_NOT_FOUND,
+ UNABLE_TO_CONNECT,
+ UNKNOWN_ERROR,
+ OTHER_ERROR
+ }
+ [CCode (cprefix = "IANJUTA_DEBUGGER_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DebuggerOutputType {
+ OUTPUT,
+ WARNING_OUTPUT,
+ ERROR_OUTPUT,
+ INFO_OUTPUT
+ }
+ [CCode (cprefix = "IANJUTA_DEBUGGER_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DebuggerState {
+ BUSY,
+ STOPPED,
+ STARTED,
+ PROGRAM_LOADED,
+ PROGRAM_STOPPED,
+ PROGRAM_RUNNING
+ }
+ [CCode (cprefix = "IANJUTA_DOCUMENT_MANAGER_DOESNT_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum DocumentManagerError {
+ EXIST
+ }
+ [CCode (cprefix = "IANJUTA_EDITOR_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum EditorAttribute {
+ TEXT,
+ KEYWORD,
+ COMMENT,
+ STRING
+ }
+ [CCode (cprefix = "IANJUTA_EDITOR_DOESNT_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum EditorError {
+ EXIST
+ }
+ [CCode (cprefix = "IANJUTA_EDITOR_LINE_MODE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum EditorLineModeType {
+ LF,
+ CR,
+ CRLF
+ }
+ [CCode (cprefix = "IANJUTA_INDICABLE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum IndicableIndicator {
+ NONE,
+ IMPORTANT,
+ WARNING,
+ CRITICAL
+ }
+ [CCode (cprefix = "IANJUTA_MARKABLE_INVALID_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum MarkableError {
+ LOCATION
+ }
+ [CCode (cprefix = "IANJUTA_MARKABLE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum MarkableMarker {
+ LINEMARKER,
+ BOOKMARK,
+ BREAKPOINT_DISABLED,
+ BREAKPOINT_ENABLED,
+ PROGRAM_COUNTER
+ }
+ [CCode (cprefix = "IANJUTA_MESSAGE_MANAGER_DOESNT_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum MessageManagerError {
+ EXIST
+ }
+ [CCode (cprefix = "IANJUTA_MESSAGE_VIEW_TYPE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum MessageViewType {
+ NORMAL,
+ INFO,
+ WARNING,
+ ERROR
+ }
+ [CCode (cprefix = "IANJUTA_PLUGIN_FACTORY_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum PluginFactoryError {
+ OK,
+ MISSING_LOCATION,
+ MISSING_TYPE,
+ MISSING_MODULE,
+ INVALID_MODULE,
+ MISSING_FUNCTION,
+ INVALID_TYPE,
+ UNKNOWN_ERROR
+ }
+ [CCode (cprefix = "IANJUTA_PROJECT_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum ProjectCapabilities {
+ CAN_ADD_NONE,
+ CAN_ADD_GROUP,
+ CAN_ADD_TARGET,
+ CAN_ADD_SOURCE,
+ HAS_PACKAGES
+ }
+ [CCode (cprefix = "IANJUTA_PROJECT_ERROR_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum ProjectError {
+ SUCCESS,
+ DOESNT_EXIST,
+ ALREADY_EXISTS,
+ VALIDATION_FAILED,
+ PROJECT_MALFORMED,
+ GENERAL_FAILURE
+ }
+ [CCode (cprefix = "IANJUTA_PROJECT_PROBE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum ProjectProbe {
+ FILES,
+ MAKE_FILES,
+ PROJECT_FILES
+ }
+ [CCode (cprefix = "IANJUTA_SYMBOL_FIELD_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum SymbolField {
+ SIMPLE,
+ FILE_PATH,
+ IMPLEMENTATION,
+ ACCESS,
+ KIND,
+ TYPE,
+ TYPE_NAME,
+ LANGUAGE,
+ FILE_IGNORE,
+ FILE_INCLUDE,
+ PROJECT_NAME,
+ WORKSPACE_NAME
+ }
+ [CCode (cprefix = "IANJUTA_SYMBOL_MANAGER_SEARCH_FS_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum SymbolManagerSearchFileScope {
+ IGNORE,
+ PUBLIC,
+ PRIVATE
+ }
+ [CCode (cprefix = "IANJUTA_SYMBOL_TYPE_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum SymbolType {
+ UNDEF,
+ CLASS,
+ ENUM,
+ ENUMERATOR,
+ FIELD,
+ FUNCTION,
+ INTERFACE,
+ MEMBER,
+ METHOD,
+ NAMESPACE,
+ PACKAGE,
+ PROTOTYPE,
+ STRUCT,
+ TYPEDEF,
+ UNION,
+ VARIABLE,
+ EXTERNVAR,
+ MACRO,
+ MACRO_WITH_ARG,
+ FILE,
+ OTHER,
+ SCOPE_CONTAINER,
+ MAX
+ }
+ [CCode (cprefix = "IANJUTA_VCS_UNKOWN_", cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public enum VcsError {
+ ERROR
+ }
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public delegate void BuilderCallback (GLib.Object sender, IAnjuta.BuilderHandle command, GLib.Error err);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h", has_target = false)]
+ public delegate void DebuggerCallback (void* data, void* user_data, GLib.Error err);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h", has_target = false)]
+ public delegate void DebuggerGCharCallback (string value, void* user_data, GLib.Error err);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h", has_target = false)]
+ public delegate void DebuggerGListCallback (GLib.List list, void* user_data, GLib.Error err);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h", has_target = false)]
+ public delegate void DebuggerMemoryCallback (ulong address, uint length, string data, void* user_data, GLib.Error err);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public delegate void DebuggerOutputCallback (IAnjuta.DebuggerOutputType type, string output);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public delegate void SymbolManagerSearchCallback (uint search_id, IAnjuta.Iterable result);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public delegate void VcsDiffCallback (GLib.File file, string diff);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public delegate void VcsStatusCallback (GLib.File file, Anjuta.VcsStatus status);
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string BUILDER_CONFIGURATION_DEBUG;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string BUILDER_CONFIGURATION_OPTIMIZED;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string BUILDER_CONFIGURATION_PROFILING;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string BUILDER_ROOT_URI;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string DOCUMENT_MANAGER_CURRENT_DOCUMENT;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string FILE_MANAGER_SELECTED_FILE;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string PROJECT_MANAGER_CURRENT_URI;
+ [CCode (cheader_filename = "libanjuta/interfaces/libanjuta-interfaces.h")]
+ public const string PROJECT_MANAGER_PROJECT_ROOT_URI;
+}
diff --git a/plugins/language-support-vala/locator.vala b/plugins/language-support-vala/locator.vala
new file mode 100644
index 0000000..2210379
--- /dev/null
+++ b/plugins/language-support-vala/locator.vala
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2008 Abderrahim Kitouni
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* Finds the innermost block containing the given location */
+public class BlockLocator : Vala.CodeVisitor {
+ double location;
+ Vala.Block innermost = null;
+ double innermost_begin;
+ double innermost_end;
+
+ public Vala.Block locate (Vala.SourceFile file, int line, int column) {
+ // XXX : assumes that line length < 1000
+ location = line + column / 1000.0;
+ innermost = null;
+ file.accept_children(this);
+ return innermost;
+ }
+ public override void visit_block (Vala.Block b) {
+ var begin = b.source_reference.first_line + b.source_reference.first_column / 1000.0;
+ var end = b.source_reference.last_line + b.source_reference.last_column / 1000.0;
+
+ if (begin <= location && location <= end)
+ if (innermost == null || (innermost_begin <= begin && innermost_end >= end))
+ innermost = b;
+ }
+
+ public override void visit_namespace (Vala.Namespace ns) {
+ ns.accept_children(this);
+ }
+ public override void visit_class (Vala.Class cl) {
+ cl.accept_children(this);
+ }
+ public override void visit_struct (Vala.Struct st) {
+ st.accept_children(this);
+ }
+ public override void visit_interface (Vala.Interface iface) {
+ iface.accept_children(this);
+ }
+ public override void visit_method (Vala.Method m) {
+ m.accept_children(this);
+ }
+ public override void visit_creation_method (Vala.CreationMethod m) {
+ m.accept_children(this);
+ }
+ public override void visit_property (Vala.Property prop) {
+ prop.accept_children(this);
+ }
+ public override void visit_property_accessor (Vala.PropertyAccessor acc) {
+ acc.accept_children(this);
+ }
+ public override void visit_constructor (Vala.Constructor c) {
+ c.accept_children(this);
+ }
+ public override void visit_destructor (Vala.Destructor d) {
+ d.accept_children(this);
+ }
+ public override void visit_if_statement (Vala.IfStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_switch_statement (Vala.SwitchStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_switch_section (Vala.SwitchSection section) {
+ visit_block(section);
+ }
+ public override void visit_while_statement (Vala.WhileStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_do_statement (Vala.DoStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_for_statement (Vala.ForStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_foreach_statement (Vala.ForeachStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_try_statement (Vala.TryStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_catch_clause (Vala.CatchClause clause) {
+ clause.accept_children(this);
+ }
+ public override void visit_lock_statement (Vala.LockStatement stmt) {
+ stmt.accept_children(this);
+ }
+ public override void visit_lambda_expression (Vala.LambdaExpression expr) {
+ expr.accept_children(this);
+ }
+}
+
diff --git a/plugins/language-support-vala/plugin.vala b/plugins/language-support-vala/plugin.vala
new file mode 100644
index 0000000..271820b
--- /dev/null
+++ b/plugins/language-support-vala/plugin.vala
@@ -0,0 +1,352 @@
+/*
+ * Copyright (C) 2008-2010 Abderrahim Kitouni
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+using GLib;
+using Anjuta;
+
+public class ValaPlugin : Plugin {
+ internal weak IAnjuta.Editor current_editor;
+ uint editor_watch_id;
+
+ Vala.CodeContext context;
+ Vala.Map<string,Vala.SourceFile> source_files;
+ BlockLocator locator = new BlockLocator ();
+
+ AnjutaReport report;
+ ValaProvider provider;
+
+ Vala.Parser parser;
+ Vala.Genie.Parser genie_parser;
+ Vala.SymbolResolver resolver;
+ Vala.SemanticAnalyzer analyzer;
+
+ public override bool activate () {
+ //debug("Activating ValaPlugin");
+ context = new Vala.CodeContext();
+ report = new AnjutaReport();
+ report.docman = (IAnjuta.DocumentManager) shell.get_object("IAnjutaDocumentManager");
+ context.report = report;
+ context.profile = Vala.Profile.GOBJECT;
+
+ var project = (IAnjuta.ProjectManager) shell.get_object("IAnjutaProjectManager");
+ weak List<string> packages = project.get_packages();
+ add_package(context, "glib-2.0");
+ add_package(context, "gobject-2.0");
+
+ var status = shell.get_status ();
+ foreach(var pkg in packages) {
+ if (!add_package(context, pkg))
+ status.set("Package %s not found", pkg);
+ }
+
+ source_files = new Vala.HashMap<string, Vala.SourceFile>(str_hash, str_equal, direct_equal);
+
+ weak List<File> sources = project.get_elements(Anjuta.ProjectNodeType.SOURCE);
+ foreach (var src in sources) {
+ if (src.get_path() != null && !source_files.contains(src.get_path())) {
+ if (src.get_basename().has_suffix("vala") || src.get_basename().has_suffix("gs")) {
+ var vsrc = new Vala.SourceFile(context, src.get_path());
+ context.add_source_file(vsrc);
+ var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib", null));
+ vsrc.add_using_directive (ns_ref);
+ context.root.add_using_directive (ns_ref);
+ source_files[src.get_path()] = vsrc;
+ } else if (src.get_basename().has_suffix("vapi")) {
+ var vsrc = new Vala.SourceFile (context, src.get_path(), true);
+ context.add_source_file(vsrc);
+ source_files[src.get_path()] = vsrc;
+ }
+ }
+ }
+ ThreadFunc parse = () => {
+ lock (context) {
+ Vala.CodeContext.push(context);
+
+ parser = new Vala.Parser ();
+ genie_parser = new Vala.Genie.Parser ();
+
+ parser.parse (context);
+ genie_parser.parse (context);
+
+ resolver = new Vala.SymbolResolver ();
+ resolver.resolve (context);
+
+ analyzer = new Vala.SemanticAnalyzer ();
+ analyzer.analyze (context);
+
+ Vala.CodeContext.pop();
+ }
+ };
+
+ try {
+ Thread.create(parse, false);
+ debug("Using threads");
+ } catch (ThreadError err) {
+ parse();
+ }
+
+ provider = new ValaProvider(this);
+ editor_watch_id = add_watch("document_manager_current_document",
+ (PluginValueAdded) editor_value_added,
+ (PluginValueRemoved) editor_value_removed);
+
+ return true;
+ }
+
+ public override bool deactivate () {
+ //debug("Deactivating ValaPlugin");
+ remove_watch(editor_watch_id, true);
+
+ context = null;
+ source_files = null;
+
+ return true;
+ }
+
+ /* "document_manager_current_document" watch */
+ public void editor_value_added(string name, Value value) {
+ //debug("editor value added");
+ assert (current_editor == null);
+ assert (value.get_object() is IAnjuta.Editor);
+
+ current_editor = value.get_object() as IAnjuta.Editor;
+ if (current_editor != null) {
+ if (current_editor is IAnjuta.EditorAssist)
+ (current_editor as IAnjuta.EditorAssist).add(provider);
+ if (current_editor is IAnjuta.EditorTip)
+ (current_editor as IAnjuta.EditorTip).char_added += on_char_added;
+ if (current_editor is IAnjuta.EditorHover)
+ (current_editor as IAnjuta.EditorHover).hover_over += report.on_hover_over;
+ if (current_editor is IAnjuta.FileSavable) {
+ var file_savable = (IAnjuta.FileSavable) current_editor;
+ file_savable.saved += (savable, gfile) => {
+ /* gfile's type is Object, should be File */
+ var file = (File) gfile;
+ var source_file = source_files.get(file.get_path());
+ string contents;
+ try {
+ file.load_contents (null, out contents, null, null);
+ } catch (Error e) {
+ // ignore
+ }
+ source_file.content = contents;
+ update_file (source_file);
+ };
+ }
+ }
+ report.update_errors (current_editor);
+ }
+ public void editor_value_removed(string name) {
+ //debug("editor value removed");
+ if (current_editor is IAnjuta.EditorAssist)
+ (current_editor as IAnjuta.EditorAssist).remove(provider);
+ if (current_editor is IAnjuta.EditorTip)
+ (current_editor as IAnjuta.EditorTip).char_added -= on_char_added;
+ if (current_editor is IAnjuta.EditorHover)
+ (current_editor as IAnjuta.EditorHover).hover_over -= report.on_hover_over;
+ if (current_editor is IAnjuta.FileSavable)
+ assert (SignalHandler.disconnect_matched (current_editor, SignalMatchType.DATA,
+ 0, 0, null, null, this) == 1);
+
+ current_editor = null;
+ }
+
+ public void on_char_added (IAnjuta.EditorTip editor, Object position, char ch) {
+ var current_position = (IAnjuta.Iterable) position;
+ /* include the just added char */
+ current_position.next ();
+ if (ch == '(') {
+ var line_start = editor.get_line_begin_position(current_editor.get_lineno());
+ var current_text = editor.get_text(line_start, current_position);
+ provider.show_call_tip (editor, current_text);
+ } else if (ch == ')') {
+ editor.cancel ();
+ }
+ }
+ internal Vala.Block get_current_block (IAnjuta.Editor editor) requires (editor is IAnjuta.File) {
+ var file = editor as IAnjuta.File;
+
+ var path = file.get_file().get_path();
+ lock (context) {
+ if (!(path in source_files)) {
+ var src = new Vala.SourceFile(context, path, path.has_suffix("vapi"));
+ context.add_source_file(src);
+ source_files[path] = src;
+ update_file(src);
+ }
+ return locator.locate(source_files[path], editor.get_lineno(), editor.get_column());
+ }
+ }
+
+ internal List<Vala.Symbol> lookup_symbol (Vala.Expression? inner, string name, bool prefix_match,
+ Vala.Block block) {
+ List<Vala.Symbol> matching_symbols = null;
+
+ lock (context) {
+ if (inner == null) {
+ for (var sym = (Vala.Symbol) block; sym != null; sym = sym.parent_symbol) {
+ matching_symbols.concat (symbol_lookup_inherited (sym, name, prefix_match));
+ }
+
+ foreach (var ns in block.source_reference.file.current_using_directives) {
+ matching_symbols.concat (symbol_lookup_inherited (ns.namespace_symbol, name, prefix_match));
+ }
+ } else if (inner.symbol_reference != null) {
+ matching_symbols.concat (symbol_lookup_inherited (inner.symbol_reference, name, prefix_match));
+ } else if (inner is Vala.MemberAccess) {
+ var inner_ma = (Vala.MemberAccess) inner;
+ var matching = lookup_symbol (inner_ma.inner, inner_ma.member_name, false, block);
+ if (matching != null)
+ matching_symbols.concat (symbol_lookup_inherited (matching.data, name, prefix_match));
+ } else if (inner is Vala.MethodCall) {
+ var inner_inv = (Vala.MethodCall) inner;
+ var inner_ma = inner_inv.call as Vala.MemberAccess;
+ if (inner_ma != null) {
+ var matching = lookup_symbol (inner_ma.inner, inner_ma.member_name, false, block);
+ if (matching != null)
+ matching_symbols.concat (symbol_lookup_inherited (matching.data, name, prefix_match, true));
+ }
+ }
+ }
+ return matching_symbols;
+ }
+ List<Vala.Symbol> symbol_lookup_inherited (Vala.Symbol sym, string name, bool prefix_match, bool invocation = false) {
+ List<Vala.Symbol> result = null;
+
+ var symbol_table = sym.scope.get_symbol_table ();
+ if (symbol_table != null) {
+ foreach (string key in symbol_table.get_keys()) {
+ if (((prefix_match && key.has_prefix (name)) || key == name) && (key != "this")) {
+ result.append (symbol_table[key]);
+ }
+ }
+ }
+ if (invocation && sym is Vala.Method) {
+ var func = (Vala.Method) sym;
+ result.concat (symbol_lookup_inherited (func.return_type.data_type, name, prefix_match));
+ } else if (sym is Vala.Class) {
+ var cl = (Vala.Class) sym;
+ foreach (var base_type in cl.get_base_types ()) {
+ result.concat (symbol_lookup_inherited (base_type.data_type, name, prefix_match));
+ }
+ } else if (sym is Vala.Struct) {
+ var st = (Vala.Struct) sym;
+ result.concat (symbol_lookup_inherited (st.base_type.data_type, name, prefix_match));
+ } else if (sym is Vala.Interface) {
+ var iface = (Vala.Interface) sym;
+ foreach (var prerequisite in iface.get_prerequisites ()) {
+ result.concat (symbol_lookup_inherited (prerequisite.data_type, name, prefix_match));
+ }
+ } else if (sym is Vala.LocalVariable) {
+ var variable = (Vala.LocalVariable) sym;
+ result.concat (symbol_lookup_inherited (variable.variable_type.data_type, name, prefix_match));
+ } else if (sym is Vala.Field) {
+ var field = (Vala.Field) sym;
+ result.concat (symbol_lookup_inherited (field.field_type.data_type, name, prefix_match));
+ } else if (sym is Vala.Property) {
+ var prop = (Vala.Property) sym;
+ result.concat (symbol_lookup_inherited (prop.property_type.data_type, name, prefix_match));
+ } else if (sym is Vala.FormalParameter) {
+ var fp = (Vala.FormalParameter) sym;
+ result.concat (symbol_lookup_inherited (fp.parameter_type.data_type, name, prefix_match));
+ }
+
+ return result;
+ }
+ void update_file (Vala.SourceFile file) {
+ lock (context) {
+ /* Removing nodes in the same loop causes problems (probably due to ReadOnlyList)*/
+ var nodes = new Vala.ArrayList<Vala.CodeNode> ();
+ foreach (var node in file.get_nodes()) {
+ nodes.add(node);
+ }
+ foreach (var node in nodes) {
+ file.remove_node (node);
+ if (node is Vala.Symbol) {
+ var sym = (Vala.Symbol) node;
+ if (sym.owner != null)
+ /* we need to remove it from the scope*/
+ sym.owner.remove(sym.name);
+ if (context.entry_point == sym)
+ context.entry_point = null;
+ }
+ }
+ file.current_using_directives = new Vala.ArrayList<Vala.UsingDirective>();
+ var ns_ref = new Vala.UsingDirective (new Vala.UnresolvedSymbol (null, "GLib"));
+ file.add_using_directive (ns_ref);
+ context.root.add_using_directive (ns_ref);
+
+ report.clear_error_indicators ();
+
+ Vala.CodeContext.push (context);
+
+ /* visit_source_file checks for the file extension */
+ parser.visit_source_file (file);
+ genie_parser.visit_source_file (file);
+
+ resolver.resolve (context);
+ analyzer.visit_source_file (file);
+
+ Vala.CodeContext.pop ();
+
+ report.update_errors(current_editor);
+ }
+ }
+}
+
+
+/* Copied from valac */
+public bool add_package (Vala.CodeContext context, string pkg) {
+ if (context.has_package (pkg)) {
+ // ignore multiple occurences of the same package
+ return true;
+ }
+ var package_path = context.get_package_path (pkg, new string[]{});
+
+ if (package_path == null) {
+ return false;
+ }
+
+ context.add_package (pkg);
+
+ context.add_source_file (new Vala.SourceFile (context, package_path, true));
+
+ var deps_filename = Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg));
+ if (FileUtils.test (deps_filename, FileTest.EXISTS)) {
+ try {
+ string deps_content;
+ ulong deps_len;
+ FileUtils.get_contents (deps_filename, out deps_content, out deps_len);
+ foreach (string dep in deps_content.split ("\n")) {
+ if (dep != "") {
+ if (!add_package (context, dep)) {
+ context.report.err (null, "%s, dependency of %s, not found in specified Vala API directories".printf (dep, pkg));
+ }
+ }
+ }
+ } catch (FileError e) {
+ context.report.err (null, "Unable to read dependency file: %s".printf (e.message));
+ }
+ }
+
+ return true;
+}
+
+[ModuleInit]
+public Type anjuta_glue_register_components (TypeModule module) {
+ return typeof (ValaPlugin);
+}
diff --git a/plugins/language-support-vala/provider.vala b/plugins/language-support-vala/provider.vala
new file mode 100644
index 0000000..0ed0470
--- /dev/null
+++ b/plugins/language-support-vala/provider.vala
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2008-2010 Abderrahim Kitouni
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+public class ValaProvider : Object, IAnjuta.Provider {
+ IAnjuta.Iterable start_pos;
+ weak ValaPlugin plugin;
+
+ static Regex member_access;
+ static Regex member_access_split;
+ static Regex function_call;
+
+ static construct {
+ try {
+ member_access = new Regex("""((?:\w+(?:\s*\([^()]*\))?\.)*)(\w*)$""");
+ member_access_split = new Regex ("""(\s*\([^()]*\))?\.""");
+ function_call = new Regex("""(new )?((?:\w+(?:\s*\([^()]*\))?\.)*)(\w+)\s*\(([^(,)]+,)*([^(,)]*)$""");
+ } catch(RegexError err) {
+ critical("Regular expressions failed to compile : %s", err.message);
+ }
+ }
+
+ public ValaProvider(ValaPlugin plugin) {
+ this.plugin = plugin;
+ }
+ public unowned string get_name () throws GLib.Error {
+ return "Vala";
+ }
+ public void populate (IAnjuta.Iterable iter) throws GLib.Error {
+ var editor = plugin.current_editor as IAnjuta.EditorAssist;
+ var line_start = editor.get_line_begin_position(editor.get_lineno());
+ var current_text = editor.get_text(line_start, iter);
+
+ MatchInfo match_info;
+ if (! member_access.match(current_text, 0, out match_info))
+ return;
+ if (match_info.fetch(0).length < 2)
+ return;
+
+ start_pos = iter.clone();
+ start_pos.set_position(iter.get_position() - (int) match_info.fetch(2).length);
+
+ var names = member_access_split.split (match_info.fetch(1));
+
+ var syms = plugin.lookup_symbol (construct_member_access (names), match_info.fetch(2),
+ true, plugin.get_current_block(editor));
+
+ var proposals = new GLib.List<IAnjuta.EditorAssistProposal?>();
+ foreach (var symbol in syms) {
+ var prop = IAnjuta.EditorAssistProposal();
+ prop.data = symbol;
+ prop.label = symbol.name;
+ proposals.prepend(prop);
+ }
+ proposals.reverse();
+ editor.proposals(this, proposals, true);
+ }
+ public unowned IAnjuta.Iterable get_start_iter () throws GLib.Error {
+ return start_pos;
+ }
+ public void activate (IAnjuta.Iterable iter, void* data) {
+ var sym = data as Vala.Symbol;
+ var editor = plugin.current_editor as IAnjuta.EditorAssist;
+ (editor as IAnjuta.Document).begin_undo_action();
+ editor.erase(start_pos, iter);
+ editor.insert(start_pos, sym.name, -1);
+ (editor as IAnjuta.Document).end_undo_action();
+ }
+
+ public void show_call_tip (IAnjuta.EditorTip editor, string to_complete) {
+ List<string> tips = null;
+
+ MatchInfo match_info;
+ if (! function_call.match(to_complete, 0, out match_info))
+ return;
+
+ var creation_method = (match_info.fetch(1) != "");
+ var names = member_access_split.split (match_info.fetch(2));
+ var syms = plugin.lookup_symbol (construct_member_access (names), match_info.fetch(3),
+ false, plugin.get_current_block (editor));
+
+ foreach (var sym in syms) {
+ Vala.List<Vala.FormalParameter> parameters = null;
+ if (sym is Vala.Method) {
+ parameters = ((Vala.Method) sym).get_parameters ();
+ } else if (sym is Vala.Signal) {
+ parameters = ((Vala.Signal) sym).get_parameters ();
+ } else if (sym is Vala.Delegate) {
+ parameters = ((Vala.Delegate) sym).get_parameters ();
+ } else if (creation_method && sym is Vala.Class) {
+ parameters = ((Vala.Class)sym).default_construction_method.get_parameters ();
+ } else {
+ return_if_reached ();
+ }
+ var calltip = new StringBuilder ("(");
+ var first = true;
+ foreach (var p in parameters) {
+ if(first) {
+ first = false;
+ } else {
+ calltip.append(", ");
+ }
+ if (p.ellipsis) {
+ calltip.append("...");
+ } else {
+ calltip.append (p.parameter_type.to_qualified_string());
+ calltip.append (" ").append (p.name);
+ }
+ }
+ calltip.append (")");
+ tips.append (calltip.str);
+ }
+ editor.show (tips, editor.get_position ());
+ }
+ Vala.Expression construct_member_access (string[] names) {
+ Vala.Expression expr = null;
+
+ for (var i = 0; names[i] != null; i++) {
+ if (names[i] != "") {
+ expr = new Vala.MemberAccess (expr, names[i]);
+ if (names[i+1] != null && names[i+1].chug ().has_prefix ("(")) {
+ expr = new Vala.MethodCall (expr);
+ i++;
+ }
+ }
+ }
+
+ return expr;
+ }
+
+}
+
diff --git a/plugins/language-support-vala/report.vala b/plugins/language-support-vala/report.vala
new file mode 100644
index 0000000..f0d658e
--- /dev/null
+++ b/plugins/language-support-vala/report.vala
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2008-2009 Abderrahim Kitouni
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /* A Vala.Report subclass for reporting errors in Anjuta UI */
+public class AnjutaReport : Vala.Report {
+ struct Error {
+ public Vala.SourceReference source;
+ public bool error;
+ public string message;
+ }
+ public IAnjuta.DocumentManager docman { get; set; }
+ Vala.List<Error?> errors = new Vala.ArrayList<Error?>();
+ public void update_errors (IAnjuta.Editor editor) {
+ var ind = editor as IAnjuta.Indicable;
+ if (ind == null)
+ return;
+ ind.clear ();
+ foreach (var e in errors) {
+ if (e.source.file.filename.has_suffix (((IAnjuta.Document)editor).get_filename ())) {
+ /* begin_iter should be one cell before to select the first character */
+ var begin_iter = editor.get_line_begin_position (e.source.first_line);
+ for (var i = 1; i < e.source.first_column; i++)
+ begin_iter.next ();
+ var end_iter = editor.get_line_begin_position (e.source.last_line);
+ for (var i = 0; i < e.source.last_column; i++)
+ end_iter.next ();
+ ind.set(begin_iter, end_iter, e.error ? IAnjuta.IndicableIndicator.CRITICAL :
+ IAnjuta.IndicableIndicator.WARNING);
+ }
+
+ }
+ }
+ public void clear_error_indicators () {
+ errors = new Vala.ArrayList<Error?>();
+ foreach (var doc in (List<Gtk.Widget>)docman.get_doc_widgets ()) {
+ if (doc is IAnjuta.Indicable)
+ ((IAnjuta.Indicable)doc).clear ();
+ }
+ }
+ public void on_hover_over (IAnjuta.EditorHover editor, Object pos) {
+ var position = (IAnjuta.Iterable) pos;
+ lock (errors) {
+ foreach (var error in errors) {
+ if (!error.source.file.filename.has_suffix (((IAnjuta.Document)editor).get_filename ()))
+ continue;
+
+ var begin = editor.get_line_begin_position (error.source.first_line);
+ for (var i = 0; i < error.source.first_column; i++)
+ begin.next();
+
+ var end = editor.get_line_begin_position (error.source.last_line);
+ for (var i = 0; i < error.source.last_column; i++)
+ end.next();
+
+ if (position.compare(begin) >= 0 && position.compare(end) <= 0) {
+ editor.display(position, error.message);
+ return;
+ }
+ }
+ }
+ }
+ public override void warn (Vala.SourceReference? source, string message) {
+ if (source == null)
+ return;
+
+ lock (errors) {
+ errors.add(Error () {source = source, message = message, error = false});
+ }
+ }
+ public override void err (Vala.SourceReference? source, string message) {
+ if (source == null)
+ return;
+
+ lock (errors) {
+ errors.add(Error () {source = source, message = message, error = true});
+ }
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]