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 * IAnjutaFile::opened:
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-callback-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_get_indentsize:
1463 * @err: Error propagation and reporting
1465 * Returns the indentation size in spaces currently used by the
1468 * Returns: indentation size in number of spaces
1470 gint get_indentsize
();
1473 * ianjuta_editor_set_indentsize:
1475 * @indentsize: Indentation size in spaces
1476 * @err: Error propagation and reporting
1478 * Sets the indentation size of the editor.
1480 void set_indentsize
(gint indentsize
);
1483 * ianjuta_editor_erase_range:
1485 * @position_start: Start position of chars to erase.
1486 * @position_end: End position of chars to erase.
1487 * @err: Error propagation and reporting
1489 * Erases the chars between positions pointed by @position_start and
1490 * @position_end. The character pointed by @position_start is included,
1491 * while pointed by @position_end is not include in the range. After
1492 * the erase operation, all active iters, except these two, are no
1493 * longer guranteed to be valid. At the end the operation, these two
1494 * iters point to the same position which is the position where erase
1495 * happend (usually the original @position_start position).
1497 void erase
(IAnjutaIterable
*position_start
, IAnjutaIterable
*position_end
);
1500 * ianjuta_editor_erase_all:
1502 * @err: Error propagation and reporting
1504 * Empties the whole editor buffer. There will be zero characters.
1505 * After the erase operation, none of the active iters are guranteed
1511 * ianjuta_editor_insert:
1513 * @position: Character position in editor where insert will take place.
1514 * @text: Text to append.
1515 * @length: Length of @text to use.
1516 * @err: Error propagation and reporting
1518 * Inserts @length characters from @text buffer at given @position of
1519 * editor buffer. If @length is -1, the whole @text is used.
1521 void insert
(IAnjutaIterable
*position
, const gchar
*text
, gint length
);
1524 * ianjuta_editor_append:
1526 * @text: Text to append.
1527 * @length: Length of @text to use.
1528 * @err: Error propagation and reporting
1530 * Appends @length characters from @text buffer at the end of editor
1531 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1533 void append
(const gchar
*text
, gint length
);
1536 * ianjuta_editor_goto_line:
1538 * @lineno: line number where carat will be moved.
1539 * @err: Error propagation and reporting
1541 * Carat is moved to the given @lineno line and text view is scrolled to
1542 * bring it in viewable area of the editor.
1544 void goto_line
(gint lineno
);
1547 * ianjuta_editor_goto_start:
1549 * @err: Error propagation and reporting
1551 * Carat is moved to the begining of editor and text view is scrolled to
1552 * bring it in viewable area of the editor.
1557 * ianjuta_editor_goto_end:
1559 * @err: Error propagation and reporting
1561 * Carat is moved to the end of editor and text view is scrolled to
1562 * bring it in viewable area of the editor.
1567 * ianjuta_editor_goto_position:
1569 * @position: Character position where carat will be moved.
1570 * @err: Error propagation and reporting
1572 * Carat is moved to the given @position and text view is scrolled to
1573 * bring @position in viewable area of the editor.
1575 void goto_position
(IAnjutaIterable
*position
);
1578 * ianjuta_editor_get_text:
1580 * @begin: Begining iterator
1581 * @end: End iterator
1582 * @err: Error propagation and reporting
1584 * Gets text characters beginning from @begin (including char
1585 * pointed by @begin) and ending with @end (excluding character
1586 * pointed by @end). The characters returned are utf-8 encoded.
1587 * The iterators @begin and @end could be in either order. The returned
1588 * text, however, is in right order. If both @begin and @end points
1589 * to the same position, NULL is returned.
1591 * Returns: A buffer of utf-8 characters.
1592 * The returned buffer must be freed when no longer required.
1594 gchar
* get_text
(IAnjutaIterable
*begin
, IAnjutaIterable
*end
);
1597 * ianjuta_editor_get_text_all:
1599 * @err: Error propagation and reporting
1601 * Gets all text characters in the editor.
1602 * The characters returned are utf-8 encoded.
1604 * Returns: A buffer of utf-8 characters containing all text from editor.
1605 * The returned buffer must be freed when no longer required.
1607 gchar
* get_text_all
();
1610 * ianjuta_editor_line_from_position:
1612 * @position: Position you want to know the line from
1613 * @err: Error propagation and reporting
1615 * Get the line number in which @position locates.
1616 * Returns: Line which corresponds to @position
1619 int get_line_from_position
(IAnjutaIterable
*position
);
1622 * ianjuta_editor_get_lineno:
1624 * @err: Error propagation and reporting
1626 * Obtains current line number on which carat is.
1628 * Return value: Line number.
1633 * ianjuta_editor_get_length:
1635 * @err: Error propagation and reporting
1637 * Get length of complete text in editor. This will be the total
1638 * number of bytes in the file or buffer.
1640 * Return value: Text length.
1645 * ianjuta_editor_get_current_word:
1647 * @err: Error propagation and reporting
1649 * Obtains the word on which carat is currently on.
1651 * Return value: Current word.
1653 gchar
* get_current_word
();
1656 * ianjuta_editor_get_current_column:
1658 * @err: Error propagation and reporting
1660 * Obtains number of the current column in the editor.
1662 * Return value: Current column.
1667 * ianjuta_editor_get_line_begin_position:
1670 * @err: Error propagation and reporting.
1674 * Returns: (transfer full): fixme
1676 IAnjutaIterable
* get_line_begin_position
(gint line
);
1679 * ianjuta_editor_get_line_end_position:
1682 * @err: Error propagation and reporting.
1686 * Returns: (transfer full): fixme
1688 IAnjutaIterable
*get_line_end_position
(gint line
);
1691 * ianjuta_editor_get_overwrite:
1693 * @err: Error propagation and reporting
1695 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1697 * Return value: editor mode.
1699 gboolean get_overwrite
();
1703 * ianjuta_editor_set_popup_menu:
1706 * @err: Error propagation and reporting
1708 * Set Editor popup menu. This is the menu shown in the editor when one
1709 * right-clicks on it.
1712 void set_popup_menu
(GtkWidget
*menu
);
1715 * ianjuta_editor_get_offset:
1717 * @err: Error propagation and reporting
1719 * Get current caret position in integer character offset. Deprecated.
1720 * Use ianjuta_editor_get_position() instead.
1722 * Returns: Current character position since the begining of file.
1727 * ianjuta_editor_get_position:
1729 * @err: Error propagation and reporting
1731 * Get current caret position.
1733 * Returns: (transfer full): Iterator that points to the current position.
1735 IAnjutaIterable
* get_position
();
1738 * ianjuta_editor_get_position_from_offset:
1740 * @offset: Character offset position where the iter will be set
1741 * @err: Error propagation and reporting
1743 * Creates and returns an iter for editor cells. The iter is
1744 * placed at the unicode character position where the given offset
1745 * @offset happens to fall. The returned iter is cell (character)
1746 * iter and not byte iter, so all iter operations
1747 * on it are character (not byte) iteration, including all position
1748 * and index references in the iter.
1750 * The iter must be unreferrenced by the caller when done.
1751 * The iter navigates (next/previous) in step of unicode
1752 * characters (one unicode character == one cell).
1754 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1755 * given @offset position.
1757 IAnjutaIterable
* get_position_from_offset
(gint offset
);
1760 * ianjuta_editor_get_start_position:
1762 * @err: Error propagation and reporting
1764 * Gets the iter positioned at the start of the editor buffer.
1766 * Return value: (transfer none): Cell iter set to the begining of the editor.
1768 IAnjutaIterable
* get_start_position
();
1771 * ianjuta_editor_get_end_position:
1773 * @err: Error propagation and reporting
1775 * Gets the iter positioned at the end of the editor buffer. The
1776 * returned iter is the end-iter which does not point to any valid
1777 * character in the buffer (it is pointed one step beyond the last
1780 * Return value: (transfer none): Cell iter set to the end of the editor (end-iter).
1782 IAnjutaIterable
* get_end_position
();
1785 * SECTION:ianjuta-editor-selection
1786 * @title: IAnjutaEditorSelection
1787 * @short_description: Text editor selection interface
1789 * @stability: Unstable
1790 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1793 interface IAnjutaEditorSelection
1795 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1797 * ianjuta_editor_selection_has_selection:
1799 * @err: Error propagation and reporting
1801 * Returns TRUE if editor has any text selected. The selection
1802 * positions can be retrieved with ianjuta_editor_selection_get_start()
1803 * and ianjuta_editor_selection_get_end().
1805 * Returns: TRUE if there is text selected else FALSE.
1807 gboolean has_selection
();
1810 * ianjuta_editor_selection_get:
1812 * @err: Error propagation and reporting
1814 * Gets curerntly selected text in editor.
1816 * Returns: A newly allocated buffer of currently selected characters.
1817 * NULL if there is no selection. The returned buffer must be freed after
1823 * ianjuta_editor_selection_set:
1825 * @start: Begin of selection
1826 * @end: End of selection
1827 * @scroll: Scroll selection onscreen
1828 * @err: Error propagation and reporting
1830 * Select characters between start and end. Start and end don't have to
1833 void set
(IAnjutaIterable
* start
, IAnjutaIterable
* end
, gboolean scroll
);
1836 * ianjuta_editor_selection_get_start:
1838 * @err: Error propagation and reporting
1840 * Gets start position of selection text.
1842 * Return: Start of selection or NULL if there is no selection.
1844 IAnjutaIterable
* get_start
();
1847 * ianjuta_editor_selection_get_end:
1849 * @err: Error propagation and reporting
1851 * Get end position of selection. If there is no selection, returns
1854 * Returns: End of selection or NULL if there is no selection.
1856 IAnjutaIterable
* get_end
();
1859 * ianjuta_editor_selection_select_block:
1861 * @err: Error propagation and reporting
1863 * Selects current block of code. The definition of block of code
1864 * depends on highlight mode used (programming language). Some
1865 * highlight mode does not have block concept, in that case this
1866 * method does not do anything.
1868 void select_block
();
1871 * ianjuta_editor_selection_select_function:
1873 * @err: Error propagation and reporting
1875 * Select current function block. The definition of function block
1876 * depends on highlight mode used (programming language). Some
1877 * highlight mode does not have function concept, in that case this
1878 * method does not do anything.
1880 void select_function
();
1883 * ianjuta_editor_edit_select_all:
1885 * @err: Error propagation and reporting
1887 * Select whole buffer.
1892 * ianjuta_editor_selection_replace:
1894 * @text: Replacement text.
1895 * @length: Length of the text to used in @text.
1896 * @err: Error propagation and reporting
1898 * Replaces currently selected text with the @text. Only @length amount
1899 * of characters are used from @text buffer to replace.
1901 void replace
(const gchar
*text
, gint length
);
1905 * SECTION:ianjuta-editor-search
1906 * @title: IAnjutaEditorSearch
1907 * @short_description: Text editor search interface
1909 * @stability: Unstable
1910 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1913 interface IAnjutaEditorSearch
1915 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1918 * ianjuta_editor_search_forward:
1920 * @search: String to search for
1921 * @start: Where to search from
1922 * @end: Where to stop searching
1923 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1924 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1925 * @err: Error propagation and reporting
1927 * Search forward from start to end
1930 gboolean forward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1933 * ianjuta_editor_search_backward:
1935 * @search: String to search for
1936 * @start: Where to search from
1937 * @end: Where to stop searching
1938 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1939 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1940 * @err: Error propagation and reporting
1942 * Search backward from end to start
1946 gboolean backward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1951 * SECTION:ianjuta-editor-convert
1952 * @title: IAnjutaEditorConvert
1953 * @short_description: Text editor convert interface
1955 * @stability: Unstable
1956 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1959 interface IAnjutaEditorConvert
1962 * ianjuta_editor_convert_to_upper:
1964 * @start_position: Start position.
1965 * @end_position: End position.
1966 * @err: Error propagation and reporting
1968 * change characters from start position to end position to uppercase.
1971 void to_upper
(IAnjutaIterable
*start_position
, IAnjutaIterable
*end_position
);
1974 * ianjuta_editor_convert_to_lower:
1976 * @start_position: Start position.
1977 * @end_position: End position.
1978 * @err: Error propagation and reporting
1980 * change characters from start position to end position to lowercase
1983 void to_lower
(IAnjutaIterable
*start_position
, IAnjutaIterable
*end_position
);
1987 * SECTION:ianjuta-editor-line-mode
1988 * @title: IAnjutaEditorLineMode
1989 * @short_description: Text editor line mode
1991 * @stability: Unstable
1992 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1995 interface IAnjutaEditorLineMode
1998 * IAnjutaEditorLineModeType:
1999 * @IANJUTA_EDITOR_LINE_MODE_LF: Line-Feed (Unix)
2000 * @IANJUTA_EDITOR_LINE_MODE_CR: Carat return (Max)
2001 * @IANJUTA_EDITOR_LINE_MODE_CRLF: Caret return + line-feed (Windows)
2003 * This enumeration is used to specify the type of text. Note that not all
2004 * editors implement this.
2014 * ianjuta_editor_line_mode_get:
2016 * @err: Error propagation and reporting
2018 * Get current line ending mode. It is auto-detected from the
2024 * ianjuta_editor_line_mode_set:
2026 * @mode: Line mode to set.
2027 * @err: Error propagation and reporting
2029 * Set the line ending mode to the given @mode. Existing line end
2030 * characters in the buffer are not touched. Only the newly added
2031 * texts will have @mode line end characters.
2033 void set
(Type mode
);
2036 * ianjuta_editor_line_mode_convert:
2038 * @mode: Line mode to convert.
2039 * @err: Error propagation and reporting
2041 * Set the line ending mode to the given @mode and convert all line end
2042 * characters in the buffer to @mode line end characters.
2044 void convert
(Type mode
);
2047 * ianjuta_editor_line_mode_fix:
2049 * @err: Error propagation and reporting
2051 * Convert EOL characters to majority of line mode. This is helpful
2052 * when the buffer contains mixed line modes and we want to fix it.
2058 * SECTION:ianjuta-editor-tip
2059 * @title: IAnjutaEditorTip
2060 * @short_description: Editor call tips assistance framework
2062 * @stability: Unstable
2063 * @include: libanjuta/interfaces/ianjuta-editor-tip.h
2066 interface IAnjutaEditorTip
2069 * ianjuta_editor_tip_show:
2071 * @tips: (element-type utf8): list of alternative tips.
2072 * @position: Tip position.
2073 * @err: Error propagation and reporting
2075 * Show tips showing more information on current context. No user feedback
2076 * is required when tips are shown. @position indicates
2077 * the position before which is the known context and after which are
2078 * the suggestions. Usually the editor would use this to
2079 * align the choices displayed such that the carat is just at this
2080 * position when the choices are displayed.
2083 void show
(List
<const gchar
*> tips
, IAnjutaIterable
*position
);
2086 * ianjuta_editor_tip_cancel:
2088 * @err: Error propagation and reporting
2090 * Cancels the last shown tooltip
2095 * ianjuta_editor_tip_visible:
2097 * @err: Error propagation and reporting
2099 * Returns: whether a tooltip is crrently shown
2105 * SECTION:ianjuta-editor-assist
2106 * @title: IAnjutaEditorAssist
2107 * @short_description: Text editor assist interface
2109 * @stability: Unstable
2110 * @include: libanjuta/interfaces/ianjuta-editor-assist
2113 interface IAnjutaEditorAssist
2115 #include
<libanjuta
/interfaces
/ianjuta
-provider.h
>
2128 * IAnjutaEditorAssist::cancelled:
2131 * This signal is emitted when the autocompletion is cancelled due to various
2132 * reasons. The provider should avoid to call ianjuta_editor_assist_proposals() after
2135 void ::cancelled
();
2138 * ianjuta_editor_assist_add:
2140 * @provider: a IAnjutaProvider
2141 * @err: Error handling
2143 * Add a provider to the list of completion providers
2145 void add
(IAnjutaProvider
* provider
);
2148 * ianjuta_editor_assist_remove:
2150 * @provider: a IAnjutaProvider
2151 * @err: Error handling
2153 * Remove a provider from the list of completion providers
2155 void remove
(IAnjutaProvider
* provider
);
2158 * ianjuta_editor_assist_invoke:
2160 * @provider: a IAnjutaProvider (can be NULL to use all providers)
2161 * @err: Error handling
2163 * Force invokation of a provider at the current cursor position.
2164 * That means that ianjuta_provider_populate() will be called on the
2167 void invoke
(IAnjutaProvider
* provider
);
2170 * ianjuta_editor_assist_proposals:
2172 * @provider: a IAnjutaProvider
2173 * @proposals: (element-type IAnjutaEditorAssistProposal): a list of IAnjutaProposals
2174 * @pre_word: the word before the cursor
2175 * @finished: whether is was the last call in an async operation
2176 * @err: Error handling
2178 * Add the list of proposals for the current population. You can add
2179 * proposals async as long as the last call sets finished to TRUE. That
2180 * is usually called by the IAnjutaProvider after it was triggered by
2181 * ianjuta_provider_populate()
2184 void proposals
(IAnjutaProvider
* provider
, GList
* proposals
, const gchar
* pre_word
, gboolean finished
);
2188 * SECTION:ianjuta-editor-hover
2189 * @title: IAnjutaEditorHover
2190 * @short_description: Text editor hover interface
2192 * @stability: Unstable
2193 * @include: libanjuta/interfaces/ianjuta-editor-hover
2196 interface IAnjutaEditorHover
2198 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
2201 * IAnjutaEditorHover::hover-over:
2203 * @position: IAnjutaEditorCell specifying the position the mouse is over
2205 * The mouse is held for a moment over @position. This can be used to show
2208 void ::hover_over
(IAnjutaIterable
* position
);
2211 * IAnjutaEditorHover::hover-leave:
2213 * @position: IAnjutaEditorCell specifying the position the mouse was over
2215 * User moved the mouse away - can be used to clean up things done in
2216 * #IAnjutaEditorHover::hover-over
2218 void ::hover_leave
(IAnjutaIterable
* position
);
2221 * ianjuta_editor_hover_display:
2223 * @info: String to display
2224 * @err: Error propagation and reporting
2226 * Show @info as tooltip
2229 void display
(IAnjutaIterable
* position
, const gchar
*info
);
2233 * SECTION:ianjuta-editor-language
2234 * @title: IAnjutaEditorLanguage
2235 * @short_description: Text editor language interface
2237 * @stability: Unstable
2238 * @include: libanjuta/interfaces/ianjuta-editor-language.h
2241 interface IAnjutaEditorLanguage
2244 * IAnjutaEditorLanguage::language-changed:
2246 * @language: new language
2248 * the language of the editor changed to @language
2250 void ::language_changed
(const gchar
*language
);
2253 * ianjuta_editor_language_get_supported_languages:
2255 * @err: Error propagation and reporting
2257 * Return a list of languages supported by the editor
2258 * Note: These list contains the names in the form
2259 * the editor implementation knows them
2260 * Returns: (element-type utf8):
2263 const List
<const gchar
*> get_supported_languages
();
2266 * ianjuta_editor_language_name:
2268 * @err: Error propagation and reporting
2270 * Get a list of languages the editor can highlight
2274 const gchar
*get_language_name
(const gchar
* language
);
2277 * ianjuta_editor_language_get_language:
2279 * @err: Error propagation and reporting
2281 * Return the name of the currently used language
2285 const gchar
*get_language
();
2288 * ianjuta_editor_language_set_language:
2290 * @language: Language
2291 * @err: Error propagation and reporting
2293 * Force the editor to use a given language
2297 void set_language
(const gchar
* language
);
2301 * SECTION:ianjuta-editor-folds
2302 * @title: IAnjutaEditorFolds
2303 * @short_description: Text editor folds inteface
2305 * @stability: Unstable
2306 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
2309 interface IAnjutaEditorFolds
2312 * ianjuta_editor_view_open_folds:
2314 * @err: Error propagation and reporting
2322 * ianjuta_editor_view_close_folds:
2324 * @err: Error propagation and reporting
2332 * ianjuta_editor_view_toggle_fold:
2334 * @err: Error propagation and reporting
2336 * Open/Close current fold
2339 void toggle_current
();
2343 * SECTION:ianjuta-editor-view
2344 * @title: IAnjutaEditorView
2345 * @short_description: Text editor view interface
2347 * @stability: Unstable
2348 * @include: libanjuta/interfaces/ianjuta-editor-view.h
2350 * An editor view is a visual representation of the editor. An editor
2351 * can have multiple views. All views of an editor show the same editor
2352 * content (buffer). Consequently, any change done in one view is
2353 * updated in all other views.
2355 interface IAnjutaEditorView
2358 * ianjuta_editor_view_create:
2360 * @err: Error propagation and reporting
2362 * Creates a new view for the editor. The newly created view gets
2363 * the user focus and scrolls to the same location as last view.
2368 * ianjuta_editor_view_remove_current:
2370 * @err: Error propagation and reporting
2372 * Removes currently focused editor view. It does not remove the
2373 * last view of the editor. That is, if currently there is only
2374 * one view of the editor, this function does nothing.
2376 void remove_current
();
2379 * ianjuta_editor_view_get_count:
2381 * @err: Error propagation and reporting
2383 * Total number of views currently present. It will never be less
2384 * than 1. Invalid return values are considered error condition.
2390 * SECTION:ianjuta-editor-comment
2391 * @title: IAnjutaEditorComment
2392 * @short_description: Text editor comment interface
2394 * @stability: Unstable
2395 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
2398 interface IAnjutaEditorComment
2401 * ianjuta_editor_comment_block:
2403 * @err: Error propagation and reporting
2405 * Comment/Uncomment out selected block
2410 * ianjuta_editor_comment_box:
2412 * @err: Error propagation and reporting
2414 * Comment/Uncomment out selected block
2419 * ianjuta_editor_comment_stream:
2421 * @err: Error propagation and reporting
2423 * Comment/Uncomment out selected block
2429 * SECTION:ianjuta-editor-zoom
2430 * @title: IAnjutaEditorZoom
2431 * @short_description: Text editor zoom interface
2433 * @stability: Unstable
2434 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2437 interface IAnjutaEditorZoom
2440 * ianjuta_editor_zoom_in:
2442 * @err: Error propagation and reporting
2449 * ianjuta_editor_zoom_out:
2451 * @err: Error propagation and reporting
2459 * SECTION:ianjuta-editor-goto
2460 * @title: IAnjutaEditorGoto
2461 * @short_description: Text editor navigation interface
2463 * @stability: Unstable
2464 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2467 interface IAnjutaEditorGoto
2470 * ianjuta_editor_goto_start_block:
2472 * @err: Error propagation and reporting
2474 * Moves cursor to the start of the current block
2479 * ianjuta_editor_goto_end_block:
2481 * @err: Error propagation and reporting
2483 * Moves cursor to the end of the current block
2488 * ianjuta_editor_goto_matching_brace:
2490 * @err: Error propagation and reporting
2492 * Moves cursor to matching brace
2494 void matching_brace
();
2499 * SECTION:ianjuta-editor-glade-signal
2500 * @title: IAnjutaEditorGladeSignal
2501 * @short_description: Interface for dropping signal handlers
2503 * @stability: Unstable
2504 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2507 interface IAnjutaEditorGladeSignal
2510 * IAnjutaEditorGladeSignal::drop-possible:
2512 * @iter: a IAnjutaIterable of the position where drop would happen
2514 * Emitted when a signal is dragged over the editor
2516 * Return value: TRUE if a signal handler can be dropped, FALSE otherwise
2518 gboolean
::drop_possible
(IAnjutaIterable
* iterator
);
2521 * IAnjutaEditorGladeSignal::drop:
2523 * @iter: a IAnjutaIterable of the position where drop happens
2524 * @signal_data: Signal data in form "widget:signal:handler", e.g.
2525 * "GtkToggleButton:toggled:on_toggle_button_toggled"
2527 * Emitted when a signal was received per drag & drop
2530 void ::drop
(IAnjutaIterable
* iterator
, const gchar
* signal_data
);
2535 * SECTION:ianjuta-editor-cell
2536 * @title: IAnjutaEditorCell
2537 * @short_description: Text editor character cell
2539 * @stability: Unstable
2540 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2542 * Represents a cell in editor. A cell corresponds to a unicode
2543 * character along with all associated styles (such as colors and font).
2544 * A cell may or may not have style. If style is supported in the
2545 * editor, it is assumed all cells will have styles and hence every
2546 * IAnjutaEditorCell interface instance will have additionally
2547 * IAnjutaEditorCellStyle implemented.
2549 interface IAnjutaEditorCell
2551 #include
<libanjuta
/interfaces
/ianjuta
-editor.h
>
2554 * ianjuta_editor_cell_get_character:
2556 * @err: Error propagation and reporting
2558 * Returns the unicode character in this cell. A NULL terminated
2559 * string is returned that is the multibyte unicode character.
2560 * NULL is returned if the cell does not have any character.
2562 * Returns: a newly created string representing the cell's unicode
2565 gchar
*get_character
();
2568 * ianjuta_editor_cell_get_length:
2570 * @err: Error propagation and reporting.
2572 * Gets the length of the cell in bytes. That is, length of the
2573 * unicode character.
2575 * Returns: Length of the unicode character.
2580 * ianjuta_editor_cell_get_char:
2582 * @err: Error propagation and reporting
2584 * Returns the byte of the unicode character in this cell at given
2585 * index @char_index. @char_index can vary from 0 to length of the
2586 * unicode string minus 1. Out of range index is not allowed
2587 * (asserted) and return is undefined.
2589 * Since there is dynamic allocation of unicode character string
2590 * involved in ianjuta_editor_cell_get_character(), this function
2591 * is mainly useful for fast iteration (such as copying data).
2593 * Returns: a byte character.
2595 gchar get_char
(gint char_index
);
2597 IAnjutaEditorAttribute get_attribute
();
2600 * SECTION:ianjuta-editor-cell-style
2601 * @title: IAnjutaEditorCellStyle
2602 * @short_description: Text editor cell style interface
2604 * @stability: Unstable
2605 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2608 interface IAnjutaEditorCellStyle
2610 gchar
* get_font_description
();
2612 gchar
* get_background_color
();
2617 * SECTION:ianjuta-editor-factory
2618 * @title: IAnjutaEditorFactory
2619 * @short_description: Text editor factory that creates IAnjutaEditor objects
2621 * @stability: Unstable
2622 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2625 interface IAnjutaEditorFactory
2627 #include
"ianjuta-editor.h"
2628 #include
<gio
/gio.h
>
2631 * ianjuta_editor_factory_new_editor:
2633 * @file: file to open
2634 * @filename: filename to open
2635 * @err: Error propagation and reporting
2637 * Get a new GtkWidget* which implements IAnjutaEditor
2639 * Return value: An object implementing IAnjutaEditor
2641 IAnjutaEditor
* new_editor
(GFile
* file
, const gchar
* filename
);
2645 * SECTION:ianjuta-provider
2646 * @title: IAnjutaProvider
2647 * @short_description: Provider for autocompletion features
2649 * @stability: Unstable
2650 * @include: libanjuta/interfaces/ianjuta-provider.h
2652 interface IAnjutaProvider
2654 #include
"ianjuta-iterable.h"
2657 * ianjuta_provider_populate:
2659 * @iter: the text iter where the provider should be populated
2660 * @err: Error propagation and reporting.
2662 * Show completion for the context at position @iter. The provider should
2663 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2665 * Note that this is called after every character typed and the list of proposals
2666 * has to be completely renewed.
2668 void populate
(IAnjutaIterable
* iter
);
2671 * ianjuta_provider_get_start_iter:
2673 * @err: Error propagation and reporting.
2675 * Get the iter where the current completion started
2677 * Returns: (transfer none): current start iter
2679 IAnjutaIterable
* get_start_iter
();
2682 * ianjuta_provider_activate:
2684 * @iter: position where the completion occurs
2685 * @data: data assigned to the proposal
2686 * @err: Error propagation and reporting.
2688 * Show completion for the context at position @iter
2690 void activate
(IAnjutaIterable
* iter
, gpointer data
);
2693 * ianjuta_provider_get_name:
2696 * Return a (translatable) name for the provider
2698 const gchar
* get_name
();
2701 * SECTION:ianjuta-language-provider
2702 * @title: IAnjutaLanguageProvider
2703 * @short_description: Provider for autocompletion features
2705 * @stability: Unstable
2706 * @include: libanjuta/interfaces/ianjuta-language-provider.h
2708 interface IAnjutaLanguageProvider
2710 #include
"ianjuta-editor.h"
2711 #include
"ianjuta-iterable.h"
2712 #include
"ianjuta-symbol.h"
2715 * IANJUTA_LANGUAGE_PROVIDER_PREF_CALLTIP_ENABLE:
2717 * Boolean key, true is calltips has to be shown.
2719 #define PREF_CALLTIP_ENABLE
"calltip-enable"
2722 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_ENABLE:
2724 * Boolean key, true is code completion is enable.
2726 #define PREF_AUTOCOMPLETE_ENABLE
"completion-enable"
2729 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC:
2731 * Boolean key, true is adding a space after function call autocompletion
2733 #define PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC
"completion-space-after-func"
2736 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC:
2738 * Boolean key, true is adding '(' after function call autocompletion
2740 #define PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC
"completion-brace-after-func"
2743 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC:
2745 * Boolean key, true is adding ')' after function call autocompletion
2747 #define PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC
"completion-closebrace-after-func"
2750 * ianjuta_language_provider_get_calltip_cache:
2752 * @call_context: name of the method to show a calltip
2753 * @err: Error propagation
2755 * Searches for a calltip in the cache
2757 * Returns: (element-type utf8) (transfer container): tips for the
2758 * searched name of the method from the cache,
2759 * NULL if nothing found
2761 List
<gchar
*> get_calltip_cache
(gchar
* call_context
);
2764 * ianjuta_language_provider_get_calltip_context:
2766 * @iter: current cursor position
2767 * @err: Error propagation
2769 * Searches for a calltip context
2771 * Returns: name of the method to show a calltip for or NULL
2773 gchar
* get_calltip_context
(IAnjutaIterable
* iter
);
2776 * ianjuta_language_provider_new_calltip:
2778 * @call_context: name of the method to create a new calltip
2779 * @iter: current cursor position
2780 * @err: Error propagation
2782 * Creates a new calltip
2784 void new_calltip
(gchar
* call_context
, IAnjutaIterable
* iter
);
2787 * ianjuta_language_provider_populate_completions:
2789 * @iter: the text iter where the provider should be populated
2790 * @err: Error propagation and reporting.
2792 * Show completion for the context at position @iter. The provider should
2793 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2795 * Note that this is called after every character typed and the list of proposals
2796 * has to be completely renewed.
2798 * Returns: (transfer full) (allow-none): the iter where the provider populated, NULL otherwise
2800 IAnjutaIterable
* populate_completions
(IAnjutaIterable
* iter
);
2805 * SECTION:ianjuta-document-manager
2806 * @title: IAnjutaDocumentManager
2807 * @short_description: Interface for plugin that manages all the editors
2809 * @stability: Unstable
2810 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2813 interface IAnjutaDocumentManager
2815 #include
"ianjuta-document.h"
2816 #include
"ianjuta-editor.h"
2817 #include
<gio
/gio.h
>
2820 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT:
2822 * Anjuta shell value set by document manager to the current document
2824 #define CURRENT_DOCUMENT
"document_manager_current_document"
2832 * IAnjutaDocumentManager::document-added:
2834 * @doc: The #IAnjutaDocument that was added.
2835 * @err: Error propagation and reporting.
2837 * Emitted when a document was added to the document manager.
2839 void ::document_added
(IAnjutaDocument
* doc
);
2842 * IAnjutaDocumentManager::document-removed:
2844 * @doc: The #IAnjutaDocument that was removed.
2845 * @err: Error propagation and reporting.
2847 * Emitted when a document was removed from the document manager.
2849 void ::document_removed
(IAnjutaDocument
* doc
);
2853 * ianjuta_document_manager_get_file:
2855 * @filename: short filename
2856 * @err: Error propagation and reporting.
2858 * Given the short filename, finds the file of the filename, if the
2859 * editor that has it loaded is found. If there is no editor that has
2860 * this file opened, returns NULL.
2862 * Return value: (transfer full): the GFile for the given short filename
2864 GFile
* get_file
(const gchar
*filename
);
2867 * ianjuta_document_manager_find_document_with_file:
2869 * @file: The file to find.
2870 * @err: Error propagation and reporting.
2872 * Finds the document that has the file loaded. Only
2873 * the editor that matches the file will be searched.
2875 * Return value: (transfer none): the document that corresponds to given file. NULL if
2876 * there is no editor loaded with this file.
2878 IAnjutaDocument
* find_document_with_file
(GFile
* file
);
2881 * ianjuta_document_manager_goto_file_line:
2883 * @file: file to go to.
2884 * @lineno: the line number in the file to go to.
2885 * @err: Error propagation and reporting.
2887 * Loads the given file if not loaded yet, set its editor as current editor
2888 * and moves cursor to the given line in the editor.
2890 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2892 IAnjutaEditor
* goto_file_line
(GFile
* file
, gint lineno
);
2895 * ianjuta_document_manager_goto_file_line_mark:
2897 * @file: file to go to.
2898 * @lineno: the line number in the file to go to.
2899 * @mark: TRUE if the line should be marked with a marker.
2900 * @err: Error propagation and reporting
2902 * Loads the given file if not loaded yet, set its editor as current editor
2903 * and moves cursor to the given line in the editor. Optionally also marks
2904 * the line with line marker if @mark is given TRUE.
2906 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2908 IAnjutaEditor
* goto_file_line_mark
(GFile
* file
, gint lineno
, gboolean mark
);
2911 * ianjuta_document_manager_get_current_document:
2913 * @err: Error propagation and reporting.
2915 * Gets the current document.
2917 * Return value: (transfer none): the currently active document. NULL if none is there.
2919 IAnjutaDocument
* get_current_document
();
2922 * ianjuta_document_manager_set_current_document:
2924 * @document: the document to set as current.
2925 * @err: Error propagation and reporting.
2927 * Sets the given document as current document.
2929 void set_current_document
(IAnjutaDocument
*document
);
2932 * ianjuta_document_manager_get_doc_widgets:
2934 * @err: Error propagation and reporting.
2936 * Gets a list of widgets for open documents. Each widget is
2937 * a GTK_WIDGET(IAnjutaDocument*)
2939 * Return value: (element-type GtkWidget) (transfer container): a list of widgets for
2940 * all open documents. The returned list (but not the data in the list) must be
2943 List
<GtkWidget
*> get_doc_widgets
();
2946 * ianjuta_document_manager_add_buffer:
2948 * @name: Name of the editor buffer.
2949 * @content: Initial content of the buffer.
2950 * @err: Error propagation and reporting.
2952 * Creates a new editor buffer of the given name and sets the given
2953 * content as its initial content.
2955 * Return value: (transfer full): the IAnjutaEditor instance that has been added.
2957 IAnjutaEditor
* add_buffer
(const gchar
*name
, const gchar
* content
);
2960 * ianjuta_document_manager_remove_document:
2962 * @document: Document to close.
2963 * @save_before: If true, saves the document before closing.
2964 * @err: Error propagation and reporting.
2966 * Closes and removes the given document. If @save_before is TRUE, also
2967 * saves the document before closing.
2969 * Return value: TRUE if the document was removed, else FALSE.
2971 gboolean remove_document
(IAnjutaDocument
*document
, gboolean save_before
);
2974 * ianjuta_document_manager_add_document:
2976 * @document: the document to add
2977 * @err: Error propagation and reporting.
2979 * Adds a document to the document manager. This will open a new
2980 * Notebook tab and show the document there
2983 void add_document
(IAnjutaDocument
* document
);
2986 * ianjuta_document_manager_add_bookmark:
2988 * @file: File to add the bookmark
2989 * @line: Line of the bookmark
2993 void add_bookmark
(GFile
* file
, gint line
);
2997 * SECTION:ianjuta-message-view
2998 * @title: IAnjutaMessageView
2999 * @short_description: A view where messages of different kind can be shown
3001 * @stability: Unstable
3002 * @include: libanjuta/interfaces/ianjuta-message-view.h
3005 interface IAnjutaMessageView
3008 * IAnjutaMessageViewType:
3009 * @IANJUTA_MESSAGE_VIEW_TYPE_NORMAL: Normal message
3010 * @IANJUTA_MESSAGE_VIEW_TYPE_INFO: Info message (highlighed)
3011 * @IANJUTA_MESSAGE_VIEW_TYPE_ERROR: Error message
3012 * @IANJUTA_MESSAGE_VIEW_TYPE_WARNING: Warning message
3014 * Speficy the type ot the message added to the message view
3025 * IAnjutaMessageView::message-clicked:
3027 * @message: text of the clicked message
3029 * Emitted when the user clicks on a message
3031 void ::message_clicked
(const gchar
*message);
3034 * IAnjutaMessageView::buffer-flushed:
3036 * @line: the current line
3038 * Emitted when #ianjuta_message_view_buffer_append found a newline
3040 void ::buffer_flushed
(const gchar
*line
);
3043 * ianjuta_message_view_buffer_append:
3045 * @text: text to show as message
3046 * @err: Error propagation and reporting.
3048 * Appends the text in buffer. Flushes the buffer where a newline is found.
3049 * by emiiting buffer_flushed signal. The string is expected to be utf8.
3051 void buffer_append
(const gchar
*text
);
3054 * ianjuta_message_view_append:
3056 * @type: type of the message
3057 * @summary: summary of the message
3058 * @details: details of the message
3059 * @err: Error propagation and reporting.
3061 * Append the message with summary displayed and details displayed as tooltip
3063 void append
(Type type
, const gchar
*summary
, const gchar
*details
);
3066 * ianjuta_message_view_clear:
3068 * @err: Error propagation and reporting.
3070 * Clear all messages in buffer
3075 * ianjuta_message_view_select_next:
3077 * @err: Error propagation and reporting.
3079 * Select next message (of type INFO, WARNING or ERROR)
3081 void select_next
();
3084 * ianjuta_message_view_select_previous:
3086 * @err: Error propagation and reporting.
3088 * Select previous message
3090 void select_previous
();
3093 * ianjuta_message_view_get_current_message:
3095 * @err: Error propagation and reporting.
3097 * Get the currently selected message
3099 const gchar
* get_current_message
();
3102 * ianjuta_message_view_get_all_messages:
3104 * @err: Error propagation and reporting.
3106 * Get a list of all messages. The list has to be freed
3107 * Returns: (element-type utf8):
3109 List
<const gchar
*> get_all_messages
();
3113 * SECTION:ianjuta-message-manager
3114 * @title: IAnjutaMessageManager
3115 * @short_description: The plugin that managers all message views
3117 * @stability: Unstable
3118 * @include: libanjuta/interfaces/ianjuta-message-manager.h
3121 interface IAnjutaMessageManager
3123 #include
"ianjuta-message-view.h"
3124 #include
<gdk
/gdk.h
>
3131 * ianjuta_message_manager_add_view:
3133 * @name: Name/Title of the new view
3134 * @icon: Path to an icon or ""
3135 * @err: Error propagation and reporting
3137 * Adds a new view to the message-manager
3139 * Return value: The new message-view
3141 IAnjutaMessageView
* add_view
(const gchar
*name
, const gchar
*icon
);
3144 * ianjuta_message_manager_remove_view:
3146 * @view: The view to remove
3147 * @err: Error propagation and reporting
3149 * Remove view from the message-manager. The view
3150 * will become invalid.
3152 void remove_view
(IAnjutaMessageView
*view
);
3155 * ianjuta_message_manager_get_current_view:
3157 * @err: Error propagation and reporting
3159 * Get the view with is currently on top of
3160 * the notebook or NULL if the message-manager is empty.
3162 * Return value: Current view; #IAnjutaMessageView object.
3163 * NULL, if there is no views.
3165 IAnjutaMessageView
* get_current_view
();
3168 * ianjuta_message_manager_get_view_by_name:
3170 * @name: Name/Title of the view
3171 * @err: Error propagation and reporting
3173 * Get the view with the given name or NULL if
3174 * it does not exist.
3176 * Return value: The message-view or NULL
3178 IAnjutaMessageView
* get_view_by_name
(const gchar
*name
);
3181 * ianjuta_message_manager_get_all_views:
3183 * @err: Error propagation and reporting
3185 * Get all message-views
3187 * Return value: (element-type IAnjutaMessageView): A GList* of all views. You must not
3188 * manipulate the list.
3190 List
<IAnjutaMessageView
*> get_all_views
();
3193 * ianjuta_message_manager_set_current_view:
3195 * @view: A message view
3196 * @err: Error propagation and reporting
3198 * Set view to be on top of the notebook.
3201 void set_current_view
(IAnjutaMessageView
*view
);
3204 * ianjuta_message_manager_set_view_title:
3206 * @view: A message view
3207 * @title: Sets the title of view.
3208 * @err: Error propagation and reporting
3210 * Sets the title of view.
3213 void set_view_title
(IAnjutaMessageView
*view
, const gchar
*title
);
3216 * ianjuta_message_manager_set_view_icon:
3218 * @view: A message view
3219 * @icon: Sets the icon of view.
3220 * @err: Error propagation and reporting
3222 * Sets the icon of view.
3225 void set_view_icon
(IAnjutaMessageView
*view
, GdkPixbufAnimation
*icon
);
3228 * ianjuta_message_manager_set_view_icon_from_stock:
3230 * @view: A message view
3231 * @icon: Sets the icon of view.
3232 * @err: Error propagation and reporting
3234 * Sets the icon of view.
3237 void set_view_icon_from_stock
(IAnjutaMessageView
*view
, const gchar
*icon
);
3241 * SECTION:ianjuta-file-manager
3242 * @title: IAnjutaFileManager
3243 * @short_description: File manager plugin
3245 * @stability: Unstable
3246 * @include: libanjuta/interfaces/ianjuta-file-manager.h
3249 interface IAnjutaFileManager
3251 #include
<gio
/gio.h
>
3254 * IANJUTA_FILE_MANAGER_SELECTED_FILE:
3256 * Anjuta shell value set by file manager to the selected file.
3258 #define SELECTED_FILE
"file_manager_selected_file"
3261 * IAnjutaFileManager::section-changed:
3263 * @err: Error propagation and reporting.
3267 void ::section_changed
(GFile
* file
);
3270 * ianjuta_file_manager_set_root:
3273 * @err: Error propagation and reporting.
3277 void set_root
(const gchar
*root_uri
);
3280 * ianjuta_file_manager_get_selected:
3282 * @err: Error propagation and reporting.
3286 GFile
* get_selected
();
3289 * ianjuta_file_manager_set_selected:
3291 * @file: File to select
3292 * @err: Error propagation and reporting.
3296 void set_selected
(GFile
* file
);
3300 * SECTION:ianjuta-terminal
3301 * @title: IAnjutaTerminal
3302 * @short_description: Interface for command line terminals
3304 * @stability: Unstable
3305 * @include: libanjuta/interfaces/ianjuta-terminal.h
3308 interface IAnjutaTerminal
3310 #include
<sys
/types.h
>
3313 * IAnjutaTerminal::child_exited:
3315 * @pid: pid of terminated child
3316 * @status: status of terminated child as returned by waitpid
3318 * This signal is emitted when a child exit.
3320 void ::child_exited
(gint pid
, gint status
);
3324 * ianjuta_terminal_execute_command:
3326 * @directory: Working directory
3327 * @command: Command executed followed by arguments
3328 * @environment: List of additional environment variables
3329 * @err: Error propagation and reporting.
3331 * Run the command in a terminal, setting the working directory
3332 * and environment variables.
3334 * Returns: Process ID
3336 pid_t execute_command
(const gchar
* directory
, const gchar
*command
, gchar
**environment
);
3340 * SECTION:ianjuta-project
3341 * @title: IAnjutaProject
3342 * @short_description: Interface implemented by project backend
3344 * @stability: Unstable
3345 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3347 * This is the new interface that is replacing Gnome Build.
3349 interface IAnjutaProject
3351 #include
<libanjuta
/anjuta
-project.h
>
3352 #include
<gtk
/gtk.h
>
3359 ERROR_ALREADY_EXISTS
,
3360 ERROR_VALIDATION_FAILED
,
3361 ERROR_PROJECT_MALFORMED
,
3363 ERROR_NOT_SUPPORTED
,
3364 ERROR_GENERAL_FAILURE
3369 PROBE_MAKE_FILES
= 100,
3370 PROBE_PROJECT_FILES
= 200
3376 * IAnjutaProject::file-changed:
3378 * @node: Node to be reloaded.
3380 * This signal is emitted when the project is changed on the disk. The
3381 * corresponding node has to be reloaded.
3383 void ::file_changed
(gpointer node
);
3386 * IAnjutaProject::node-changed:
3388 * @node: Changed node.
3389 * @error: Error while changing node
3391 * This signal is emitted when a node is changed by a function of this
3392 * interface. The error argument is not NULL if the change was not
3393 * possible. The corresponding node need to be saved.
3395 void ::node_changed
(gpointer node
, GError
*error
);
3398 * IAnjutaProject::node-saved:
3400 * @node: Saved node.
3401 * @error: Error while saving node
3403 * This signal is emitted when a node is saved. It returns an error if the
3404 * save operation fail.
3406 void ::node_saved
(gpointer node
, GError
*error
);
3409 * IAnjutaProject::node-loaded:
3411 * @node: Loaded node.
3412 * @error: Error while loading node
3414 * This signal is emitted when a node is loaded. It returns an error if the
3415 * load operation fail.
3417 void ::node_loaded
(gpointer node
, GError
*error
);
3421 * ianjuta_project_load_node:
3423 * @node: (transfer none): Project node to reload
3424 * @err: Error propagation and reporting
3426 * Reload a project node
3428 * Return value: TRUE if the node has been loaded without error
3430 gboolean load_node
(AnjutaProjectNode
*node
);
3433 * ianjuta_project_save_node:
3435 * @node: (transfer none): Project node to save
3436 * @err: Error propagation and reporting
3438 * Save a project node
3440 * Return value: TRUE if the node has been saved without error
3442 gboolean save_node
(AnjutaProjectNode
*node
);
3445 * ianjuta_project_add_node_after:
3447 * @parent: (transfer none): Parent
3448 * @sibling: (allow-none) (transfer none): Sibling
3450 * @file: (allow-none) (transfer none): Optional file object for the node
3451 * @name: (allow-none) (transfer none): Optional name for the node
3452 * @err: Error propagation and reporting
3454 * Create a new node and insert it after sibling
3456 * Return value: (transfer none): The new node, NULL if error
3458 AnjutaProjectNode
*add_node_after
(AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
);
3461 * ianjuta_project_add_node_before:
3463 * @parent: (transfer none): Parent
3464 * @sibling: (allow-none) (transfer none): Sibling
3466 * @file: (allow-none) (transfer none): Optional file object for the node
3467 * @name: (allow-none) (transfer none): Optional name for the node
3468 * @err: Error propagation and reporting
3470 * Create a new node and insert it before sibling
3472 * Return value: (transfer none): The new node, NULL if error
3474 AnjutaProjectNode
*add_node_before
(AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
);
3477 * ianjuta_project_remove_node:
3479 * @node: (transfer none): Node
3480 * @err: Error propagation and reporting
3484 * Return value: TRUE if the node can be removed
3486 gboolean remove_node
(AnjutaProjectNode
*node
);
3489 * ianjuta_project_set_property:
3491 * @node: (transfer none): Node
3492 * @id: (transfer none): Property
3493 * @name: (allow-none) (transfer none): Name for map property
3494 * @value: (transfer none): Value
3495 * @err: Error propagation and reporting
3497 * Change a properties on node.
3499 * Return value: (allow-none) (transfer none): The new property of NULL if the property cannot be set
3501 AnjutaProjectProperty
*set_property
(AnjutaProjectNode
*node
, const gchar
*id, const gchar
*name
, const gchar
*value
);
3504 * ianjuta_project_remove_property:
3506 * @node: (transfer none): Node
3507 * @id: (transfer none): Property
3508 * @name: (allow-none) (transfer none): Name for map property
3509 * @err: Error propagation and reporting
3511 * Remove a property of the node
3513 * Return value: TRUE if the node is removed
3515 gboolean remove_property
(AnjutaProjectNode
*node
, const gchar
*id, const gchar
*name
);
3518 * ianjuta_project_get_root:
3520 * @err: Error propagation and reporting
3524 * Return value: (transfer none): The root node
3526 AnjutaProjectNode
*get_root
();
3529 * ianjuta_project_get_node_info:
3531 * @err: Error propagation and reporting
3533 * Return a list of possible node;
3535 * Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): A list
3536 * containing information on all node supported by the project.
3538 const List
<AnjutaProjectNodeInfo
*> get_node_info
();
3541 * ianjuta_project_is_loaded:
3543 * @err: Error propagation and reporting
3545 * Return TRUE if the project is loaded;
3547 * Return value: TRUE if the project is completely loaded.
3549 gboolean is_loaded
();
3553 * SECTION:ianjuta-project-backend
3554 * @title: IAnjutaProjectBackend
3555 * @short_description: Interface for creating new project
3557 * @stability: Unstable
3558 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3561 interface IAnjutaProjectBackend
3563 #include
"ianjuta-project.h"
3566 * ianjuta_project_backend_new_project:
3568 * @file: (transfer none): Project file or directory
3569 * @err: Error propagation and reporting
3571 * Create a new Anjuta project.
3573 * Return value: (transfer full): An object implementing the
3574 * #IAnjutaProject interface.
3576 IAnjutaProject
* new_project
(GFile
*file
);
3580 * ianjuta_project_backend_probe:
3582 * @directory: (transfer none): Project file or directory
3583 * @err: Error propagation and reporting
3585 * Check if the directory contains a project supported by this
3588 * Return value: 0 if the project is invalid and > 0 if the project is
3591 gint probe
(GFile
*directory
);
3595 * SECTION:ianjuta-project-manager
3596 * @title: IAnjutaProjectManager
3597 * @short_description: Interface for project managers
3599 * @stability: Unstable
3600 * @include: libanjuta/interfaces/ianjuta-project-manager.h
3603 interface IAnjutaProjectManager
3606 #include
<libanjuta
/anjuta
-project.h
>
3607 #include
<libanjuta
/interfaces
/ianjuta
-project.h
>
3610 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI:
3612 * Anjuta shell value set by project manager to the project root uri.
3614 #define PROJECT_ROOT_URI
"project_root_uri"
3617 * IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT:
3619 * Anjuta shell value set by project manager to the current project object
3620 * which implement #IAnjutaProject interface.
3622 #define CURRENT_PROJECT
"project_manager_current_project"
3625 * IANJUTA_PROJECT_MANAGER_CURRENT_URI:
3627 * Anjuta shell value set by project manager to the current uri.
3629 #define CURRENT_URI
"project_manager_current_uri"
3634 * IAnjutaProjectManager::project_loaded:
3636 * @err: Error propagation and reporting.
3638 * Emitted when the project is fully loaded. It can takes a quite long
3639 * time if the project is big. The project is loaded in several parts
3640 * in a thread. All functions are available before having the project
3643 void ::project_loaded
(GError
*error
);
3646 * IAnjutaProjectManager::element_added:
3648 * @element: A #GFile corrresponding to added element
3649 * @err: Error propagation and reporting.
3651 * Emitted when a new element is added to the project. It can be
3652 * a source, a target or a group. It does not always correspond
3653 * to an existing file. This signal can be emitted several time for
3656 void ::element_added
(GFile
*element
);
3659 * IAnjutaProjectManager::element_removed:
3661 * @element: A #GFile corresponding to removed element
3662 * @err: Error propagation and reporting.
3664 * Emitted when an element is removed from a project. It can be
3665 * a source, a target or a group.
3667 void ::element_removed
(GFile
*element
);
3670 * IAnjutaProjectManager::element_selected:
3672 * @element_uri: A #GFile corresponding to selected element
3673 * @err: Error propagation and reporting.
3675 * Emitted when an element is selected in the project view. It
3676 * can be a source, a target or a group.
3678 void ::element_selected
(GFile
*element
);
3683 * ianjuta_project_manager_get_elements:
3685 * @element_type: Select one element type: source, group or target
3686 * @err: Error propagation and reporting.
3688 * Get a list of all elements of this type in the project.
3690 * Returns: (element-type GFile) (transfer full): Get list of #GFile corresponding to
3691 * all valid elements or %NULL if there are no elements of this type. Free the returned
3692 * list with g_list_free() and the files with g_object_unref().
3694 List
<GFile
*> get_elements
(AnjutaProjectNodeType element_type
);
3697 * ianjuta_project_manager_get_target_type:
3699 * @target: A #GFile corresponding to a target
3700 * @err: Error propagation and reporting.
3702 * Get the type of the corresponding target: program, library...
3704 * Returns: Return the type of the target.
3706 AnjutaProjectNodeType get_target_type
(GFile
*target
);
3709 * ianjuta_project_manager_get_targets:
3711 * @target_type: type of the target
3712 * @err: Error propagation and reporting.
3714 * Get a list of targets in the project with the corresponding type.
3716 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to
3717 * each target of the requested type or %NULL if none exists. Free the returned list
3718 * with g_list_free() and the files with g_object_unref().
3720 List
<GFile
*> get_targets
(AnjutaProjectNodeType target_type
);
3723 * ianjuta_project_manager_get_parent:
3725 * @element: A #GFile corresponding to one child.
3726 * @err: Error propagation and reporting.
3728 * Gets the parent of the corresponding child.
3730 * Returns: The parent of the child, or %NULL if the element is the root.
3732 GFile
* get_parent
(GFile
*element
);
3735 * ianjuta_project_manager_get_children:
3737 * @parent: A #GFile corresponding to the parent.
3738 * @children_type: Select one element type: source, group or target
3739 * @err: Error propagation and reporting.
3741 * Recursively gets the list of all children below the corresponding
3742 * parent having the specify type.
3744 * Returns: (element-type GFile) (transfer full): The list of #GFile
3745 * corresponding to all children or %NULL if the element has no
3746 * children with the corresponding type. Free the returned * list
3747 * with g_list_free() and the files with g_object_unref().
3749 List
<GFile
*> get_children
(GFile
*parent
, gint children_type
);
3752 * ianjuta_project_manager_get_selected:
3754 * @err: Error propagation and reporting.
3756 * Gets the currently selected element in the project manager view.
3758 * Returns: (transfer full): A #GFile corresponding to the selected element in the project
3759 * view. You own the returned file; use g_object_unref() to release it.
3761 GFile
* get_selected
();
3764 * ianjuta_project_manager_get_capabilities:
3766 * @err: Error propagation and reporting.
3768 * Gets the capabilites of project whether it can add group, target
3771 * Returns: Supported capabilites.
3773 guint get_capabilities
();
3776 * ianjuta_project_manager_add_source:
3778 * @name: Source name or URI.
3779 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3780 * %NULL if you don't care.
3781 * @err: Error propagation and reporting.
3783 * Prompts the user to add a file to the project. If the user selects
3784 * multiple files only the first source file is returned.
3786 * You can add non existing file. In this case the element_added
3787 * signal will be emitted with a non existing file. So it is
3788 * up to the caller to reemit this signal later when the file
3791 * Returns: (transfer full): A #GFile corresponding to the new source file in the
3792 * project view. You own the returned file; use g_object_unref() to release it.
3794 GFile
* add_source
(const gchar
*name
, GFile
*default_target
);
3797 * ianjuta_project_manager_add_source_quiet:
3799 * @name: Source name or URI.
3800 * @target: A #GFile corresponding to the parent target or group.
3801 * @err: Error propagation and reporting.
3803 * Adds a file to the project without prompting the user.
3805 * You can add non existing file. In this case the element_added
3806 * signal will be emitted with a non existing file. So it is
3807 * up to the caller to reemit this signal later when the file
3810 * Returns: (transfer full): A #GFile corresponding to the new source file in the project
3811 * view. You own the returned file; use g_object_unref() to release it.
3813 GFile
* add_source_quiet
(const gchar
*name
, GFile
*target
);
3816 * ianjuta_project_manager_add_sources:
3818 * @names: (element-type utf8): Sources name or URI to add.
3819 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3820 * %NULL if don't care.
3821 * @err: Error propagation and reporting.
3823 * Prompts the user to add several files to the project. Depending on the
3824 * project backend, it can be possible that the source files must
3825 * be located in a particular directory.
3827 * You can add non existing file. In this case the element_added
3828 * signal will be emitted with a non existing file. So it is
3829 * up to the caller to reemit this signal later when the file
3832 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to all
3833 * new source files added in the project. You own the list with the the returned files;
3834 * use g_list_free() and g_object_unref() on each file to release them.
3836 List
<GFile
*> add_sources
(List
<const gchar
*> names
, GFile
*default_target
);
3839 * ianjuta_project_manager_add_target:
3841 * @name: Target name or URI.
3842 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3843 * %NULL if don't care.
3844 * @err: Error propagation and reporting.
3846 * Prompts the user to add a new target to the project. The user can select
3847 * a parent group different from the one set as default.
3849 * Returns: (transfer full): A #GFile corresponding to the new target added in the project.
3850 * You own the returned file; use g_object_unref() to release it.
3852 GFile
* add_target
(const gchar
*name
, GFile
*default_group
);
3855 * ianjuta_project_manager_add_group:
3857 * @name: Group name or URI.
3858 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3859 * %NULL if don't care.
3860 * @err: Error propagation and reporting.
3862 * Prompts the user to add a new group to the project. The user can select
3863 * a parent group different from the one set as default.
3865 * Returns: (transfer full): A #GFile corresponding to the new group added in the project.
3866 * You own the returned file; use g_object_unref() to release it.
3868 GFile
* add_group
(const gchar
*name
, GFile
*default_group
);
3871 * ianjuta_project_manager_is_open:
3873 * @err: Error propagation and reporting.
3875 * Gets whether a project is currently opened.
3877 * Returns: %TRUE if a project is opened.
3879 gboolean is_open
();
3882 * ianjuta_project_manager_get_packages:
3884 * @err: Error propagation and reporting.
3886 * Returns: (element-type utf8) (transfer container): the list of pkg-config packages that the current project
3887 * requires in it's configure.ac. Can be NULL if there is no project
3888 * opened currently or no package is required.
3890 List
<gchar
*> get_packages
();
3893 * ianjuta_project_manager_get_current_project:
3895 * @err: Error propagation and reporting.
3897 * Gets the current project.
3899 * Return value: (transfer none): the currently active project. NULL if none is there.
3901 IAnjutaProject
* get_current_project
();
3905 * SECTION:ianjuta-project-chooser
3906 * @title: IAnjutaProjectChooser
3907 * @short_description: Interface for selecting project node
3909 * @stability: Unstable
3910 * @include: libanjuta/interfaces/ianjuta-project-chooser.h
3913 interface IAnjutaProjectChooser
3916 #include
<libanjuta
/anjuta
-project.h
>
3917 #include
<libanjuta
/interfaces
/ianjuta
-project
-manager.h
>
3922 * IAnjutaProjectChooser::changed:
3925 * Emitted when the selected node is changed.
3932 * ianjuta_project_chooser_set_project_model:
3934 * @manager: A project manager
3935 * @child_type: Select one element type: source, group or target
3936 * @err: Error propagation and reporting.
3938 * Initialize a project chooser button allowing to select a parent node
3939 * where you can add the nodes of type child_type.
3940 * As special cases with
3943 * <term>ANJUTA_PROJECT_ROOT</term>
3944 * <listitem><para>all nodes are included</para></listitem>
3947 * <term>ANJUTA_PROJECT_MODULE</term>
3948 * <listitem><para>only modules are included, this can be used
3949 * to add a new package. While ANJUTA_PROJECT_PACKAGE allows you
3950 * to select a target using a package.</para></listitem>
3954 * Returns: TRUE if sucessful, other FALSE.
3956 gboolean set_project_model
(IAnjutaProjectManager
*manager
, AnjutaProjectNodeType child_type
);
3960 * ianjuta_project_chooser_get_selected:
3962 * @err: Error propagation and reporting.
3964 * Gets the currently selected element in the project chooser.
3966 * Returns: (transfer none): A #GFile corresponding to the selected
3967 * element in the project view or %NULL if no valid node is selected.
3968 * The file is owned by the widget If you want to keep a pointer to
3969 * the file you must add a refcount using g_object_ref().
3971 GFile
* get_selected
();
3976 * SECTION:ianjuta-todo
3977 * @title: IAnjutaTodo
3978 * @short_description: Task manager interface
3980 * @stability: Unstable
3981 * @include: libanjuta/interfaces/ianjuta-todo.h
3984 interface IAnjutaTodo
3986 #include
<gio
/gio.h
>
3988 * ianjuta_to_do_load:
3991 * @err: Error propagation and reporting.
3995 void load
(GFile
*file
);
3999 * SECTION:ianjuta-wizard
4000 * @title: IAnjutaWizard
4001 * @short_description: Interface for wizards that can create new stuffs
4003 * @stability: Unstable
4004 * @include: libanjuta/interfaces/ianjuta-wizard.h
4007 interface IAnjutaWizard
4011 * ianjuta_wizard_activate:
4013 * @err: Error propagation and reporting.
4015 * Called when the wizard should start after some user action
4021 * SECTION:ianjuta-debugger
4022 * @title: IAnjutaDebugger
4023 * @short_description: Debugger interface
4024 * @see_also: #IAnjutaDebugManager
4025 * @stability: Unstable
4026 * @include: libanjuta/interfaces/ianjuta-debugger.h
4028 * This interface is implemented by debugger backends, by example the gdb
4029 * backend. It is used by the debug manager plugin which provides the
4030 * graphical interface and a simple wrapper: #IAnjutaDebugManager.
4032 * The debugger is in one on these 5 states and emit a signal to the debug
4033 * manager when it changes. Here is figure showing all transitions and
4034 * the signal emitted.
4035 * <figure id="debugger-states">
4038 * <imagedata fileref="debugger-states.png" format="PNG"/>
4044 interface IAnjutaDebugger
4046 #include
"ianjuta-message-view.h"
4047 #include
<sys
/types.h
>
4048 #include
<gio
/gio.h
>
4052 * IAnjutaDebuggerError:
4053 * @IANJUTA_DEBUGGER_OK: No error
4054 * @IANJUTA_DEBUGGER_NOT_READY: Debugger is not ready to execute the command
4055 * @IANJUTA_DEBUGGER_NOT_RUNNING: Debugger is not is running state
4056 * @IANJUTA_DEBUGGER_NOT_STOPPED: Debugger is not is stopped state
4057 * @IANJUTA_DEBUGGER_NOT_LOADED: Debugger is not is loaded state
4058 * @IANJUTA_DEBUGGER_NOT_STARTED: Debugger is not in started state
4059 * @IANJUTA_DEBUGGER_NOT_CONNECTED: Debugger is not connected:
4060 * @IANJUTA_DEBUGGER_NOT_IMPLEMENTED: Corresponding function is not implemented
4061 * @IANJUTA_DEBUGGER_CANCEL: Operation has been cancelled
4062 * @IANJUTA_DEBUGGER_UNABLE_TO_CREATE_VARIABLE: Debugger cannot create variable
4063 * @IANJUTA_DEBUGGER_UNABLE_TO_ACCESS_MEMORY: Debugger cannot access memory
4064 * @IANJUTA_DEBUGGER_UNABLE_TO_OPEN_FILE: Debugger cannot open file
4065 * @IANJUTA_DEBUGGER_UNSUPPORTED_FILE_TYPE: Debugger cannot debug such file
4066 * @IANJUTA_DEBUGGER_UNSUPPORTED_VERSION: Debugger is too old
4067 * @IANJUTA_DEBUGGER_UNABLE_TO_FIND_DEBUGGER: Debugger cannot be found
4068 * @IANJUTA_DEBUGGER_ALREADY_DONE: Command has already been executed
4069 * @IANJUTA_DEBUGGER_PROGRAM_NOT_FOUND: Program cannot be found
4070 * @IANJUTA_DEBUGGER_UNABLE_TO_CONNECT: Unable to connect to debugger
4071 * @IANJUTA_DEBUGGER_UNKNOWN_ERROR: Unknown error
4072 * @IANJUTA_DEBUGGER_OTHER_ERROR: other error
4074 * This enumeration is used to defined the error returned by the debugger
4088 UNABLE_TO_CREATE_VARIABLE
,
4089 UNABLE_TO_ACCESS_MEMORY
,
4090 UNABLE_TO_OPEN_FILE
,
4091 UNSUPPORTED_FILE_TYPE
,
4092 UNSUPPORTED_VERSION
,
4093 UNABLE_TO_FIND_DEBUGGER
,
4102 * IAnjutaDebuggerOutputType:
4103 * @IANJUTA_DEBUGGER_OUTPUT: Output from debugger
4104 * @IANJUTA_DEBUGGER_WARNING_OUTPUT: Warning from debugger
4105 * @IANJUTA_DEBUGGER_ERROR_OUTPUT: Error from debugger
4106 * @IANJUTA_DEBUGGER_INFO_OUTPUT: Additional message from debugger
4108 * This enumeration is used to defined the kind of output in
4109 * #IAnjutaDebuggerOutputCallback
4120 * IAnjutaDebuggerState:
4121 * @IANJUTA_DEBUGGER_BUSY: Debugger is executing a command, it can enter in another
4122 * at the end of the command.
4123 * @IANJUTA_DEBUGGER_STOPPED: Debugger is stopped.
4124 * @IANJUTA_DEBUGGER_STARTED: Debugger is started but no program is loaded.
4125 * @IANJUTA_DEBUGGER_PROGRAM_LOADED: Debugger is started and has a program loaded.
4126 * @IANJUTA_DEBUGGER_PROGRAM_STOPPED: Debugger is started and has a program stopped.
4127 * @IANJUTA_DEBUGGER_PROGRAM_RUNNING: Debugger is started and has a program running.
4129 * This enumeration is used to defined the different state of the debugger.
4142 * IAnjutaDebuggerFrame:
4143 * @thread: Thread identifier.
4144 * @level: Level of the frame, 0 is the topmost one.
4145 * @args: List of argument of the caller.
4146 * @file: Source file name where is the program counter.
4147 * @line: Line number in the file above.
4148 * @function: Function name where is the program counter.
4149 * @library: Library name where is the program counter.
4150 * @address: Address of the program counter.
4152 * This structure keeps all information about a stack frame.
4167 * IAnjutaDebuggerCallback:
4169 * @user_data: user data passed to the function
4172 * This callback function is used only by #ianjuta_debugger_callback with a
4175 typedef void (*Callback) (const gpointer data
, gpointer user_data
, GError
* err
);
4178 * IAnjutaDebuggerGListCallback:
4179 * @list: (element-type any): list of data
4180 * @user_data: user data passed to the function
4183 * This callback function is used by several debugger functions. Depending on
4184 * the function, the kind of elements in the list is different. It is a string
4185 * for #ianjuta_debugger_list_local or a #IAnjutaDebuggerFrame for
4186 * #ianjuta_debugger_list_frame.
4188 typedef void (*GListCallback
) (const GList
* list
, gpointer user_data
, GError
* err
);
4191 * IAnjutaDebuggerGCharCallback:
4193 * @user_data: user data
4196 * This callback function is used by several debugger functions. The data is
4199 typedef void (*GCharCallback
) (const gchar
*value
, gpointer user_data
, GError
* err
);
4202 * IAnjutaDebuggerOutputCallback:
4203 * @type: kind of output
4205 * @user_data: user data
4207 * This callback function is used only by #ianjuta_debugger_callback with a
4210 typedef void (*OutputCallback
) (OutputType type
, const gchar
*output
, gpointer user_data
);
4215 * IAnjutaDebugger::debugger_started:
4218 * This signal is emitted when the debugger is started.
4220 void ::debugger_started
();
4223 * IAnjutaDebugger::debugger_stopped:
4225 * @err: Error propagation and reporting.
4227 * This signal is emitted when the debugger is stopped. The error
4228 * parameters allow to check it has run correctly.
4230 void ::debugger_stopped
(GError
*err
);
4233 * IAnjutaDebugger::program_loaded:
4236 * This signal is emitted when a program is loaded.
4238 void ::program_loaded
();
4241 * IAnjutaDebugger::program_running:
4244 * This signal is emitted when the program is running.
4246 void ::program_running
();
4249 * IAnjutaDebugger::program_stopped:
4252 * This signal is emitted when the program is interrupted.
4254 void ::program_stopped
();
4257 * IAnjutaDebugger::program_exited:
4260 * This signal is emitted when the program exits.
4262 void ::program_exited
();
4265 * IAnjutaDebugger::sharedlib_event:
4268 * This signal is emitted when the program load a new shared
4271 void ::sharedlib_event
();
4274 * IAnjutaDebugger::program_moved:
4276 * @pid: process id, 0 when unknown
4277 * @tid: thread id, 0 when unknown
4278 * @address: program counter address, 0 when unknown
4279 * @file: source file where is the program counter, NULL when unknown
4280 * @line: line number if file name above is not NULL
4282 * This signal is emitted when the debugger know the current program
4283 * location. Most of the time, after the program has stopped but it
4284 * could happen even if it is still running.
4286 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
4289 * IAnjutaDebugger::frame_changed:
4291 * @frame: frame number
4292 * @thread: thread number
4294 * This signal is emitted when the current frame changes.
4296 void ::frame_changed
(guint frame
, gint thread
);
4299 * IAnjutaDebugger::signal_received:
4301 * @name: Signal name
4302 * @description: Signal description
4304 * This signal is emitted when the program received a unix signal.
4306 void ::signal_received
(const gchar
* name
, const gchar
* description
);
4309 * IAnjutaDebugger::debugger_ready:
4311 * @state: debugger status
4313 * This signal is emitted when the debugger is ready to execute
4316 void ::debugger_ready
(State state
);
4320 * ianjuta_debugger_get_state:
4322 * @err: Error propagation and reporting.
4324 * Get the current state of the debugger
4326 * Returns: The current debugger state.
4334 * ianjuta_debugger_load:
4337 * @mime_type: mime type of the file
4338 * @source_search_directories: (element-type utf8): List of directories to search for
4340 * @err: Error propagation and reporting.
4342 * Load a program in the debugger.
4344 * Returns: TRUE if sucessful, other FALSE.
4346 gboolean load
(const gchar
*file
, const gchar
*mime_type
, const List
<const gchar
*> source_search_directories
);
4349 * ianjuta_debugger_attach:
4351 * @pid: pid of the process to debug
4352 * @source_search_directories: (element-type utf8): List of directories to search for
4354 * @err: Error propagation and reporting.
4356 * Attach to an already running process.
4358 * Returns: TRUE if sucessful, other FALSE.
4360 gboolean attach
(pid_t pid
, const List
<const gchar
*> source_search_directories
);
4363 * ianjuta_debugger_set_working_directory:
4365 * @dir: working program directory
4366 * @err: Error propagation and reporting.
4368 * Set program working directory.
4370 * Returns: TRUE if sucessful, other FALSE.
4372 gboolean set_working_directory
(const gchar
*dir
);
4375 * ianjuta_debugger_set_environment:
4377 * @env: List environment variable
4378 * @err: Error propagation and reporting
4380 * Set environment variable
4382 * Returns: TRUE if sucessfull, other FALSE.
4384 gboolean set_environment
(gchar
**env
);
4387 * ianjuta_debugger_start:
4389 * @args: command line argument of the program
4390 * @terminal: TRUE if the program need a terminal
4391 * @stop: TRUE if program is stopped at the beginning
4392 * @err: Error propagation and reporting.
4394 * Start a loaded program under debugger control.
4396 * Returns: TRUE if sucessful, other FALSE.
4398 gboolean start
(const gchar
*args
, gboolean terminal
, gboolean stop
);
4401 * ianjuta_debugger_connect:
4403 * @server: remote server
4404 * @args: command line argument of the program
4405 * @terminal: TRUE if the program need a terminal
4406 * @stop: TRUE if program is stopped at the beginning
4407 * @err: Error propagation and reporting
4409 * Connect to a remote debugger and run program
4411 * Returns: TRUE if sucessfull, otherwise FALSE.
4413 gboolean connect
(const gchar
*server
, const gchar
*args
, gboolean terminal
, gboolean stop
);
4416 * ianjuta_debugger_unload:
4418 * @err: Error propagation and reporting.
4422 * Returns: TRUE if sucessfull, otherwise FALSE.
4427 * ianjuta_debugger_quit:
4429 * @err: Error propagation and reporting.
4431 * Quit the debugger, can wait until the debugger is ready.
4433 * Returns: TRUE if sucessful, other FALSE.
4438 * ianjuta_debugger_abort:
4440 * @err: Error propagation and reporting.
4442 * Quit the debugger as fast as possible.
4444 * Returns: TRUE if sucessful, otherwise FALSE.
4449 * ianjuta_debugger_run:
4451 * @err: Error propagation and reporting.
4453 * Run the program currently loaded.
4455 * Returns: TRUE if sucessful, otherwise FALSE.
4460 * ianjuta_debugger_step_in:
4462 * @err: Error propagation and reporting.
4464 * Execute a single C instruction of the program currently loaded.
4466 * Returns: TRUE if sucessful, otherwise FALSE.
4468 gboolean step_in
();
4471 * ianjuta_debugger_step_over:
4473 * @err: Error propagation and reporting.
4475 * Execute one C instruction, without entering in procedure, of
4476 * the program currently loaded.
4478 * Returns: TRUE if sucessful, otherwise FALSE.
4480 gboolean step_over
();
4483 * ianjuta_debugger_step_out:
4485 * @err: Error propagation and reporting.
4487 * Execute the currently loaded program until it goes out of the
4488 * current procedure.
4490 * Returns: TRUE if sucessful, otherwise FALSE.
4492 gboolean step_out
();
4495 * ianjuta_debugger_run_to:
4497 * @file: target file name
4498 * @line: target line in file
4499 * @err: Error propagation and reporting.
4501 * Execute the currently loaded program until it reachs the target
4504 * Returns: TRUE if sucessful, otherwise FALSE.
4506 gboolean run_to
(const gchar
* file
, gint line
);
4509 * ianjuta_debugger_run_from:
4511 * @file: target file name
4512 * @line: target line in file
4513 * @err: Error propagation and reporting.
4515 * Execute the program from a new position.
4516 * This function is optional.
4518 * Returns: TRUE if sucessful, otherwise FALSE.
4520 gboolean run_from
(const gchar
*file
, gint line
);
4523 * ianjuta_debugger_exit:
4525 * @err: Error propagation and reporting.
4527 * Exit from the currently loaded program.
4529 * Returns: TRUE if sucessful, otherwise FALSE.
4534 * ianjuta_debugger_interrupt:
4536 * @err: Error propagation and reporting.
4538 * Interrupt the program currently running.
4540 * Returns: TRUE if sucessful, otherwise FALSE.
4542 gboolean interrupt
();
4547 * ianjuta_debugger_inspect:
4549 * @name: variable name
4550 * @callback: Callback to call with variable value
4551 * @user_data: User data that is passed back to the callback
4552 * @err: Error propagation and reporting.
4554 * Get back the value of the named variable.
4556 * Returns: TRUE if sucessful, otherwise FALSE.
4558 gboolean inspect
(const gchar
* name
, GCharCallback
callback, gpointer user_data
);
4561 * ianjuta_debugger_evaluate:
4563 * @name: variable name
4564 * @value: new variable value
4565 * @callback: Callback to call when the variable has been modified
4566 * @user_data: User data that is passed back to the callback
4567 * @err: Error propagation and reporting.
4569 * Change the value of a variable in the current program.
4571 * Returns: TRUE if sucessful, otherwise FALSE.
4573 gboolean evaluate
(const gchar
* name
, const gchar
* value
, GCharCallback
callback, gpointer user_data
);
4576 * ianjuta_debugger_print:
4578 * @name: variable name
4579 * @callback: Callback to call with variable value
4580 * @user_data: User data that is passed back to the callback
4581 * @err: Error propagation and reporting.
4583 * Display value of a variable, like inspect.
4585 * Returns: TRUE if sucessful, otherwise FALSE.
4587 gboolean print
(const gchar
*name
, GCharCallback
callback, gpointer user_data
);
4590 * ianjuta_debugger_list_local:
4592 * @callback: Callback to call with list of local variable
4593 * @user_data: User data that is passed back to the callback
4594 * @err: Error propagation and reporting.
4596 * Get the list of local variables
4598 * Returns: TRUE if sucessful, otherwise FALSE.
4600 gboolean list_local
(GListCallback
callback, gpointer user_data
);
4603 * ianjuta_debugger_list_argument:
4605 * @callback: Callback to call with list of arguments
4606 * @user_data: User data that is passed back to the callback
4607 * @err: Error propagation and reporting.
4609 * Get the list of arguments
4611 * Returns: TRUE if sucessful, otherwise FALSE.
4613 gboolean list_argument
(GListCallback
callback, gpointer user_data
);
4616 * ianjuta_debugger_info_signal:
4618 * @callback: Callback to call with list of arguments
4619 * @user_data: User data that is passed back to the callback
4620 * @err: Error propagation and reporting.
4622 * Get some informatin about a signal
4624 * Returns: TRUE if sucessful, otherwise FALSE.
4626 gboolean info_signal
(GListCallback
callback, gpointer user_data
);
4629 * ianjuta_debugger_info_sharedlib:
4631 * @callback: Callback to call with list of arguments
4632 * @user_data: User data that is passed back to the callback
4633 * @err: Error propagation and reporting.
4635 * Get information about shared libraries.
4637 * Returns: TRUE if sucessful, otherwise FALSE.
4639 gboolean info_sharedlib
(GListCallback
callback, gpointer user_data
);
4642 * ianjuta_debugger_handle_signal:
4644 * @name: signal name
4645 * @stop: TRUE if we need to stop signal
4646 * @print: TRUE if we display a message when the signal is emitted
4647 * @ignore: TRUE if we ignore the signal
4648 * @err: Error propagation and reporting.
4650 * It defines how to handle signal received by the program.
4652 * Returns: TRUE if sucessful, otherwise FALSE.
4654 gboolean handle_signal
(const gchar
*name
, gboolean stop
, gboolean print
, gboolean
ignore);
4657 * ianjuta_debugger_info_frame:
4659 * @frame: frame number, the top frame has the number 0
4660 * @callback: Callback to call getting a list of strings with all information
4661 * @user_data: User data that is passed back to the callback
4662 * @err: Error propagation and reporting.
4664 * Get some information about the one stack frame.
4665 * This function has been deprecated and is not used anymore in the
4668 * Returns: TRUE if sucessful, otherwise FALSE.
4670 gboolean info_frame
(guint frame
, GListCallback
callback, gpointer user_data
);
4673 * ianjuta_debugger_info_args:
4675 * @callback: Callback to call getting a list of strings with all information
4676 * @user_data: User data that is passed back to the callback
4677 * @err: Error propagation and reporting.
4679 * Get some informatin about a current functin arguments.
4680 * This function has been deprecated and is not used anymore in the
4683 * Returns: TRUE if sucessful, otherwise FALSE.
4685 gboolean info_args
(GListCallback
callback, gpointer user_data
);
4688 * ianjuta_debugger_info_target:
4690 * @callback: Callback to call getting a list of strings with all information
4691 * @user_data: User data that is passed back to the callback
4692 * @err: Error propagation and reporting.
4694 * Get back some information about the target
4695 * This function has been deprecated and is not used anymore in the
4698 * Returns: TRUE if sucessful, otherwise FALSE.
4700 gboolean info_target
(GListCallback
callback, gpointer user_data
);
4703 * ianjuta_debugger_info_program:
4705 * @callback: Callback to call getting a list of strings with all information
4706 * @user_data: User data that is passed back to the callback
4707 * @err: Error propagation and reporting.
4709 * Get some informatin about a current program.
4710 * This function has been deprecated and is not used anymore in the
4713 * Returns: TRUE if sucessful, otherwise FALSE.
4715 gboolean info_program
(GListCallback
callback, gpointer user_data
);
4718 * ianjuta_debugger_info_udot:
4720 * @callback: Callback to call getting a list of strings with all information
4721 * @user_data: User data that is passed back to the callback
4722 * @err: Error propagation and reporting.
4724 * Get some informatin about OS structures.
4725 * This function has been deprecated and is not used anymore in the
4728 * Returns: TRUE if sucessful, otherwise FALSE.
4730 gboolean info_udot
(GListCallback
callback, gpointer user_data
);
4734 * ianjuta_debugger_info_variables:
4736 * @callback: Callback to call getting a list of strings with all information
4737 * @user_data: User data that is passed back to the callback
4738 * @err: Error propagation and reporting.
4740 * Get some informatin about variables.
4741 * This function has been deprecated and is not used anymore in the
4744 * Returns: TRUE if sucessful, otherwise FALSE.
4746 gboolean info_variables
(GListCallback
callback, gpointer user_data
);
4749 * ianjuta_debugger_list_frame:
4751 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame
4752 * @user_data: User data that is passed back to the callback
4753 * @err: Error propagation and reporting.
4755 * Get the list of frames.
4757 * Returns: TRUE if sucessful, otherwise FALSE.
4759 gboolean list_frame
(GListCallback
callback, gpointer user_data
);
4762 * ianjuta_debugger_set_frame:
4764 * @frame: frame number
4765 * @err: Error propagation and reporting.
4767 * Set the current frame.
4769 * Returns: TRUE if sucessful, otherwise FALSE.
4771 gboolean set_frame
(guint frame
);
4774 * ianjuta_debugger_list_thread:
4776 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame for each thread
4777 * @user_data: User data that is passed back to the callback
4778 * @err: Error propagation and reporting.
4780 * Get the list of threads.
4782 * Returns: TRUE if sucessful, otherwise FALSE.
4784 gboolean list_thread
(GListCallback
callback, gpointer user_data
);
4787 * ianjuta_debugger_set_thread:
4789 * @thread: thread number
4790 * @err: Error propagation and reporting.
4792 * Set the current thread.
4794 * Returns: TRUE if sucessful, otherwise FALSE.
4796 gboolean set_thread
(gint thread
);
4799 * ianjuta_debugger_info_thread:
4801 * @thread: thread number
4802 * @callback: Callback to call getting a list of strings with all information
4803 * @user_data: User data that is passed back to the callback
4804 * @err: Error propagation and reporting.
4806 * Get some information about current threads.
4808 * Returns: TRUE if sucessful, otherwise FALSE.
4810 gboolean info_thread
(gint thread
, GListCallback
callback, gpointer user_data
);
4813 * ianjuta_debugger_send_command:
4816 * @err: Error propagation and reporting.
4818 * Send a command directly to the debugger. Warning, changing the
4819 * debugger states, by sending a run command by example, will
4820 * probably gives some troubles in the debug manager.
4822 * Returns: TRUE if sucessful, otherwise FALSE.
4824 gboolean send_command
(const gchar
*command
);
4827 * ianjuta_debugger_callback:
4829 * @callback: Callback to call. the data argument is NULL.
4830 * @user_data: User data that is passed back to the callback
4831 * @err: Error propagation and reporting.
4833 * All commands are executed asynchronously and give back information
4834 * with callbacks. It is difficult to know when a command is really
4835 * executed. But as all commands are executed in order, you can use
4836 * this command to get a call back when all previous commands have
4839 * Returns: TRUE if sucessful, otherwise FALSE.
4841 gboolean
callback (Callback callback, gpointer user_data
);
4844 * ianjuta_debugger_enable_log:
4846 * @log: MessageView used by log
4847 * @err: Error propagation and reporting.
4849 * Log all debuggers commands, mainly useful for debugging.
4851 void enable_log
(IAnjutaMessageView
*log
);
4854 * ianjuta_debugger_disable_log:
4856 * @err: Error propagation and reporting.
4858 * Disable debugger log.
4860 void disable_log
();
4863 * ianjuta_debugger_dump_stack_trace:
4865 * @callback: Callback to call getting a list of strings
4866 * @user_data: User data that is passed back to the callback
4867 * @err: Error propagation and reporting.
4869 * Return a stack trace valid for a bug reports.
4870 * This function is optional.
4872 * Returns: TRUE if sucessful, otherwise FALSE.
4874 gboolean dump_stack_trace
(GListCallback
callback, gpointer user_data
);
4877 * SECTION:ianjuta-debugger-breakpoint
4878 * @title: IAnjutaDebuggerBreakpoint
4879 * @short_description: Breakpoint Debugger interface
4881 * @stability: Unstable
4882 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
4885 interface IAnjutaDebuggerBreakpoint
4889 * IAnjutaDebuggerBreakpointType:
4890 * @IANJUTA_DEBUGGER_BREAKPOINT_REMOVED: Set for removed breakpoint
4891 * @IANJUTA_DEBUGGER_BREAKPOINT_UPDATED: Set for changed breakpoint
4892 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE: Set on source line
4893 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS: Set on an addresse
4894 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION: Set on a function name
4895 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_READ: Set on read access
4896 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE: Set on write access
4897 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE: Has enable information
4898 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE: Has ignore information,
4899 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME: Has counter information
4900 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION: Has a condition
4901 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY: Temporary breakpoint, automatically removed when triggered
4902 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_PENDING: Pending breakpoint
4904 * This enumeration defined various characteristics of the breakpoint.
4911 ON_ADDRESS
= 1 << 2,
4912 ON_FUNCTION
= 1 << 3,
4915 WITH_ENABLE
= 1 << 16,
4916 WITH_IGNORE
= 1 << 15,
4917 WITH_TIME
= 1 << 11,
4918 WITH_CONDITION
= 1 << 12,
4919 WITH_TEMPORARY
= 1 << 13,
4920 WITH_PENDING
= 1 << 14,
4924 * IAnjutaDebuggerBreakpointItem:
4925 * @type: type see #IAnjutaBreakpointType enumeration
4926 * @id: unique identifier
4927 * @file: source file where is the breakpoint
4928 * @line: corresponding source file line number
4929 * @function: corresponding function name
4930 * @address: corresponding address
4931 * @enable: TRUE if the breakpoint is enabled
4932 * @ignore: TRUE if the breakpoint is ignored
4933 * @times: Count how many time the breakpoint is triggered
4934 * @condition: Additional condition for triggering the breakpoint
4935 * @temporary: TRUE if the breakpoint is temporary
4936 * @pending: TRUE if the breakpoint is pending
4938 * This structure keeps all information about a breakpoint.
4957 * IAnjutaDebuggerBreakpointMethod:
4958 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS: Allow to set breakpoint on address
4959 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION: Allow to set breakpoint on function name
4960 * @IANJUTA_DEBUGGER_BREAKPOINT_ENABLE: Allow to disable breakpoint
4961 * @IANJUTA_DEBUGGER_BREAKPOINT_IGNORE: Allow to ignore breakpoint
4962 * @IANJUTA_DEBUGGER_BREAKPOINT_CONDITION: Allow to add a condition on breakpoint
4964 * Defines which breakpoint characteristics are supported by the debugger
4969 SET_AT_ADDRESS
= 1 << 0,
4970 SET_AT_FUNCTION
= 1 << 1,
4977 * IAnjutaDebuggerBreakpointCallback:
4978 * @data: a #IAnjutaBreakpointItem object
4979 * @user_data: user data passed to the function
4982 * This callback function is used to return a #IAnjutaBreakpointItem.
4984 typedef void (*Callback) (const Item
*data
, gpointer user_data
, GError
* err
);
4987 * ianjuta_debugger_breakpoint_implement_breakpoint:
4989 * @err: Error propagation and reporting.
4991 * Return all implemented methods.
4993 * Returns: A OR of #IAnjutaDebuggerBreakpointMethod
4994 * corresponding to all implemented optional methods.
4996 gint implement_breakpoint
();
4999 * ianjuta_debugger_breakpoint_set_breakpoint_at_line:
5001 * @file: File containing the breakpoint
5002 * @line: Line number where is the breakpoint
5003 * @callback: Callback to call when the breakpoint has been set
5004 * @user_data: User data that is passed back to the callback
5005 * @err: Error propagation and reporting.
5007 * Set a breakpoint at the specified line in the file.
5009 * Returns: TRUE if the request succeed and the callback is called. If
5010 * FALSE, the callback will not be called.
5012 gboolean set_breakpoint_at_line
(const gchar
* file
, guint line
, Callback callback, gpointer user_data
);
5016 * ianjuta_debugger_breakpoint_set_breakpoint_at_address:
5018 * @address: Address of the breakpoint
5019 * @callback: Callback to call when the breakpoint has been set
5020 * @user_data: User data that is passed back to the callback
5021 * @err: Error propagation and reporting.
5023 * Set a breakpoint at the specified address.
5024 * This function is optional.
5026 * Returns: TRUE if the request succeed and the callback is called. If
5027 * FALSE, the callback will not be called.
5029 gboolean set_breakpoint_at_address
(gulong address
, Callback callback, gpointer user_data
);
5032 * ianjuta_debugger_breakpoint_set_breakpoint_at_function:
5034 * @file: File containing the breakpoint
5035 * @function: Function name where the breakpoint is put
5036 * @callback: Callback to call when the breakpoint has been set
5037 * @user_data: User data that is passed back to the callback
5038 * @err: Error propagation and reporting.
5040 * Set a breakpoint at the beginning of the specified function.
5041 * This function is optional.
5043 * Returns: TRUE if the request succeed and the callback is called. If
5044 * FALSE, the callback will not be called.
5046 gboolean set_breakpoint_at_function
(const gchar
* file
, const gchar
* function
, Callback callback, gpointer user_data
);
5049 * ianjuta_debugger_breakpoint_clear_breakpoint:
5051 * @id: Breakpoint identification number
5052 * @callback: Callback to call when the breakpoint has been cleared
5053 * @user_data: User data that is passed back to the callback
5054 * @err: Error propagation and reporting.
5056 * Clear a breakpoint put by any set functions. The Id of the breakpoint
5057 * is given in the callback of the set functions.
5059 * Returns: TRUE if the request succeed and the callback is called. If
5060 * FALSE, the callback will not be called.
5062 gboolean clear_breakpoint
(guint
id, Callback callback, gpointer user_data
);
5065 * ianjuta_debugger_breakpoint_list_breakpoint:
5067 * @callback: Callback to call with the list of #IAnjutaDebuggreBreakpointItem
5068 * @user_data: User data that is passed back to the callback
5069 * @err: Error propagation and reporting.
5071 * List all breakpoints set in the debugger. It is useful to
5072 * know how many time a breakpoint has been hit.
5074 * Returns: TRUE if the request succeed and the callback is called. If
5075 * FALSE, the callback will not be called.
5077 gboolean list_breakpoint
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5080 * ianjuta_debugger_breakpoint_enable_breakpoint:
5082 * @id: Breakpoint identification number
5083 * @enable: TRUE to enable the breakpoint, FALSE to disable it
5084 * @callback: Callback to call when the breakpoint has been changed
5085 * @user_data: User data that is passed back to the callback
5086 * @err: Error propagation and reporting.
5088 * Enable of disable a breakpoint. This function is optional.
5090 * Returns: TRUE if the request succeed and the callback is called. If
5091 * FALSE, the callback will not be called.
5093 gboolean enable_breakpoint
(guint
id, gboolean enable
, Callback callback, gpointer user_data
);
5096 * ianjuta_debugger_breakpoint_ignore_breakpoint:
5098 * @id: Breakpoint identification number
5099 * @ignore: Number of time a breakpoint must be ignored
5100 * @callback: Callback to call when the breakpoint has been changed
5101 * @user_data: User data that is passed back to the callback
5102 * @err: Error propagation and reporting.
5104 * This allow to ignore the breakpoint a number of time before stopping.
5105 * This function is optional.
5107 * Returns: TRUE if the request succeed and the callback is called. If
5108 * FALSE, the callback will not be called.
5110 gboolean ignore_breakpoint
(guint
id, guint
ignore, Callback callback, gpointer user_data
);
5113 * ianjuta_debugger_breakpoint_condition_breakpoint:
5115 * @id: Breakpoint identification number
5116 * @condition: expression that has to be true
5117 * @callback: Callback to call when the breakpoint has been changed
5118 * @user_data: User data that is passed back to the callback
5119 * @err: Error propagation and reporting.
5121 * Add a condition, evaluate in the program context, on the breakpoint,
5122 * the program will stop when it reachs the breakpoint only if the
5123 * condition is true. This function is optional.
5125 * Returns: TRUE if the request succeed and the callback is called. If
5126 * FALSE, the callback will not be called.
5128 gboolean condition_breakpoint
(guint
id, const gchar
* condition
, Callback callback, gpointer user_data
);
5132 * SECTION:ianjuta-debugger-variable
5133 * @title: IAnjutaDebuggerVariable
5134 * @short_description: Variables interface for debuggers
5136 * @stability: Unstable
5137 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
5139 * This interface is used to examine and change values of expression.
5140 * It is based on the MI2 variable object interface of gdb. A
5141 * variable needs to be created before being able to get or set its
5142 * value and list its children.
5144 interface IAnjutaDebuggerVariable
5147 * IAnjutaDebuggerVariableObject:
5148 * @name: unique variable object name created by backend
5149 * @expression: corresponding variable name or expression
5150 * @type: variable type
5151 * @value: variable value
5152 * @changed: TRUE if the variable has changed
5153 * @exited: TRUE if the variable is outside current scope
5154 * @deleted: TRUE if the variable has been removed
5155 * @children: Number of variable children, -1 if unknown
5156 * @has_more: TRUE if the children value is wrong
5158 * Defines a variable object.
5174 * IAnjutaDebuggerVariableCallback:
5175 * @data: a #IAnjutaDebuggerVariableObject object
5176 * @user_data: user data passed to the function
5179 * This callback function is used to return a #IAnjutaDebuggerVariableObject.
5181 typedef void (*Callback) (const Object *data
, gpointer user_data
, GError
* err
);
5184 * ianjuta_debugger_variable_create:
5186 * @expression: Variable expression
5187 * @callback: Callback to call when the variable has been created
5188 * @user_data: User data that is passed back to the callback
5189 * @err: Error propagation and reporting.
5191 * Create a new variable object in the current thread and frame.
5193 * Returns: TRUE if the request succeed and the callback is
5194 * called. If FALSE, the callback will not be called.
5196 gboolean create
(const gchar
*expression
, Callback callback, gpointer user_data
);
5199 * ianjuta_debugger_variable_list_children:
5201 * @name: Variable name
5202 * @from: Starting from this children (zero-based)
5203 * @callback: Callback to call when the children have been
5204 * created with a list of variable objects
5205 * @user_data: User data that is passed back to the callback
5206 * @err: Error propagation and reporting.
5208 * List and create objects for variable object's children.
5209 * The backend can returns only a part of the children, in
5210 * this case a last variable with a NULL name is added to
5211 * the list given to the callback function.
5212 * If the remaining children are wanted, this
5213 * function must be called again with a from argument
5214 * corresponding to the first missing children.
5216 * Returns: TRUE if the request succeed and the callback is
5217 * called. If FALSE, the callback will not be called.
5219 gboolean list_children
(const gchar
*name
, guint from
, IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5222 * ianjuta_debugger_variable_evaluate:
5224 * @name: Variable name
5225 * @callback: Callback to call with the variable value
5226 * @user_data: User data that is passed back to the callback
5227 * @err: Error propagation and reporting.
5229 * Get the value of one variable or child object.
5231 * Returns: TRUE if the request succeed and the callback is
5232 * called. If FALSE, the callback will not be called.
5234 gboolean evaluate
(const gchar
*name
, IAnjutaDebuggerGCharCallback
callback, gpointer user_data
);
5237 * ianjuta_debugger_variable_assign:
5239 * @name: Variable name
5240 * @value: Variable value
5241 * @err: Error propagation and reporting.
5243 * Set the value of one variable or child object.
5245 * Returns: TRUE if the request succeed and the callback is
5246 * called. If FALSE, the callback will not be called.
5248 gboolean assign
(const gchar
*name
, const gchar
*value
);
5251 * ianjuta_debugger_variable_update:
5253 * @callback: Callback to call with the list of all changed
5255 * @user_data: User data that is passed back to the callback
5256 * @err: Error propagation and reporting.
5258 * List all changed variable objects since the last call.
5260 * Returns: TRUE if the request succeed and the callback is
5261 * called. If FALSE, the callback will not be called.
5263 gboolean update
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5266 * ianjuta_debugger_variable_destroy:
5268 * @name: Variable name
5269 * @err: Error propagation and reporting.
5271 * Delete a previously created variable or child object
5272 * including its own children.
5274 * Returns: TRUE if the request succeed and the callback is
5275 * called. If FALSE, the callback will not be called.
5277 gboolean destroy
(const gchar
*name
);
5281 * SECTION:ianjuta-debugger-register
5282 * @title: IAnjutaDebuggerRegister
5283 * @short_description: Register interface for debuggers
5285 * @stability: Unstable
5286 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
5288 * This interface is used to examine and change values of CPU registers.
5290 interface IAnjutaDebuggerRegister
5294 * IAnjutaDebuggerRegisterData:
5295 * @num: register identifier
5296 * @name: register name
5297 * @value: register value
5299 * Defines a register data.
5309 * ianjuta_debugger_register_list_register:
5311 * @callback: Callback to call with the #IAnjutaDebuggerRegisterData list
5312 * @user_data: User data that is passed back to the callback
5313 * @err: Error propagation and reporting.
5315 * List all registers of the target. This function can be called without
5316 * a program loaded, the value field of register structure is not filled.
5318 * Returns: TRUE if the request succeed and the callback is
5319 * called. If FALSE, the callback will not be called.
5321 gboolean list_register
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5324 * ianjuta_debugger_register_update_register:
5326 * @callback: Callback call with the list of all modified #IAnjutaDebuggerRegisterData
5327 * @user_data: User data that is passed back to the callback
5328 * @err: Error propagation and reporting.
5330 * Return all modified registers since the last call. Only the num and
5331 * value field are used.
5333 * Returns: TRUE if the request succeed and the callback is
5334 * called. If FALSE, the callback will not be called.
5336 gboolean update_register
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5339 * ianjuta_debugger_register_write_register:
5341 * @value: Modified register with a new value
5342 * @err: Error propagation and reporting.
5344 * Change the value of one register. Only the num and value field are used.
5346 * Returns: TRUE if the request succeed.
5348 gboolean write_register
(Data
*value
);
5352 * SECTION:ianjuta-debugger-memory
5353 * @title: IAnjutaDebuggerMemory
5354 * @short_description: Memory interface for debuggers
5356 * @stability: Unstable
5357 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
5359 * This interface is used to examine the target memory.
5361 interface IAnjutaDebuggerMemory
5364 * IAnjutaDebuggerRegisterMemoryBlock:
5365 * @address: start address of memory block
5366 * @length: size of memory block
5367 * @data: memory block data
5369 * Represent a block of memory.
5379 * IAnjutaDebuggerMemoryCallback:
5380 * @data: a #IAnjutaDebuggerMemoryBlock object
5381 * @user_data: user data passed to the function
5384 * This callback function is used to return a #IAnjutaDebuggerMemoryBlock.
5386 typedef void (*Callback) (const Block
*data
, gpointer user_data
, GError
* err
);
5389 * ianjuta_debugger_memory_inspect:
5391 * @address: Start address of the memory block
5392 * @length: Length of memory block
5393 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
5394 * @user_data: User data that is passed back to the callback
5395 * @err: Error propagation and reporting.
5397 * Read a block of the target memory.
5399 * Returns: TRUE if the request succeed and the callback is
5400 * called. If FALSE, the callback will not be called.
5402 gboolean inspect
(gulong address
, guint length
, Callback callback, gpointer user_data
);
5406 * SECTION:ianjuta-debugger-instruction
5407 * @title: IAnjutaDebuggerInstruction
5408 * @short_description: Debugger interface for machine instruction
5410 * @stability: Unstable
5411 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
5413 * This interface is used to debuger as machine instruction level.
5415 interface IAnjutaDebuggerInstruction
5419 * IAnjutaDebuggerInstructionALine:
5420 * @address: Address of the line
5421 * @label: Optional label
5422 * @text: Diassembled instruction on the line
5424 * Defines a disassembled line
5434 * IAnjutaDebuggerInstructionDisassembly:
5435 * @size: Number of line
5436 * @data: Array of all lines
5438 * Represents a block of diassembled instructions
5447 * IAnjutaDebuggerInstructionCallback:
5448 * @data: a #IAnjutaDebuggerInstructionDisassembly object
5449 * @user_data: user data passed to the function
5452 * This callback function is used to return a #IAnjutaDebuggerInstructionDisassembly.
5454 typedef void (*Callback) (const Disassembly
*data
, gpointer user_data
, GError
* err
);
5457 * ianjuta_debugger_instruction_disassemble:
5459 * @address: Start address of the memory block
5460 * @length: Length of memory block
5461 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
5462 * @user_data: User data that is passed back to the callback
5463 * @err: Error propagation and reporting.
5465 * Disassemble a part of the memory
5467 * Returns: TRUE if the request succeed and the callback is
5468 * called. If FALSE, the callback will not be called.
5470 gboolean disassemble
(gulong address
, guint length
, Callback callback, gpointer user_data
);
5473 * ianjuta_debugger_instruction_step_in_instruction:
5475 * @err: Error propagation and reporting.
5477 * Execute one assembler instruction in the program.
5479 * Returns: TRUE if the request succeed and the callback is called. If
5480 * FALSE, the callback will not be called.
5482 gboolean step_in_instruction
();
5485 * ianjuta_debugger_instruction_step_over_instruction:
5487 * @err: Error propagation and reporting.
5489 * Execute one assembler instruction in the program, if the instruction
5490 * is a function call, continues until the function returns.
5492 * Returns: TRUE if the request succeed and the callback is called. If
5493 * FALSE, the callback will not be called.
5495 gboolean step_over_instruction
();
5498 * ianjuta_debugger_instruction_run_to_address:
5500 * @address: Run to this addresss
5501 * @err: Error propagation and reporting.
5503 * Start the program until it reachs the address address
5505 * Returns: TRUE if the request succeed and the callback is called. If
5506 * FALSE, the callback will not be called.
5508 gboolean run_to_address
(gulong address
);
5511 * ianjuta_debugger_instruction_run_from_address:
5513 * @address: Run from this addresss
5514 * @err: Error propagation and reporting.
5516 * Restart the program starting from address address
5518 * Returns: TRUE if the request succeed and the callback is called. If
5519 * FALSE, the callback will not be called.
5521 gboolean run_from_address
(gulong address
);
5527 * SECTION:ianjuta-debug-manager
5528 * @title: IAnjutaDebugManager
5529 * @short_description: Common graphical interface to all debugger
5531 * @stability: Unstable
5532 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
5534 * This interface wrap the real debugger plugin and provide a
5535 * common graphical user interface.
5538 interface IAnjutaDebugManager
5540 #include
"ianjuta-debugger.h"
5541 #include
"ianjuta-debugger-breakpoint.h"
5542 #include
<gio
/gio.h
>
5547 * IAnjutaDebugManager::debugger_started:
5550 * This signal is emitted when the debugger is started.
5552 void ::debugger_started
();
5555 * IAnjutaDebugManager::debugger_stopped:
5557 * @err: Error propagation and reporting.
5559 * This signal is emitted when the debugger is stopped.
5561 void ::debugger_stopped
(GError
*err
);
5564 * IAnjutaDebugManager::program_loaded:
5567 * This signal is emitted when a program is loaded most of the
5568 * time just before the first program_stopped signal.
5570 void ::program_loaded
();
5573 * IAnjutaDebugManager::program_unloaded:
5576 * This signal is emitted when a program is unloaded. If the
5577 * debugger is stopped while a program is loaded, this signal
5578 * is emitted before the debugger_stopped signal.
5580 void ::program_unloaded
();
5583 * IAnjutaDebugManager::program_started:
5586 * This signal is emitted when the program is started. If the
5587 * program starts and is stopped by the debugger, a program-stopped
5588 * signal will be emitted too. If the program starts is not stopped
5589 * by the debugger a program-running signal will be emitted.
5591 void ::program_started
();
5594 * IAnjutaDebugManager::program_exited:
5597 * This signal is emitted when the program is unloaded. If the
5598 * debugger is stopped while a program is running or stopped, this
5599 * signal is emitted before the program_unloaded signal.
5601 void ::program_exited
();
5604 * IAnjutaDebugManager::program_stopped:
5607 * This signal is emitted when the program is stopped.
5609 void ::program_stopped
();
5612 * IAnjutaDebugManager::program_running:
5615 * This signal is emitted when the program is running.
5617 void ::program_running
();
5621 * IAnjutaDebugManager::sharedlib_event:
5624 * This signal is emitted when a new shared library is loaded. It
5625 * is useful to try to set pending breakpoints those could be in
5626 * the newly loaded library.
5628 void ::sharedlib_event
();
5631 * IAnjutaDebugManager::program_moved:
5633 * @pid: process id, 0 when unknown
5634 * @tid: thread id, 0 when unknown
5635 * @address: program counter address, 0 when unknown
5636 * @file: source file where is the program counter, NULL when unknown
5637 * @line: line number if file name above is not NULL
5639 * This signal is emitted when the debugger know the current program
5640 * location. Most of the time, after the program has stopped but it
5641 * could happen even if it is still running.
5643 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
5646 * IAnjutaDebugManager::frame_changed:
5651 * This signal is emitted when the current frame is changed. It is
5652 * equal to the top frame in the interrupted thread when the
5653 * program stops but can be changed afterward by the user.
5654 * Several commands use this current frame, by example the register
5655 * window display the register values for the current thread only.
5657 void ::frame_changed
(guint frame
, gint thread
);
5660 * IAnjutaDebugManager::location_changed:
5662 * @address: program counter address, 0 when unknown
5663 * @uri: source file where is the program counter, NULL when unknown
5664 * @line: line number if file name above is not NULL
5666 * This signal is emitted when the current location is changed. It is
5667 * equal to the program location when the program stops but can be
5668 * changed afterward by the user.
5670 void ::location_changed
(gulong address
, const gchar
* uri
, guint line
);
5673 * IAnjutaDebugManager::signal_received:
5675 * @name: Signal name
5676 * @description: Signal description
5678 * This signal is emitted when the debugged program receives a
5681 void ::signal_received
(const gchar
* name
, const gchar
* description
);
5684 * IAnjutaDebugManager::breakpoint_changed:
5686 * @breakpoint: Breakpoint
5687 * @err: Error propagation and reporting.
5689 * This signal is emitted when a breakpoint is changed. It includes
5690 * new breakpoint and deleted breakpoint.
5692 void ::breakpoint_changed
(IAnjutaDebuggerBreakpointItem
*breakpoint
);
5695 * ianjuta_debug_manager_start:
5697 * @uri: uri of the target
5698 * @err: Error propagation and reporting.
5700 * Start the debugger of the given uri
5702 * Returns: TRUE if sucessful, other FALSE.
5704 gboolean start
(const gchar
*uri
);
5707 * ianjuta_debug_manager_start_remote:
5709 * @server: server (IP address:port)
5710 * @uri: uri of the local target
5711 * @err: Error propagation and reporting.
5713 * Start the debugger of the given uri
5715 * Returns: TRUE if sucessful, other FALSE.
5717 gboolean start_remote
(const gchar
*server
, const gchar
*uri
);
5720 * ianjuta_debug_manager_quit:
5722 * @err: Error propagation and reporting.
5724 * Quit the debugger, can wait until the debugger is ready.
5726 * Returns: TRUE if sucessful, other FALSE.
5732 * SECTION:ianjuta-vcs
5733 * @title: IAnjutaVcs
5734 * @short_description: Version control system interface
5736 * @stability: Unstable
5737 * @include: libanjuta/interfaces/ianjuta-vcs.h
5740 interface IAnjutaVcs
5742 #include
<gio
/gio.h
>
5743 #include
<libanjuta
/anjuta
-vcs
-status.h
>
5744 #include
<libanjuta
/anjuta
-async
-notify.h
>
5748 * @IANJUTA_VCS_UNKNOWN_ERROR: Unkown error
5750 * These enumeration is used to specify errors.
5761 * 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
5762 * fold- unfold the tree.
5764 void ::status_changed
();
5769 * @files: (element-type GFile): List of List of files, represented as #Gfile objects, to add
5770 * @notify: #AnjutaAsyncNotify object for finish notification and error
5773 * Add files to the VCS repository.
5775 void add
(List
<GFile
*> files
, AnjutaAsyncNotify
*notify
);
5778 * ianjuta_vcs_remove:
5780 * @files: (element-type GFile): List of files, represented as #Gfile objects, to remove
5781 * @notify: #AnjutaAsyncNotify object for finish notification and error
5784 * Remove files from the VCS repository.
5786 void remove
(List
<GFile
*> files
, AnjutaAsyncNotify
*notify
);
5789 * ianjuta_vcs_checkout:
5791 * @repository_location: Location of repository to check out
5792 * @dest: Destination of checked out copy
5793 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5794 * @notify: #AnjutaAsyncNotify object for finish notification and error
5797 * Check out a copy of a code repository.
5799 void checkout
(const gchar
*repository_location
, GFile
*dest
, GCancellable
*cancel
, AnjutaAsyncNotify
*notify
);
5802 * ianjuta_vcs_query_status:
5804 * @file: File/directory to query
5805 * @callback: callback to call when data for a particular file is available
5806 * @user_data: User data passed to callback
5807 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5808 * @notify: #AnjutaAsyncNotify object for finish notification and error
5811 * Querys the status of files in the repository.
5813 void query_status
(GFile
* file
, StatusCallback
callback, gpointer user_data
, GCancellable
* cancel
, AnjutaAsyncNotify
*notify
);
5816 * IAnjutaVcsStatusCallback:
5817 * @file: File representing the file for which status is given
5818 * @status: #AnjutaVcsStatus for the file represented by @file.
5819 * @user_data: User data
5821 * Callback called for each status record returned by
5822 * ianjuta_vcs_query_status.
5824 typedef void (*StatusCallback
) (GFile
* file
, AnjutaVcsStatus status
, gpointer user_data
);
5829 * @file: File to diff
5830 * @callback: Callback to call when diff data becomes available
5831 * @user_data: User data passed to @callback
5832 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5833 * @notify: #AnjutaAsyncNotify object for finish notification and error
5836 * Generates a unified diff of the file represented by @file.
5838 void diff
(GFile
* file
, DiffCallback
callback, gpointer user_data
, GCancellable
* cancel
, AnjutaAsyncNotify
*notify
);
5841 * IAnjutaVcsDiffCallback:
5842 * @file: File being diffed
5844 * @user_data: User data
5846 * Called when diff data comes from ianjuta_vcs_diff.
5848 typedef void (*DiffCallback
) (GFile
* file
, const gchar
* diff
, gpointer user_data
);
5852 * SECTION:ianjuta-snippets-manager
5853 * @title: IAnjutaSnippetsManager
5854 * @short_description: Snippets Manager interface
5856 * @stability: Unstable
5857 * @include: libanjuta/interfaces/ianjuta-macro.h
5860 interface IAnjutaSnippetsManager
5863 * ianjuta_snippets_manager_insert:
5864 * @key: Trigger-key of the snippet
5865 * @editing_session: If after inserting the snippet there should be an editing
5866 * session. Mark as FALSE if not interested in the dynamic capabilities of the
5869 * @err: Error propagation and reporting
5871 * Insert snippet in the current editor.
5873 gboolean insert
(const gchar
* key
, gboolean editing_session
);
5877 * SECTION:ianjuta-symbol
5878 * @title: IAnjutaSymbol
5879 * @short_description: Source code symbol interface
5880 * @see_also: #IAnjutaSymbolQuery, #IAnjutaSymbolManager
5881 * @stability: Unstable
5882 * @include: libanjuta/interfaces/ianjuta-symbol.h
5884 * This interface is used to define a symbol, normally got from symbol
5885 * queries. A symbol has various fields that can be retrieved by using
5886 * their get methods. A symbol will have only those fields which have
5887 * been selected to be included in their respective queries, so make sure
5888 * the needed fields are correctly specified during query creation.
5890 interface IAnjutaSymbol
5892 #include
<gdk
/gdk.h
>
5893 #include
<gio
/gio.h
>
5896 * IAnjutaSymbolType:
5897 * @IANJUTA_SYMBOL_TYPE_NONE: None spedified.
5898 * @IANJUTA_SYMBOL_TYPE_UNDEF: Unknown type.
5899 * @IANJUTA_SYMBOL_TYPE_CLASS: Class declaration
5900 * @IANJUTA_SYMBOL_TYPE_ENUM: Enum declaration
5901 * @IANJUTA_SYMBOL_TYPE_ENUMERATOR: Enumerator value
5902 * @IANJUTA_SYMBOL_TYPE_FIELD: Field (Java only)
5903 * @IANJUTA_SYMBOL_TYPE_FUNCTION: Function definition
5904 * @IANJUTA_SYMBOL_TYPE_INTERFACE: Interface (Java only)
5905 * @IANJUTA_SYMBOL_TYPE_MEMBER: Member variable of class/struct
5906 * @IANJUTA_SYMBOL_TYPE_METHOD: Class method (Java only)
5907 * @IANJUTA_SYMBOL_TYPE_NAMESPACE: Namespace declaration
5908 * @IANJUTA_SYMBOL_TYPE_PACKAGE: Package (Java only)
5909 * @IANJUTA_SYMBOL_TYPE_PROTOTYPE: Function prototype
5910 * @IANJUTA_SYMBOL_TYPE_STRUCT: Struct declaration
5911 * @IANJUTA_SYMBOL_TYPE_TYPEDEF: Typedef
5912 * @IANJUTA_SYMBOL_TYPE_UNION: Union
5913 * @IANJUTA_SYMBOL_TYPE_VARIABLE: Variable
5914 * @IANJUTA_SYMBOL_TYPE_EXTERNVAR: Extern or forward declaration
5915 * @IANJUTA_SYMBOL_TYPE_MACRO: Macro (without arguments)
5916 * @IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG: Parameterized macro
5917 * @IANJUTA_SYMBOL_TYPE_FILE: File (Pseudo tag)
5918 * @IANJUTA_SYMBOL_TYPE_OTHER: Other (non C/C++/Java tag)
5919 * @IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER: types which are subjected to create a scope.
5920 * @IANJUTA_SYMBOL_TYPE_MAX: Maximum value, used as end marker.
5928 TYPE_ENUMERATOR
= 8,
5931 TYPE_INTERFACE
= 64,
5934 TYPE_NAMESPACE
= 512,
5935 TYPE_PACKAGE
= 1024,
5936 TYPE_PROTOTYPE
= 2048,
5938 TYPE_TYPEDEF
= 8192,
5940 TYPE_VARIABLE
= 32768,
5941 TYPE_EXTERNVAR
= 65536,
5942 TYPE_MACRO
= 131072,
5943 TYPE_MACRO_WITH_ARG
= 262144,
5945 TYPE_OTHER
= 1048576,
5946 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
,
5951 * IAnjutaSymbolField:
5952 * @IANJUTA_SYMBOL_FIELD_ID: Integer. A unique ID of the symbol
5953 * @IANJUTA_SYMBOL_FIELD_NAME: String. Name of the symbol
5954 * @IANJUTA_SYMBOL_FIELD_FILE_POS: Integer. The file line number where the symbol is found.
5955 * @IANJUTA_SYMBOL_FIELD_SCOPE_DEF_ID: Integer. A unique ID to define scope created by this symbol.
5956 * @IANJUTA_SYMBOL_FIELD_FILE_SCOPE: Boolean: TRUE if symbol is within file scope,
5958 * @IANJUTA_SYMBOL_FIELD_SIGNATURE: String. Signature of a method, if symbol is a funtion.
5959 * Namely, the arguments list of the funtion.
5960 * @IANJUTA_SYMBOL_FIELD_RETURNTYPE: String. Return type of a method, if symbol is a function.
5961 * @IANJUTA_SYMBOL_FIELD_FILE_PATH: String. The relative path to the file where the symbol is found.
5962 * @IANJUTA_SYMBOL_FIELD_PROJECT_NAME: String. The project name to which the symbol belongs to.
5963 * @IANJUTA_SYMBOL_FIELD_PROJECT_VERSION: String. The project version to which the symbol belongs to.
5964 * @IANJUTA_SYMBOL_FIELD_IMPLEMENTATION: String. Implementation attribute of a symbol. It may be
5965 * "pure virtual", "virtual", etc.
5966 * @IANJUTA_SYMBOL_FIELD_ACCESS: String. Access attribute of a symbol.
5967 * It may be "public", "private" etc.
5968 * @IANJUTA_SYMBOL_FIELD_KIND: Kind attribute of a symbol, such as
5969 * "enumerator", "namespace", "class" etc.
5970 * @IANJUTA_SYMBOL_FIELD_TYPE: Both string and Integer. Type attribute of a symbol.
5971 * In string form, it is name of the type in string form.
5972 * In integer form, it is IAnjutaSymbolType enumerator value.
5973 * @IANJUTA_SYMBOL_FIELD_TYPE_NAME: type_name attribute of a symbol.
5974 * If a type could be "class" then its type_name may be "MyFooClass" etc.
5975 * @IANJUTA_SYMBOL_FIELD_IS_CONTAINER: Boolean. TRUE if symbol is
5976 * a scope container, such as namespace, class, struct etc., otherwise
5978 * @IANJUTA_SYMBOL_FIELD_END: The end marker.
5980 * Symbol Fields. Used to define and retrieve results from query. Each of
5981 * these fields are either integer or string. Use the right method to
5982 * retrieve them. That is, for integer use ianjuta_symbol_get_int(),
5983 * for string use ianjuta_symbol_get_string(), and for boolean use
5984 * ianjuta_symbol_get_boolean(). Some fields can be in both forms,
5985 * e.g. #IANJUTA_SYMBOL_FIELD_TYPE.
6000 FIELD_PROJECT_VERSION
,
6001 FIELD_IMPLEMENTATION
,
6009 * ianjuta_symbol_get_boolean:
6011 * @field: The field to retrieve.
6012 * @err: Error propagation and reporting.
6014 * Retreives the boolean value of a boolean @field.
6016 * Returns: The boolean
6018 gboolean get_boolean
(Field field
);
6021 * ianjuta_symbol_get_int:
6023 * @field: The field to retrieve.
6024 * @err: Error propagation and reporting.
6026 * Retreives the integer value of an integer @field.
6028 * Returns: The integer
6030 gint get_int
(Field field
);
6033 * ianjuta_symbol_get_string:
6035 * @field: The field to retrieve.
6036 * @err: Error propagation and reporting.
6038 * Retreives the string value of a string @field.
6040 * Returns: The string
6042 const gchar
* get_string
(Field field
);
6045 * ianjuta_symbol_get_file:
6047 * @err: Error propagation and reporting.
6049 * A convenience method to get GFile object for
6050 * #IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the
6051 * symbol is declared. It contains the absolute path of the file
6052 * unlike raw value of field #IANJUTA_SYMBOL_FIELD_FILE_PATH.
6054 * Returns: A GFile object. It must be unrefed after use.
6059 * ianjuta_symbol_get_sym_type:
6061 * @err: Error propagation and reporting.
6063 * A convenience method to get value of #IANJUTA_SYMBOL_FIELD_TYPE
6064 * field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
6066 * Returns: a #IAnjutaSymbolType
6068 Type get_sym_type
();
6071 * ianjuta_symbol_get_icon:
6073 * @err: Error propagation and reporting.
6075 * A convenience method to get a small icon (16x16) representing the symbol
6076 * kind. You *need* a query with fields #IANJUTA_SYMBOL_FIELD_ACCESS and
6077 * #IANJUTA_SYMBOL_FIELD_KIND selected.
6079 * Returns: a Pixbuf icon representing the symbol. Ref the icon if you
6082 const GdkPixbuf
*get_icon
();
6086 * SECTION:ianjuta-symbol-query
6087 * @title: IAnjutaSymbolQuery
6088 * @short_description: Source code symbol query interface
6089 * @see_also: #IAnjutaSymbolManager, #IAnjutaSymbol
6090 * @stability: Unstable
6091 * @include: libanjuta/interfaces/ianjuta-symbol-query.h
6093 * A query object will have this interface that allows to tweak various
6094 * query parameters. Except for the #IAnjutaSymbolQueryName and
6095 * #IAnjutaSymbolQueryDb parameters, everything else is changable
6098 * Note that chaning a query parameter, except for limit and offset will
6099 * result in re-preparing the query the next time it is executed, so it is
6100 * not advisable to change it each time the query is executed. For such
6101 * cases, create different queries with different parameters.
6103 * A query is signified by a name enumeration (#IAnjutaSymbolQueryName) which
6104 * practically determines the query type and its execution condition. Each
6105 * query name is assigned to pre-defined query statement and can only be
6106 * set during creation time. Then only its specific ianjuta_symbol_query_search_*()
6107 * can be used to execute the query. These specific execution methods are
6108 * provided to make it convenient to pass query parameters easily and to
6109 * ensure all the needed parameters are given.
6111 * A query can run in different modes, defined by #IAnjutaSymbolQueryMode, by
6112 * default it is executed in synchrounous mode #IANJUTA_SYMBOL_QUERY_MODE_SYNC
6113 * and can be changed using ianjuta_symbol_query_set_mode().
6114 * #IANJUTA_SYMBOL_QUERY_MODE_ASYNC runs it in asynchronous mode in a separate
6115 * thread and can be canceled with ianjuta_symbol_query_cancel().
6117 * A query runs on a database, defined by #IAnjutaSymbolQueryDb, and can be
6118 * only selected at creatation time.
6120 * In addition, there are many other filters that can be set to the query
6121 * to refine the query results. For example, ianjuta_symbol_query_set_fields()
6122 * is used to set the needed symbol fields to retrieve, ianjuta_symbol_query_set_filters()
6123 * is used to filter the results with symbol types, ianjuta_symbol_query_set_file_scope()
6124 * limits the results to either public or private scope within the source file,
6125 * ianjuta_symbol_query_set_group_by() is used to group the results on a given
6126 * field, ianjuta_symbol_query_set_order_by is used to order the results on a
6129 * ianjuta_symbol_query_set_limit() and ianjuta_symbol_query_set_offset() are
6130 * used to change limit and offset of the resultset. Note again that these
6131 * parameters do not require re-preparation of query, so can be safely used
6132 * any time without performance hit.
6134 interface IAnjutaSymbolQuery
6136 #include
"ianjuta-iterable.h"
6137 #include
"ianjuta-symbol.h"
6140 * IAnjutaSymbolQueryMode:
6141 * @IANJUTA_SYMBOL_QUERY_MODE_SYNC: Syncronous query. The result is immediately
6142 * available as retrun value of search call.
6143 * @IANJUTA_SYMBOL_QUERY_MODE_ASYNC: Asynchronous query. The search call
6144 * return immediately and result delievered as a signal later. The actual
6145 * query is done in a separate thread.
6146 * @IANJUTA_SYMBOL_QUERY_MODE_QUEUED: If the database is busy
6147 * scanning, then the query is performed later when database is ready.
6148 * It returns NULL and result is delivered through async-result signal.
6149 * Only query can stay queued, so calling search multiple times would
6150 * result in only the last one being active.
6152 * This parameter determines the mode of query execution. By default,
6153 * IANJUTA_SYMBOL_QUERY_MODE_SYNC is selected.
6163 * IAnjutaSymbolQueryDb:
6164 * @IANJUTA_SYMBOL_QUERY_DB_PROJECT: Select project database.
6165 * @IANJUTA_SYMBOL_QUERY_DB_SYSTEM: Select system database.
6167 * Sets the database to use for the query. System database is where
6168 * all system library symbols are found. While project database is where
6169 * currently open project's symbols are found.
6178 * IAnjutaSymbolQueryName:
6179 * @IANJUTA_SYMBOL_QUERY_SEARCH: Query to perform basic substring search.
6180 * @IANJUTA_SYMBOL_QUERY_SEARCH_ALL: Query to get all symbols
6181 * @IANJUTA_SYMBOL_QUERY_SEARCH_FILE: Query to perform substring search in a file.
6182 * @IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE: Query to perform substring search in a scope.
6183 * @IANJUTA_SYMBOL_QUERY_SEARCH_ID: Query to find the symbol of given ID.
6184 * @IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS: Query to find members of a scope (eg. class).
6185 * @IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS: Query to get parents of a class.
6186 * @IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE: Query to find scope name of a file position.
6187 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE: Query to get the parent scope of a symbol.
6188 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE: Query to get the parent scope of a symbol in the file.
6190 * Names of query that defined what kind of query it is.
6200 SEARCH_CLASS_PARENTS
,
6202 SEARCH_PARENT_SCOPE
,
6203 SEARCH_PARENT_SCOPE_FILE
6207 * IAnjutaSymbolQueryFileScope:
6208 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_IGNORE: Ignore file scope
6209 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PUBLIC: Only public symbols visible to rest of project.
6210 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PRIVATE: Only private symbols visible inside a file.
6212 * Defines file scope of symbols to query.
6222 * IAnjutaSymbolQuery::async_result:
6223 * @ianjutasymbolquery: Self
6224 * @arg1: Query result (IAnjutaIterable, IAnjutaSymbol) of an async
6225 * or queued search. NULL if no result is found or some error happened.
6227 * This signal is emitted for every search of the Query involved in async
6228 * mode, unless cancled by ianjuta_symbol_query_cancel(). For single queued
6229 * query, only result of the last search is emitted (if it wasn't database
6230 * was busy when search was invoked). Unlike in sync counterpart,
6231 * do not unref @result after use.
6233 void ::async_result
(GObject
* result
);
6236 * ianjuta_symbol_query_set_mode:
6238 * @mode: The mode of query.
6239 * @err: Error propagation and reporting.
6241 * Sets the mode of Query.
6243 void set_mode
(IAnjutaSymbolQueryMode mode
);
6246 * ianjuta_symbol_query_set_fields:
6248 * @n_fields: Then number of fields to retrieve.
6249 * @fields: The fields to retrieve in the query. The array length must
6251 * @err: Error propagation and reporting.
6253 * Sets the fields of Query.
6255 void set_fields
(gint n_fields
, IAnjutaSymbolField
*fields
);
6258 * ianjuta_symbol_query_set_filters:
6260 * @filters: The mode of query.
6261 * @include_types: TRUE if filter is positive, FALSE if reversed.
6262 * @err: Error propagation and reporting.
6264 * Sets the bit mask of symbol type filters. if @include_types is TRUE,
6265 * symbols satisfying the given symbol types are selected, otherwise
6266 * they are excluded.
6268 void set_filters
(IAnjutaSymbolType filters
, gboolean include_types
);
6271 * ianjuta_symbol_query_set_file_scope:
6273 * @filescope_search: The filescope to search.
6274 * @err: Error propagation and reporting.
6276 * Sets the filescope search of Query.
6278 void set_file_scope
(IAnjutaSymbolQueryFileScope filescope_search
);
6281 * ianjuta_symbol_query_set_offset:
6283 * @offset: Offset of the resultset.
6284 * @err: Error propagation and reporting.
6286 * Sets the offset index of Query results.
6288 void set_offset
(gint offset
);
6291 * ianjuta_symbol_query_set_limit:
6293 * @limit: The limit of query.
6294 * @err: Error propagation and reporting.
6296 * Sets the limit of Query results. No more than @limit results are
6299 void set_limit
(gint limit
);
6302 * ianjuta_symbol_query_set_group_by:
6304 * @field: The field to group results.
6305 * @err: Error propagation and reporting.
6307 * Sets the field with which result of query is grouped. As a result
6308 * there will be no duplicates of with this field.
6310 void set_group_by
(IAnjutaSymbolField field
);
6313 * ianjuta_symbol_query_set_order_by:
6315 * @field: The field to order the result.
6316 * @err: Error propagation and reporting.
6318 * Sets the field with which result of query is ordered.
6320 void set_order_by
(IAnjutaSymbolField field
);
6323 * ianjuta_symbol_query_set_cancel:
6325 * @err: Error propagation and reporting.
6327 * Cancels any pending non-sync searches. After calling this, it is
6328 * guaranteed that "async-result" will not be called any more for any
6329 * past searches. New searches will have their results signaled as
6335 * ianjuta_symbol_query_search:
6337 * @pattern: Search pattern in compliance with SQL LIKE syntax
6338 * @err: Error propagation and reporting.
6340 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH query.
6342 IAnjutaIterable
* search
(const gchar
*pattern
);
6345 * ianjuta_symbol_query_search_all:
6347 * @err: Error propagation and reporting.
6349 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ALL query.
6351 IAnjutaIterable
* search_all
();
6354 * ianjuta_symbol_query_search_file:
6356 * @pattern: Search pattern in compliance with SQL LIKE syntax
6357 * @file: The file whose symbols are searched.
6358 * @err: Error propagation and reporting.
6360 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_FILE query.
6362 IAnjutaIterable
* search_file
(const gchar
*pattern
, const GFile
*file
);
6365 * ianjuta_symbol_query_search_in_scope:
6367 * @pattern: Search pattern in compliance with SQL LIKE syntax
6368 * @scope: The scope inside which symbols are searched.
6369 * @err: Error propagation and reporting.
6371 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE query.
6373 IAnjutaIterable
* search_in_scope
(const gchar
*pattern
, IAnjutaSymbol
*scope
);
6376 * ianjuta_symbol_query_search_members:
6378 * @symbol: The symbol whose members to get.
6379 * @err: Error propagation and reporting.
6381 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS query.
6383 IAnjutaIterable
* search_members
(IAnjutaSymbol
*symbol
);
6386 * ianjuta_symbol_query_search_class_parents:
6388 * @symbol: The class symbol whose parents to get.
6389 * @err: Error propagation and reporting.
6391 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS query.
6393 IAnjutaIterable
* search_class_parents
(IAnjutaSymbol
*symbol
);
6396 * ianjuta_symbol_query_search_id:
6398 * @symbol: The symbol id whose details to get.
6399 * @err: Error propagation and reporting.
6401 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ID query.
6403 IAnjutaIterable
* search_id
(gint symbol
);
6406 * ianjuta_symbol_query_search_scope:
6408 * @file_path: The file where the scope is.
6409 * @line: The line where the scope is.
6410 * @err: Error propagation and reporting.
6412 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE query.
6414 IAnjutaIterable
* search_scope
(const gchar
*file_path
, gint line
);
6417 * ianjuta_symbol_query_search_parent_scope:
6419 * @symbol: The symbol whose parent scope is to be found.
6420 * @err: Error propagation and reporting.
6422 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE query.
6424 IAnjutaIterable
* search_parent_scope
(IAnjutaSymbol
*symbol
);
6427 * ianjuta_symbol_query_search_parent_scope_file:
6428 * @symbol: The symbol whose parent scope is to be found.
6430 * @file_path: The file where the parent scope is to be found.
6431 * @err: Error propagation and reporting.
6433 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE query.
6435 IAnjutaIterable
* search_parent_scope_file
(IAnjutaSymbol
*symbol
, const gchar
*file_path
);
6439 * SECTION:ianjuta-symbol-manager
6440 * @title: IAnjutaSymbolManager
6441 * @short_description: Source code symbols manager inteface
6442 * @see_also: #IAnjutaSymbol
6443 * @stability: Unstable
6444 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
6447 interface IAnjutaSymbolManager
6449 #include
<libanjuta
/anjuta
-async
-notify.h
>
6450 #include
"ianjuta-iterable.h"
6451 #include
"ianjuta-symbol.h"
6452 #include
"ianjuta-symbol-query.h"
6455 * IAnjutaSymbolManager::prj_scan_end:
6458 * This signal is emitted when a scanning of one or more files on project db
6461 void ::prj_scan_end
(gint process_id
);
6464 * IAnjutaSymbolManager::sys_scan_end:
6467 * This signal is emitted when a scanning of one or more packages on system db
6468 * ends. This signal doesn't mean that all the scan process for the packages
6469 * is ended, but that just one (or more) is (are).
6471 void ::sys_scan_end
(gint process_id
);
6474 * ianjuta_symbol_manager_create_query:
6476 * @name: Name of the query. It decides what query type it is.
6477 * @db: The database to use.
6478 * @err: Error propagation and reporting.
6480 * Create a query object. By default only #IANJUTA_SYMBOL_FIELD_ID and
6481 * and #IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity,
6482 * offset is set to 0, no filters are set and mode is set to
6483 * #IANJUTA_SYMBOL_QUERY_MODE_SYNC.
6485 * Returns: A #IAnjutaSymbolQuery object
6487 IAnjutaSymbolQuery
* create_query
(IAnjutaSymbolQueryName name
, IAnjutaSymbolQueryDb db
);
6490 * ianjuta_symbol_manager_add_package:
6492 * @pkg_name: Name of the package to scan. Should be the name given by
6493 * pkg-config. The colon char must be avoided.
6494 * @pkg_version: Version of the package. The colon char must be avoided.
6495 * or by the language implementation (Python, Javascript, etc.)
6496 * @files: A list of GFile's to scan for this package
6498 * Reads the package files into the database asynchronously.
6500 * Returns: TRUE if the package will be loaded into the db, FALSE if the package
6503 gboolean add_package
(const gchar
* pkg_name
, const gchar
* pkg_version
, GList
* files
);
6506 * ianjuta_symbol_manager_activate_package:
6508 * @pkg_name: Name of the package to activate. The colon char must be avoided.
6509 * @pkg_version: Version of the package. The colon char must be avoided.
6511 * Activates the package for searches in the global symbol database.
6513 * Returns: TRUE if the package was loaded (or will be loaded once scanned).
6514 * FALSE if the version given was newer than the version in the database or the
6515 * package was not found. In this case, add_package() should be called.
6517 gboolean activate_package
(const gchar
*pkg_name
, const gchar
* pkg_version
);
6520 * ianjuta_symbol_manager_deactivate_package:
6522 * @pkg_name: name of the package. The colon char must be avoided.
6523 * @pkg_version: Version of the package. The colon char must be avoided.
6525 * Deactivates the package if it was found. If package is NULL, deactivate all
6529 void deactivate_package
(const gchar
* pkg_name
, const gchar
* pkg_version
);
6532 * ianjuta_symbol_manager_deactivate_all:
6535 * Deactivates all activate packages
6538 void deactivate_all
();
6542 * SECTION:ianjuta-print
6543 * @title: IAnjutaPrint
6544 * @short_description: Print interface
6546 * @stability: Unstable
6547 * @include: libanjuta/interfaces/ianjuta-print.h
6550 interface IAnjutaPrint
6553 * ianjuta_print_print:
6555 * @err: Error propagation and reporting.
6557 * Print the plugin (the file in case of the editor). In most cases this will show
6563 * ianjuta_print_print_preview:
6565 * @err: Error propagation and reporting.
6567 * Show print preview dialog
6570 void print_preview
();
6574 * SECTION:ianjuta-preferences
6575 * @title: IAnjutaPreferences
6576 * @short_description: Preferences interface
6578 * @stability: Unstable
6579 * @include: libanjuta/interfaces/ianjuta-preferences
6582 interface IAnjutaPreferences
6584 #include
<libanjuta
/anjuta
-preferences.h
>
6586 * ianjuta_preferences_merge:
6588 * @prefs: AnjutaPreferences to install to
6589 * @err: Error propagation and reporting.
6591 * When called, the plugin should install it's preferences
6593 void merge
(AnjutaPreferences
* prefs
);
6596 * ianjuta_preferences_unmerge:
6598 * @prefs: AnjutaPreferences to install to
6599 * @err: Error propagation and reporting.
6601 * When called, the plugin should uninstall it's preferences
6603 void unmerge
(AnjutaPreferences
* prefs
);
6607 * SECTION:ianjuta-plugin-factory
6608 * @title: IAnjutaPluginFactory
6609 * @short_description: Create Anjuta plugin objects
6611 * @stability: Unstable
6612 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
6614 * This interface is used to create all Anjuta plugin objects. It is
6615 * already implemented inside Anjuta by an object able to load plugins written
6616 * in C. In order to load plugins in other languages (or in a different way),
6617 * a loader plugin implementing this interface must be written first, probably
6621 interface IAnjutaPluginFactory
6623 #include
<libanjuta
/anjuta
-plugin.h
>
6624 #include
<libanjuta
/anjuta
-shell.h
>
6625 #include
<libanjuta
/anjuta
-plugin
-handle.h
>
6628 * IAnjutaPluginFactoryError:
6629 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
6630 * missing in .plugin file
6631 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
6632 * double colon following location) is missing in .plugin file
6633 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
6634 * plugin module is probably not installed
6635 * @IANJUTA_PLUGIN_FACTORY_INVALID_MODULE: Module file cannot be
6636 * loaded, not a shared library perhaps
6637 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
6638 * registration function, library is not an anjuta plugin or
6639 * is not for the right version
6640 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
6641 * plugin type, library is not an anjuta plugin or not for
6643 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
6645 * These enumeration is used to specify errors.
6660 * ianjuta_plugin_factory_new_plugin:
6662 * @handle: Plugin information
6663 * @shell: Anjuta shell
6664 * @err: Error propagation and reporting.
6666 * Create a new AnjutaPlugin object from the plugin information handle,
6667 * give it the AnjutaShell object as argument.
6669 * Return value: a new plugin object
6671 AnjutaPlugin
* new_plugin
(AnjutaPluginHandle
* handle, AnjutaShell
*shell
);
6675 * SECTION:ianjuta-language
6676 * @title: IAnjutaLanguage
6677 * @short_description: Interface to manage multiple programming languages
6679 * @stability: Unstable
6680 * @include: libanjuta/interfaces/ianjuta-language.h
6684 interface IAnjutaLanguage
6686 #include
<libanjuta
/interfaces
/ianjuta
-editor
-language.h
>
6690 * ianjuta_language_from_mime_type:
6692 * @mime_type: A mime type to get the language for
6694 * Returns: A language Id or 0 in case no language was found
6696 Id get_from_mime_type
(const gchar
* mime_type
);
6699 * ianjuta_language_from_string:
6701 * @string: A string representation of the language. Note that multiple
6702 * strings may describe the language like C++ and Cpp
6704 * Returns: A language Id or 0 in case no language was found
6706 Id get_from_string
(const gchar
* string);
6709 * ianjuta_language_get_name:
6711 * @id: A valid language id
6713 * Returns: The main name of the language. When you call ianjuta_language_from_string()
6714 * before that method the string you get here might be different to the one you passed
6715 * because the language might have multiple string representations
6717 const gchar
* get_name
(Id id);
6720 * ianjuta_language_get_make_target:
6722 * @id: A valid language id
6724 * Returns: The suffix for the file thats needs to be passed to
6725 * make to compile the file, e.g. ".o" for C
6727 const gchar
* get_make_target
(Id id);
6730 * ianjuta_language_get_strings:
6732 * @id: A valid language id
6734 * Returns: (element-type utf8): A list of strings that represent this language
6736 List
<const gchar
*> get_strings
(Id id);
6739 * ianjuta_language_get_mime_types:
6741 * @id: A valid language id
6743 * Returns: (element-type utf8): A list of mime-types that represent this language
6745 List
<const gchar
*> get_mime_types
(Id id);
6748 * ianjuta_language_get_from_editor:
6750 * @editor: An object implementing IAnjutaEditorLanguage
6751 * @err: Error propagation
6753 * Conviniece method to get the id directly from the editor
6755 * Returns: A valid language id or 0
6757 IAnjutaLanguageId get_from_editor
(IAnjutaEditorLanguage
* editor
);
6760 * ianjuta_language_get_name_from_editor:
6762 * @editor: An object implementing IAnjutaEditorLanguage
6763 * @err: Error propagation
6765 * Conviniece method to get the name directly from the editor
6767 * Returns: A language name or NULL
6769 const gchar
* get_name_from_editor
(IAnjutaEditorLanguage
* editor
);
6772 * ianjuta_language_get_languages:
6774 * @err: Error propagation
6776 * Returns: (element-type int) (transfer container): a list of ids of the available
6777 * languages. Use GPOINTER_TO_INT() to receive them. The list but not the
6778 * values should be free'd with g_list_free()
6780 GList
* get_languages
();
6784 * SECTION:ianjuta-indenter
6785 * @title: IAnjutaIndenter
6786 * @short_description: Interface for automatic indentation
6788 * @stability: Unstable
6789 * @include: libanjuta/interfaces/ianjuta-indenter.h
6793 interface IAnjutaIndenter
6795 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
6798 * ianjuta_indenter_indent:
6800 * @start: Start of the area to indent
6801 * @end: End of the area to indent
6802 * @err: Error propagation
6804 * Indent the area between @start and @end according to the indentation rules
6805 * of the programming language. Usually implemented by language support plugins.
6806 * Only one indenter can be loaded at a time.
6807 * Note: Indenters always affect full lines, so start and end will be moved
6808 * according to the next line start/end.
6810 void indent
(IAnjutaIterable
* start
, IAnjutaIterable
* end
);