1 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 // libanjuta interfaces. Generate stubs with anjuta-idl-compiler.pl
6 // Copyright (C) 2004 Naba Kumar <naba@gnome.org>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Library General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include
<glib
-object.h
>
25 * SECTION:ianjuta-file
27 * @short_description: Implemented by plugins that can open files.
28 * @see_also: #IAnjutaFileSavable
29 * @stability: Unstable
30 * @include: libanjuta/interfaces/ianjuta-file.h
32 * Any plugin that can open files should implemented this interface. Along
33 * with the 'File Loader::SupportedMimeTypes' property of the plugin in
34 * .plugin file, it will be used by the loader to open files of that type.
42 * @file: file to open.
43 * @err: Error propagation and reporting
45 * The implementor opens the given file.
47 void open
(GFile
* file
);
50 * IAnjutaFileSavable::saved:
53 * This signal is emitted when the content is loaded completely.
58 * ianjuta_file_get_file:
60 * @err: Error propagation and reporting
62 * Returns the file that was opened with ianjuta_file_open().
64 * Return value: (transfer full): The last file opened.
69 * SECTION:ianjuta-file-savable
70 * @title: IAnjutaFileSavable
71 * @short_description: Implemented by plugins that can save files.
72 * @see_also: #IAnjutaFile
73 * @stability: Unstable
74 * @include: libanjuta/interfaces/ianjuta-file-savable.h
76 * Plugins implementing #IAnjutaFile inteface that can also save files
77 * should also implement this interface.
79 interface IAnjutaFileSavable
82 * IAnjutaFileSavable::update_save_ui:
85 * This signal is emitted when the state of the file has
86 * changed. It could be that the user writes in it
87 * and the file becomes dirty or the opposite: after using
88 * undo, the file is back to its saved content. It is triggered
89 * if the file becomes read-only or give a conflict too.
91 void ::update_save_ui
();
94 * IAnjutaFileSavable::saved:
96 * @file: file where the content is saved or NULL if save failed
98 * This signal is emitted when the content is saved.
100 void ::saved
(GFile
* file
);
103 * ianjuta_file_savable_save:
105 * @err: Error propagation and reporting
107 * Saves the content to the original file from which it was loaded.
108 * The signal saved is always emitted even if the save fails.
113 * ianjuta_file_savable_save_as:
115 * @file: File to save the content.
116 * @err: Error propagation and reporting
118 * Saves the content to a different File.
119 * The signal saved is always emitted even if the save fails.
121 void save_as
(GFile
* file
);
124 * ianjuta_file_savable_set_dirty:
126 * @dirty: Whether the file was edited or not
127 * @err: Error propagation and reporting
129 * if @dirty is TRUE, sets dirty for the content. Save point will be
130 * left and the content will be considered not saved. Otherwise,
131 * content will considered saved and save-point will be entered.
133 void set_dirty
(gboolean dirty
);
136 * ianjuta_file_savable_is_dirty:
138 * @err: Error propagation and reporting
140 * Returns the dirty status of the content.
142 * Return value: TRUE if dirty, FALSE otherwise.
144 gboolean is_dirty
();
147 * ianjuta_file_savable_is_read_only:
149 * @err: Error propagation and reporting
151 * Return is the file is read-only
153 * Return value: TRUE if read-only, FALSE otherwise.
155 gboolean is_read_only
();
158 * ianjuta_file_savable_is_conflict:
160 * @err: Error propagation and reporting
162 * Return is the file is in conflict. It means the file
163 * has been modified externally and the user needs to
164 * tell which version he wants to use.
166 * Return value: TRUE if conflict, FALSE otherwise.
168 gboolean is_conflict
();
173 * SECTION:ianjuta-stream
174 * @title: IAnjutaStream
175 * @short_description: Implemented by plugins that can open file streams
177 * @stability: Unstable
178 * @include: libanjuta/interfaces/ianjuta-stream.h
181 interface IAnjutaStream
186 * ianjuta_stream_open:
188 * @stream: Stream to open from.
189 * @err: Error propagation and reporting
191 * The implementor opens the given stream.
193 void open
(FILE
* stream
);
196 * SECTION:ianjuta-stream-savable
197 * @title: IAnjutaStreamSavable
198 * @short_description: Implemented by plugins that can save file streams
200 * @stability: Unstable
201 * @include: libanjuta/interfaces/ianjuta-stream-savable.h
204 interface IAnjutaStreamSavable
207 * ianjuta_stream_save:
209 * @stream: Stream to save to.
210 * @err: Error propagation and reporting
212 * The implementor saves the content to the given stream.
214 void save
(FILE
* stream
);
219 * SECTION:ianjuta-markable
220 * @title: IAnjutaMarkable
221 * @short_description: Implemented by editors (or views) with markers support
223 * @stability: Unstable
224 * @include: libanjuta/interfaces/ianjuta-markable.h
227 interface IAnjutaMarkable
235 * IAnjutaMarkableMarker:
236 * @IANJUTA_MARKABLE_LINEMARKER: Mark a particular line
237 * @IANJUTA_MARKABLE_BOOKMARK: A bookmark
238 * @IANJUTA_MARKABLE_MESSAGE: An (error) message
239 * @IANJUTA_MARKABLE_BREAKPOINT_DISABLED: a disabled breakpoint
240 * @IANJUTA_MARKABLE_BREAKPOINT_ENABLED: a enabled breakpoint
241 * @IANJUTA_MARKABLE_PROGRAM_COUNTER: Marks the program counter position
243 * This enumeration is used to specify the pixmap used for the marker
256 * IAnjutaMarkable::marker-clicked:
258 * @double_click: whether the marker was double clicked
259 * @location: location of the clicked marker
261 * The signal is emitted when the user clicks on a marker
263 void ::marker_clicked
(gboolean double_click
, gint location
);
266 * ianjuta_markable_mark:
268 * @location: Location at which the marker to set.
269 * @marker: Type of marker to be used
270 * @tooltip: (allow-none): optional tooltip displayed with the marker
271 * @err: Error propagation and reporting
273 * Marks the specified location with the given marker type. Location is
274 * implementation depenedent. For example, for an editor location means
275 * lines where markers are set.
277 * Return value: Handle of the location marked. Can be used later to obtain
278 * new location, if it has been moved due to addetions/deletions in the
279 * implementor object.
281 gint mark
(gint location
, Marker marker
, const gchar
* tooltip
);
284 * ianjuta_markable_location_from_handle:
286 * @handle: Handle of location.
287 * @err: Error propagation and reporting
289 * Location where a marker is set could have moved by some operation in
290 * the implementation. To retrieve the correct location where the marker
291 * has moved, pass the handle retured by ianjuta_markable_mark() to this
294 * Return value: Current location where the marker was set.
296 gint location_from_handle
(gint
handle);
299 * ianjuta_markable_unmark:
301 * @location: Location where the marker is set.
302 * @marker: The marker to unset.
303 * @err: Error propagation and reporting
305 * Clears the @marker at given @location.
307 void unmark
(gint location
, Marker marker
);
310 * ianjuta_markable_is_marker_set:
312 * @location: Location to check.
313 * @marker: Marker to check.
314 * @err: Error propagation and reporting
316 * Check if the @marker is set at the given @location.
318 * Returns: TRUE if the marker is set at the location, other false.
320 gboolean is_marker_set
(gint location
, Marker marker
);
323 * ianjuta_markable_delete_all_markers:
325 * @marker: Marker to delete.
326 * @err: Error propagation and reporting
328 * Delete the @marker from all locations.
330 void delete_all_markers
(Marker marker
);
334 * SECTION:ianjuta-indicable
335 * @title: IAnjutaIndicable
336 * @short_description: Implemented by indicate that indicate a range
338 * @stability: Unstable
339 * @include: libanjuta/interfaces/ianjuta-indicable.h
342 interface IAnjutaIndicable
344 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
347 * IAnjutaIndicableIndicator:
348 * @IANJUTA_INDICABLE_NONE: No indicator
349 * @IANJUTA_INDICABLE_IMPORTANT: Important indicator
350 * @IANJUTA_INDICABLE_WARNING: Warning indicator
351 * @IANJUTA_INDICABLE_CRITICAL: Critical indicator
353 * This enumeration is used to specify the appearance of the indicator
364 * ianjuta_indicable_set:
366 * @begin_location: Location where the indication should start
367 * @end_location: Location where the indication should end
368 * @indicator: the indicator to use
369 * @err: Error propagation and reporting
374 void set
(IAnjutaIterable
*begin_location
, IAnjutaIterable
*end_location
, Indicator indicator
);
377 * ianjuta_indicable_clear:
379 * @err: Error propagation and reporting
381 * Clear all indicators
388 * SECTION:ianjuta-iterable
389 * @title: IAnjutaIterable
390 * @short_description: Implemented by objects that can iterate
392 * @stability: Unstable
393 * @include: libanjuta/interfaces/ianjuta-iterable.h
396 interface IAnjutaIterable
399 * ianjuta_iterable_first:
401 * @err: Error propagation and reporting
403 * Set iter to first element position. Returns FALSE if
404 * there is no element in the iterable (hence does not have first).
405 * The iter points to the first valid item.
407 * Returns: TRUE if sucessful, other FALSE.
412 * ianjuta_iterable_next:
414 * @err: Error propagation and reporting
416 * Set the iter position to next element position. Iter can go until one
417 * item past the last item and lands in end-iter. end-iter does not point
418 * to any valid item and signifies end of the list. Returns FALSE if iter
419 * was already at end-iter (iter can not go past it) and remains pointed
422 * Returns: TRUE if sucessful, otherwise FALSE if already at end-iter.
427 * ianjuta_iterable_previous:
429 * @err: Error propagation and reporting
431 * Set the iter position to previous element position. Returns FALSE if
432 * there is no previous element and the iter remains pointed to the first
435 * Returns: TRUE if sucessful, other FALSE.
437 gboolean previous
();
440 * ianjuta_iterable_last:
442 * @err: Error propagation and reporting
444 * Set iter position to end-iter (one past last element) position.
445 * Returns FALSE if there is no element in the iterable (already
448 * Returns: TRUE if sucessful, other FALSE.
453 * ianjuta_iterable_foreach:
455 * @callback: Callback to call for each element.
456 * @user_data: user data that is passed back to the callback.
457 * @err: Error propagation and reporting
459 * Call callback for each element in the list. Call back is passed the
460 * same iter, but with different position set (from first to last). This
461 * method does not affect current position. i.e. current position is
462 * restored at the end of this method.
464 void foreach
(GFunc
callback, gpointer user_data
);
467 * ianjuta_iterable_set_position:
469 * @position: New position for the iter.
470 * @err: Error propagation and reporting
472 * Sets the current position of the iter to @position. The given @position
473 * must be from 0 to length - 1 (#ianjuta_iter_get_length()) to point to
474 * a valid element. Passing @position < 0 will set it to end-iter. It
475 * returns TRUE for the above cases. FLASE will be returned, if
476 * out-of-range @position is passed (@position > length - 1) and iter is
479 * Returns: TRUE if successfully set (i.e. @position is within the range or
480 * end-iter). otherwise returns FALSE (i.e. @position is out of data range).
482 gboolean set_position
(gint position
);
485 * ianjuta_iterable_get_position:
487 * @err: Error propagation and reporting
489 * Index of the current iter in the iterable. It will be
490 * from 0 to length - 1 (ianjuta_iter_get_length()) if iter is pointed
491 * at valid element. It will return -1 if iter is pointed at end-iter.
493 * Returns: integer index, or -1 for end-iter.
495 gint get_position
();
498 * ianjuta_iterable_get_length:
500 * @err: Error propagation and reporting
502 * Length of the iterable (number of elements indexable by it).
504 * Returns: total length of the list.
509 * ianjuta_iterable_clone:
511 * @err: Error propagation and reporting
513 * Clones the iterable. The returned iterable object must be unreffed
516 * Returns: (transfer full): A new instance of this iterable pointing at the same location.
518 IAnjutaIterable
*clone
();
521 * ianjuta_iterable_assign:
523 * @src_iter: Source iter from which to copy the assignment.
524 * @err: Error propagation and reporting
526 * Assigns the iter position from @src_iter.
529 void assign
(IAnjutaIterable
*src_iter
);
532 * ianjuta_iterable_compare:
534 * @iter2: Second iter to compare.
535 * @err: Error propagation and reporting
537 * Compares the position of @iter2 with this @obj. Returns -1
538 * value if this @obj is smaller than @iter2. Returns +1 value
539 * if this @obj is larger than @iter2. And returns 0 if both are equal.
540 * If you want difference of the iter positions, use
541 * #ianjuta_iterable_diff(). This method is meant for fast comparision.
543 * Returns: 0 if equal, -1 if @obj is smaller than @iter2
544 * or +1 if @obj is larger than @iter2.
547 gint compare
(IAnjutaIterable
*iter2
);
550 * ianjuta_iterable_diff:
552 * @iter2: Second iter to differenciate.
553 * @err: Error propagation and reporting
555 * Compares the position of @iter2 with this @obj and returns difference
556 * in position of the two (@obj - @iter2).
558 * Returns: The position difference of @obj - @iter2
561 gint diff
(IAnjutaIterable
*iter2
);
564 * SECTION:ianjuta-iterable-tree
565 * @title: IAnjutaIterableTree
566 * @short_description: Implemented by tree objects that can iterate
568 * @stability: Unstable
569 * @include: libanjuta/interfaces/ianjuta-iterable-tree.h
572 interface IAnjutaIterableTree
576 * ianjuta_iterable_tree_parent:
578 * @err: Error propagation and reporting
580 * Set iter position to parent of curernt iter. If there is no parent,
581 * returns FALSE (current iter position is not changed)
583 * Returns: TRUE if sucessful, otherwise FALSE.
588 * ianjuta_iterable_tree_children:
590 * @err: Error propagation and reporting
592 * Iter position set to first child of current iter. If there is no
593 * children, return NULL (iter position is not changed).
595 * Returns: TRUE if sucessful, otherwise FALSE.
597 gboolean children
();
600 * ianjuta_iterable_tree_has_children:
602 * @err: Error propagation and reporting
604 * Returns true if current iter has children
606 * Returns: TRUE if there are children, otherwise FALSE.
608 gboolean has_children
();
611 * ianjuta_iterable_tree_foreach_post:
613 * @callback: Callback to call for each element.
614 * @user_data: User data to pass back to callback.
615 * @err: Error propagation and reporting
617 * Call callback for each element in post order.
619 void foreach_post
(GFunc
callback, gpointer user_data
);
622 * ianjuta_iterable_tree_foreach_pre:
624 * @callback: Callback to call for each element.
625 * @user_data: User data to pass back to callback.
626 * @err: Error propagation and reporting
628 * Call callback for each element in pre order.
630 void foreach_pre
(GFunc
callback, gpointer user_data
);
635 * SECTION:ianjuta-builder
636 * @title: IAnjutaBuilder
637 * @short_description: Implemented by plugins that can build
639 * @stability: Unstable
640 * @include: libanjuta/interfaces/ianjuta-builder.h
643 interface IAnjutaBuilder
646 * IAnjutaBuilderError:
647 * @IANJUTA_BUILDER_SUCCEED: Build succeeded
648 * @IANJUTA_BUILDER_FAILED: Build failed
649 * @IANJUTA_BUILDER_CANCELED: Build was canceld
650 * @IANJUTA_BUILDER_ABORTED: Build aborted
651 * @IANJUTA_BUILDER_INTERRUPTED: Build interruped
652 * @IANJUTA_BUILDER_TERMINATED: Build interruped
653 * @IANJUTA_BUILDER_UNKNOWN_TARGET: The specified target is unknown
654 * @IANJUTA_BUILDER_UNKNOWN_ERROR: Unknown Error
655 * @IANJUTA_BUILDER_OTHER_ERROR: Other Error (no unknown ;-))
657 * Possible build errors
672 typedef gpointer
Handle;
674 typedef void (*Callback) (GObject
*sender
, IAnjutaBuilderHandle command
, GError
* err
, gpointer user_data
);
677 * IANJUTA_BUILDER_ROOT_URI
679 * Build directory uri. It is the same than the project_root_uri for
682 #define ROOT_URI
"build_root_uri"
685 * IANJUTA_BUILDER_CONFIGURATION_DEBUG
687 * Name of debugging configutation.
689 #define CONFIGURATION_DEBUG
"Debug"
692 * IANJUTA_BUILDER_CONFIGURATION_OPTIMIZED
694 * Name of optimized configutation.
696 #define CONFIGURATION_OPTIMIZED
"Optimized"
699 * IANJUTA_BUILDER_CONFIGURATION_PROFILING
701 * Name of profiling configutation.
703 #define CONFIGURATION_PROFILING
"Profiling"
706 * ianjuta_builder_is_built:
709 * @callback: callback called when command is finished
710 * @user_data: data passed to the callback
711 * @err: Error propagation and reporting.
713 * Check if the corresponding target is up to date or not. This
714 * command doesn't display anything. If this command cannot be
715 * implemented, it is possible to return always TRUE.
716 * When the command is finished, the callback function is called
719 * Returns: non null command handle if succeed
721 Handle is_built
(const gchar
*uri
, Callback callback, gpointer user_data
);
724 * ianjuta_builder_build:
727 * @callback: callback called when command is finished
728 * @user_data: data passed to the callback
729 * @err: Error propagation and reporting.
731 * Build the specified target.
732 * When the command if finished, the callback function is called
735 * Returns: non null command handle if succeed
737 Handle build
(const gchar
*uri
, Callback callback, gpointer user_data
);
740 * ianjuta_builder_cancel:
742 * @handle: handle of the command to cancel
743 * @err: Error propagation and reporting.
745 * Cancel specified command. The callback function will not
749 void cancel
(Handle handle);
752 * ianjuta_builder_list_configuration:
754 * @err: Error propagation and reporting.
756 * List all defined configuration. These names returned are
757 * the internal non localized names for the following
758 * predefined configuration: Debug, Profiling, Optimized.
759 * The default configuration has no name and is not returned.
761 * Returns: (element-type utf8) (transfer container): a list configuration name. The names are owned
762 * by the plugin, so only the list has to be free using
765 List
<const gchar
*> list_configuration
();
768 * ianjuta_builder_get_uri_configuration:
771 * @err: Error propagation and reporting.
773 * Get the configuration corresponding to the target uri.
775 * Returns: The configuration name or NULL if the corresponding
776 * configuration cannot be found.
778 const gchar
* get_uri_configuration
(const gchar
*uri
);
782 * SECTION:ianjuta-environment
783 * @title: IAnjutaEnvironment
784 * @short_description: Implemented by plugins doing cross compilation
786 * @stability: Unstable
787 * @include: libanjuta/interfaces/ianjuta-environment.h
790 interface IAnjutaEnvironment
793 * IAnjutaEnvironmentError:
794 * @IANJUTA_BUILDER_CONFIG: Configuration of the environment is wrong
795 * @IANJUTA_BUILDER_OTHER_ERROR: Other Error (no unknown ;-))
797 * Possible build errors
806 * ianjuta_environment_override:
808 * @dirp: a pointer on the working directory
809 * @argvp: a pointer on a NULL terminated string array
810 * containing the command name in argv[0] and all
812 * @envp: a pointer on a NULL terminated string array
813 * containing all additional environment variable
814 * used by the command
815 * @err: Error propagation and reporting.
817 * Override a command to work in another build environment
819 * Returns: FALSE if there is an error.
821 gboolean override
(gchar
**dirp
, gchar
***argvp
, gchar
***envp
);
824 * ianjuta_environment_get_real_directory:
826 * @dir: A directory path in the environment
827 * @err: Error propagation and reporting.
829 * Convert a directory in the environment to a directory outside.
830 * It is useful when the environment use chroot. Take care that
831 * the input directory string is freed using g_free but and you need to
832 * free the output string when not needed.
834 * Returns: The directory path outside the environment
836 gchar
* get_real_directory
(gchar
*dir
);
840 * SECTION:ianjuta-buildable
841 * @title: IAnjutaBuildable
842 * @short_description: Implemented by plugins that can build. This interface
843 * will be replaced by #IAnjutaBuilder (for build functions) and
844 * #IAnjutaEnvironment for ianjuta_buildable_set_command,
845 * ianjuta_buildable_reset_command and ianjuta_buildable_get_command.
847 * @stability: Obsolete
848 * @include: libanjuta/interfaces/ianjuta-buildable.h
851 interface IAnjutaBuildable
855 * IAnjutaBuildableCommand:
856 * @IANJUTA_BUILDABLE_COMMAND_COMPILE: Compile source
857 * @IANJUTA_BUILDABLE_COMMAND_BUILD: Build file (normally using make)
858 * @IANJUTA_BUILDABLE_COMMAND_BUILD_TARBALL: make dist
859 * @IANJUTA_BUILDABLE_COMMAND_INSTALL: make install
860 * @IANJUTA_BUILDABLE_COMMAND_CONFIGURE: ./configure
861 * @IANJUTA_BUILDABLE_COMMAND_GENERATE: ./autogen.sh
862 * @IANJUTA_BUILDABLE_COMMAND_CLEAN: make clean
863 * @IANJUTA_BUILDABLE_COMMAND_EXECUTE: ./hello
864 * @IANJUTA_BUILDABLE_COMMAND_IS_BUILT: check whether object files are up-to-date
865 * @IANJUTA_BUILDABLE_COMMAND_DISTCLEAN: make distclean
866 * @IANJUTA_BUILDABLE_COMMAND_CHECK: make check
867 * @IANJUTA_BUILDABLE_N_COMMANDS: size of enum
869 * The enumeration is used to speficy the disered build operation
875 COMMAND_BUILD_TARBALL
,
889 * ianjuta_buildable_set_command:
891 * @command_id: Command to override.
892 * @command: Build command to override.
893 * @err: Error propagation and reporting.
895 * Overrides the default command for the given command.
897 void set_command
(Command command_id
, const gchar
*command
);
900 * ianjuta_buildable_get_command:
902 * @command_id: Command to get override.
903 * @err: Error propagation and reporting.
905 * Retrieves the currently set command override.
907 * Returns: The overridden command. NULL if no override set.
909 const gchar
* get_command
(Command command_id
);
912 * ianjuta_buildable_reset_commands:
914 * @err: Error propagation and reporting.
916 * Resets the command overrides to defaults.
918 void reset_commands
();
921 * ianjuta_buildable_build:
924 * @err: Error propagation and reporting.
928 void build
(const gchar
*uri
);
931 * ianjuta_buildable_clean:
934 * @err: Error propagation and reporting.
938 void clean
(const gchar
*uri
);
941 * ianjuta_buildable_install:
944 * @err: Error propagation and reporting.
948 void install
(const gchar
*uri
);
951 * ianjuta_buildable_configure:
954 * @err: Error propagation and reporting.
958 void configure
(const gchar
*uri
);
961 * ianjuta_buildable_generate:
964 * @err: Error propagation and reporting.
968 void generate
(const gchar
*uri
);
971 * ianjuta_buildable_execute:
974 * @err: Error propagation and reporting.
978 void execute
(const gchar
*uri
);
982 * SECTION:ianjuta-help
983 * @title: IAnjutaHelp
984 * @short_description: Implemented by plugins that can provide help support
986 * @stability: Unstable
987 * @include: libanjuta/interfaces/ianjuta-help.h
990 interface IAnjutaHelp
994 * ianjuta_help_search:
996 * @query: string to search in the help
997 * @err: Error propagation and reporting
999 * Search for string @query in the help and display the result
1001 void search
(const gchar
*query
);
1005 * SECTION:ianjuta-loader
1006 * @title: IAnjutaLoader
1007 * @short_description: Interface to load file or stream
1009 * @stability: Unstable
1010 * @include: libanjuta/interfaces/ianjuta-loader.h
1012 * Loaders can deterime correct plugin to open a file or stream. They
1013 * themselves can not load it, but will correctly redirect the request to
1014 * an implementor of IAnjutaFile, IAnjutaFileSavable, IAnjutaStream or
1015 * IAnjutaStreamSavable, depending on the mime-type, meta-type or any other
1018 interface IAnjutaLoader
1020 #include
<libanjuta
/anjuta
-plugin.h
>
1022 * ianjuta_loader_find_plugins:
1024 * @err: Error propagation and reporting.
1026 * Returns: (element-type AnjutaPlugin): all plugins supporting loader interface.
1028 List
<AnjutaPlugin
*> find_plugins
();
1031 * SECTION:ianjuta-file-loader
1032 * @title: IAnjutaFileLoader
1033 * @short_description: Loader to load files
1035 * @stability: Unstable
1036 * @include: libanjuta/interfaces/ianjuta-file-loader.h
1038 * Loaders can deterime correct plugin to open a file.
1040 interface IAnjutaFileLoader
1042 #include
<gio
/gio.h
>
1044 * ianjuta_file_loader_load:
1046 * @file: File to load
1047 * @readonly: Open in readonly mode.
1048 * @err: Error propagation and reporting
1050 * Determines a plugin which can open the given file, activates it
1051 * opening the file and returns the interface of the plugin activated.
1053 * Return value: Plugin interface used to load the file.
1055 GObject
* load
(GFile
* file
, gboolean
readonly);
1058 * ianjuta_loader_peek_interface:
1060 * @file: Meta file to peek
1061 * @err: Error propagation and reporting
1063 * Peeks the file and determines the interface which can load
1066 * Return value: Plugin interface name that can load the file.
1068 gchar
* peek_interface
(GFile
* file
);
1072 * SECTION:ianjuta-stream-loader
1073 * @title: IAnjutaStreamLoader
1074 * @short_description: Loader to load streams
1076 * @stability: Unstable
1077 * @include: libanjuta/interfaces/ianjuta-stream-loader.h
1079 * StreamLoaders can deterime correct plugin to open a stream.
1081 interface IAnjutaStreamLoader
1086 * ianjuta_stream_loader_load:
1088 * @stream: Stream to load
1089 * @readonly: Open in readonly mode.
1090 * @err: Error propagation and reporting
1092 * Determines a plugin which can open the given stream, activates it
1093 * opening the stream and returns the interface of the plugin activated.
1095 * Return value: Plugin interface used to load the stream.
1097 GObject
* load
(FILE
*stream
, gboolean
readonly);
1100 * ianjuta_stream_loader_peek_interface:
1102 * @stream: Stream to load
1103 * @err: Error propagation and reporting
1105 * Peeks the stream and determines the interface which can load
1108 * Return value: Plugin interface name that can load the stream.
1110 gchar
* peek_interface
(FILE
*stream
);
1115 * SECTION:ianjuta-document
1116 * @title: IAnjutaDocument
1117 * @short_description: Interface for all kind of editable resources that
1118 * will be managed by IAnjutaDocumentManager
1120 * @stability: Unstable
1121 * @include: libanjuta/interfaces/ianjuta-document.h
1124 interface IAnjutaDocument
1127 * IAnjutaDocument::update-ui:
1130 * This signal is emitted when the document assumes the UI must be updated
1131 * because some internal state of the document has changed. For example, if
1132 * current line position is changed, it needs to be reflected to the UI.
1134 void ::update_ui
();
1137 * ianjuta_document_get_filename:
1139 * @err: Error propagation and reporting
1141 * Allows obtaining of the filename the editor was loaded from.
1143 * Return value: The name of the file. Not to be freed by caller.
1145 const gchar
* get_filename
();
1148 * ianjuta_document_can_undo:
1150 * @err: Error propagation and reporting
1152 * Can the editor undo the last operation?
1154 * Returns: TRUE if editor can undo, else FALSE
1156 gboolean can_undo
();
1159 * ianjuta_document_can_redo:
1161 * @err: Error propagation and reporting
1163 * Can the editor redo the last operation?
1165 * Returns: TRUE if editor can redo, else FALSE
1167 gboolean can_redo
();
1170 * ianjuta_document_undo:
1172 * @err: Error propagation and reporting
1174 * Undo last operation
1179 * ianjuta_document_redo:
1181 * @err: Error propagation and reporting
1183 * Redo last undo operation
1188 * ianjuta_document_begin_undo_action:
1190 * @err: Error propagation and reporting
1192 * Begins the mark of undoable action. Calls to this are stacked and
1193 * each must be ended with ianjuta_document_end_action().
1195 void begin_undo_action
();
1198 * ianjuta_document_end_undo_action:
1200 * @err: Error propagation and reporting
1202 * Ends the mark of undoable action.
1204 void end_undo_action
();
1207 * ianjuta_document_grab_focus:
1209 * @err: Error propagation and reporting
1216 * ianjuta_document_cut:
1218 * @err: Error propagation and reporting
1220 * Cut selection to clipboard.
1225 * ianjuta_document_copy:
1227 * @err: Error propagation and reporting
1229 * Copy selection to clipboard.
1234 * ianjuta_document_paste:
1236 * @err: Error propagation and reporting
1238 * Paste clipboard at current position.
1243 * ianjuta_document_clear:
1245 * @err: Error propagation and reporting
1253 * SECTION:ianjuta-editor
1254 * @title: IAnjutaEditor
1255 * @short_description: Text editor interface
1257 * @stability: Unstable
1258 * @include: libanjuta/interfaces/ianjuta-editor.h
1261 interface IAnjutaEditor
1263 #include
<gtk
/gtk.h
>
1264 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
1267 * IANJUTA_EDITOR_PREF_SCHEMA
1269 * Schema id used to store common editor settings.
1271 #define PREF_SCHEMA
"editor"
1274 * IANJUTA_EDITOR_USE_TABS_KEY
1276 * Boolean key, true is tabs has to be used for indenting.
1278 #define USE_TABS_KEY
"use-tabs"
1281 * IANJUTA_EDITOR_TAB_WIDTH_KEY
1283 * Integer key, defines the size of a tabulation in spaces.
1285 #define TAB_WIDTH_KEY
"tab-width"
1288 * IANJUTA_EDITOR_INDENT_WIDTH_KEY
1290 * Integer key, defines the number a space for one indentation step.
1292 #define INDENT_WIDTH_KEY
"indent-width"
1300 * IAnjutaEditorAttribute:
1301 * @IANJUTA_EDITOR_TEXT: Normal text
1302 * @IANJUTA_EDITOR_KEYWORD: A keyword of the programming language
1303 * @IANJUTA_EDITOR_COMMENT: A comment
1304 * @IANJUTA_EDITOR_STRING: A string
1306 * This enumeration is used to specify the type of text. Note that not all
1307 * editors implement this.
1318 * IAnjutaEditor::glade-member-add:
1319 * @widget_typename: Name of the type of the widget that will become a member of the class.
1320 * @widget_name: Name of the widget that will become a member of the class.
1321 * @filename: Path for the .ui file that generated the signal.
1324 * This signal is emitted when code for a widget must be generated.
1326 void ::glade_member_add
(gchar
*widget_typename
, gchar
*widget_name
, gchar
*filename
);
1329 * IAnjutaEditor::glade-member-add:
1330 * @widget_typename: Name of the type of the widget.
1331 * @signal_name: Name of the signal.
1332 * @handler_name: Name of the signal handler.
1333 * @object: Name of the object to be passed.
1334 * @swap: The "swap" signal property.
1335 * @after: The "after" signal property.
1336 * @filename: Path for the .ui file that generated the signal.
1339 * This signal is emitted when code for a widget must be generated.
1341 void ::glade_callback_add
(gchar
*widget_typename
, gchar
*signal_name
, gchar
*handler_name
, gchar
*object, gboolean swap
, gboolean after
, gchar
*filename
);
1344 * IAnjutaEditor::code-added:
1345 * @position: The iter position where @ch is added.
1346 * @code: The code that has been added.
1349 * This signal is emitted when code is added inside the editor.
1350 * The newly added code is @code which has been inserted at @position.
1352 void ::code_added
(IAnjutaIterable
*position
, gchar
*code
);
1355 * IAnjutaEditor::char-added:
1356 * @position: The iter position where @ch is added.
1357 * @ch: The character that has been added.
1360 * This signal is emitted when any character is added inside the editor.
1361 * The newly added character is @ch which has been inserted at @position.
1363 void ::char_added
(IAnjutaIterable
*position
, gchar ch
);
1366 * IAnjutaEditor::backspace:
1369 * The signal is emitted when the user presses backspace
1371 void ::backspace
();
1374 * IAnjutaEditor::changed:
1375 * @position: The iter position where change happend.
1376 * @added: TRUE if added, FALSE if deleted.
1377 * @length: Length of the text changed.
1378 * @lines: Number of lines added or removed.
1379 * @text: The text added or removed.
1382 * This signal is emitted when any text change happens in editor.
1383 * The changes begin at @position. @text is not garanteed to be NULL
1384 * terminated. Use @length to read the text. @lines represent the
1385 * number of line breaks in the added or removed text.
1387 void ::changed
(IAnjutaIterable
*position
, gboolean added
, gint length
, gint lines
, const gchar
*text
);
1390 * IAnjutaEditor::cursor-moved:
1393 * The signal is a hint that the cursor was moved.
1395 void ::cursor_moved
();
1398 * IAnjutaEditor::line-marks-gutter-clicked:
1400 * @double_click: whether the line marks gutter was double clicked
1401 * @location: location of the clicked marker
1403 * The signal is emitted when the user clicks on a marker
1405 void ::line_marks_gutter_clicked
(gint location
);
1408 * ianjuta_editor_get_tabsize:
1410 * @err: Error propagation and reporting
1412 * Returns the tabsize (in spaces) currently used by the editor.
1414 * Returns: tabsize in number of spaces
1416 gint get_tabsize
();
1419 * ianjuta_editor_set_tabsize:
1421 * @tabsize: Tabsize in spaces
1422 * @err: Error propagation and reporting
1424 * Sets the tabsize of the editor.
1426 void set_tabsize
(gint tabsize
);
1429 * ianjuta_editor_get_use_spaces:
1431 * @err: Error propagation and reporting
1433 * Returns if the editor uses spaces for filling up tab characters.
1435 * Returns: TRUE if yes, FALSE if no.
1437 gboolean get_use_spaces
();
1440 * ianjuta_editor_set_use_space:
1442 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
1443 * @err: Error propagation and reporting
1445 * Sets if the editor should use spaces for filling up tab characters.
1447 void set_use_spaces
(gboolean use_spaces
);
1450 * ianjuta_editor_set_auto_indent:
1452 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
1454 * Sets whether the editor should auto-indent itself. A plugin that does
1455 * custom auto-indent can set this to false and override the preferences
1458 void set_auto_indent
(gboolean auto_indent
);
1461 * ianjuta_editor_erase_range:
1463 * @position_start: Start position of chars to erase.
1464 * @position_end: End position of chars to erase.
1465 * @err: Error propagation and reporting
1467 * Erases the chars between positions pointed by @position_start and
1468 * @position_end. The character pointed by @position_start is included,
1469 * while pointed by @position_end is not include in the range. After
1470 * the erase operation, all active iters, except these two, are no
1471 * longer guranteed to be valid. At the end the operation, these two
1472 * iters point to the same position which is the position where erase
1473 * happend (usually the original @position_start position).
1475 void erase
(IAnjutaIterable
*position_start
, IAnjutaIterable
*position_end
);
1478 * ianjuta_editor_erase_all:
1480 * @err: Error propagation and reporting
1482 * Empties the whole editor buffer. There will be zero characters.
1483 * After the erase operation, none of the active iters are guranteed
1489 * ianjuta_editor_insert:
1491 * @position: Character position in editor where insert will take place.
1492 * @text: Text to append.
1493 * @length: Length of @text to use.
1494 * @err: Error propagation and reporting
1496 * Inserts @length characters from @text buffer at given @position of
1497 * editor buffer. If @length is -1, the whole @text is used.
1499 void insert
(IAnjutaIterable
*position
, const gchar
*text
, gint length
);
1502 * ianjuta_editor_append:
1504 * @text: Text to append.
1505 * @length: Length of @text to use.
1506 * @err: Error propagation and reporting
1508 * Appends @length characters from @text buffer at the end of editor
1509 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1511 void append
(const gchar
*text
, gint length
);
1514 * ianjuta_editor_goto_line:
1516 * @lineno: line number where carat will be moved.
1517 * @err: Error propagation and reporting
1519 * Carat is moved to the given @lineno line and text view is scrolled to
1520 * bring it in viewable area of the editor.
1522 void goto_line
(gint lineno
);
1525 * ianjuta_editor_goto_start:
1527 * @err: Error propagation and reporting
1529 * Carat is moved to the begining of editor and text view is scrolled to
1530 * bring it in viewable area of the editor.
1535 * ianjuta_editor_goto_end:
1537 * @err: Error propagation and reporting
1539 * Carat is moved to the end of editor and text view is scrolled to
1540 * bring it in viewable area of the editor.
1545 * ianjuta_editor_goto_position:
1547 * @position: Character position where carat will be moved.
1548 * @err: Error propagation and reporting
1550 * Carat is moved to the given @position and text view is scrolled to
1551 * bring @position in viewable area of the editor.
1553 void goto_position
(IAnjutaIterable
*position
);
1556 * ianjuta_editor_get_text:
1558 * @begin: Begining iterator
1559 * @end: End iterator
1560 * @err: Error propagation and reporting
1562 * Gets text characters beginning from @begin (including char
1563 * pointed by @begin) and ending with @end (excluding character
1564 * pointed by @end). The characters returned are utf-8 encoded.
1565 * The iterators @begin and @end could be in either order. The returned
1566 * text, however, is in right order. If both @begin and @end points
1567 * to the same position, NULL is returned.
1569 * Returns: A buffer of utf-8 characters.
1570 * The returned buffer must be freed when no longer required.
1572 gchar
* get_text
(IAnjutaIterable
*begin
, IAnjutaIterable
*end
);
1575 * ianjuta_editor_get_text_all:
1577 * @err: Error propagation and reporting
1579 * Gets all text characters in the editor.
1580 * The characters returned are utf-8 encoded.
1582 * Returns: A buffer of utf-8 characters containing all text from editor.
1583 * The returned buffer must be freed when no longer required.
1585 gchar
* get_text_all
();
1588 * ianjuta_editor_line_from_position:
1590 * @position: Position you want to know the line from
1591 * @err: Error propagation and reporting
1593 * Get the line number in which @position locates.
1594 * Returns: Line which corresponds to @position
1597 int get_line_from_position
(IAnjutaIterable
*position
);
1600 * ianjuta_editor_get_lineno:
1602 * @err: Error propagation and reporting
1604 * Obtains current line number on which carat is.
1606 * Return value: Line number.
1611 * ianjuta_editor_get_length:
1613 * @err: Error propagation and reporting
1615 * Get length of complete text in editor. This will be the total
1616 * number of bytes in the file or buffer.
1618 * Return value: Text length.
1623 * ianjuta_editor_get_current_word:
1625 * @err: Error propagation and reporting
1627 * Obtains the word on which carat is currently on.
1629 * Return value: Current word.
1631 gchar
* get_current_word
();
1634 * ianjuta_editor_get_current_column:
1636 * @err: Error propagation and reporting
1638 * Obtains number of the current column in the editor.
1640 * Return value: Current column.
1645 * ianjuta_editor_get_line_begin_position:
1648 * @err: Error propagation and reporting.
1652 * Returns: (transfer full): fixme
1654 IAnjutaIterable
* get_line_begin_position
(gint line
);
1657 * ianjuta_editor_get_line_end_position:
1660 * @err: Error propagation and reporting.
1664 * Returns: (transfer full): fixme
1666 IAnjutaIterable
*get_line_end_position
(gint line
);
1669 * ianjuta_editor_get_overwrite:
1671 * @err: Error propagation and reporting
1673 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1675 * Return value: editor mode.
1677 gboolean get_overwrite
();
1681 * ianjuta_editor_set_popup_menu:
1684 * @err: Error propagation and reporting
1686 * Set Editor popup menu. This is the menu shown in the editor when one
1687 * right-clicks on it.
1690 void set_popup_menu
(GtkWidget
*menu
);
1693 * ianjuta_editor_get_offset:
1695 * @err: Error propagation and reporting
1697 * Get current caret position in integer character offset. Deprecated.
1698 * Use ianjuta_editor_get_position() instead.
1700 * Returns: Current character position since the begining of file.
1705 * ianjuta_editor_get_position:
1707 * @err: Error propagation and reporting
1709 * Get current caret position.
1711 * Returns: (transfer full): Iterator that points to the current position.
1713 IAnjutaIterable
* get_position
();
1716 * ianjuta_editor_get_position_from_offset:
1718 * @offset: Character offset position where the iter will be set
1719 * @err: Error propagation and reporting
1721 * Creates and returns an iter for editor cells. The iter is
1722 * placed at the unicode character position where the given offset
1723 * @offset happens to fall. The returned iter is cell (character)
1724 * iter and not byte iter, so all iter operations
1725 * on it are character (not byte) iteration, including all position
1726 * and index references in the iter.
1728 * The iter must be unreferrenced by the caller when done.
1729 * The iter navigates (next/previous) in step of unicode
1730 * characters (one unicode character == one cell).
1732 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1733 * given @offset position.
1735 IAnjutaIterable
* get_position_from_offset
(gint offset
);
1738 * ianjuta_editor_get_start_position:
1740 * @err: Error propagation and reporting
1742 * Gets the iter positioned at the start of the editor buffer.
1744 * Return value: (transfer none): Cell iter set to the begining of the editor.
1746 IAnjutaIterable
* get_start_position
();
1749 * ianjuta_editor_get_end_position:
1751 * @err: Error propagation and reporting
1753 * Gets the iter positioned at the end of the editor buffer. The
1754 * returned iter is the end-iter which does not point to any valid
1755 * character in the buffer (it is pointed one step beyond the last
1758 * Return value: (transfer none): Cell iter set to the end of the editor (end-iter).
1760 IAnjutaIterable
* get_end_position
();
1763 * SECTION:ianjuta-editor-selection
1764 * @title: IAnjutaEditorSelection
1765 * @short_description: Text editor selection interface
1767 * @stability: Unstable
1768 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1771 interface IAnjutaEditorSelection
1773 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1775 * ianjuta_editor_selection_has_selection:
1777 * @err: Error propagation and reporting
1779 * Returns TRUE if editor has any text selected. The selection
1780 * positions can be retrieved with ianjuta_editor_selection_get_start()
1781 * and ianjuta_editor_selection_get_end().
1783 * Returns: TRUE if there is text selected else FALSE.
1785 gboolean has_selection
();
1788 * ianjuta_editor_selection_get:
1790 * @err: Error propagation and reporting
1792 * Gets curerntly selected text in editor.
1794 * Returns: A newly allocated buffer of currently selected characters.
1795 * NULL if there is no selection. The returned buffer must be freed after
1801 * ianjuta_editor_selection_set:
1803 * @start: Begin of selection
1804 * @end: End of selection
1805 * @scroll: Scroll selection onscreen
1806 * @err: Error propagation and reporting
1808 * Select characters between start and end. Start and end don't have to
1811 void set
(IAnjutaIterable
* start
, IAnjutaIterable
* end
, gboolean scroll
);
1814 * ianjuta_editor_selection_get_start:
1816 * @err: Error propagation and reporting
1818 * Gets start position of selection text.
1820 * Return: Start of selection or NULL if there is no selection.
1822 IAnjutaIterable
* get_start
();
1825 * ianjuta_editor_selection_get_end:
1827 * @err: Error propagation and reporting
1829 * Get end position of selection. If there is no selection, returns
1832 * Returns: End of selection or NULL if there is no selection.
1834 IAnjutaIterable
* get_end
();
1837 * ianjuta_editor_selection_select_block:
1839 * @err: Error propagation and reporting
1841 * Selects current block of code. The definition of block of code
1842 * depends on highlight mode used (programming language). Some
1843 * highlight mode does not have block concept, in that case this
1844 * method does not do anything.
1846 void select_block
();
1849 * ianjuta_editor_selection_select_function:
1851 * @err: Error propagation and reporting
1853 * Select current function block. The definition of function block
1854 * depends on highlight mode used (programming language). Some
1855 * highlight mode does not have function concept, in that case this
1856 * method does not do anything.
1858 void select_function
();
1861 * ianjuta_editor_edit_select_all:
1863 * @err: Error propagation and reporting
1865 * Select whole buffer.
1870 * ianjuta_editor_selection_replace:
1872 * @text: Replacement text.
1873 * @length: Length of the text to used in @text.
1874 * @err: Error propagation and reporting
1876 * Replaces currently selected text with the @text. Only @length amount
1877 * of characters are used from @text buffer to replace.
1879 void replace
(const gchar
*text
, gint length
);
1883 * SECTION:ianjuta-editor-search
1884 * @title: IAnjutaEditorSearch
1885 * @short_description: Text editor search interface
1887 * @stability: Unstable
1888 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1891 interface IAnjutaEditorSearch
1893 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1896 * ianjuta_editor_search_forward:
1898 * @search: String to search for
1899 * @start: Where to search from
1900 * @end: Where to stop searching
1901 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1902 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1903 * @err: Error propagation and reporting
1905 * Search forward from start to end
1908 gboolean forward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1911 * ianjuta_editor_search_backward:
1913 * @search: String to search for
1914 * @start: Where to search from
1915 * @end: Where to stop searching
1916 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1917 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1918 * @err: Error propagation and reporting
1920 * Search backward from end to start
1924 gboolean backward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1929 * SECTION:ianjuta-editor-convert
1930 * @title: IAnjutaEditorConvert
1931 * @short_description: Text editor convert interface
1933 * @stability: Unstable
1934 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1937 interface IAnjutaEditorConvert
1940 * ianjuta_editor_convert_to_upper:
1942 * @start_position: Start position.
1943 * @end_position: End position.
1944 * @err: Error propagation and reporting
1946 * change characters from start position to end position to uppercase.
1949 void to_upper
(IAnjutaIterable
*start_position
, IAnjutaIterable
*end_position
);
1952 * ianjuta_editor_convert_to_lower:
1954 * @start_position: Start position.
1955 * @end_position: End position.
1956 * @err: Error propagation and reporting
1958 * change characters from start position to end position to lowercase
1961 void to_lower
(IAnjutaIterable
*start_position
, IAnjutaIterable
*end_position
);
1965 * SECTION:ianjuta-editor-line-mode
1966 * @title: IAnjutaEditorLineMode
1967 * @short_description: Text editor line mode
1969 * @stability: Unstable
1970 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1973 interface IAnjutaEditorLineMode
1976 * IAnjutaEditorLineModeType:
1977 * @IANJUTA_EDITOR_LINE_MODE_LF: Line-Feed (Unix)
1978 * @IANJUTA_EDITOR_LINE_MODE_CR: Carat return (Max)
1979 * @IANJUTA_EDITOR_LINE_MODE_CRLF: Caret return + line-feed (Windows)
1981 * This enumeration is used to specify the type of text. Note that not all
1982 * editors implement this.
1992 * ianjuta_editor_line_mode_get:
1994 * @err: Error propagation and reporting
1996 * Get current line ending mode. It is auto-detected from the
2002 * ianjuta_editor_line_mode_set:
2004 * @mode: Line mode to set.
2005 * @err: Error propagation and reporting
2007 * Set the line ending mode to the given @mode. Existing line end
2008 * characters in the buffer are not touched. Only the newly added
2009 * texts will have @mode line end characters.
2011 void set
(Type mode
);
2014 * ianjuta_editor_line_mode_convert:
2016 * @mode: Line mode to convert.
2017 * @err: Error propagation and reporting
2019 * Set the line ending mode to the given @mode and convert all line end
2020 * characters in the buffer to @mode line end characters.
2022 void convert
(Type mode
);
2025 * ianjuta_editor_line_mode_fix:
2027 * @err: Error propagation and reporting
2029 * Convert EOL characters to majority of line mode. This is helpful
2030 * when the buffer contains mixed line modes and we want to fix it.
2036 * SECTION:ianjuta-editor-tip
2037 * @title: IAnjutaEditorTip
2038 * @short_description: Editor call tips assistance framework
2040 * @stability: Unstable
2041 * @include: libanjuta/interfaces/ianjuta-editor-tip.h
2044 interface IAnjutaEditorTip
2047 * ianjuta_editor_tip_show:
2049 * @tips: (element-type utf8): list of alternative tips.
2050 * @position: Tip position.
2051 * @err: Error propagation and reporting
2053 * Show tips showing more information on current context. No user feedback
2054 * is required when tips are shown. @position indicates
2055 * the position before which is the known context and after which are
2056 * the suggestions. Usually the editor would use this to
2057 * align the choices displayed such that the carat is just at this
2058 * position when the choices are displayed.
2061 void show
(List
<const gchar
*> tips
, IAnjutaIterable
*position
);
2064 * ianjuta_editor_tip_cancel
2066 * @err: Error propagation and reporting
2068 * Cancels the last shown tooltip
2073 * ianjuta_editor_tip_visible:
2075 * @err: Error propagation and reporting
2077 * Returns: whether a tooltip is crrently shown
2083 * SECTION:ianjuta-editor-assist
2084 * @title: IAnjutaEditorAssist
2085 * @short_description: Text editor assist interface
2087 * @stability: Unstable
2088 * @include: libanjuta/interfaces/ianjuta-editor-assist
2091 interface IAnjutaEditorAssist
2093 #include
<libanjuta
/interfaces
/ianjuta
-provider.h
>
2106 * IAnjutaEditorAssist::cancelled
2109 * This signal is emitted when the autocompletion is cancelled due to various
2110 * reasons. The provider should avoid to call ianjuta_editor_assist_proposals() after
2113 void ::cancelled
();
2116 * ianjuta_editor_assist_add
2118 * @provider: a IAnjutaProvider
2119 * @err: Error handling
2121 * Add a provider to the list of completion providers
2123 void add
(IAnjutaProvider
* provider
);
2126 * ianjuta_editor_assist_remove
2128 * @provider: a IAnjutaProvider
2129 * @err: Error handling
2131 * Remove a provider from the list of completion providers
2133 void remove
(IAnjutaProvider
* provider
);
2136 * ianjuta_editor_assist_invoke
2138 * @provider: a IAnjutaProvider (can be NULL to use all providers)
2139 * @err: Error handling
2141 * Force invokation of a provider at the current cursor position.
2142 * That means that ianjuta_provider_populate() will be called on the
2145 void invoke
(IAnjutaProvider
* provider
);
2148 * ianjuta_editor_assist_proposals:
2150 * @provider: a IAnjutaProvider
2151 * @proposals: (element-type IAnjutaEditorAssistProposal): a list of IAnjutaProposals
2152 * @pre_word: the word before the cursor
2153 * @finished: whether is was the last call in an async operation
2154 * @err: Error handling
2156 * Add the list of proposals for the current population. You can add
2157 * proposals async as long as the last call sets finished to TRUE. That
2158 * is usually called by the IAnjutaProvider after it was triggered by
2159 * ianjuta_provider_populate()
2162 void proposals
(IAnjutaProvider
* provider
, GList
* proposals
, const gchar
* pre_word
, gboolean finished
);
2166 * SECTION:ianjuta-editor-hover
2167 * @title: IAnjutaEditorHover
2168 * @short_description: Text editor hover interface
2170 * @stability: Unstable
2171 * @include: libanjuta/interfaces/ianjuta-editor-hover
2174 interface IAnjutaEditorHover
2176 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
2178 /* IAnjutaEditorHover::hover-over:
2180 * @position: IAnjutaEditorCell specifying the position the mouse is over
2182 * The mouse is held for a moment over @position. This can be used to show
2185 void ::hover_over
(IAnjutaIterable
* position
);
2187 /* IAnjutaEditorHover::hover-leave
2189 * @position: IAnjutaEditorCell specifying the position the mouse was over
2191 * User moved the mouse away - can be used to clean up things done in
2192 * #IAnjutaEditorHover::hover-over
2194 void ::hover_leave
(IAnjutaIterable
* position
);
2197 * ianjuta_editor_hover_display:
2199 * @info: String to display
2200 * @err: Error propagation and reporting
2202 * Show @info as tooltip
2205 void display
(IAnjutaIterable
* position
, const gchar
*info
);
2209 * SECTION:ianjuta-editor-language
2210 * @title: IAnjutaEditorLanguage
2211 * @short_description: Text editor language interface
2213 * @stability: Unstable
2214 * @include: libanjuta/interfaces/ianjuta-editor-language.h
2217 interface IAnjutaEditorLanguage
2219 /* IAnjutaEditorLanguage::language-changed:
2221 * @language: new language
2223 * the language of the editor changed to @language
2225 void ::language_changed
(const gchar
*language
);
2228 * ianjuta_editor_language_get_supported_languages:
2230 * @err: Error propagation and reporting
2232 * Return a list of languages supported by the editor
2233 * Note: These list contains the names in the form
2234 * the editor implementation knows them
2235 * Returns: (element-type utf8):
2238 const List
<const gchar
*> get_supported_languages
();
2241 * ianjuta_editor_language_name:
2243 * @err: Error propagation and reporting
2245 * Get a list of languages the editor can highlight
2249 const gchar
*get_language_name
(const gchar
* language
);
2252 * ianjuta_editor_language_get_language:
2254 * @err: Error propagation and reporting
2256 * Return the name of the currently used language
2260 const gchar
*get_language
();
2263 * ianjuta_editor_language_set_language:
2265 * @language: Language
2266 * @err: Error propagation and reporting
2268 * Force the editor to use a given language
2272 void set_language
(const gchar
* language
);
2276 * SECTION:ianjuta-editor-folds
2277 * @title: IAnjutaEditorFolds
2278 * @short_description: Text editor folds inteface
2280 * @stability: Unstable
2281 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
2284 interface IAnjutaEditorFolds
2287 * ianjuta_editor_view_open_folds:
2289 * @err: Error propagation and reporting
2297 * ianjuta_editor_view_close_folds:
2299 * @err: Error propagation and reporting
2307 * ianjuta_editor_view_toggle_fold:
2309 * @err: Error propagation and reporting
2311 * Open/Close current fold
2314 void toggle_current
();
2318 * SECTION:ianjuta-editor-view
2319 * @title: IAnjutaEditorView
2320 * @short_description: Text editor view interface
2322 * @stability: Unstable
2323 * @include: libanjuta/interfaces/ianjuta-editor-view.h
2325 * An editor view is a visual representation of the editor. An editor
2326 * can have multiple views. All views of an editor show the same editor
2327 * content (buffer). Consequently, any change done in one view is
2328 * updated in all other views.
2330 interface IAnjutaEditorView
2333 * ianjuta_editor_view_create:
2335 * @err: Error propagation and reporting
2337 * Creates a new view for the editor. The newly created view gets
2338 * the user focus and scrolls to the same location as last view.
2343 * ianjuta_editor_view_remove_current:
2345 * @err: Error propagation and reporting
2347 * Removes currently focused editor view. It does not remove the
2348 * last view of the editor. That is, if currently there is only
2349 * one view of the editor, this function does nothing.
2351 void remove_current
();
2354 * ianjuta_editor_view_get_count:
2356 * @err: Error propagation and reporting
2358 * Total number of views currently present. It will never be less
2359 * than 1. Invalid return values are considered error condition.
2365 * SECTION:ianjuta-editor-comment
2366 * @title: IAnjutaEditorComment
2367 * @short_description: Text editor comment interface
2369 * @stability: Unstable
2370 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
2373 interface IAnjutaEditorComment
2376 * ianjuta_editor_comment_block:
2378 * @err: Error propagation and reporting
2380 * Comment/Uncomment out selected block
2385 * ianjuta_editor_comment_box:
2387 * @err: Error propagation and reporting
2389 * Comment/Uncomment out selected block
2394 * ianjuta_editor_comment_stream:
2396 * @err: Error propagation and reporting
2398 * Comment/Uncomment out selected block
2404 * SECTION:ianjuta-editor-zoom
2405 * @title: IAnjutaEditorZoom
2406 * @short_description: Text editor zoom interface
2408 * @stability: Unstable
2409 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2412 interface IAnjutaEditorZoom
2415 * ianjuta_editor_zoom_in:
2417 * @err: Error propagation and reporting
2424 * ianjuta_editor_zoom_out:
2426 * @err: Error propagation and reporting
2434 * SECTION:ianjuta-editor-goto
2435 * @title: IAnjutaEditorGoto
2436 * @short_description: Text editor navigation interface
2438 * @stability: Unstable
2439 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2442 interface IAnjutaEditorGoto
2445 * ianjuta_editor_goto_start_block:
2447 * @err: Error propagation and reporting
2449 * Moves cursor to the start of the current block
2454 * ianjuta_editor_goto_end_block:
2456 * @err: Error propagation and reporting
2458 * Moves cursor to the end of the current block
2463 * ianjuta_editor_goto_matching_brace:
2465 * @err: Error propagation and reporting
2467 * Moves cursor to matching brace
2469 void matching_brace
();
2474 * SECTION:ianjuta-editor-glade-signal
2475 * @title: IAnjutaEditorGladeSignal
2476 * @short_description: Interface for dropping signal handlers
2478 * @stability: Unstable
2479 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2482 interface IAnjutaEditorGladeSignal
2484 /* IAnjutaEditorGladeSignal::drop-possible
2486 * @iter: a IAnjutaIterable of the position where drop would happen
2488 * Emitted when a signal is dragged over the editor
2490 * Return value: TRUE if a signal handler can be dropped, FALSE otherwise
2492 gboolean
::drop_possible
(IAnjutaIterable
* iterator
);
2494 /* IAnjutaEditorGladeSignal::drop
2496 * @iter: a IAnjutaIterable of the position where drop happens
2497 * @signal_data: Signal data in form "widget:signal:handler", e.g.
2498 * "GtkToggleButton:toggled:on_toggle_button_toggled"
2500 * Emitted when a signal was received per drag & drop
2503 void ::drop
(IAnjutaIterable
* iterator
, const gchar
* signal_data
);
2508 * SECTION:ianjuta-editor-cell
2509 * @title: IAnjutaEditorCell
2510 * @short_description: Text editor character cell
2512 * @stability: Unstable
2513 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2515 * Represents a cell in editor. A cell corresponds to a unicode
2516 * character along with all associated styles (such as colors and font).
2517 * A cell may or may not have style. If style is supported in the
2518 * editor, it is assumed all cells will have styles and hence every
2519 * IAnjutaEditorCell interface instance will have additionally
2520 * IAnjutaEditorCellStyle implemented.
2522 interface IAnjutaEditorCell
2524 #include
<libanjuta
/interfaces
/ianjuta
-editor.h
>
2527 * ianjuta_editor_cell_get_character:
2529 * @err: Error propagation and reporting
2531 * Returns the unicode character in this cell. A NULL terminated
2532 * string is returned that is the multibyte unicode character.
2533 * NULL is returned if the cell does not have any character.
2535 * Returns: a newly created string representing the cell's unicode
2538 gchar
*get_character
();
2541 * ianjuta_editor_cell_get_length:
2543 * @err: Error propagation and reporting.
2545 * Gets the length of the cell in bytes. That is, length of the
2546 * unicode character.
2548 * Returns: Length of the unicode character.
2553 * ianjuta_editor_cell_get_char:
2555 * @err: Error propagation and reporting
2557 * Returns the byte of the unicode character in this cell at given
2558 * index @char_index. @char_index can vary from 0 to length of the
2559 * unicode string minus 1. Out of range index is not allowed
2560 * (asserted) and return is undefined.
2562 * Since there is dynamic allocation of unicode character string
2563 * involved in ianjuta_editor_cell_get_character(), this function
2564 * is mainly useful for fast iteration (such as copying data).
2566 * Returns: a byte character.
2568 gchar get_char
(gint char_index
);
2570 IAnjutaEditorAttribute get_attribute
();
2573 * SECTION:ianjuta-editor-cell-style
2574 * @title: IAnjutaEditorCellStyle
2575 * @short_description: Text editor cell style interface
2577 * @stability: Unstable
2578 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2581 interface IAnjutaEditorCellStyle
2583 gchar
* get_font_description
();
2585 gchar
* get_background_color
();
2590 * SECTION:ianjuta-editor-factory
2591 * @title: IAnjutaEditorFactory
2592 * @short_description: Text editor factory that creates IAnjutaEditor objects
2594 * @stability: Unstable
2595 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2598 interface IAnjutaEditorFactory
2600 #include
"ianjuta-editor.h"
2601 #include
<gio
/gio.h
>
2604 * ianjuta_editor_factory_new_editor:
2606 * @file: file to open
2607 * @filename: filename to open
2608 * @err: Error propagation and reporting
2610 * Get a new GtkWidget* which implements IAnjutaEditor
2612 * Return value: An object implementing IAnjutaEditor
2614 IAnjutaEditor
* new_editor
(GFile
* file
, const gchar
* filename
);
2618 * SECTION:ianjuta-provider
2619 * @title: IAnjutaProvider
2620 * @short_description: Provider for autocompletion features
2622 * @stability: Unstable
2623 * @include: libanjuta/interfaces/ianjuta-provider.h
2625 interface IAnjutaProvider
2627 #include
"ianjuta-iterable.h"
2630 * ianjuta_provider_populate:
2632 * @iter: the text iter where the provider should be populated
2633 * @err: Error propagation and reporting.
2635 * Show completion for the context at position @iter. The provider should
2636 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2638 * Note that this is called after every character typed and the list of proposals
2639 * has to be completely renewed.
2641 void populate
(IAnjutaIterable
* iter
);
2644 * ianjuta_provider_get_start_iter:
2646 * @err: Error propagation and reporting.
2648 * Get the iter where the current completion started
2650 * Returns: (transfer none): current start iter
2652 IAnjutaIterable
* get_start_iter
();
2655 * ianjuta_provider_activate:
2657 * @iter: position where the completion occurs
2658 * @data: data assigned to the proposal
2659 * @err: Error propagation and reporting.
2661 * Show completion for the context at position @iter
2663 void activate
(IAnjutaIterable
* iter
, gpointer data
);
2666 * ianjuta_provider_get_name:
2669 * Return a (translatable) name for the provider
2671 const gchar
* get_name
();
2674 * SECTION:ianjuta-language-provider
2675 * @title: IAnjutaLanguageProvider
2676 * @short_description: Provider for autocompletion features
2678 * @stability: Unstable
2679 * @include: libanjuta/interfaces/ianjuta-language-provider.h
2681 interface IAnjutaLanguageProvider
2683 #include
"ianjuta-editor.h"
2684 #include
"ianjuta-iterable.h"
2685 #include
"ianjuta-symbol.h"
2688 * IANJUTA_LANGUAGE_PROVIDER_PREF_CALLTIP_ENABLE
2690 * Boolean key, true is calltips has to be shown.
2692 #define PREF_CALLTIP_ENABLE
"calltip-enable"
2695 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_ENABLE
2697 * Boolean key, true is code completion is enable.
2699 #define PREF_AUTOCOMPLETE_ENABLE
"completion-enable"
2702 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC
2704 * Boolean key, true is adding a space after function call autocompletion
2706 #define PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC
"completion-space-after-func"
2709 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC
2711 * Boolean key, true is adding '(' after function call autocompletion
2713 #define PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC
"completion-brace-after-func"
2716 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC
2718 * Boolean key, true is adding ')' after function call autocompletion
2720 #define PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC
"completion-closebrace-after-func"
2723 * ianjuta_language_provider_get_calltip_cache:
2725 * @call_context: name of the method to show a calltip
2726 * @err: Error propagation
2728 * Searches for a calltip in the cache
2730 * Returns: (element-type utf8) (transfer container): tips for the
2731 * searched name of the method from the cache,
2732 * NULL if nothing found
2734 List
<gchar
*> get_calltip_cache
(gchar
* call_context
);
2737 * ianjuta_language_provider_get_calltip_context:
2739 * @iter: current cursor position
2740 * @err: Error propagation
2742 * Searches for a calltip context
2744 * Returns: name of the method to show a calltip for or NULL
2746 gchar
* get_calltip_context
(IAnjutaIterable
* iter
);
2749 * ianjuta_language_provider_new_calltip:
2751 * @call_context: name of the method to create a new calltip
2752 * @iter: current cursor position
2753 * @err: Error propagation
2755 * Creates a new calltip
2757 void new_calltip
(gchar
* call_context
, IAnjutaIterable
* iter
);
2760 * ianjuta_language_provider_populate_completions:
2762 * @iter: the text iter where the provider should be populated
2763 * @err: Error propagation and reporting.
2765 * Show completion for the context at position @iter. The provider should
2766 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2768 * Note that this is called after every character typed and the list of proposals
2769 * has to be completely renewed.
2771 * Returns: (transfer full) (allow-none): the iter where the provider populated, NULL otherwise
2773 IAnjutaIterable
* populate_completions
(IAnjutaIterable
* iter
);
2778 * SECTION:ianjuta-document-manager
2779 * @title: IAnjutaDocumentManager
2780 * @short_description: Interface for plugin that manages all the editors
2782 * @stability: Unstable
2783 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2786 interface IAnjutaDocumentManager
2788 #include
"ianjuta-document.h"
2789 #include
"ianjuta-editor.h"
2790 #include
<gio
/gio.h
>
2793 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT
2795 * Anjuta shell value set by document manager to the current document
2797 #define CURRENT_DOCUMENT
"document_manager_current_document"
2805 * ianjuta_document_manager_get_file:
2807 * @filename: short filename
2808 * @err: Error propagation and reporting.
2810 * Given the short filename, finds the file of the filename, if the
2811 * editor that has it loaded is found. If there is no editor that has
2812 * this file opened, returns NULL.
2814 * Return value: (transfer full): the GFile for the given short filename
2816 GFile
* get_file
(const gchar
*filename
);
2819 * ianjuta_document_manager_find_document_with_file:
2821 * @file: The file to find.
2822 * @err: Error propagation and reporting.
2824 * Finds the document that has the file loaded. Only
2825 * the editor that matches the file will be searched.
2827 * Return value: (transfer none): the document that corresponds to given file. NULL if
2828 * there is no editor loaded with this file.
2830 IAnjutaDocument
* find_document_with_file
(GFile
* file
);
2833 * ianjuta_document_manager_goto_file_line:
2835 * @file: file to go to.
2836 * @lineno: the line number in the file to go to.
2837 * @err: Error propagation and reporting.
2839 * Loads the given file if not loaded yet, set its editor as current editor
2840 * and moves cursor to the given line in the editor.
2842 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2844 IAnjutaEditor
* goto_file_line
(GFile
* file
, gint lineno
);
2847 * ianjuta_document_manager_goto_file_line_mark:
2849 * @file: file to go to.
2850 * @lineno: the line number in the file to go to.
2851 * @mark: TRUE if the line should be marked with a marker.
2852 * @err: Error propagation and reporting
2854 * Loads the given file if not loaded yet, set its editor as current editor
2855 * and moves cursor to the given line in the editor. Optionally also marks
2856 * the line with line marker if @mark is given TRUE.
2858 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2860 IAnjutaEditor
* goto_file_line_mark
(GFile
* file
, gint lineno
, gboolean mark
);
2863 * ianjuta_document_manager_get_current_document:
2865 * @err: Error propagation and reporting.
2867 * Gets the current document.
2869 * Return value: (transfer none): the currently active document. NULL if none is there.
2871 IAnjutaDocument
* get_current_document
();
2874 * ianjuta_document_manager_set_current_document:
2876 * @document: the document to set as current.
2877 * @err: Error propagation and reporting.
2879 * Sets the given document as current document.
2881 void set_current_document
(IAnjutaDocument
*document
);
2884 * ianjuta_document_manager_get_doc_widgets:
2886 * @err: Error propagation and reporting.
2888 * Gets a list of widgets for open documents. Each widget is
2889 * a GTK_WIDGET(IAnjutaDocument*)
2891 * Return value: (element-type GtkWidget) (transfer container): a list of widgets for
2892 * all open documents. The returned list (but not the data in the list) must be
2895 List
<GtkWidget
*> get_doc_widgets
();
2898 * ianjuta_document_manager_add_buffer:
2900 * @name: Name of the editor buffer.
2901 * @content: Initial content of the buffer.
2902 * @err: Error propagation and reporting.
2904 * Creates a new editor buffer of the given name and sets the given
2905 * content as its initial content.
2907 * Return value: (transfer full): the IAnjutaEditor instance that has been added.
2909 IAnjutaEditor
* add_buffer
(const gchar
*name
, const gchar
* content
);
2912 * ianjuta_document_manager_remove_document:
2914 * @document: Document to close.
2915 * @save_before: If true, saves the document before closing.
2916 * @err: Error propagation and reporting.
2918 * Closes and removes the given document. If @save_before is TRUE, also
2919 * saves the document before closing.
2921 * Return value: TRUE if the document was removed, else FALSE.
2923 gboolean remove_document
(IAnjutaDocument
*document
, gboolean save_before
);
2926 * ianjuta_document_manager_add_document:
2928 * @document: the document to add
2929 * @err: Error propagation and reporting.
2931 * Adds a document to the document manager. This will open a new
2932 * Notebook tab and show the document there
2935 void add_document
(IAnjutaDocument
* document
);
2938 * ianjuta_document_manager_add_bookmark:
2940 * @file: File to add the bookmark
2941 * @line: Line of the bookmark
2945 void add_bookmark
(GFile
* file
, gint line
);
2949 * SECTION:ianjuta-message-view
2950 * @title: IAnjutaMessageView
2951 * @short_description: A view where messages of different kind can be shown
2953 * @stability: Unstable
2954 * @include: libanjuta/interfaces/ianjuta-message-view.h
2957 interface IAnjutaMessageView
2960 * IAnjutaMessageViewType:
2961 * @IANJUTA_MESSAGE_VIEW_TYPE_NORMAL: Normal message
2962 * @IANJUTA_MESSAGE_VIEW_TYPE_INFO: Info message (highlighed)
2963 * @IANJUTA_MESSAGE_VIEW_TYPE_ERROR: Error message
2964 * @IANJUTA_MESSAGE_VIEW_TYPE_WARNING: Warning message
2966 * Speficy the type ot the message added to the message view
2977 * IAnjutaMessageView::message-clicked:
2979 * @message: text of the clicked message
2981 * Emitted when the user clicks on a message
2983 void ::message_clicked
(const gchar
*message);
2986 * IAnjutaMessageView::buffer-flushed:
2988 * @line: the current line
2990 * Emitted when #ianjuta_message_view_buffer_append found a newline
2992 void ::buffer_flushed
(const gchar
*line
);
2995 * ianjuta_message_view_buffer_append:
2997 * @text: text to show as message
2998 * @err: Error propagation and reporting.
3000 * Appends the text in buffer. Flushes the buffer where a newline is found.
3001 * by emiiting buffer_flushed signal. The string is expected to be utf8.
3003 void buffer_append
(const gchar
*text
);
3006 * ianjuta_message_view_append:
3008 * @type: type of the message
3009 * @summary: summary of the message
3010 * @details: details of the message
3011 * @err: Error propagation and reporting.
3013 * Append the message with summary displayed and details displayed as tooltip
3015 void append
(Type type
, const gchar
*summary
, const gchar
*details
);
3018 * ianjuta_message_view_clear:
3020 * @err: Error propagation and reporting.
3022 * Clear all messages in buffer
3027 * ianjuta_message_view_select_next:
3029 * @err: Error propagation and reporting.
3031 * Select next message (of type INFO, WARNING or ERROR)
3033 void select_next
();
3036 * ianjuta_message_view_select_previous:
3038 * @err: Error propagation and reporting.
3040 * Select previous message
3042 void select_previous
();
3045 * ianjuta_message_view_get_current_message:
3047 * @err: Error propagation and reporting.
3049 * Get the currently selected message
3051 const gchar
* get_current_message
();
3054 * ianjuta_message_view_get_all_messages:
3056 * @err: Error propagation and reporting.
3058 * Get a list of all messages. The list has to be freed
3059 * Returns: (element-type utf8):
3061 List
<const gchar
*> get_all_messages
();
3065 * SECTION:ianjuta-message-manager
3066 * @title: IAnjutaMessageManager
3067 * @short_description: The plugin that managers all message views
3069 * @stability: Unstable
3070 * @include: libanjuta/interfaces/ianjuta-message-manager.h
3073 interface IAnjutaMessageManager
3075 #include
"ianjuta-message-view.h"
3076 #include
<gdk
/gdk.h
>
3083 * ianjuta_message_manager_add_view:
3085 * @name: Name/Title of the new view
3086 * @icon: Path to an icon or ""
3087 * @err: Error propagation and reporting
3089 * Adds a new view to the message-manager
3091 * Return value: The new message-view
3093 IAnjutaMessageView
* add_view
(const gchar
*name
, const gchar
*icon
);
3096 * ianjuta_message_manager_remove_view:
3098 * @view: The view to remove
3099 * @err: Error propagation and reporting
3101 * Remove view from the message-manager. The view
3102 * will become invalid.
3104 void remove_view
(IAnjutaMessageView
*view
);
3107 * ianjuta_message_manager_get_current_view:
3109 * @err: Error propagation and reporting
3111 * Get the view with is currently on top of
3112 * the notebook or NULL if the message-manager is empty.
3114 * Return value: Current view; #IAnjutaMessageView object.
3115 * NULL, if there is no views.
3117 IAnjutaMessageView
* get_current_view
();
3120 * ianjuta_message_manager_get_view_by_name:
3122 * @name: Name/Title of the view
3123 * @err: Error propagation and reporting
3125 * Get the view with the given name or NULL if
3126 * it does not exist.
3128 * Return value: The message-view or NULL
3130 IAnjutaMessageView
* get_view_by_name
(const gchar
*name
);
3133 * ianjuta_message_manager_get_all_views:
3135 * @err: Error propagation and reporting
3137 * Get all message-views
3139 * Return value: (element-type IAnjutaMessageView): A GList* of all views. You must not
3140 * manipulate the list.
3142 List
<IAnjutaMessageView
*> get_all_views
();
3145 * ianjuta_message_manager_set_current_view:
3147 * @view: A message view
3148 * @err: Error propagation and reporting
3150 * Set view to be on top of the notebook.
3153 void set_current_view
(IAnjutaMessageView
*view
);
3156 * ianjuta_message_manager_set_view_title:
3158 * @view: A message view
3159 * @title: Sets the title of view.
3160 * @err: Error propagation and reporting
3162 * Sets the title of view.
3165 void set_view_title
(IAnjutaMessageView
*view
, const gchar
*title
);
3168 * ianjuta_message_manager_set_view_icon:
3170 * @view: A message view
3171 * @icon: Sets the icon of view.
3172 * @err: Error propagation and reporting
3174 * Sets the icon of view.
3177 void set_view_icon
(IAnjutaMessageView
*view
, GdkPixbufAnimation
*icon
);
3180 * ianjuta_message_manager_set_view_icon_from_stock:
3182 * @view: A message view
3183 * @icon: Sets the icon of view.
3184 * @err: Error propagation and reporting
3186 * Sets the icon of view.
3189 void set_view_icon_from_stock
(IAnjutaMessageView
*view
, const gchar
*icon
);
3193 * SECTION:ianjuta-file-manager
3194 * @title: IAnjutaFileManager
3195 * @short_description: File manager plugin
3197 * @stability: Unstable
3198 * @include: libanjuta/interfaces/ianjuta-file-manager.h
3201 interface IAnjutaFileManager
3203 #include
<gio
/gio.h
>
3206 * IANJUTA_FILE_MANAGER_SELECTED_FILE
3208 * Anjuta shell value set by file manager to the selected file.
3210 #define SELECTED_FILE
"file_manager_selected_file"
3213 * IAnjutaFileManager::section-changed:
3215 * @err: Error propagation and reporting.
3219 void ::section_changed
(GFile
* file
);
3222 * ianjuta_file_manager_set_root:
3225 * @err: Error propagation and reporting.
3229 void set_root
(const gchar
*root_uri
);
3232 * ianjuta_file_manager_get_selected:
3234 * @err: Error propagation and reporting.
3238 GFile
* get_selected
();
3241 * ianjuta_file_manager_set_selected:
3243 * @file: File to select
3244 * @err: Error propagation and reporting.
3248 void set_selected
(GFile
* file
);
3252 * SECTION:ianjuta-terminal
3253 * @title: IAnjutaTerminal
3254 * @short_description: Interface for command line terminals
3256 * @stability: Unstable
3257 * @include: libanjuta/interfaces/ianjuta-terminal.h
3260 interface IAnjutaTerminal
3262 #include
<sys
/types.h
>
3265 * IAnjutaTerminal::child_exited:
3267 * @pid: pid of terminated child
3268 * @status: status of terminated child as returned by waitpid
3270 * This signal is emitted when a child exit.
3272 void ::child_exited
(gint pid
, gint status
);
3276 * ianjuta_terminal_execute_command:
3278 * @directory: Working directory
3279 * @command: Command executed followed by arguments
3280 * @environment: List of additional environment variables
3281 * @err: Error propagation and reporting.
3283 * Run the command in a terminal, setting the working directory
3284 * and environment variables.
3286 * Returns: Process ID
3288 pid_t execute_command
(const gchar
* directory
, const gchar
*command
, gchar
**environment
);
3292 * SECTION:ianjuta-project
3293 * @title: IAnjutaProject
3294 * @short_description: Interface implemented by project backend
3296 * @stability: Unstable
3297 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3299 * This is the new interface that is replacing Gnome Build.
3301 interface IAnjutaProject
3303 #include
<libanjuta
/anjuta
-project.h
>
3304 #include
<gtk
/gtk.h
>
3311 ERROR_ALREADY_EXISTS
,
3312 ERROR_VALIDATION_FAILED
,
3313 ERROR_PROJECT_MALFORMED
,
3315 ERROR_NOT_SUPPORTED
,
3316 ERROR_GENERAL_FAILURE
3321 PROBE_MAKE_FILES
= 100,
3322 PROBE_PROJECT_FILES
= 200
3328 * IAnjutaProject::file-changed:
3330 * @node: Node to be reloaded.
3332 * This signal is emitted when the project is changed on the disk. The
3333 * corresponding node has to be reloaded.
3335 void ::file_changed
(gpointer node
);
3338 * IAnjutaProject::node-changed:
3340 * @node: Changed node.
3341 * @error: Error while changing node
3343 * This signal is emitted when a node is changed by a function of this
3344 * interface. The error argument is not NULL if the change was not
3345 * possible. The corresponding node need to be saved.
3347 void ::node_changed
(gpointer node
, GError
*error
);
3350 * IAnjutaProject::node-saved:
3352 * @node: Saved node.
3353 * @error: Error while saving node
3355 * This signal is emitted when a node is saved. It returns an error if the
3356 * save operation fail.
3358 void ::node_saved
(gpointer node
, GError
*error
);
3361 * IAnjutaProject::node-loaded:
3363 * @node: Loaded node.
3364 * @error: Error while loading node
3366 * This signal is emitted when a node is loaded. It returns an error if the
3367 * load operation fail.
3369 void ::node_loaded
(gpointer node
, GError
*error
);
3373 * ianjuta_project_load_node:
3375 * @node: (transfer none): Project node to reload
3376 * @err: Error propagation and reporting
3378 * Reload a project node
3380 * Return value: TRUE if the node has been loaded without error
3382 gboolean load_node
(AnjutaProjectNode
*node
);
3385 * ianjuta_project_save_node:
3387 * @node: (transfer none): Project node to save
3388 * @err: Error propagation and reporting
3390 * Save a project node
3392 * Return value: TRUE if the node has been saved without error
3394 gboolean save_node
(AnjutaProjectNode
*node
);
3397 * ianjuta_project_add_node_after:
3399 * @parent: (transfer none): Parent
3400 * @sibling: (allow-none) (transfer none): Sibling
3402 * @file: (allow-none) (transfer none): Optional file object for the node
3403 * @name: (allow-none) (transfer none): Optional name for the node
3404 * @err: Error propagation and reporting
3406 * Create a new node and insert it after sibling
3408 * Return value: (transfer none): The new node, NULL if error
3410 AnjutaProjectNode
*add_node_after
(AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
);
3413 * ianjuta_project_add_node_before:
3415 * @parent: (transfer none): Parent
3416 * @sibling: (allow-none) (transfer none): Sibling
3418 * @file: (allow-none) (transfer none): Optional file object for the node
3419 * @name: (allow-none) (transfer none): Optional name for the node
3420 * @err: Error propagation and reporting
3422 * Create a new node and insert it before sibling
3424 * Return value: (transfer none): The new node, NULL if error
3426 AnjutaProjectNode
*add_node_before
(AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
);
3429 * ianjuta_project_remove_node:
3431 * @node: (transfer none): Node
3432 * @err: Error propagation and reporting
3436 * Return value: TRUE if the node can be removed
3438 gboolean remove_node
(AnjutaProjectNode
*node
);
3441 * ianjuta_project_set_property:
3443 * @node: (transfer none): Node
3444 * @id: (transfer none): Property
3445 * @name: (allow-none) (transfer none): Name for map property
3446 * @value: (transfer none): Value
3447 * @err: Error propagation and reporting
3449 * Change a properties on node.
3451 * Return value: (allow-none) (transfer none): The new property of NULL if the property cannot be set
3453 AnjutaProjectProperty
*set_property
(AnjutaProjectNode
*parent
, const gchar
*id, const gchar
*name
, const gchar
*value
);
3456 * ianjuta_project_remove_property:
3458 * @node: (transfer none): Node
3459 * @id: (transfer none): Property
3460 * @name: (allow-none) (transfer none): Name for map property
3461 * @err: Error propagation and reporting
3463 * Remove a property of the node
3465 * Return value: TRUE if the node is removed
3467 gboolean remove_property
(AnjutaProjectNode
*node
, const gchar
*id, const gchar
*name
);
3470 * ianjuta_project_get_root:
3472 * @err: Error propagation and reporting
3476 * Return value: (transfer none): The root node
3478 AnjutaProjectNode
*get_root
();
3481 * ianjuta_project_get_node_info:
3483 * @err: Error propagation and reporting
3485 * Return a list of possible node;
3487 * Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): A list
3488 * containing information on all node supported by the project.
3490 const List
<AnjutaProjectNodeInfo
*> get_node_info
();
3493 * ianjuta_project_is_loaded:
3495 * @err: Error propagation and reporting
3497 * Return TRUE if the project is loaded;
3499 * Return value: TRUE if the project is completely loaded.
3501 gboolean is_loaded
();
3505 * SECTION:ianjuta-project-backend
3506 * @title: IAnjutaProjectBackend
3507 * @short_description: Interface for creating new project
3509 * @stability: Unstable
3510 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3513 interface IAnjutaProjectBackend
3515 #include
"ianjuta-project.h"
3518 * ianjuta_project_backend_new_project:
3520 * @file: (transfer none): Project file or directory
3521 * @err: Error propagation and reporting
3523 * Create a new Anjuta project.
3525 * Return value: (transfer full): An object implementing the
3526 * #IAnjutaProject interface.
3528 IAnjutaProject
* new_project
(GFile
*file
);
3532 * ianjuta_project_backend_probe:
3534 * @file: (transfer none): Project file or directory
3535 * @err: Error propagation and reporting
3537 * Check if the directory contains a project supported by this
3540 * Return value: 0 if the project is invalid and > 0 if the project is
3543 gint probe
(GFile
*directory
);
3547 * SECTION:ianjuta-project-manager
3548 * @title: IAnjutaProjectManager
3549 * @short_description: Interface for project managers
3551 * @stability: Unstable
3552 * @include: libanjuta/interfaces/ianjuta-project-manager.h
3555 interface IAnjutaProjectManager
3558 #include
<libanjuta
/anjuta
-project.h
>
3559 #include
<libanjuta
/interfaces
/ianjuta
-project.h
>
3562 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI
3564 * Anjuta shell value set by project manager to the project root uri.
3566 #define PROJECT_ROOT_URI
"project_root_uri"
3569 * IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT
3571 * Anjuta shell value set by project manager to the current project object
3572 * which implement #IAnjutaProject interface.
3574 #define CURRENT_PROJECT
"project_manager_current_project"
3577 * IANJUTA_PROJECT_MANAGER_CURRENT_URI
3579 * Anjuta shell value set by project manager to the current uri.
3581 #define CURRENT_URI
"project_manager_current_uri"
3586 * IAnjutaProjectManager::project_loaded:
3588 * @err: Error propagation and reporting.
3590 * Emitted when the project is fully loaded. It can takes a quite long
3591 * time if the project is big. The project is loaded in several parts
3592 * in a thread. All functions are available before having the project
3595 void ::project_loaded
(GError
*error
);
3598 * IAnjutaProjectManager::element_added:
3600 * @element: A #GFile corrresponding to added element
3601 * @err: Error propagation and reporting.
3603 * Emitted when a new element is added to the project. It can be
3604 * a source, a target or a group. It does not always correspond
3605 * to an existing file. This signal can be emitted several time for
3608 void ::element_added
(GFile
*element
);
3611 * IAnjutaProjectManager::element_removed:
3613 * @element: A #GFile corresponding to removed element
3614 * @err: Error propagation and reporting.
3616 * Emitted when an element is removed from a project. It can be
3617 * a source, a target or a group.
3619 void ::element_removed
(GFile
*element
);
3622 * IAnjutaProjectManager::element_selected:
3624 * @element_uri: A #GFile corresponding to selected element
3625 * @err: Error propagation and reporting.
3627 * Emitted when an element is selected in the project view. It
3628 * can be a source, a target or a group.
3630 void ::element_selected
(GFile
*element
);
3635 * ianjuta_project_manager_get_elements:
3637 * @element_type: Select one element type: source, group or target
3638 * @err: Error propagation and reporting.
3640 * Get a list of all elements of this type in the project.
3642 * Returns: (element-type GFile) (transfer full): Get list of #GFile corresponding to
3643 * all valid elements or %NULL if there are no elements of this type. Free the returned
3644 * list with g_list_free() and the files with g_object_unref().
3646 List
<GFile
*> get_elements
(AnjutaProjectNodeType element_type
);
3649 * ianjuta_project_manager_get_target_type:
3651 * @target: A #GFile corresponding to a target
3652 * @err: Error propagation and reporting.
3654 * Get the type of the corresponding target: program, library...
3656 * Returns: Return the type of the target.
3658 AnjutaProjectNodeType get_target_type
(GFile
*target
);
3661 * ianjuta_project_manager_get_targets:
3663 * @target_type: type of the target
3664 * @err: Error propagation and reporting.
3666 * Get a list of targets in the project with the corresponding type.
3668 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to
3669 * each target of the requested type or %NULL if none exists. Free the returned list
3670 * with g_list_free() and the files with g_object_unref().
3672 List
<GFile
*> get_targets
(AnjutaProjectNodeType target_type
);
3675 * ianjuta_project_manager_get_parent:
3677 * @element: A #GFile corresponding to one child.
3678 * @err: Error propagation and reporting.
3680 * Gets the parent of the corresponding child.
3682 * Returns: The parent of the child, or %NULL if the element is the root.
3684 GFile
* get_parent
(GFile
*element
);
3687 * ianjuta_project_manager_get_children:
3689 * @parent: A #GFile corresponding to the parent.
3690 * @children_type: Select one element type: source, group or target
3691 * @err: Error propagation and reporting.
3693 * Recursively gets the list of all children below the corresponding
3694 * parent having the specify type.
3696 * Returns: (element-type GFile) (transfer full): The list of #GFile
3697 * corresponding to all children or %NULL if the element has no
3698 * children with the corresponding type. Free the returned * list
3699 * with g_list_free() and the files with g_object_unref().
3701 List
<GFile
*> get_children
(GFile
*parent
, gint children_type
);
3704 * ianjuta_project_manager_get_selected:
3706 * @err: Error propagation and reporting.
3708 * Gets the currently selected element in the project manager view.
3710 * Returns: (transfer full): A #GFile corresponding to the selected element in the project
3711 * view. You own the returned file; use g_object_unref() to release it.
3713 GFile
* get_selected
();
3716 * ianjuta_project_manager_get_capabilities:
3718 * @err: Error propagation and reporting.
3720 * Gets the capabilites of project whether it can add group, target
3723 * Returns: Supported capabilites.
3725 guint get_capabilities
();
3728 * ianjuta_project_manager_add_source:
3730 * @name: Source name or URI.
3731 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3732 * %NULL if you don't care.
3733 * @err: Error propagation and reporting.
3735 * Prompts the user to add a file to the project. If the user selects
3736 * multiple files only the first source file is returned.
3738 * You can add non existing file. In this case the element_added
3739 * signal will be emitted with a non existing file. So it is
3740 * up to the caller to reemit this signal later when the file
3743 * Returns: (transfer full): A #GFile corresponding to the new source file in the
3744 * project view. You own the returned file; use g_object_unref() to release it.
3746 GFile
* add_source
(const gchar
*name
, GFile
*default_target
);
3749 * ianjuta_project_manager_add_source_quiet:
3751 * @name: Source name or URI.
3752 * @target: A #GFile corresponding to the parent target or group.
3753 * @err: Error propagation and reporting.
3755 * Adds a file to the project without prompting the user.
3757 * You can add non existing file. In this case the element_added
3758 * signal will be emitted with a non existing file. So it is
3759 * up to the caller to reemit this signal later when the file
3762 * Returns: (transfer full): A #GFile corresponding to the new source file in the project
3763 * view. You own the returned file; use g_object_unref() to release it.
3765 GFile
* add_source_quiet
(const gchar
*name
, GFile
*target
);
3768 * ianjuta_project_manager_add_sources:
3770 * @names: (element-type utf8): Sources name or URI to add.
3771 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3772 * %NULL if don't care.
3773 * @err: Error propagation and reporting.
3775 * Prompts the user to add several files to the project. Depending on the
3776 * project backend, it can be possible that the source files must
3777 * be located in a particular directory.
3779 * You can add non existing file. In this case the element_added
3780 * signal will be emitted with a non existing file. So it is
3781 * up to the caller to reemit this signal later when the file
3784 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to all
3785 * new source files added in the project. You own the list with the the returned files;
3786 * use g_list_free() and g_object_unref() on each file to release them.
3788 List
<GFile
*> add_sources
(List
<const gchar
*> names
, GFile
*default_target
);
3791 * ianjuta_project_manager_add_target:
3793 * @name: Target name or URI.
3794 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3795 * %NULL if don't care.
3796 * @err: Error propagation and reporting.
3798 * Prompts the user to add a new target to the project. The user can select
3799 * a parent group different from the one set as default.
3801 * Returns: (transfer full): A #GFile corresponding to the new target added in the project.
3802 * You own the returned file; use g_object_unref() to release it.
3804 GFile
* add_target
(const gchar
*name
, GFile
*default_group
);
3807 * ianjuta_project_manager_add_group:
3809 * @name: Group name or URI.
3810 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3811 * %NULL if don't care.
3812 * @err: Error propagation and reporting.
3814 * Prompts the user to add a new group to the project. The user can select
3815 * a parent group different from the one set as default.
3817 * Returns: (transfer full): A #GFile corresponding to the new group added in the project.
3818 * You own the returned file; use g_object_unref() to release it.
3820 GFile
* add_group
(const gchar
*name
, GFile
*default_group
);
3823 * ianjuta_project_manager_is_open:
3825 * @err: Error propagation and reporting.
3827 * Gets whether a project is currently opened.
3829 * Returns: %TRUE if a project is opened.
3831 gboolean is_open
();
3834 * ianjuta_project_manager_get_packages:
3836 * @err: Error propagation and reporting.
3838 * Returns: (element-type utf8) (transfer container): the list of pkg-config packages that the current project
3839 * requires in it's configure.ac. Can be NULL if there is no project
3840 * opened currently or no package is required.
3842 List
<gchar
*> get_packages
();
3845 * ianjuta_project_manager_get_current_project:
3847 * @err: Error propagation and reporting.
3849 * Gets the current project.
3851 * Return value: (transfer none): the currently active project. NULL if none is there.
3853 IAnjutaProject
* get_current_project
();
3857 * SECTION:ianjuta-project-chooser
3858 * @title: IAnjutaProjectChooser
3859 * @short_description: Interface for selecting project node
3861 * @stability: Unstable
3862 * @include: libanjuta/interfaces/ianjuta-project-chooser.h
3865 interface IAnjutaProjectChooser
3868 #include
<libanjuta
/anjuta
-project.h
>
3869 #include
<libanjuta
/interfaces
/ianjuta
-project
-manager.h
>
3874 * IAnjutaProjectChooser::changed:
3877 * Emitted when the selected node is changed.
3884 * ianjuta_project_chooser_set_project_model:
3886 * @manager: A project manager
3887 * @child_type: Select one element type: source, group or target
3888 * @err: Error propagation and reporting.
3890 * Initialize a project chooser button allowing to select a parent node
3891 * where you can add the nodes of type child_type.
3892 * As special cases with
3895 * <term>ANJUTA_PROJECT_ROOT</term>
3896 * <listitem><para>all nodes are included</para></listitem>
3899 * <term>ANJUTA_PROJECT_MODULE</term>
3900 * <listitem><para>only modules are included, this can be used
3901 * to add a new package. While ANJUTA_PROJECT_PACKAGE allows you
3902 * to select a target using a package.</para></listitem>
3906 * Returns: TRUE if sucessful, other FALSE.
3908 gboolean set_project_model
(IAnjutaProjectManager
*manager
, AnjutaProjectNodeType child_type
);
3912 * ianjuta_project_chooser_get_selected:
3914 * @err: Error propagation and reporting.
3916 * Gets the currently selected element in the project chooser.
3918 * Returns: (transfer none): A #GFile corresponding to the selected
3919 * element in the project view or %NULL if no valid node is selected.
3920 * The file is owned by the widget If you want to keep a pointer to
3921 * the file you must add a refcount using g_object_ref().
3923 GFile
* get_selected
();
3928 * SECTION:ianjuta-todo
3929 * @title: IAnjutaTodo
3930 * @short_description: Task manager interface
3932 * @stability: Unstable
3933 * @include: libanjuta/interfaces/ianjuta-todo.h
3936 interface IAnjutaTodo
3938 #include
<gio
/gio.h
>
3940 * ianjuta_to_do_load:
3943 * @err: Error propagation and reporting.
3947 void load
(GFile
*file
);
3951 * SECTION:ianjuta-wizard
3952 * @title: IAnjutaWizard
3953 * @short_description: Interface for wizards that can create new stuffs
3955 * @stability: Unstable
3956 * @include: libanjuta/interfaces/ianjuta-wizard.h
3959 interface IAnjutaWizard
3963 * ianjuta_wizard_activate:
3965 * @err: Error propagation and reporting.
3967 * Called when the wizard should start after some user action
3973 * SECTION:ianjuta-debugger
3974 * @title: IAnjutaDebugger
3975 * @short_description: Debugger interface
3976 * @see_also: #IAnjutaDebugManager
3977 * @stability: Unstable
3978 * @include: libanjuta/interfaces/ianjuta-debugger.h
3980 * This interface is implemented by debugger backends, by example the gdb
3981 * backend. It is used by the debug manager plugin which provides the
3982 * graphical interface and a simple wrapper: #IAnjutaDebugManager.
3984 * The debugger is in one on these 5 states and emit a signal to the debug
3985 * manager when it changes. Here is figure showing all transitions and
3986 * the signal emitted.
3987 * <figure id="debugger-states">
3990 * <imagedata fileref="debugger-states.png" format="PNG"/>
3996 interface IAnjutaDebugger
3998 #include
"ianjuta-message-view.h"
3999 #include
<sys
/types.h
>
4000 #include
<gio
/gio.h
>
4004 * IAnjutaDebuggerError:
4005 * @IANJUTA_DEBUGGER_OK: No error
4006 * @IANJUTA_DEBUGGER_NOT_READY: Debugger is not ready to execute the command
4007 * @IANJUTA_DEBUGGER_NOT_RUNNING: Debugger is not is running state
4008 * @IANJUTA_DEBUGGER_NOT_STOPPED: Debugger is not is stopped state
4009 * @IANJUTA_DEBUGGER_NOT_LOADED: Debugger is not is loaded state
4010 * @IANJUTA_DEBUGGER_NOT_STARTED: Debugger is not in started state
4011 * @IANJUTA_DEBUGGER_NOT_CONNECTED: Debugger is not connected:
4012 * @IANJUTA_DEBUGGER_NOT_IMPLEMENTED: Corresponding function is not implemented
4013 * @IANJUTA_DEBUGGER_CANCEL: Operation has been cancelled
4014 * @IANJUTA_DEBUGGER_UNABLE_TO_CREATE_VARIABLE: Debugger cannot create variable
4015 * @IANJUTA_DEBUGGER_UNABLE_TO_ACCESS_MEMORY: Debugger cannot access memory
4016 * @IANJUTA_DEBUGGER_UNABLE_TO_OPEN_FILE: Debugger cannot open file
4017 * @IANJUTA_DEBUGGER_UNSUPPORTED_FILE_TYPE: Debugger cannot debug such file
4018 * @IANJUTA_DEBUGGER_UNSUPPORTED_VERSION: Debugger is too old
4019 * @IANJUTA_DEBUGGER_UNABLE_TO_FIND_DEBUGGER: Debugger cannot be found
4020 * @IANJUTA_DEBUGGER_ALREADY_DONE: Command has already been executed
4021 * @IANJUTA_DEBUGGER_PROGRAM_NOT_FOUND: Program cannot be found
4022 * @IANJUTA_DEBUGGER_UNABLE_TO_CONNECT: Unable to connect to debugger
4023 * @IANJUTA_DEBUGGER_UNKNOWN_ERROR: Unknown error
4024 * @IANJUTA_DEBUGGER_OTHER_ERROR: other error
4026 * This enumeration is used to defined the error returned by the debugger
4040 UNABLE_TO_CREATE_VARIABLE
,
4041 UNABLE_TO_ACCESS_MEMORY
,
4042 UNABLE_TO_OPEN_FILE
,
4043 UNSUPPORTED_FILE_TYPE
,
4044 UNSUPPORTED_VERSION
,
4045 UNABLE_TO_FIND_DEBUGGER
,
4054 * IAnjutaDebuggerOutputType:
4055 * @IANJUTA_DEBUGGER_OUTPUT: Output from debugger
4056 * @IANJUTA_DEBUGGER_WARNING_OUTPUT: Warning from debugger
4057 * @IANJUTA_DEBUGGER_ERROR_OUTPUT: Error from debugger
4058 * @IANJUTA_DEBUGGER_INFO_OUTPUT: Additional message from debugger
4060 * This enumeration is used to defined the kind of output in
4061 * #IAnjutaDebuggerOutputCallback
4072 * IAnjutaDebuggerState:
4073 * @IANJUTA_DEBUGGER_BUSY: Debugger is executing a command, it can enter in another
4074 * at the end of the command.
4075 * @IANJUTA_DEBUGGER_STOPPED: Debugger is stopped.
4076 * @IANJUTA_DEBUGGER_STARTED: Debugger is started but no program is loaded.
4077 * @IANJUTA_DEBUGGER_PROGRAM_LOADED: Debugger is started and has a program loaded.
4078 * @IANJUTA_DEBUGGER_PROGRAM_STOPPED: Debugger is started and has a program stopped.
4079 * @IANJUTA_DEBUGGER_PROGRAM_RUNNING: Debugger is started and has a program running.
4081 * This enumeration is used to defined the different state of the debugger.
4094 * IAnjutaDebuggerFrame:
4095 * @thread: Thread identifier.
4096 * @level: Level of the frame, 0 is the topmost one.
4097 * @args: List of argument of the caller.
4098 * @file: Source file name where is the program counter.
4099 * @line: Line number in the file above.
4100 * @function: Function name where is the program counter.
4101 * @library: Library name where is the program counter.
4102 * @address: Address of the program counter.
4104 * This structure keeps all information about a stack frame.
4119 * IAnjutaDebuggerCallback:
4121 * @user_data: user data passed to the function
4124 * This callback function is used only by #ianjuta_debugger_callback with a
4127 typedef void (*Callback) (const gpointer data
, gpointer user_data
, GError
* err
);
4130 * IAnjutaDebuggerGListCallback:
4131 * @list: (element-type any): list of data
4132 * @user_data: user data passed to the function
4135 * This callback function is used by several debugger functions. Depending on
4136 * the function, the kind of elements in the list is different. It is a string
4137 * for #ianjuta_debugger_list_local or a #IAnjutaDebuggerFrame for
4138 * #ianjuta_debugger_list_frame.
4140 typedef void (*GListCallback
) (const GList
* list
, gpointer user_data
, GError
* err
);
4143 * IAnjutaDebuggerGCharCallback:
4145 * @user_data: user data
4148 * This callback function is used by several debugger functions. The data is
4151 typedef void (*GCharCallback
) (const gchar
*value
, gpointer user_data
, GError
* err
);
4154 * IAnjutaDebuggerOutputCallback:
4156 * @user_data: user data
4159 * This callback function is used only by #ianjuta_debugger_callback with a
4162 typedef void (*OutputCallback
) (OutputType type
, const gchar
*output
, gpointer user_data
);
4167 * IAnjutaDebugger::debugger_started:
4170 * This signal is emitted when the debugger is started.
4172 void ::debugger_started
();
4175 * IAnjutaDebugger::debugger_stopped:
4177 * @err: Error propagation and reporting.
4179 * This signal is emitted when the debugger is stopped. The error
4180 * parameters allow to check it has run correctly.
4182 void ::debugger_stopped
(GError
*err
);
4185 * IAnjutaDebugger::program_loaded:
4188 * This signal is emitted when a program is loaded.
4190 void ::program_loaded
();
4193 * IAnjutaDebugger::program_running:
4196 * This signal is emitted when the program is running.
4198 void ::program_running
();
4201 * IAnjutaDebugger::program_stopped:
4204 * This signal is emitted when the program is interrupted.
4206 void ::program_stopped
();
4209 * IAnjutaDebugger::program_exited:
4212 * This signal is emitted when the program exits.
4214 void ::program_exited
();
4217 * IAnjutaDebugger::sharedlib_event:
4220 * This signal is emitted when the program load a new shared
4223 void ::sharedlib_event
();
4226 * IAnjutaDebugger::program_moved:
4228 * @pid: process id, 0 when unknown
4229 * @tid: thread id, 0 when unknown
4230 * @address: program counter address, 0 when unknown
4231 * @file: source file where is the program counter, NULL when unknown
4232 * @line: line number if file name above is not NULL
4234 * This signal is emitted when the debugger know the current program
4235 * location. Most of the time, after the program has stopped but it
4236 * could happen even if it is still running.
4238 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
4241 * IAnjutaDebugger::frame_changed:
4243 * @frame: frame number
4244 * @thread: thread number
4246 * This signal is emitted when the current frame changes.
4248 void ::frame_changed
(guint frame
, gint thread
);
4251 * IAnjutaDebugger::signal_received:
4253 * @name: Signal name
4254 * @description: Signal description
4256 * This signal is emitted when the program received a unix signal.
4258 void ::signal_received
(const gchar
* name
, const gchar
* description
);
4261 * IAnjutaDebugger::debugger_ready:
4263 * @state: debugger status
4265 * This signal is emitted when the debugger is ready to execute
4268 void ::debugger_ready
(State state
);
4272 * ianjuta_debugger_get_state:
4274 * @err: Error propagation and reporting.
4276 * Get the current state of the debugger
4278 * Returns: The current debugger state.
4286 * ianjuta_debugger_load:
4289 * @mime_type: mime type of the file
4290 * @source_search_directories: (element-type utf8): List of directories to search for
4292 * @err: Error propagation and reporting.
4294 * Load a program in the debugger.
4296 * Returns: TRUE if sucessful, other FALSE.
4298 gboolean load
(const gchar
*file
, const gchar
*mime_type
, const List
<const gchar
*> source_search_directories
);
4301 * ianjuta_debugger_attach:
4303 * @pid: pid of the process to debug
4304 * @source_search_directories: (element-type utf8): List of directories to search for
4306 * @err: Error propagation and reporting.
4308 * Attach to an already running process.
4310 * Returns: TRUE if sucessful, other FALSE.
4312 gboolean attach
(pid_t pid
, const List
<const gchar
*> source_search_directories
);
4315 * ianjuta_debugger_set_working_directory:
4317 * @dir: working program directory
4318 * @err: Error propagation and reporting.
4320 * Set program working directory.
4322 * Returns: TRUE if sucessful, other FALSE.
4324 gboolean set_working_directory
(const gchar
*dir
);
4327 * ianjuta_debugger_set_environment:
4329 * @env: List environment variable
4330 * @err: Error propagation and reporting
4332 * Set environment variable
4334 * Returns: TRUE if sucessfull, other FALSE.
4336 gboolean set_environment
(gchar
**env
);
4339 * ianjuta_debugger_start:
4341 * @args: command line argument of the program
4342 * @terminal: TRUE if the program need a terminal
4343 * @stop: TRUE if program is stopped at the beginning
4344 * @err: Error propagation and reporting.
4346 * Start a loaded program under debugger control.
4348 * Returns: TRUE if sucessful, other FALSE.
4350 gboolean start
(const gchar
*args
, gboolean terminal
, gboolean stop
);
4353 * ianjuta_debugger_connect:
4355 * @server: remote server
4356 * @args: command line argument of the program
4357 * @terminal: TRUE if the program need a terminal
4358 * @stop: TRUE if program is stopped at the beginning
4359 * @err: Error propagation and reporting
4361 * Connect to a remote debugger and run program
4363 * Returns: TRUE if sucessfull, otherwise FALSE.
4365 gboolean connect
(const gchar
*server
, const gchar
*args
, gboolean terminal
, gboolean stop
);
4368 * ianjuta_debugger_unload:
4370 * @err: Error propagation and reporting.
4374 * Returns: TRUE if sucessfull, otherwise FALSE.
4379 * ianjuta_debugger_quit:
4381 * @err: Error propagation and reporting.
4383 * Quit the debugger, can wait until the debugger is ready.
4385 * Returns: TRUE if sucessful, other FALSE.
4390 * ianjuta_debugger_abort:
4392 * @err: Error propagation and reporting.
4394 * Quit the debugger as fast as possible.
4396 * Returns: TRUE if sucessful, otherwise FALSE.
4401 * ianjuta_debugger_run:
4403 * @err: Error propagation and reporting.
4405 * Run the program currently loaded.
4407 * Returns: TRUE if sucessful, otherwise FALSE.
4412 * ianjuta_debugger_step_in:
4414 * @err: Error propagation and reporting.
4416 * Execute a single C instruction of the program currently loaded.
4418 * Returns: TRUE if sucessful, otherwise FALSE.
4420 gboolean step_in
();
4423 * ianjuta_debugger_step_over:
4425 * @err: Error propagation and reporting.
4427 * Execute one C instruction, without entering in procedure, of
4428 * the program currently loaded.
4430 * Returns: TRUE if sucessful, otherwise FALSE.
4432 gboolean step_over
();
4435 * ianjuta_debugger_step_out:
4437 * @err: Error propagation and reporting.
4439 * Execute the currently loaded program until it goes out of the
4440 * current procedure.
4442 * Returns: TRUE if sucessful, otherwise FALSE.
4444 gboolean step_out
();
4447 * ianjuta_debugger_run_to:
4449 * @file: target file name
4450 * @line: target line in file
4451 * @err: Error propagation and reporting.
4453 * Execute the currently loaded program until it reachs the target
4456 * Returns: TRUE if sucessful, otherwise FALSE.
4458 gboolean run_to
(const gchar
* file
, gint line
);
4461 * ianjuta_debugger_run_from:
4463 * @file: target file name
4464 * @line: target line in file
4465 * @err: Error propagation and reporting.
4467 * Execute the program from a new position.
4468 * This function is optional.
4470 * Returns: TRUE if sucessful, otherwise FALSE.
4472 gboolean run_from
(const gchar
*file
, gint line
);
4475 * ianjuta_debugger_exit:
4477 * @err: Error propagation and reporting.
4479 * Exit from the currently loaded program.
4481 * Returns: TRUE if sucessful, otherwise FALSE.
4486 * ianjuta_debugger_interrupt:
4488 * @err: Error propagation and reporting.
4490 * Interrupt the program currently running.
4492 * Returns: TRUE if sucessful, otherwise FALSE.
4494 gboolean interrupt
();
4499 * ianjuta_debugger_inspect:
4501 * @name: variable name
4502 * @callback: Callback to call with variable value
4503 * @user_data: User data that is passed back to the callback
4504 * @err: Error propagation and reporting.
4506 * Get back the value of the named variable.
4508 * Returns: TRUE if sucessful, otherwise FALSE.
4510 gboolean inspect
(const gchar
* name
, GCharCallback
callback, gpointer user_data
);
4513 * ianjuta_debugger_evaluate:
4515 * @name: variable name
4516 * @value: new variable value
4517 * @callback: Callback to call when the variable has been modified
4518 * @user_data: User data that is passed back to the callback
4519 * @err: Error propagation and reporting.
4521 * Change the value of a variable in the current program.
4523 * Returns: TRUE if sucessful, otherwise FALSE.
4525 gboolean evaluate
(const gchar
* name
, const gchar
* value
, GCharCallback
callback, gpointer user_data
);
4528 * ianjuta_debugger_print:
4530 * @name: variable name
4531 * @callback: Callback to call with variable value
4532 * @user_data: User data that is passed back to the callback
4533 * @err: Error propagation and reporting.
4535 * Display value of a variable, like inspect.
4537 * Returns: TRUE if sucessful, otherwise FALSE.
4539 gboolean print
(const gchar
*variable
, GCharCallback
callback, gpointer user_data
);
4542 * ianjuta_debugger_list_local:
4544 * @callback: Callback to call with list of local variable
4545 * @user_data: User data that is passed back to the callback
4546 * @err: Error propagation and reporting.
4548 * Get the list of local variables
4550 * Returns: TRUE if sucessful, otherwise FALSE.
4552 gboolean list_local
(GListCallback
callback, gpointer user_data
);
4555 * ianjuta_debugger_list_argument:
4557 * @callback: Callback to call with list of arguments
4558 * @user_data: User data that is passed back to the callback
4559 * @err: Error propagation and reporting.
4561 * Get the list of arguments
4563 * Returns: TRUE if sucessful, otherwise FALSE.
4565 gboolean list_argument
(GListCallback
callback, gpointer user_data
);
4568 * ianjuta_debugger_info_signal:
4570 * @callback: Callback to call with list of arguments
4571 * @user_data: User data that is passed back to the callback
4572 * @err: Error propagation and reporting.
4574 * Get some informatin about a signal
4576 * Returns: TRUE if sucessful, otherwise FALSE.
4578 gboolean info_signal
(GListCallback
callback, gpointer user_data
);
4581 * ianjuta_debugger_info_sharedlib:
4583 * @callback: Callback to call with list of arguments
4584 * @user_data: User data that is passed back to the callback
4585 * @err: Error propagation and reporting.
4587 * Get information about shared libraries.
4589 * Returns: TRUE if sucessful, otherwise FALSE.
4591 gboolean info_sharedlib
(GListCallback
callback, gpointer user_data
);
4594 * ianjuta_debugger_handle_signal:
4596 * @name: signal name
4597 * @stop: TRUE if we need to stop signal
4598 * @print: TRUE if we display a message when the signal is emitted
4599 * @ignore: TRUE if we ignore the signal
4600 * @err: Error propagation and reporting.
4602 * It defines how to handle signal received by the program.
4604 * Returns: TRUE if sucessful, otherwise FALSE.
4606 gboolean handle_signal
(const gchar
*name
, gboolean stop
, gboolean print
, gboolean
ignore);
4609 * ianjuta_debugger_info_frame:
4611 * @frame: frame number, the top frame has the number 0
4612 * @callback: Callback to call getting a list of strings with all information
4613 * @user_data: User data that is passed back to the callback
4614 * @err: Error propagation and reporting.
4616 * Get some information about the one stack frame.
4617 * This function has been deprecated and is not used anymore in the
4620 * Returns: TRUE if sucessful, otherwise FALSE.
4622 gboolean info_frame
(guint frame
, GListCallback
callback, gpointer user_data
);
4625 * ianjuta_debugger_info_args:
4627 * @callback: Callback to call getting a list of strings with all information
4628 * @user_data: User data that is passed back to the callback
4629 * @err: Error propagation and reporting.
4631 * Get some informatin about a current functin arguments.
4632 * This function has been deprecated and is not used anymore in the
4635 * Returns: TRUE if sucessful, otherwise FALSE.
4637 gboolean info_args
(GListCallback
callback, gpointer user_data
);
4640 * ianjuta_debugger_info_target:
4642 * @callback: Callback to call getting a list of strings with all information
4643 * @user_data: User data that is passed back to the callback
4644 * @err: Error propagation and reporting.
4646 * Get back some information about the target
4647 * This function has been deprecated and is not used anymore in the
4650 * Returns: TRUE if sucessful, otherwise FALSE.
4652 gboolean info_target
(GListCallback
callback, gpointer user_data
);
4655 * ianjuta_debugger_info_program:
4657 * @callback: Callback to call getting a list of strings with all information
4658 * @user_data: User data that is passed back to the callback
4659 * @err: Error propagation and reporting.
4661 * Get some informatin about a current program.
4662 * This function has been deprecated and is not used anymore in the
4665 * Returns: TRUE if sucessful, otherwise FALSE.
4667 gboolean info_program
(GListCallback
callback, gpointer user_data
);
4670 * ianjuta_debugger_info_udot:
4672 * @callback: Callback to call getting a list of strings with all information
4673 * @user_data: User data that is passed back to the callback
4674 * @err: Error propagation and reporting.
4676 * Get some informatin about OS structures.
4677 * This function has been deprecated and is not used anymore in the
4680 * Returns: TRUE if sucessful, otherwise FALSE.
4682 gboolean info_udot
(GListCallback
callback, gpointer user_data
);
4686 * ianjuta_debugger_info_variables:
4688 * @callback: Callback to call getting a list of strings with all information
4689 * @user_data: User data that is passed back to the callback
4690 * @err: Error propagation and reporting.
4692 * Get some informatin about variables.
4693 * This function has been deprecated and is not used anymore in the
4696 * Returns: TRUE if sucessful, otherwise FALSE.
4698 gboolean info_variables
(GListCallback
callback, gpointer user_data
);
4701 * ianjuta_debugger_list_frame:
4703 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame
4704 * @user_data: User data that is passed back to the callback
4705 * @err: Error propagation and reporting.
4707 * Get the list of frames.
4709 * Returns: TRUE if sucessful, otherwise FALSE.
4711 gboolean list_frame
(GListCallback
callback, gpointer user_data
);
4714 * ianjuta_debugger_set_frame:
4716 * @frame: frame number
4717 * @err: Error propagation and reporting.
4719 * Set the current frame.
4721 * Returns: TRUE if sucessful, otherwise FALSE.
4723 gboolean set_frame
(guint frame
);
4726 * ianjuta_debugger_list_thread:
4728 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame for each thread
4729 * @user_data: User data that is passed back to the callback
4730 * @err: Error propagation and reporting.
4732 * Get the list of threads.
4734 * Returns: TRUE if sucessful, otherwise FALSE.
4736 gboolean list_thread
(GListCallback
callback, gpointer user_data
);
4739 * ianjuta_debugger_set_thread:
4741 * @thread: thread number
4742 * @err: Error propagation and reporting.
4744 * Set the current thread.
4746 * Returns: TRUE if sucessful, otherwise FALSE.
4748 gboolean set_thread
(gint thread
);
4751 * ianjuta_debugger_info_thread:
4753 * @thread: thread number
4754 * @callback: Callback to call getting a list of strings with all information
4755 * @user_data: User data that is passed back to the callback
4756 * @err: Error propagation and reporting.
4758 * Get some information about current threads.
4760 * Returns: TRUE if sucessful, otherwise FALSE.
4762 gboolean info_thread
(gint thread
, GListCallback
callback, gpointer user_data
);
4765 * ianjuta_debugger_send_command:
4768 * @err: Error propagation and reporting.
4770 * Send a command directly to the debugger. Warning, changing the
4771 * debugger states, by sending a run command by example, will
4772 * probably gives some troubles in the debug manager.
4774 * Returns: TRUE if sucessful, otherwise FALSE.
4776 gboolean send_command
(const gchar
*command
);
4779 * ianjuta_debugger_callback:
4781 * @callback: Callback to call. the data argument is NULL.
4782 * @user_data: User data that is passed back to the callback
4783 * @err: Error propagation and reporting.
4785 * All commands are executed asynchronously and give back information
4786 * with callbacks. It is difficult to know when a command is really
4787 * executed. But as all commands are executed in order, you can use
4788 * this command to get a call back when all previous commands have
4791 * Returns: TRUE if sucessful, otherwise FALSE.
4793 gboolean
callback (Callback callback, gpointer user_data
);
4796 * ianjuta_debugger_enable_log:
4798 * @log: MessageView used by log
4799 * @err: Error propagation and reporting.
4801 * Log all debuggers commands, mainly useful for debugging.
4803 void enable_log
(IAnjutaMessageView
*log
);
4806 * ianjuta_debugger_disable_log:
4808 * @err: Error propagation and reporting.
4810 * Disable debugger log.
4812 void disable_log
();
4815 * ianjuta_debugger_dump_stack_trace:
4817 * @callback: Callback to call getting a list of strings
4818 * @user_data: User data that is passed back to the callback
4819 * @err: Error propagation and reporting.
4821 * Return a stack trace valid for a bug reports.
4822 * This function is optional.
4824 * Returns: TRUE if sucessful, otherwise FALSE.
4826 gboolean dump_stack_trace
(GListCallback
callback, gpointer user_data
);
4829 * SECTION:ianjuta-debugger-breakpoint
4830 * @title: IAnjutaDebuggerBreakpoint
4831 * @short_description: Breakpoint Debugger interface
4833 * @stability: Unstable
4834 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
4837 interface IAnjutaDebuggerBreakpoint
4841 * IAnjutaDebuggerBreakpointType:
4842 * @IANJUTA_DEBUGGER_BREAKPOINT_REMOVED: Set for removed breakpoint
4843 * @IANJUTA_DEBUGGER_BREAKPOINT_UPDATED: Set for changed breakpoint
4844 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE: Set on source line
4845 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS: Set on an addresse
4846 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION: Set on a function name
4847 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_READ: Set on read access
4848 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE: Set on write access
4849 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE: Has enable information
4850 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE: Has ignore information,
4851 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME: Has counter information
4852 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION: Has a condition
4853 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY: Temporary breakpoint, automatically removed when triggered
4854 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_PENDING: Pending breakpoint
4856 * This enumeration defined various characteristics of the breakpoint.
4863 ON_ADDRESS
= 1 << 2,
4864 ON_FUNCTION
= 1 << 3,
4867 WITH_ENABLE
= 1 << 16,
4868 WITH_IGNORE
= 1 << 15,
4869 WITH_TIME
= 1 << 11,
4870 WITH_CONDITION
= 1 << 12,
4871 WITH_TEMPORARY
= 1 << 13,
4872 WITH_PENDING
= 1 << 14,
4876 * IAnjutaDebuggerBreakpointItem:
4877 * @type: type see #IAnjutaBreakpointType enumeration
4878 * @id: unique identifier
4879 * @file: source file where is the breakpoint
4880 * @line: corresponding source file line number
4881 * @function: corresponding function name
4882 * @address: corresponding address
4883 * @enable: TRUE if the breakpoint is enabled
4884 * @ignore: TRUE if the breakpoint is ignored
4885 * @times: Count how many time the breakpoint is triggered
4886 * @condition: Additional condition for triggering the breakpoint
4887 * @temporary: TRUE if the breakpoint is temporary
4888 * @pending: TRUE if the breakpoint is pending
4890 * This structure keeps all information about a breakpoint.
4909 * IAnjutaDebuggerBreakpointMethod:
4910 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS: Allow to set breakpoint on address
4911 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION: Allow to set breakpoint on function name
4912 * @IANJUTA_DEBUGGER_BREAKPOINT_ENABLE: Allow to disable breakpoint
4913 * @IANJUTA_DEBUGGER_BREAKPOINT_IGNORE: Allow to ignore breakpoint
4914 * @IANJUTA_DEBUGGER_BREAKPOINT_CONDITION: Allow to add a condition on breakpoint
4916 * Defines which breakpoint characteristics are supported by the debugger
4921 SET_AT_ADDRESS
= 1 << 0,
4922 SET_AT_FUNCTION
= 1 << 1,
4929 * IAnjutaDebuggerBreakpointCallback:
4930 * @data: a #IAnjutaBreakpointItem object
4931 * @user_data: user data passed to the function
4934 * This callback function is used to return a #IAnjutaBreakpointItem.
4936 typedef void (*Callback) (const Item
*data
, gpointer user_data
, GError
* err
);
4939 * ianjuta_debugger_breakpoint_implement_breakpoint:
4941 * @err: Error propagation and reporting.
4943 * Return all implemented methods.
4945 * Returns: A OR of #IAnjutaDebuggerBreakpointMethod
4946 * corresponding to all implemented optional methods.
4948 gint implement_breakpoint
();
4951 * ianjuta_debugger_breakpoint_set_breakpoint_at_line:
4953 * @file: File containing the breakpoint
4954 * @line: Line number where is the breakpoint
4955 * @callback: Callback to call when the breakpoint has been set
4956 * @user_data: User data that is passed back to the callback
4957 * @err: Error propagation and reporting.
4959 * Set a breakpoint at the specified line in the file.
4961 * Returns: TRUE if the request succeed and the callback is called. If
4962 * FALSE, the callback will not be called.
4964 gboolean set_breakpoint_at_line
(const gchar
* file
, guint line
, Callback callback, gpointer user_data
);
4968 * ianjuta_debugger_breakpoint_set_breakpoint_at_address:
4970 * @address: Address of the breakpoint
4971 * @callback: Callback to call when the breakpoint has been set
4972 * @user_data: User data that is passed back to the callback
4973 * @err: Error propagation and reporting.
4975 * Set a breakpoint at the specified address.
4976 * This function is optional.
4978 * Returns: TRUE if the request succeed and the callback is called. If
4979 * FALSE, the callback will not be called.
4981 gboolean set_breakpoint_at_address
(gulong address
, Callback callback, gpointer user_data
);
4984 * ianjuta_debugger_breakpoint_set_breakpoint_at_function:
4986 * @file: File containing the breakpoint
4987 * @function: Function name where the breakpoint is put
4988 * @callback: Callback to call when the breakpoint has been set
4989 * @user_data: User data that is passed back to the callback
4990 * @err: Error propagation and reporting.
4992 * Set a breakpoint at the beginning of the specified function.
4993 * This function is optional.
4995 * Returns: TRUE if the request succeed and the callback is called. If
4996 * FALSE, the callback will not be called.
4998 gboolean set_breakpoint_at_function
(const gchar
* file
, const gchar
* function
, Callback callback, gpointer user_data
);
5001 * ianjuta_debugger_breakpoint_clear_breakpoint:
5003 * @id: Breakpoint identification number
5004 * @callback: Callback to call when the breakpoint has been cleared
5005 * @user_data: User data that is passed back to the callback
5006 * @err: Error propagation and reporting.
5008 * Clear a breakpoint put by any set functions. The Id of the breakpoint
5009 * is given in the callback of the set functions.
5011 * Returns: TRUE if the request succeed and the callback is called. If
5012 * FALSE, the callback will not be called.
5014 gboolean clear_breakpoint
(guint
id, Callback callback, gpointer user_data
);
5017 * ianjuta_debugger_breakpoint_list_breakpoint:
5019 * @callback: Callback to call with the list of #IAnjutaDebuggreBreakpointItem
5020 * @user_data: User data that is passed back to the callback
5021 * @err: Error propagation and reporting.
5023 * List all breakpoints set in the debugger. It is useful to
5024 * know how many time a breakpoint has been hit.
5026 * Returns: TRUE if the request succeed and the callback is called. If
5027 * FALSE, the callback will not be called.
5029 gboolean list_breakpoint
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5032 * ianjuta_debugger_breakpoint_enable_breakpoint:
5034 * @id: Breakpoint identification number
5035 * @enable: TRUE to enable the breakpoint, FALSE to disable it
5036 * @callback: Callback to call when the breakpoint has been changed
5037 * @user_data: User data that is passed back to the callback
5038 * @err: Error propagation and reporting.
5040 * Enable of disable a breakpoint. This function is optional.
5042 * Returns: TRUE if the request succeed and the callback is called. If
5043 * FALSE, the callback will not be called.
5045 gboolean enable_breakpoint
(guint
id, gboolean enable
, Callback callback, gpointer user_data
);
5048 * ianjuta_debugger_breakpoint_ignore_breakpoint:
5050 * @id: Breakpoint identification number
5051 * @ignore: Number of time a breakpoint must be ignored
5052 * @callback: Callback to call when the breakpoint has been changed
5053 * @user_data: User data that is passed back to the callback
5054 * @err: Error propagation and reporting.
5056 * This allow to ignore the breakpoint a number of time before stopping.
5057 * This function is optional.
5059 * Returns: TRUE if the request succeed and the callback is called. If
5060 * FALSE, the callback will not be called.
5062 gboolean ignore_breakpoint
(guint
id, guint
ignore, Callback callback, gpointer user_data
);
5065 * ianjuta_debugger_breakpoint_condition_breakpoint:
5067 * @id: Breakpoint identification number
5068 * @condition: expression that has to be true
5069 * @callback: Callback to call when the breakpoint has been changed
5070 * @user_data: User data that is passed back to the callback
5071 * @err: Error propagation and reporting.
5073 * Add a condition, evaluate in the program context, on the breakpoint,
5074 * the program will stop when it reachs the breakpoint only if the
5075 * condition is true. This function is optional.
5077 * Returns: TRUE if the request succeed and the callback is called. If
5078 * FALSE, the callback will not be called.
5080 gboolean condition_breakpoint
(guint
id, const gchar
* condition
, Callback callback, gpointer user_data
);
5084 * SECTION:ianjuta-debugger-variable
5085 * @title: IAnjutaDebuggerVariable
5086 * @short_description: Variables interface for debuggers
5088 * @stability: Unstable
5089 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
5091 * This interface is used to examine and change values of expression.
5092 * It is based on the MI2 variable object interface of gdb. A
5093 * variable needs to be created before being able to get or set its
5094 * value and list its children.
5096 interface IAnjutaDebuggerVariable
5099 * IAnjutaDebuggerVariableObject:
5100 * @name: unique variable object name created by backend
5101 * @expression: corresponding variable name or expression
5102 * @type: variable type
5103 * @value: variable value
5104 * @changed: TRUE if the variable has changed
5105 * @exited: TRUE if the variable is outside current scope
5106 * @deleted: TRUE if the variable has been removed
5107 * @children: Number of variable children, -1 if unknown
5108 * @has_more: TRUE if the children value is wrong
5110 * Defines a variable object.
5126 * IAnjutaDebuggerVariableCallback:
5127 * @data: a #IAnjutaDebuggerVariableObject object
5128 * @user_data: user data passed to the function
5131 * This callback function is used to return a #IAnjutaDebuggerVariableObject.
5133 typedef void (*Callback) (const Object *data
, gpointer user_data
, GError
* err
);
5136 * ianjuta_debugger_variable_create:
5138 * @expression: Variable expression
5139 * @callback: Callback to call when the variable has been created
5140 * @user_data: User data that is passed back to the callback
5141 * @err: Error propagation and reporting.
5143 * Create a new variable object in the current thread and frame.
5145 * Returns: TRUE if the request succeed and the callback is
5146 * called. If FALSE, the callback will not be called.
5148 gboolean create
(const gchar
*expression
, Callback callback, gpointer user_data
);
5151 * ianjuta_debugger_variable_list_children:
5153 * @name: Variable name
5154 * @from: Starting from this children (zero-based)
5155 * @callback: Callback to call when the children have been
5156 * created with a list of variable objects
5157 * @user_data: User data that is passed back to the callback
5158 * @err: Error propagation and reporting.
5160 * List and create objects for variable object's children.
5161 * The backend can returns only a part of the children, in
5162 * this case a last variable with a NULL name is added to
5163 * the list given to the callback function.
5164 * If the remaining children are wanted, this
5165 * function must be called again with a from argument
5166 * corresponding to the first missing children.
5168 * Returns: TRUE if the request succeed and the callback is
5169 * called. If FALSE, the callback will not be called.
5171 gboolean list_children
(const gchar
*name
, guint from
, IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5174 * ianjuta_debugger_variable_evaluate:
5176 * @name: Variable name
5177 * @callback: Callback to call with the variable value
5178 * @user_data: User data that is passed back to the callback
5179 * @err: Error propagation and reporting.
5181 * Get the value of one variable or child object.
5183 * Returns: TRUE if the request succeed and the callback is
5184 * called. If FALSE, the callback will not be called.
5186 gboolean evaluate
(const gchar
*name
, IAnjutaDebuggerGCharCallback
callback, gpointer user_data
);
5189 * ianjuta_debugger_variable_assign:
5191 * @name: Variable name
5192 * @value: Variable value
5193 * @err: Error propagation and reporting.
5195 * Set the value of one variable or child object.
5197 * Returns: TRUE if the request succeed and the callback is
5198 * called. If FALSE, the callback will not be called.
5200 gboolean assign
(const gchar
*name
, const gchar
*value
);
5203 * ianjuta_debugger_variable_update:
5205 * @callback: Callback to call with the list of all changed
5207 * @user_data: User data that is passed back to the callback
5208 * @err: Error propagation and reporting.
5210 * List all changed variable objects since the last call.
5212 * Returns: TRUE if the request succeed and the callback is
5213 * called. If FALSE, the callback will not be called.
5215 gboolean update
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5218 * ianjuta_debugger_variable_destroy:
5220 * @name: Variable name
5221 * @err: Error propagation and reporting.
5223 * Delete a previously created variable or child object
5224 * including its own children.
5226 * Returns: TRUE if the request succeed and the callback is
5227 * called. If FALSE, the callback will not be called.
5229 gboolean destroy
(const gchar
*name
);
5233 * SECTION:ianjuta-debugger-register
5234 * @title: IAnjutaDebuggerRegister
5235 * @short_description: Register interface for debuggers
5237 * @stability: Unstable
5238 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
5240 * This interface is used to examine and change values of CPU registers.
5242 interface IAnjutaDebuggerRegister
5246 * IAnjutaDebuggerRegisterData:
5247 * @num: register identifier
5248 * @name: register name
5249 * @value: register value
5251 * Defines a register data.
5261 * ianjuta_debugger_register_list_register:
5263 * @callback: Callback to call with the #IAnjutaDebuggerRegisterData list
5264 * @user_data: User data that is passed back to the callback
5265 * @err: Error propagation and reporting.
5267 * List all registers of the target. This function can be called without
5268 * a program loaded, the value field of register structure is not filled.
5270 * Returns: TRUE if the request succeed and the callback is
5271 * called. If FALSE, the callback will not be called.
5273 gboolean list_register
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5276 * ianjuta_debugger_register_update_register:
5278 * @callback: Callback call with the list of all modified #IAnjutaDebuggerRegisterData
5279 * @user_data: User data that is passed back to the callback
5280 * @err: Error propagation and reporting.
5282 * Return all modified registers since the last call. Only the num and
5283 * value field are used.
5285 * Returns: TRUE if the request succeed and the callback is
5286 * called. If FALSE, the callback will not be called.
5288 gboolean update_register
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5291 * ianjuta_debugger_register_write_register:
5293 * @value: Modified register with a new value
5294 * @err: Error propagation and reporting.
5296 * Change the value of one register. Only the num and value field are used.
5298 * Returns: TRUE if the request succeed.
5300 gboolean write_register
(Data
*value
);
5304 * SECTION:ianjuta-debugger-memory
5305 * @title: IAnjutaDebuggerMemory
5306 * @short_description: Memory interface for debuggers
5308 * @stability: Unstable
5309 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
5311 * This interface is used to examine the target memory.
5313 interface IAnjutaDebuggerMemory
5316 * IAnjutaDebuggerRegisterMemoryBlock:
5317 * @address: start address of memory block
5318 * @length: size of memory block
5319 * @data: memory block data
5321 * Represent a block of memory.
5331 * IAnjutaDebuggerMemoryCallback:
5332 * @data: a #IAnjutaDebuggerMemoryBlock object
5333 * @user_data: user data passed to the function
5336 * This callback function is used to return a #IAnjutaDebuggerMemoryBlock.
5338 typedef void (*Callback) (const Block
*data
, gpointer user_data
, GError
* err
);
5341 * ianjuta_debugger_memory_inspect:
5343 * @address: Start address of the memory block
5344 * @length: Length of memory block
5345 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
5346 * @user_data: User data that is passed back to the callback
5347 * @err: Error propagation and reporting.
5349 * Read a block of the target memory.
5351 * Returns: TRUE if the request succeed and the callback is
5352 * called. If FALSE, the callback will not be called.
5354 gboolean inspect
(gulong address
, guint length
, Callback callback, gpointer user_data
);
5358 * SECTION:ianjuta-debugger-instruction
5359 * @title: IAnjutaDebuggerInstruction
5360 * @short_description: Debugger interface for machine instruction
5362 * @stability: Unstable
5363 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
5365 * This interface is used to debuger as machine instruction level.
5367 interface IAnjutaDebuggerInstruction
5371 * IAnjutaDebuggerInstructionALine:
5372 * @address: Address of the line
5373 * @label: Optional label
5374 * @text: Diassembled instruction on the line
5376 * Defines a disassembled line
5386 * IAnjutaDebuggerInstructionDisassembly:
5387 * @size: Number of line
5388 * @data: Array of all lines
5390 * Represents a block of diassembled instructions
5399 * IAnjutaDebuggerInstructionCallback:
5400 * @data: a #IAnjutaDebuggerInstructionDisassembly object
5401 * @user_data: user data passed to the function
5404 * This callback function is used to return a #IAnjutaDebuggerInstructionDisassembly.
5406 typedef void (*Callback) (const Disassembly
*data
, gpointer user_data
, GError
* err
);
5409 * ianjuta_debugger_instruction_disassemble:
5411 * @address: Start address of the memory block
5412 * @length: Length of memory block
5413 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
5414 * @user_data: User data that is passed back to the callback
5415 * @err: Error propagation and reporting.
5417 * Disassemble a part of the memory
5419 * Returns: TRUE if the request succeed and the callback is
5420 * called. If FALSE, the callback will not be called.
5422 gboolean disassemble
(gulong address
, guint length
, Callback callback, gpointer user_data
);
5425 * ianjuta_debugger_instruction_step_in_instruction:
5427 * @err: Error propagation and reporting.
5429 * Execute one assembler instruction in the program.
5431 * Returns: TRUE if the request succeed and the callback is called. If
5432 * FALSE, the callback will not be called.
5434 gboolean step_in_instruction
();
5437 * ianjuta_debugger_instruction_step_over_instruction:
5439 * @err: Error propagation and reporting.
5441 * Execute one assembler instruction in the program, if the instruction
5442 * is a function call, continues until the function returns.
5444 * Returns: TRUE if the request succeed and the callback is called. If
5445 * FALSE, the callback will not be called.
5447 gboolean step_over_instruction
();
5450 * ianjuta_debugger_instruction_run_to_address:
5452 * @address: Run to this addresss
5453 * @err: Error propagation and reporting.
5455 * Start the program until it reachs the address address
5457 * Returns: TRUE if the request succeed and the callback is called. If
5458 * FALSE, the callback will not be called.
5460 gboolean run_to_address
(gulong address
);
5463 * ianjuta_debugger_instruction_run_from_address:
5465 * @address: Run from this addresss
5466 * @err: Error propagation and reporting.
5468 * Restart the program starting from address address
5470 * Returns: TRUE if the request succeed and the callback is called. If
5471 * FALSE, the callback will not be called.
5473 gboolean run_from_address
(gulong address
);
5479 * SECTION:ianjuta-debug-manager
5480 * @title: IAnjutaDebugManager
5481 * @short_description: Common graphical interface to all debugger
5483 * @stability: Unstable
5484 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
5486 * This interface wrap the real debugger plugin and provide a
5487 * common graphical user interface.
5490 interface IAnjutaDebugManager
5492 #include
"ianjuta-debugger.h"
5493 #include
"ianjuta-debugger-breakpoint.h"
5494 #include
<gio
/gio.h
>
5499 * IAnjutaDebugManager::debugger_started:
5502 * This signal is emitted when the debugger is started.
5504 void ::debugger_started
();
5507 * IAnjutaDebugManager::debugger_stopped:
5509 * @err: Error propagation and reporting.
5511 * This signal is emitted when the debugger is stopped.
5513 void ::debugger_stopped
(GError
*err
);
5516 * IAnjutaDebugManager::program_loaded:
5519 * This signal is emitted when a program is loaded most of the
5520 * time just before the first program_stopped signal.
5522 void ::program_loaded
();
5525 * IAnjutaDebugManager::program_unloaded:
5528 * This signal is emitted when a program is unloaded. If the
5529 * debugger is stopped while a program is loaded, this signal
5530 * is emitted before the debugger_stopped signal.
5532 void ::program_unloaded
();
5535 * IAnjutaDebugManager::program_started:
5538 * This signal is emitted when the program is started. If the
5539 * program starts and is stopped by the debugger, a program-stopped
5540 * signal will be emitted too. If the program starts is not stopped
5541 * by the debugger a program-running signal will be emitted.
5543 void ::program_started
();
5546 * IAnjutaDebugManager::program_exited:
5549 * This signal is emitted when the program is unloaded. If the
5550 * debugger is stopped while a program is running or stopped, this
5551 * signal is emitted before the program_unloaded signal.
5553 void ::program_exited
();
5556 * IAnjutaDebugManager::program_stopped:
5559 * This signal is emitted when the program is stopped.
5561 void ::program_stopped
();
5564 * IAnjutaDebugManager::program_running:
5567 * This signal is emitted when the program is running.
5569 void ::program_running
();
5573 * IAnjutaDebugManager::sharedlib_event:
5576 * This signal is emitted when a new shared library is loaded. It
5577 * is useful to try to set pending breakpoints those could be in
5578 * the newly loaded library.
5580 void ::sharedlib_event
();
5583 * IAnjutaDebugManager::program_moved:
5585 * @pid: process id, 0 when unknown
5586 * @tid: thread id, 0 when unknown
5587 * @address: program counter address, 0 when unknown
5588 * @file: source file where is the program counter, NULL when unknown
5589 * @line: line number if file name above is not NULL
5591 * This signal is emitted when the debugger know the current program
5592 * location. Most of the time, after the program has stopped but it
5593 * could happen even if it is still running.
5595 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
5598 * IAnjutaDebugManager::frame_changed:
5603 * This signal is emitted when the current frame is changed. It is
5604 * equal to the top frame in the interrupted thread when the
5605 * program stops but can be changed afterward by the user.
5606 * Several commands use this current frame, by example the register
5607 * window display the register values for the current thread only.
5609 void ::frame_changed
(guint frame
, gint thread
);
5612 * IAnjutaDebugManager::location_changed:
5614 * @address: program counter address, 0 when unknown
5615 * @uri: source file where is the program counter, NULL when unknown
5616 * @line: line number if file name above is not NULL
5618 * This signal is emitted when the current location is changed. It is
5619 * equal to the program location when the program stops but can be
5620 * changed afterward by the user.
5622 void ::location_changed
(gulong address
, const gchar
* uri
, guint line
);
5625 * IAnjutaDebugManager::signal_received:
5627 * @name: Signal name
5628 * @description: Signal description
5630 * This signal is emitted when the debugged program receives a
5633 void ::signal_received
(const gchar
* name
, const gchar
* description
);
5636 * IAnjutaDebugManager::breakpoint_changed:
5638 * @breakpoint: Breakpoint
5639 * @err: Error propagation and reporting.
5641 * This signal is emitted when a breakpoint is changed. It includes
5642 * new breakpoint and deleted breakpoint.
5644 void ::breakpoint_changed
(IAnjutaDebuggerBreakpointItem
*breakpoint
);
5647 * ianjuta_debug_manager_start:
5649 * @uri: uri of the target
5650 * @err: Error propagation and reporting.
5652 * Start the debugger of the given uri
5654 * Returns: TRUE if sucessful, other FALSE.
5656 gboolean start
(const gchar
*uri
);
5659 * ianjuta_debug_manager_start_remote:
5661 * @server: server (IP address:port)
5662 * @uri: uri of the local target
5663 * @err: Error propagation and reporting.
5665 * Start the debugger of the given uri
5667 * Returns: TRUE if sucessful, other FALSE.
5669 gboolean start_remote
(const gchar
*server
, const gchar
*uri
);
5672 * ianjuta_debug_manager_quit:
5674 * @err: Error propagation and reporting.
5676 * Quit the debugger, can wait until the debugger is ready.
5678 * Returns: TRUE if sucessful, other FALSE.
5684 * SECTION:ianjuta-vcs
5685 * @title: IAnjutaVcs
5686 * @short_description: Version control system interface
5688 * @stability: Unstable
5689 * @include: libanjuta/interfaces/ianjuta-vcs.h
5692 interface IAnjutaVcs
5694 #include
<gio
/gio.h
>
5695 #include
<libanjuta
/anjuta
-vcs
-status.h
>
5696 #include
<libanjuta
/anjuta
-async
-notify.h
>
5700 * @IANJUTA_VCS_UNKNOWN_ERROR: Unkown error
5702 * These enumeration is used to specify errors.
5713 * This signal is emited when the git pull command is finished, and refreshes the tree of files with the new pulled files without the need to
5714 * fold- unfold the tree.
5716 void ::status_changed
();
5721 * @files: (element-type GFile): List of List of files, represented as #Gfile objects, to add
5722 * @notify: #AnjutaAsyncNotify object for finish notification and error
5725 * Add files to the VCS repository.
5727 void add
(List
<GFile
*> files
, AnjutaAsyncNotify
*notify
);
5730 * ianjuta_vcs_remove:
5732 * @files: (element-type GFile): List of files, represented as #Gfile objects, to remove
5733 * @notify: #AnjutaAsyncNotify object for finish notification and error
5736 * Remove files from the VCS repository.
5738 void remove
(List
<GFile
*> files
, AnjutaAsyncNotify
*notify
);
5741 * ianjuta_vcs_checkout:
5743 * @repository_location: Location of repository to check out
5744 * @dest: Destination of checked out copy
5745 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5746 * @notify: #AnjutaAsyncNotify object for finish notification and error
5749 * Check out a copy of a code repository.
5751 void checkout
(const gchar
*repository_location
, GFile
*dest
, GCancellable
*cancel
, AnjutaAsyncNotify
*notify
);
5754 * ianjuta_vcs_query_status:
5756 * @file: File/directory to query
5757 * @callback: callback to call when data for a particular file is available
5758 * @user_data: User data passed to callback
5759 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5760 * @notify: #AnjutaAsyncNotify object for finish notification and error
5763 * Querys the status of files in the repository.
5765 void query_status
(GFile
* file
, StatusCallback
callback, gpointer user_data
, GCancellable
* cancel
, AnjutaAsyncNotify
*notify
);
5768 * IAnjutaVcsStatusCallback:
5769 * @file: File representing the file for which status is given
5770 * @status: #AnjutaVcsStatus for the file represented by @file.
5771 * @user_data: User data
5773 * Callback called for each status record returned by
5774 * ianjuta_vcs_query_status.
5776 typedef void (*StatusCallback
) (GFile
* file
, AnjutaVcsStatus status
, gpointer user_data
);
5781 * @file: File to diff
5782 * @callback: Callback to call when diff data becomes available
5783 * @user_data: User data passed to @callback
5784 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5785 * @notify: #AnjutaAsyncNotify object for finish notification and error
5788 * Generates a unified diff of the file represented by @file.
5790 void diff
(GFile
* file
, DiffCallback
callback, gpointer user_data
, GCancellable
* cancel
, AnjutaAsyncNotify
*notify
);
5793 * IAnjutaVcsDiffCallback:
5794 * @file: File being diffed
5796 * @user_data: User data
5798 * Called when diff data comes from ianjuta_vcs_diff.
5800 typedef void (*DiffCallback
) (GFile
* file
, const gchar
* diff
, gpointer user_data
);
5804 * SECTION:ianjuta-snippets-manager
5805 * @title: IAnjutaSnippetsManager
5806 * @short_description: Snippets Manager interface
5808 * @stability: Unstable
5809 * @include: libanjuta/interfaces/ianjuta-macro.h
5812 interface IAnjutaSnippetsManager
5815 * ianjuta_snippets_manager_insert:
5816 * @key: Trigger-key of the snippet
5817 * @editing_session: If after inserting the snippet there should be an editing
5818 * session. Mark as FALSE if not interested in the dynamic capabilities of the
5821 * @err: Error propagation and reporting
5823 * Insert snippet in the current editor.
5825 gboolean insert
(const gchar
* key
, gboolean editing_session
);
5829 * SECTION:ianjuta-symbol
5830 * @title: IAnjutaSymbol
5831 * @short_description: Source code symbol interface
5832 * @see_also: #IAnjutaSymbolQuery, #IAnjutaSymbolManager
5833 * @stability: Unstable
5834 * @include: libanjuta/interfaces/ianjuta-symbol.h
5836 * This interface is used to define a symbol, normally got from symbol
5837 * queries. A symbol has various fields that can be retrieved by using
5838 * their get methods. A symbol will have only those fields which have
5839 * been selected to be included in their respective queries, so make sure
5840 * the needed fields are correctly specified during query creation.
5842 interface IAnjutaSymbol
5844 #include
<gdk
/gdk.h
>
5845 #include
<gio
/gio.h
>
5848 * IAnjutaSymbolType:
5849 * @IANJUTA_SYMBOL_TYPE_NONE: None spedified.
5850 * @IANJUTA_SYMBOL_TYPE_UNDEF: Unknown type.
5851 * @IANJUTA_SYMBOL_TYPE_CLASS: Class declaration
5852 * @IANJUTA_SYMBOL_TYPE_ENUM: Enum declaration
5853 * @IANJUTA_SYMBOL_TYPE_ENUMERATOR: Enumerator value
5854 * @IANJUTA_SYMBOL_TYPE_FIELD: Field (Java only)
5855 * @IANJUTA_SYMBOL_TYPE_FUNCTION: Function definition
5856 * @IANJUTA_SYMBOL_TYPE_INTERFACE: Interface (Java only)
5857 * @IANJUTA_SYMBOL_TYPE_MEMBER: Member variable of class/struct
5858 * @IANJUTA_SYMBOL_TYPE_METHOD: Class method (Java only)
5859 * @IANJUTA_SYMBOL_TYPE_NAMESPACE: Namespace declaration
5860 * @IANJUTA_SYMBOL_TYPE_PACKAGE: Package (Java only)
5861 * @IANJUTA_SYMBOL_TYPE_PROTOTYPE: Function prototype
5862 * @IANJUTA_SYMBOL_TYPE_STRUCT: Struct declaration
5863 * @IANJUTA_SYMBOL_TYPE_TYPEDEF: Typedef
5864 * @IANJUTA_SYMBOL_TYPE_UNION: Union
5865 * @IANJUTA_SYMBOL_TYPE_VARIABLE: Variable
5866 * @IANJUTA_SYMBOL_TYPE_EXTERNVAR: Extern or forward declaration
5867 * @IANJUTA_SYMBOL_TYPE_MACRO: Macro (without arguments)
5868 * @IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG: Parameterized macro
5869 * @IANJUTA_SYMBOL_TYPE_FILE: File (Pseudo tag)
5870 * @IANJUTA_SYMBOL_TYPE_OTHER: Other (non C/C++/Java tag)
5871 * @IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER: types which are subjected to create a scope.
5872 * @IANJUTA_SYMBOL_TYPE_MAX: Maximum value, used as end marker.
5880 TYPE_ENUMERATOR
= 8,
5883 TYPE_INTERFACE
= 64,
5886 TYPE_NAMESPACE
= 512,
5887 TYPE_PACKAGE
= 1024,
5888 TYPE_PROTOTYPE
= 2048,
5890 TYPE_TYPEDEF
= 8192,
5892 TYPE_VARIABLE
= 32768,
5893 TYPE_EXTERNVAR
= 65536,
5894 TYPE_MACRO
= 131072,
5895 TYPE_MACRO_WITH_ARG
= 262144,
5897 TYPE_OTHER
= 1048576,
5898 TYPE_SCOPE_CONTAINER
= IANJUTA_SYMBOL_TYPE_CLASS | IANJUTA_SYMBOL_TYPE_ENUM | IANJUTA_SYMBOL_TYPE_INTERFACE | IANJUTA_SYMBOL_TYPE_NAMESPACE | IANJUTA_SYMBOL_TYPE_PACKAGE | IANJUTA_SYMBOL_TYPE_STRUCT | IANJUTA_SYMBOL_TYPE_UNION
,
5903 * IAnjutaSymbolField:
5904 * @IANJUTA_SYMBOL_FIELD_ID: Integer. A unique ID of the symbol
5905 * @IANJUTA_SYMBOL_FIELD_NAME: String. Name of the symbol
5906 * @IANJUTA_SYMBOL_FIELD_FILE_POS: Integer. The file line number where the symbol is found.
5907 * @IANJUTA_SYMBOL_FIELD_SCOPE_DEF_ID: Integer. A unique ID to define scope created by this symbol.
5908 * @IANJUTA_SYMBOL_FIELD_FILE_SCOPE: Boolean: TRUE if symbol is within file scope,
5910 * @IANJUTA_SYMBOL_FIELD_SIGNATURE: String. Signature of a method, if symbol is a funtion.
5911 * Namely, the arguments list of the funtion.
5912 * @IANJUTA_SYMBOL_FIELD_RETURNTYPE: String. Return type of a method, if symbol is a function.
5913 * @IANJUTA_SYMBOL_FIELD_FILE_PATH: String. The relative path to the file where the symbol is found.
5914 * @IANJUTA_SYMBOL_FIELD_PROJECT_NAME: String. The project name to which the symbol belongs to.
5915 * @IANJUTA_SYMBOL_FIELD_PROJECT_VERSION: String. The project version to which the symbol belongs to.
5916 * @IANJUTA_SYMBOL_FIELD_IMPLEMENTATION: String. Implementation attribute of a symbol. It may be
5917 * "pure virtual", "virtual", etc.
5918 * @IANJUTA_SYMBOL_FIELD_ACCESS: String. Access attribute of a symbol.
5919 * It may be "public", "private" etc.
5920 * @IANJUTA_SYMBOL_FIELD_KIND: Kind attribute of a symbol, such as
5921 * "enumerator", "namespace", "class" etc.
5922 * @IANJUTA_SYMBOL_FIELD_TYPE: Both string and Integer. Type attribute of a symbol.
5923 * In string form, it is name of the type in string form.
5924 * In integer form, it is IAnjutaSymbolType enumerator value.
5925 * @IANJUTA_SYMBOL_FIELD_TYPE_NAME: type_name attribute of a symbol.
5926 * If a type could be "class" then its type_name may be "MyFooClass" etc.
5927 * @IANJUTA_SYMBOL_FIELD_IS_CONTAINER: Boolean. TRUE if symbol is
5928 * a scope container, such as namespace, class, struct etc., otherwise
5930 * @IANJUTA_SYMBOL_FIELD_END: The end marker.
5932 * Symbol Fields. Used to define and retrieve results from query. Each of
5933 * these fields are either integer or string. Use the right method to
5934 * retrieve them. That is, for integer use ianjuta_symbol_get_int(),
5935 * for string use ianjuta_symbol_get_string(), and for boolean use
5936 * ianjuta_symbol_get_boolean(). Some fields can be in both forms,
5937 * e.g. #IANJUTA_SYMBOL_FIELD_TYPE.
5952 FIELD_PROJECT_VERSION
,
5953 FIELD_IMPLEMENTATION
,
5961 * ianjuta_symbol_get_boolean:
5963 * @field: The field to retrieve.
5964 * @err: Error propagation and reporting.
5966 * Retreives the boolean value of a boolean @field.
5968 * Returns: The boolean
5970 gboolean get_boolean
(Field field
);
5973 * ianjuta_symbol_get_int:
5975 * @field: The field to retrieve.
5976 * @err: Error propagation and reporting.
5978 * Retreives the integer value of an integer @field.
5980 * Returns: The integer
5982 gint get_int
(Field field
);
5985 * ianjuta_symbol_get_string:
5987 * @field: The field to retrieve.
5988 * @err: Error propagation and reporting.
5990 * Retreives the string value of a string @field.
5992 * Returns: The string
5994 const gchar
* get_string
(Field field
);
5997 * ianjuta_symbol_get_file:
5999 * @err: Error propagation and reporting.
6001 * A convenience method to get GFile object for
6002 * #IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the
6003 * symbol is declared. It contains the absolute path of the file
6004 * unlike raw value of field #IANJUTA_SYMBOL_FIELD_FILE_PATH.
6006 * Returns: A GFile object. It must be unrefed after use.
6011 * ianjuta_symbol_get_sym_type:
6013 * @err: Error propagation and reporting.
6015 * A convenience method to get value of #IANJUTA_SYMBOL_FIELD_TYPE
6016 * field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
6018 * Returns: a #IAnjutaSymbolType
6020 Type get_sym_type
();
6023 * ianjuta_symbol_get_icon:
6025 * @err: Error propagation and reporting.
6027 * A convenience method to get a small icon (16x16) representing the symbol
6028 * kind. You *need* a query with fields #IANJUTA_SYMBOL_FIELD_ACCESS and
6029 * #IANJUTA_SYMBOL_FIELD_KIND selected.
6031 * Returns: a Pixbuf icon representing the symbol. Ref the icon if you
6034 const GdkPixbuf
*get_icon
();
6038 * SECTION:ianjuta-symbol-query
6039 * @title: IAnjutaSymbolQuery
6040 * @short_description: Source code symbol query interface
6041 * @see_also: #IAnjutaSymbolManager, #IAnjutaSymbol
6042 * @stability: Unstable
6043 * @include: libanjuta/interfaces/ianjuta-symbol-query.h
6045 * A query object will have this interface that allows to tweak various
6046 * query parameters. Except for the #IAnjutaSymbolQueryName and
6047 * #IAnjutaSymbolQueryDb parameters, everything else is changable
6050 * Note that chaning a query parameter, except for limit and offset will
6051 * result in re-preparing the query the next time it is executed, so it is
6052 * not advisable to change it each time the query is executed. For such
6053 * cases, create different queries with different parameters.
6055 * A query is signified by a name enumeration (#IAnjutaSymbolQueryName) which
6056 * practically determines the query type and its execution condition. Each
6057 * query name is assigned to pre-defined query statement and can only be
6058 * set during creation time. Then only its specific ianjuta_symbol_query_search_*()
6059 * can be used to execute the query. These specific execution methods are
6060 * provided to make it convenient to pass query parameters easily and to
6061 * ensure all the needed parameters are given.
6063 * A query can run in different modes, defined by #IAnjutaSymbolQueryMode, by
6064 * default it is executed in synchrounous mode #IANJUTA_SYMBOL_QUERY_MODE_SYNC
6065 * and can be changed using ianjuta_symbol_query_set_mode().
6066 * #IANJUTA_SYMBOL_QUERY_MODE_ASYNC runs it in asynchronous mode in a separate
6067 * thread and can be canceled with ianjuta_symbol_query_cancel().
6069 * A query runs on a database, defined by #IAnjutaSymbolQueryDb, and can be
6070 * only selected at creatation time.
6072 * In addition, there are many other filters that can be set to the query
6073 * to refine the query results. For example, ianjuta_symbol_query_set_fields()
6074 * is used to set the needed symbol fields to retrieve, ianjuta_symbol_query_set_filters()
6075 * is used to filter the results with symbol types, ianjuta_symbol_query_set_file_scope()
6076 * limits the results to either public or private scope within the source file,
6077 * ianjuta_symbol_query_set_group_by() is used to group the results on a given
6078 * field, ianjuta_symbol_query_set_order_by is used to order the results on a
6081 * ianjuta_symbol_query_set_limit() and ianjuta_symbol_query_set_offset() are
6082 * used to change limit and offset of the resultset. Note again that these
6083 * parameters do not require re-preparation of query, so can be safely used
6084 * any time without performance hit.
6086 interface IAnjutaSymbolQuery
6088 #include
"ianjuta-iterable.h"
6089 #include
"ianjuta-symbol.h"
6092 * IAnjutaSymbolQueryMode:
6093 * @IANJUTA_SYMBOL_QUERY_MODE_SYNC: Syncronous query. The result is immediately
6094 * available as retrun value of search call.
6095 * @IANJUTA_SYMBOL_QUERY_MODE_ASYNC: Asynchronous query. The search call
6096 * return immediately and result delievered as a signal later. The actual
6097 * query is done in a separate thread.
6098 * @IANJUTA_SYMBOL_QUERY_MODE_QUEUED: If the database is busy
6099 * scanning, then the query is performed later when database is ready.
6100 * It returns NULL and result is delivered through async-result signal.
6101 * Only query can stay queued, so calling search multiple times would
6102 * result in only the last one being active.
6104 * This parameter determines the mode of query execution. By default,
6105 * IANJUTA_SYMBOL_QUERY_MODE_SYNC is selected.
6115 * IAnjutaSymbolQueryDb:
6116 * @IANJUTA_SYMBOL_QUERY_DB_PROJECT: Select project database.
6117 * @IANJUTA_SYMBOL_QUERY_DB_SYSTEM: Select system database.
6119 * Sets the database to use for the query. System database is where
6120 * all system library symbols are found. While project database is where
6121 * currently open project's symbols are found.
6130 * IAnjutaSymbolQueryName:
6131 * @IANJUTA_SYMBOL_QUERY_SEARCH: Query to perform basic substring search.
6132 * @IANJUTA_SYMBOL_QUERY_SEARCH_ALL: Query to get all symbols
6133 * @IANJUTA_SYMBOL_QUERY_SEARCH_FILE: Query to perform substring search in a file.
6134 * @IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE: Query to perform substring search in a scope.
6135 * @IANJUTA_SYMBOL_QUERY_SEARCH_ID: Query to find the symbol of given ID.
6136 * @IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS: Query to find members of a scope (eg. class).
6137 * @IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS: Query to get parents of a class.
6138 * @IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE: Query to find scope name of a file position.
6139 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE: Query to get the parent scope of a symbol.
6140 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE: Query to get the parent scope of a symbol in the file.
6142 * Names of query that defined what kind of query it is.
6152 SEARCH_CLASS_PARENTS
,
6154 SEARCH_PARENT_SCOPE
,
6155 SEARCH_PARENT_SCOPE_FILE
6159 * IAnjutaSymbolQueryFileScope:
6160 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_IGNORE: Ignore file scope
6161 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PUBLIC: Only public symbols visible to rest of project.
6162 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PRIVATE: Only private symbols visible inside a file.
6164 * Defines file scope of symbols to query.
6174 * IAnjutaSymbolQuery::async_result:
6175 * @ianjutasymbolquery: Self
6176 * @arg1: Query result (IAnjutaIterable, IAnjutaSymbol) of an async
6177 * or queued search. NULL if no result is found or some error happened.
6179 * This signal is emitted for every search of the Query involved in async
6180 * mode, unless cancled by ianjuta_symbol_query_cancel(). For single queued
6181 * query, only result of the last search is emitted (if it wasn't database
6182 * was busy when search was invoked). Unlike in sync counterpart,
6183 * do not unref @result after use.
6185 void ::async_result
(GObject
* result
);
6188 * ianjuta_symbol_query_set_mode:
6190 * @mode: The mode of query.
6191 * @err: Error propagation and reporting.
6193 * Sets the mode of Query.
6195 void set_mode
(IAnjutaSymbolQueryMode mode
);
6198 * ianjuta_symbol_query_set_fields:
6200 * @n_fields: Then number of fields to retrieve.
6201 * @fields: The fields to retrieve in the query. The array length must
6203 * @err: Error propagation and reporting.
6205 * Sets the fields of Query.
6207 void set_fields
(gint n_fields
, IAnjutaSymbolField
*fields
);
6210 * ianjuta_symbol_query_set_filters:
6212 * @filters: The mode of query.
6213 * @include_types: TRUE if filter is positive, FALSE if reversed.
6214 * @err: Error propagation and reporting.
6216 * Sets the bit mask of symbol type filters. if @include_types is TRUE,
6217 * symbols satisfying the given symbol types are selected, otherwise
6218 * they are excluded.
6220 void set_filters
(IAnjutaSymbolType filters
, gboolean includes_types
);
6223 * ianjuta_symbol_query_set_file_scope:
6225 * @filescope_search: The filescope to search.
6226 * @err: Error propagation and reporting.
6228 * Sets the filescope search of Query.
6230 void set_file_scope
(IAnjutaSymbolQueryFileScope filescope_search
);
6233 * ianjuta_symbol_query_set_offset:
6235 * @offset: Offset of the resultset.
6236 * @err: Error propagation and reporting.
6238 * Sets the offset index of Query results.
6240 void set_offset
(gint offset
);
6243 * ianjuta_symbol_query_set_limit:
6245 * @limit: The limit of query.
6246 * @err: Error propagation and reporting.
6248 * Sets the limit of Query results. No more than @limit results are
6251 void set_limit
(gint limit
);
6254 * ianjuta_symbol_query_set_group_by:
6256 * @field: The field to group results.
6257 * @err: Error propagation and reporting.
6259 * Sets the field with which result of query is grouped. As a result
6260 * there will be no duplicates of with this field.
6262 void set_group_by
(IAnjutaSymbolField field
);
6265 * ianjuta_symbol_query_set_order_by:
6267 * @field: The field to order the result.
6268 * @err: Error propagation and reporting.
6270 * Sets the field with which result of query is ordered.
6272 void set_order_by
(IAnjutaSymbolField field
);
6275 * ianjuta_symbol_query_set_cancel:
6277 * @err: Error propagation and reporting.
6279 * Cancels any pending non-sync searches. After calling this, it is
6280 * guaranteed that "async-result" will not be called any more for any
6281 * past searches. New searches will have their results signaled as
6287 * ianjuta_symbol_query_search:
6289 * @pattern: Search pattern in compliance with SQL LIKE syntax
6290 * @err: Error propagation and reporting.
6292 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH query.
6294 IAnjutaIterable
* search
(const gchar
*pattern
);
6297 * ianjuta_symbol_query_search_all:
6299 * @err: Error propagation and reporting.
6301 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ALL query.
6303 IAnjutaIterable
* search_all
();
6306 * ianjuta_symbol_query_search_file:
6308 * @pattern: Search pattern in compliance with SQL LIKE syntax
6309 * @file: The file whose symbols are searched.
6310 * @err: Error propagation and reporting.
6312 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_FILE query.
6314 IAnjutaIterable
* search_file
(const gchar
*pattern
, const GFile
*file
);
6317 * ianjuta_symbol_query_search_in_scope:
6319 * @pattern: Search pattern in compliance with SQL LIKE syntax
6320 * @scope: The scope inside which symbols are searched.
6321 * @err: Error propagation and reporting.
6323 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE query.
6325 IAnjutaIterable
* search_in_scope
(const gchar
*pattern
, IAnjutaSymbol
*scope
);
6328 * ianjuta_symbol_query_search_members:
6330 * @symbol: The symbol whose members to get.
6331 * @err: Error propagation and reporting.
6333 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS query.
6335 IAnjutaIterable
* search_members
(IAnjutaSymbol
*symbol
);
6338 * ianjuta_symbol_query_search_class_parents:
6340 * @symbol: The class symbol whose parents to get.
6341 * @err: Error propagation and reporting.
6343 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS query.
6345 IAnjutaIterable
* search_class_parents
(IAnjutaSymbol
*symbol
);
6348 * ianjuta_symbol_query_search_id:
6350 * @symbol: The symbol id whose details to get.
6351 * @err: Error propagation and reporting.
6353 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ID query.
6355 IAnjutaIterable
* search_id
(gint symbol_id
);
6358 * ianjuta_symbol_query_search_scope:
6360 * @file_path: The file where the scope is.
6361 * @line: The line where the scope is.
6362 * @err: Error propagation and reporting.
6364 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE query.
6366 IAnjutaIterable
* search_scope
(const gchar
*file_path
, gint line
);
6369 * ianjuta_symbol_query_search_parent_scope:
6371 * @symbol: The symbol whose parent scope is to be found.
6372 * @err: Error propagation and reporting.
6374 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE query.
6376 IAnjutaIterable
* search_parent_scope
(IAnjutaSymbol
*symbol
);
6379 * ianjuta_symbol_query_search_parent_scope_file:
6380 * @symbol: The symbol whose parent scope is to be found.
6382 * @file_path: The file where the parent scope is to be found.
6383 * @err: Error propagation and reporting.
6385 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE query.
6387 IAnjutaIterable
* search_parent_scope_file
(IAnjutaSymbol
*symbol
, const gchar
*file_path
);
6391 * SECTION:ianjuta-symbol-manager
6392 * @title: IAnjutaSymbolManager
6393 * @short_description: Source code symbols manager inteface
6394 * @see_also: #IAnjutaSymbol
6395 * @stability: Unstable
6396 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
6399 interface IAnjutaSymbolManager
6401 #include
<libanjuta
/anjuta
-async
-notify.h
>
6402 #include
"ianjuta-iterable.h"
6403 #include
"ianjuta-symbol.h"
6404 #include
"ianjuta-symbol-query.h"
6407 * IAnjutaSymbolManager::prj_scan_end:
6410 * This signal is emitted when a scanning of one or more files on project db
6413 void ::prj_scan_end
(gint process_id
);
6416 * IAnjutaSymbolManager::sys_scan_end:
6419 * This signal is emitted when a scanning of one or more packages on system db
6420 * ends. This signal doesn't mean that all the scan process for the packages
6421 * is ended, but that just one (or more) is (are).
6423 void ::sys_scan_end
(gint process_id
);
6426 * ianjuta_symbol_manager_create_query:
6428 * @name: Name of the query. It decides what query type it is.
6429 * @db: The database to use.
6430 * @err: Error propagation and reporting.
6432 * Create a query object. By default only #IANJUTA_SYMBOL_FIELD_ID and
6433 * and #IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity,
6434 * offset is set to 0, no filters are set and mode is set to
6435 * #IANJUTA_SYMBOL_QUERY_MODE_SYNC.
6437 * Returns: A #IAnjutaSymbolQuery object
6439 IAnjutaSymbolQuery
* create_query
(IAnjutaSymbolQueryName name
, IAnjutaSymbolQueryDb db
);
6442 * ianjuta_symbol_manager_add_package:
6444 * @pkg_name: Name of the package to scan. Should be the name given by
6445 * pkg-config. The colon char must be avoided.
6446 * @pkg_version: Version of the package. The colon char must be avoided.
6447 * or by the language implementation (Python, Javascript, etc.)
6448 * @files: A list of GFile's to scan for this package
6450 * Reads the package files into the database asynchronously.
6452 * Returns: TRUE if the package will be loaded into the db, FALSE if the package
6455 gboolean add_package
(const gchar
* pkg_name
, const gchar
* pkg_version
, GList
* files
);
6458 * ianjuta_symbol_manager_activate_package:
6460 * @pkg_name: Name of the package to activate. The colon char must be avoided.
6461 * @pkg_version: Version of the package. The colon char must be avoided.
6463 * Activates the package for searches in the global symbol database.
6465 * Returns: TRUE if the package was loaded (or will be loaded once scanned).
6466 * FALSE if the version given was newer than the version in the database or the
6467 * package was not found. In this case, add_package() should be called.
6469 gboolean activate_package
(const gchar
*pkg_name
, const gchar
* pkg_version
);
6472 * ianjuta_symbol_manager_deactivate_package:
6474 * @pkg_name: name of the package. The colon char must be avoided.
6475 * @pkg_version: Version of the package. The colon char must be avoided.
6477 * Deactivates the package if it was found. If package is NULL, deactivate all
6481 void deactivate_package
(const gchar
* pkg_name
, const gchar
* pkg_version
);
6484 * ianjuta_symbol_manager_deactivate_all:
6487 * Deactivates all activate packages
6490 void deactivate_all
();
6494 * SECTION:ianjuta-print
6495 * @title: IAnjutaPrint
6496 * @short_description: Print interface
6498 * @stability: Unstable
6499 * @include: libanjuta/interfaces/ianjuta-print.h
6502 interface IAnjutaPrint
6505 * ianjuta_print_print:
6507 * @err: Error propagation and reporting.
6509 * Print the plugin (the file in case of the editor). In most cases this will show
6515 * ianjuta_print_print:
6517 * @err: Error propagation and reporting.
6519 * Show print preview dialog
6522 void print_preview
();
6526 * SECTION:ianjuta-preferences
6527 * @title: IAnjutaPreferences
6528 * @short_description: Preferences interface
6530 * @stability: Unstable
6531 * @include: libanjuta/interfaces/ianjuta-preferences
6534 interface IAnjutaPreferences
6536 #include
<libanjuta
/anjuta
-preferences.h
>
6538 * ianjuta_preferences_merge:
6540 * @prefs: AnjutaPreferences to install to
6541 * @err: Error propagation and reporting.
6543 * When called, the plugin should install it's preferences
6545 void merge
(AnjutaPreferences
* prefs
);
6548 * ianjuta_preferences_unmerge:
6550 * @prefs: AnjutaPreferences to install to
6551 * @err: Error propagation and reporting.
6553 * When called, the plugin should uninstall it's preferences
6555 void unmerge
(AnjutaPreferences
* prefs
);
6559 * SECTION:ianjuta-plugin-factory
6560 * @title: IAnjutaPluginFactory
6561 * @short_description: Create Anjuta plugin objects
6563 * @stability: Unstable
6564 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
6566 * This interface is used to create all Anjuta plugin objects. It is
6567 * already implemented inside Anjuta by an object able to load plugins written
6568 * in C. In order to load plugins in other languages (or in a different way),
6569 * a loader plugin implementing this interface must be written first, probably
6573 interface IAnjutaPluginFactory
6575 #include
<libanjuta
/anjuta
-plugin.h
>
6576 #include
<libanjuta
/anjuta
-shell.h
>
6577 #include
<libanjuta
/anjuta
-plugin
-handle.h
>
6580 * IAnjutaPluginFactoryError:
6581 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
6582 * missing in .plugin file
6583 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
6584 * double colon following location) is missing in .plugin file
6585 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
6586 * plugin module is probably not installed
6587 * @IANJUTA_PLUGIN_FACTORY_INVALID_MODULE: Module file cannot be
6588 * loaded, not a shared library perhaps
6589 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
6590 * registration function, library is not an anjuta plugin or
6591 * is not for the right version
6592 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
6593 * plugin type, library is not an anjuta plugin or not for
6595 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
6597 * These enumeration is used to specify errors.
6612 * ianjuta_plugin_factory_new_plugin:
6614 * @handle: Plugin information
6615 * @shell: Anjuta shell
6616 * @err: Error propagation and reporting.
6618 * Create a new AnjutaPlugin object from the plugin information handle,
6619 * give it the AnjutaShell object as argument.
6621 * Return value: a new plugin object
6623 AnjutaPlugin
* new_plugin
(AnjutaPluginHandle
* handle, AnjutaShell
*shell
);
6627 * SECTION:ianjuta-language
6628 * @title: IAnjutaLanguage
6629 * @short_description: Interface to manage multiple programming languages
6631 * @stability: Unstable
6632 * @include: libanjuta/interfaces/ianjuta-language.h
6636 interface IAnjutaLanguage
6638 #include
<libanjuta
/interfaces
/ianjuta
-editor
-language.h
>
6642 * ianjuta_language_from_mime_type:
6644 * @mime_type: A mime type to get the language for
6646 * Returns: A language Id or 0 in case no language was found
6648 Id get_from_mime_type
(const gchar
* mime_type
);
6651 * ianjuta_language_from_string:
6653 * @string: A string representation of the language. Note that multiple
6654 * strings may describe the language like C++ and Cpp
6656 * Returns: A language Id or 0 in case no language was found
6658 Id get_from_string
(const gchar
* string);
6661 * ianjuta_language_get_name:
6663 * @id: A valid language id
6665 * Returns: The main name of the language. When you call ianjuta_language_from_string()
6666 * before that method the string you get here might be different to the one you passed
6667 * because the language might have multiple string representations
6669 const gchar
* get_name
(Id id);
6672 * ianjuta_language_get_make_target:
6674 * @id: A valid language id
6676 * Returns: The suffix for the file thats needs to be passed to
6677 * make to compile the file, e.g. ".o" for C
6679 const gchar
* get_make_target
(Id id);
6682 * ianjuta_language_get_strings:
6684 * @id: A valid language id
6686 * Returns: (element-type utf8): A list of strings that represent this language
6688 List
<const gchar
*> get_strings
(Id id);
6691 * ianjuta_language_get_mime_types:
6693 * @id: A valid language id
6695 * Returns: (element-type utf8): A list of mime-types that represent this language
6697 List
<const gchar
*> get_mime_types
(Id id);
6700 * ianjuta_language_get_from_editor:
6702 * @editor: An object implementing IAnjutaEditorLanguage
6703 * @err: Error propagation
6705 * Conviniece method to get the id directly from the editor
6707 * Returns: A valid language id or 0
6709 IAnjutaLanguageId get_from_editor
(IAnjutaEditorLanguage
* editor
);
6712 * ianjuta_language_get_name_from_editor:
6714 * @editor: An object implementing IAnjutaEditorLanguage
6715 * @err: Error propagation
6717 * Conviniece method to get the name directly from the editor
6719 * Returns: A language name or NULL
6721 const gchar
* get_name_from_editor
(IAnjutaEditorLanguage
* editor
);
6724 * ianjuta_language_get_languages:
6726 * @err: Error propagation
6728 * Returns: (element-type int) (transfer container): a list of ids of the available
6729 * languages. Use GPOINTER_TO_INT() to receive them. The list but not the
6730 * values should be free'd with g_list_free()
6732 GList
* get_languages
();
6736 * SECTION:ianjuta-indenter
6737 * @title: IAnjutaIndenter
6738 * @short_description: Interface for automatic indentation
6740 * @stability: Unstable
6741 * @include: libanjuta/interfaces/ianjuta-indenter.h
6745 interface IAnjutaIndenter
6747 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
6750 * ianjuta_indenter_indent
6752 * @start: Start of the area to indent
6753 * @end: End of the area to indent
6754 * @error: Error propagation
6756 * Indent the area between @start and @end according to the indentation rules
6757 * of the programming language. Usually implemented by language support plugins.
6758 * Only one indenter can be loaded at a time.
6759 * Note: Indenters always affect full lines, so start and end will be moved
6760 * according to the next line start/end.
6762 void indent
(IAnjutaIterable
* start
, IAnjutaIterable
* end
);