language-manager: Added ianjuta_language_get_mime_types()
[anjuta.git] / libanjuta / interfaces / libanjuta.idl
blob2c8fd61d9bda5b9666cceeafb577c503046020e2
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 -*- */
3 //
4 // libanjuta interfaces. Generate stubs with anjuta-idl-compiler.pl
5 //
6 // Copyright (C) 2004 Naba Kumar <naba@gnome.org>
7 //
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>
24 /**
25 * SECTION:ianjuta-file
26 * @title: IAnjutaFile
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.
36 interface IAnjutaFile
38 #include <gio/gio.h>
39 /**
40 * ianjuta_file_open:
41 * @obj: Self
42 * @file: file to open.
43 * @err: Error propagation and reporting
45 * The implementor opens the given file.
47 void open (GFile* file);
49 /**
50 * IAnjutaFileSavable::saved:
51 * @obj: Self
53 * This signal is emitted when the content is loaded completely.
55 void ::opened ();
57 /**
58 * ianjuta_file_get_file:
59 * @obj: Self
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.
66 GFile* get_file ();
68 /**
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
81 /**
82 * IAnjutaFileSavable::update_save_ui:
83 * @obj: Self
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 ();
93 /**
94 * IAnjutaFileSavable::saved:
95 * @obj: Self
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:
104 * @obj: Self
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.
110 void save ();
113 * ianjuta_file_savable_save_as:
114 * @obj: Self
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:
125 * @obj: Self
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:
137 * @obj: Self
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:
148 * @obj: Self
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:
159 * @obj: Self
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
176 * @see_also:
177 * @stability: Unstable
178 * @include: libanjuta/interfaces/ianjuta-stream.h
181 interface IAnjutaStream
183 #include <stdio.h>
186 * ianjuta_stream_open:
187 * @obj: Self
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
199 * @see_also:
200 * @stability: Unstable
201 * @include: libanjuta/interfaces/ianjuta-stream-savable.h
204 interface IAnjutaStreamSavable
207 * ianjuta_stream_save:
208 * @obj: Self
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
222 * @see_also:
223 * @stability: Unstable
224 * @include: libanjuta/interfaces/ianjuta-markable.h
227 interface IAnjutaMarkable
229 enum Error
231 INVALID_LOCATION
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
245 enum Marker
247 LINEMARKER,
248 BOOKMARK,
249 MESSAGE,
250 BREAKPOINT_DISABLED,
251 BREAKPOINT_ENABLED,
252 PROGRAM_COUNTER
256 * IAnjutaMarkable::marker-clicked:
257 * @obj: Self
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:
267 * @obj: Self
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:
285 * @obj: Self
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
292 * method.
294 * Return value: Current location where the marker was set.
296 gint location_from_handle (gint handle);
299 * ianjuta_markable_unmark:
300 * @obj: Self
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:
311 * @obj: Self
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:
324 * @obj: Self
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
337 * @see_also:
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
355 enum Indicator
357 NONE,
358 IMPORTANT,
359 WARNING,
360 CRITICAL
364 * ianjuta_indicable_set:
365 * @obj: Self
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
371 * Set an indicator
374 void set (IAnjutaIterable *begin_location, IAnjutaIterable *end_location, Indicator indicator);
377 * ianjuta_indicable_clear:
378 * @obj: Self
379 * @err: Error propagation and reporting
381 * Clear all indicators
384 void clear ();
388 * SECTION:ianjuta-iterable
389 * @title: IAnjutaIterable
390 * @short_description: Implemented by objects that can iterate
391 * @see_also:
392 * @stability: Unstable
393 * @include: libanjuta/interfaces/ianjuta-iterable.h
396 interface IAnjutaIterable
399 * ianjuta_iterable_first:
400 * @obj: Self
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.
409 gboolean first ();
412 * ianjuta_iterable_next:
413 * @obj: Self
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
420 * to the end-iter.
422 * Returns: TRUE if sucessful, otherwise FALSE if already at end-iter.
424 gboolean next ();
427 * ianjuta_iterable_previous:
428 * @obj: Self
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
433 * element.
435 * Returns: TRUE if sucessful, other FALSE.
437 gboolean previous ();
440 * ianjuta_iterable_last:
441 * @obj: Self
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
446 * at end-iter).
448 * Returns: TRUE if sucessful, other FALSE.
450 gboolean last ();
453 * ianjuta_iterable_foreach:
454 * @obj: Self
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:
468 * @obj: Self
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
477 * set to end-iter.
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:
486 * @obj: Self
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:
499 * @obj: Self
500 * @err: Error propagation and reporting
502 * Length of the iterable (number of elements indexable by it).
504 * Returns: total length of the list.
506 gint get_length ();
509 * ianjuta_iterable_clone:
510 * @obj: Self
511 * @err: Error propagation and reporting
513 * Clones the iterable. The returned iterable object must be unreffed
514 * when done.
516 * Returns: (transfer full): A new instance of this iterable pointing at the same location.
518 IAnjutaIterable *clone ();
521 * ianjuta_iterable_assign:
522 * @obj: Self
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:
533 * @obj: Self
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:
551 * @obj: Self
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
567 * @see_also:
568 * @stability: Unstable
569 * @include: libanjuta/interfaces/ianjuta-iterable-tree.h
572 interface IAnjutaIterableTree
576 * ianjuta_iterable_tree_parent:
577 * @obj: Self
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.
585 gboolean parent ();
588 * ianjuta_iterable_tree_children:
589 * @obj: Self
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:
601 * @obj: Self
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:
612 * @obj: Self
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:
623 * @obj: Self
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
638 * @see_also:
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
659 enum Error
661 SUCCEED = 0,
662 FAILED,
663 CANCELED = 256,
664 ABORTED,
665 INTERRUPTED,
666 TERMINATED,
667 UNKNOWN_TARGET,
668 UNKNOWN_ERROR,
669 OTHER_ERROR
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
680 * in source build.
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:
707 * @obj: Self
708 * @uri: target uri
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
717 * if defined.
719 * Returns: non null command handle if succeed
721 Handle is_built (const gchar *uri, Callback callback, gpointer user_data);
724 * ianjuta_builder_build:
725 * @obj: Self
726 * @uri: target uri
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
733 * if defined.
735 * Returns: non null command handle if succeed
737 Handle build (const gchar *uri, Callback callback, gpointer user_data);
740 * ianjuta_builder_cancel:
741 * @obj: Self
742 * @handle: handle of the command to cancel
743 * @err: Error propagation and reporting.
745 * Cancel specified command. The callback function will not
746 * be called.
749 void cancel (Handle handle);
752 * ianjuta_builder_list_configuration:
753 * @obj: Self
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
763 * g_list_free.
765 List<const gchar*> list_configuration();
768 * ianjuta_builder_get_uri_configuration:
769 * @obj: Self
770 * @uri: target uri
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
785 * @see_also:
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
799 enum Error
801 CONFIG,
802 OTHER_ERROR
806 * ianjuta_environment_override:
807 * @obj: Self
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
811 * its argument
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:
825 * @obj: Self
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.
846 * @see_also:
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_N_COMMANDS: size of enum
868 * The enumeration is used to speficy the disered build operation
870 enum Command
872 COMMAND_COMPILE,
873 COMMAND_BUILD,
874 COMMAND_BUILD_TARBALL,
875 COMMAND_INSTALL,
876 COMMAND_CONFIGURE,
877 COMMAND_GENERATE,
878 COMMAND_CLEAN,
879 COMMAND_EXECUTE,
880 COMMAND_IS_BUILT,
881 COMMAND_AUTORECONF,
882 COMMAND_DISTCLEAN,
883 N_COMMANDS
887 * ianjuta_buildable_set_command:
888 * @obj: Self
889 * @command_id: Command to override.
890 * @command: Build command to override.
891 * @err: Error propagation and reporting.
893 * Overrides the default command for the given command.
895 void set_command (Command command_id, const gchar *command);
898 * ianjuta_buildable_get_command:
899 * @obj: Self
900 * @command_id: Command to get override.
901 * @err: Error propagation and reporting.
903 * Retrieves the currently set command override.
905 * Returns: The overridden command. NULL if no override set.
907 const gchar* get_command (Command command_id);
910 * ianjuta_buildable_reset_commands:
911 * @obj: Self
912 * @err: Error propagation and reporting.
914 * Resets the command overrides to defaults.
916 void reset_commands ();
919 * ianjuta_buildable_build:
920 * @obj: Self
921 * @uri: fixme
922 * @err: Error propagation and reporting.
924 * fixme
926 void build (const gchar *uri);
929 * ianjuta_buildable_clean:
930 * @obj: Self
931 * @uri: fixme
932 * @err: Error propagation and reporting.
934 * fixme
936 void clean (const gchar *uri);
939 * ianjuta_buildable_install:
940 * @obj: Self
941 * @uri: fixme
942 * @err: Error propagation and reporting.
944 * fixme
946 void install (const gchar *uri);
949 * ianjuta_buildable_configure:
950 * @obj: Self
951 * @uri: fixme
952 * @err: Error propagation and reporting.
954 * fixme
956 void configure (const gchar *uri);
959 * ianjuta_buildable_generate:
960 * @obj: Self
961 * @uri: fixme
962 * @err: Error propagation and reporting.
964 * fixme
966 void generate (const gchar *uri);
969 * ianjuta_buildable_execute:
970 * @obj: Self
971 * @uri: fixme
972 * @err: Error propagation and reporting.
974 * fixme
976 void execute (const gchar *uri);
980 * SECTION:ianjuta-help
981 * @title: IAnjutaHelp
982 * @short_description: Implemented by plugins that can provide help support
983 * @see_also:
984 * @stability: Unstable
985 * @include: libanjuta/interfaces/ianjuta-help.h
988 interface IAnjutaHelp
992 * ianjuta_help_search:
993 * @obj: Self
994 * @query: string to search in the help
995 * @err: Error propagation and reporting
997 * Search for string @query in the help and display the result
999 void search (const gchar *query);
1003 * SECTION:ianjuta-loader
1004 * @title: IAnjutaLoader
1005 * @short_description: Interface to load file or stream
1006 * @see_also:
1007 * @stability: Unstable
1008 * @include: libanjuta/interfaces/ianjuta-loader.h
1010 * Loaders can deterime correct plugin to open a file or stream. They
1011 * themselves can not load it, but will correctly redirect the request to
1012 * an implementor of IAnjutaFile, IAnjutaFileSavable, IAnjutaStream or
1013 * IAnjutaStreamSavable, depending on the mime-type, meta-type or any other
1014 * requirements.
1016 interface IAnjutaLoader
1018 #include <libanjuta/anjuta-plugin.h>
1020 * ianjuta_loader_find_plugins:
1021 * @obj: Self
1022 * @err: Error propagation and reporting.
1024 * Returns: (element-type AnjutaPlugin): all plugins supporting loader interface.
1026 List<AnjutaPlugin*> find_plugins ();
1029 * SECTION:ianjuta-file-loader
1030 * @title: IAnjutaFileLoader
1031 * @short_description: Loader to load files
1032 * @see_also:
1033 * @stability: Unstable
1034 * @include: libanjuta/interfaces/ianjuta-file-loader.h
1036 * Loaders can deterime correct plugin to open a file.
1038 interface IAnjutaFileLoader
1040 #include <gio/gio.h>
1042 * ianjuta_file_loader_load:
1043 * @obj: Self
1044 * @file: File to load
1045 * @readonly: Open in readonly mode.
1046 * @err: Error propagation and reporting
1048 * Determines a plugin which can open the given file, activates it
1049 * opening the file and returns the interface of the plugin activated.
1051 * Return value: Plugin interface used to load the file.
1053 GObject* load (GFile* file, gboolean readonly);
1056 * ianjuta_loader_peek_interface:
1057 * @obj: Self
1058 * @file: Meta file to peek
1059 * @err: Error propagation and reporting
1061 * Peeks the file and determines the interface which can load
1062 * this file.
1064 * Return value: Plugin interface name that can load the file.
1066 gchar* peek_interface (GFile* file);
1070 * SECTION:ianjuta-stream-loader
1071 * @title: IAnjutaStreamLoader
1072 * @short_description: Loader to load streams
1073 * @see_also:
1074 * @stability: Unstable
1075 * @include: libanjuta/interfaces/ianjuta-stream-loader.h
1077 * StreamLoaders can deterime correct plugin to open a stream.
1079 interface IAnjutaStreamLoader
1081 #include <stdio.h>
1084 * ianjuta_stream_loader_load:
1085 * @obj: Self
1086 * @stream: Stream to load
1087 * @readonly: Open in readonly mode.
1088 * @err: Error propagation and reporting
1090 * Determines a plugin which can open the given stream, activates it
1091 * opening the stream and returns the interface of the plugin activated.
1093 * Return value: Plugin interface used to load the stream.
1095 GObject* load (FILE *stream, gboolean readonly);
1098 * ianjuta_stream_loader_peek_interface:
1099 * @obj: Self
1100 * @stream: Stream to load
1101 * @err: Error propagation and reporting
1103 * Peeks the stream and determines the interface which can load
1104 * this stream.
1106 * Return value: Plugin interface name that can load the stream.
1108 gchar* peek_interface (FILE *stream);
1113 * SECTION:ianjuta-document
1114 * @title: IAnjutaDocument
1115 * @short_description: Interface for all kind of editable resources that
1116 * will be managed by IAnjutaDocumentManager
1117 * @see_also:
1118 * @stability: Unstable
1119 * @include: libanjuta/interfaces/ianjuta-document.h
1122 interface IAnjutaDocument
1125 * IAnjutaDocument::update-ui:
1126 * @obj: Self
1128 * This signal is emitted when the document assumes the UI must be updated
1129 * because some internal state of the document has changed. For example, if
1130 * current line position is changed, it needs to be reflected to the UI.
1132 void ::update_ui ();
1135 * ianjuta_document_get_filename:
1136 * @obj: Self
1137 * @err: Error propagation and reporting
1139 * Allows obtaining of the filename the editor was loaded from.
1141 * Return value: The name of the file. Not to be freed by caller.
1143 const gchar* get_filename ();
1146 * ianjuta_document_can_undo:
1147 * @obj: Self
1148 * @err: Error propagation and reporting
1150 * Can the editor undo the last operation?
1152 * Returns: TRUE if editor can undo, else FALSE
1154 gboolean can_undo();
1157 * ianjuta_document_can_redo:
1158 * @obj: Self
1159 * @err: Error propagation and reporting
1161 * Can the editor redo the last operation?
1163 * Returns: TRUE if editor can redo, else FALSE
1165 gboolean can_redo ();
1168 * ianjuta_document_undo:
1169 * @obj: Self
1170 * @err: Error propagation and reporting
1172 * Undo last operation
1174 void undo ();
1177 * ianjuta_document_redo:
1178 * @obj: Self
1179 * @err: Error propagation and reporting
1181 * Redo last undo operation
1183 void redo ();
1186 * ianjuta_document_begin_undo_action:
1187 * @obj: Self
1188 * @err: Error propagation and reporting
1190 * Begins the mark of undoable action. Calls to this are stacked and
1191 * each must be ended with ianjuta_document_end_action().
1193 void begin_undo_action ();
1196 * ianjuta_document_end_undo_action:
1197 * @obj: Self
1198 * @err: Error propagation and reporting
1200 * Ends the mark of undoable action.
1202 void end_undo_action ();
1205 * ianjuta_document_grab_focus:
1206 * @obj: Self
1207 * @err: Error propagation and reporting
1209 * Grabs the focus.
1211 void grab_focus ();
1214 * ianjuta_document_cut:
1215 * @obj: Self
1216 * @err: Error propagation and reporting
1218 * Cut selection to clipboard.
1220 void cut ();
1223 * ianjuta_document_copy:
1224 * @obj: Self
1225 * @err: Error propagation and reporting
1227 * Copy selection to clipboard.
1229 void copy ();
1232 * ianjuta_document_paste:
1233 * @obj: Self
1234 * @err: Error propagation and reporting
1236 * Paste clipboard at current position.
1238 void paste ();
1241 * ianjuta_document_clear:
1242 * @obj: Self
1243 * @err: Error propagation and reporting
1245 * Clear selection
1247 void clear ();
1251 * SECTION:ianjuta-editor
1252 * @title: IAnjutaEditor
1253 * @short_description: Text editor interface
1254 * @see_also:
1255 * @stability: Unstable
1256 * @include: libanjuta/interfaces/ianjuta-editor.h
1259 interface IAnjutaEditor
1261 #include <gtk/gtk.h>
1262 #include <libanjuta/interfaces/ianjuta-iterable.h>
1264 enum Error
1266 DOESNT_EXIST
1269 * IAnjutaEditorAttribute:
1270 * @IANJUTA_EDITOR_TEXT: Normal text
1271 * @IANJUTA_EDITOR_KEYWORD: A keyword of the programming language
1272 * @IANJUTA_EDITOR_COMMENT: A comment
1273 * @IANJUTA_EDITOR_STRING: A string
1275 * This enumeration is used to specify the type of text. Note that not all
1276 * editors implement this.
1278 enum Attribute
1280 TEXT,
1281 KEYWORD,
1282 COMMENT,
1283 STRING
1287 * IAnjutaEditor::glade-member-add:
1288 * @widget_typename: Name of the type of the widget that will become a member of the class.
1289 * @widget_name: Name of the widget that will become a member of the class.
1290 * @filename: Path for the .ui file that generated the signal.
1291 * @obj: Self
1293 * This signal is emitted when code for a widget must be generated.
1295 void ::glade_member_add (gchar *widget_typename, gchar *widget_name, gchar *filename);
1298 * IAnjutaEditor::code-added:
1299 * @position: The iter position where @ch is added.
1300 * @code: The code that has been added.
1301 * @obj: Self
1303 * This signal is emitted when code is added inside the editor.
1304 * The newly added code is @code which has been inserted at @position.
1306 void ::code_added (IAnjutaIterable *position, gchar *code);
1309 * IAnjutaEditor::char-added:
1310 * @position: The iter position where @ch is added.
1311 * @ch: The character that has been added.
1312 * @obj: Self
1314 * This signal is emitted when any character is added inside the editor.
1315 * The newly added character is @ch which has been inserted at @position.
1317 void ::char_added (IAnjutaIterable *position, gchar ch);
1320 * IAnjutaEditor::backspace:
1321 * @obj: Self
1323 * The signal is emitted when the user presses backspace
1325 void ::backspace ();
1328 * IAnjutaEditor::changed:
1329 * @position: The iter position where change happend.
1330 * @added: TRUE if added, FALSE if deleted.
1331 * @length: Length of the text changed.
1332 * @lines: Number of lines added or removed.
1333 * @text: The text added or removed.
1334 * @obj: Self
1336 * This signal is emitted when any text change happens in editor.
1337 * The changes begin at @position. @text is not garanteed to be NULL
1338 * terminated. Use @length to read the text. @lines represent the
1339 * number of line breaks in the added or removed text.
1341 void ::changed (IAnjutaIterable *position, gboolean added, gint length, gint lines, const gchar *text);
1344 * IAnjutaEditor::cursor-moved:
1345 * @obj: Self
1347 * The signal is a hint that the cursor was moved.
1349 void ::cursor_moved ();
1352 * IAnjutaEditor::line-marks-gutter-clicked:
1353 * @obj: Self
1354 * @double_click: whether the line marks gutter was double clicked
1355 * @location: location of the clicked marker
1357 * The signal is emitted when the user clicks on a marker
1359 void ::line_marks_gutter_clicked (gint location);
1362 * ianjuta_editor_get_tabsize:
1363 * @obj: Self
1364 * @err: Error propagation and reporting
1366 * Returns the tabsize (in spaces) currently used by the editor.
1368 * Returns: tabsize in number of spaces
1370 gint get_tabsize ();
1373 * ianjuta_editor_set_tabsize:
1374 * @obj: Self
1375 * @tabsize: Tabsize in spaces
1376 * @err: Error propagation and reporting
1378 * Sets the tabsize of the editor.
1380 void set_tabsize (gint tabsize);
1383 * ianjuta_editor_get_use_spaces:
1384 * @obj: Self
1385 * @err: Error propagation and reporting
1387 * Returns if the editor uses spaces for filling up tab characters.
1389 * Returns: TRUE if yes, FALSE if no.
1391 gboolean get_use_spaces ();
1394 * ianjuta_editor_set_use_space:
1395 * @obj: Self
1396 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
1397 * @err: Error propagation and reporting
1399 * Sets if the editor should use spaces for filling up tab characters.
1401 void set_use_spaces (gboolean use_spaces);
1404 * ianjuta_editor_set_auto_indent:
1405 * @obj: Self
1406 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
1408 * Sets whether the editor should auto-indent itself. A plugin that does
1409 * custom auto-indent can set this to false and override the preferences
1410 * setting
1412 void set_auto_indent (gboolean auto_indent);
1415 * ianjuta_editor_erase_range:
1416 * @obj: Self
1417 * @position_start: Start position of chars to erase.
1418 * @position_end: End position of chars to erase.
1419 * @err: Error propagation and reporting
1421 * Erases the chars between positions pointed by @position_start and
1422 * @position_end. The character pointed by @position_start is included,
1423 * while pointed by @position_end is not include in the range. After
1424 * the erase operation, all active iters, except these two, are no
1425 * longer guranteed to be valid. At the end the operation, these two
1426 * iters point to the same position which is the position where erase
1427 * happend (usually the original @position_start position).
1429 void erase (IAnjutaIterable *position_start, IAnjutaIterable *position_end);
1432 * ianjuta_editor_erase_all:
1433 * @obj: Self
1434 * @err: Error propagation and reporting
1436 * Empties the whole editor buffer. There will be zero characters.
1437 * After the erase operation, none of the active iters are guranteed
1438 * to be valid.
1440 void erase_all ();
1443 * ianjuta_editor_insert:
1444 * @obj: Self
1445 * @position: Character position in editor where insert will take place.
1446 * @text: Text to append.
1447 * @length: Length of @text to use.
1448 * @err: Error propagation and reporting
1450 * Inserts @length characters from @text buffer at given @position of
1451 * editor buffer. If @length is -1, the whole @text is used.
1453 void insert (IAnjutaIterable *position, const gchar *text, gint length);
1456 * ianjuta_editor_append:
1457 * @obj: Self
1458 * @text: Text to append.
1459 * @length: Length of @text to use.
1460 * @err: Error propagation and reporting
1462 * Appends @length characters from @text buffer at the end of editor
1463 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1465 void append (const gchar *text, gint length);
1468 * ianjuta_editor_goto_line:
1469 * @obj: Self
1470 * @lineno: line number where carat will be moved.
1471 * @err: Error propagation and reporting
1473 * Carat is moved to the given @lineno line and text view is scrolled to
1474 * bring it in viewable area of the editor.
1476 void goto_line (gint lineno);
1479 * ianjuta_editor_goto_start:
1480 * @obj: Self
1481 * @err: Error propagation and reporting
1483 * Carat is moved to the begining of editor and text view is scrolled to
1484 * bring it in viewable area of the editor.
1486 void goto_start ();
1489 * ianjuta_editor_goto_end:
1490 * @obj: Self
1491 * @err: Error propagation and reporting
1493 * Carat is moved to the end of editor and text view is scrolled to
1494 * bring it in viewable area of the editor.
1496 void goto_end ();
1499 * ianjuta_editor_goto_position:
1500 * @obj: Self
1501 * @position: Character position where carat will be moved.
1502 * @err: Error propagation and reporting
1504 * Carat is moved to the given @position and text view is scrolled to
1505 * bring @position in viewable area of the editor.
1507 void goto_position (IAnjutaIterable *position);
1510 * ianjuta_editor_get_text:
1511 * @obj: Self
1512 * @begin: Begining iterator
1513 * @end: End iterator
1514 * @err: Error propagation and reporting
1516 * Gets text characters beginning from @begin (including char
1517 * pointed by @begin) and ending with @end (excluding character
1518 * pointed by @end). The characters returned are utf-8 encoded.
1519 * The iterators @begin and @end could be in either order. The returned
1520 * text, however, is in right order. If both @begin and @end points
1521 * to the same position, NULL is returned.
1523 * Returns: A buffer of utf-8 characters.
1524 * The returned buffer must be freed when no longer required.
1526 gchar* get_text (IAnjutaIterable *begin, IAnjutaIterable *end);
1529 * ianjuta_editor_get_text_all:
1530 * @obj: Self
1531 * @err: Error propagation and reporting
1533 * Gets all text characters in the editor.
1534 * The characters returned are utf-8 encoded.
1536 * Returns: A buffer of utf-8 characters containing all text from editor.
1537 * The returned buffer must be freed when no longer required.
1539 gchar* get_text_all ();
1542 * ianjuta_editor_line_from_position:
1543 * @obj: Self
1544 * @position: Position you want to know the line from
1545 * @err: Error propagation and reporting
1547 * Get the line number in which @position locates.
1548 * Returns: Line which corresponds to @position
1551 int get_line_from_position (IAnjutaIterable *position);
1554 * ianjuta_editor_get_lineno:
1555 * @obj: Self
1556 * @err: Error propagation and reporting
1558 * Obtains current line number on which carat is.
1560 * Return value: Line number.
1562 gint get_lineno ();
1565 * ianjuta_editor_get_length:
1566 * @obj: Self
1567 * @err: Error propagation and reporting
1569 * Get length of complete text in editor. This will be the total
1570 * number of bytes in the file or buffer.
1572 * Return value: Text length.
1574 gint get_length ();
1577 * ianjuta_editor_get_current_word:
1578 * @obj: Self
1579 * @err: Error propagation and reporting
1581 * Obtains the word on which carat is currently on.
1583 * Return value: Current word.
1585 gchar* get_current_word ();
1588 * ianjuta_editor_get_current_column:
1589 * @obj: Self
1590 * @err: Error propagation and reporting
1592 * Obtains number of the current column in the editor.
1594 * Return value: Current column.
1596 gint get_column ();
1599 * ianjuta_editor_get_line_begin_position:
1600 * @obj: Self
1601 * @line: fixme
1602 * @err: Error propagation and reporting.
1604 * fixme
1606 * Returns: (transfer full): fixme
1608 IAnjutaIterable* get_line_begin_position (gint line);
1611 * ianjuta_editor_get_line_end_position:
1612 * @obj: Self
1613 * @line: fixme
1614 * @err: Error propagation and reporting.
1616 * fixme
1618 * Returns: (transfer full): fixme
1620 IAnjutaIterable *get_line_end_position (gint line);
1623 * ianjuta_editor_get_overwrite:
1624 * @obj: Self
1625 * @err: Error propagation and reporting
1627 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1629 * Return value: editor mode.
1631 gboolean get_overwrite ();
1635 * ianjuta_editor_set_popup_menu:
1636 * @obj: Self
1637 * @menu: Popupmenu
1638 * @err: Error propagation and reporting
1640 * Set Editor popup menu. This is the menu shown in the editor when one
1641 * right-clicks on it.
1644 void set_popup_menu (GtkWidget *menu);
1647 * ianjuta_editor_get_offset:
1648 * @obj: Self
1649 * @err: Error propagation and reporting
1651 * Get current caret position in integer character offset. Deprecated.
1652 * Use ianjuta_editor_get_position() instead.
1654 * Returns: Current character position since the begining of file.
1656 gint get_offset ();
1659 * ianjuta_editor_get_position:
1660 * @obj: Self
1661 * @err: Error propagation and reporting
1663 * Get current caret position.
1665 * Returns: (transfer full): Iterator that points to the current position.
1667 IAnjutaIterable* get_position ();
1670 * ianjuta_editor_get_position_from_offset:
1671 * @obj: Self
1672 * @offset: Character offset position where the iter will be set
1673 * @err: Error propagation and reporting
1675 * Creates and returns an iter for editor cells. The iter is
1676 * placed at the unicode character position where the given offset
1677 * @offset happens to fall. The returned iter is cell (character)
1678 * iter and not byte iter, so all iter operations
1679 * on it are character (not byte) iteration, including all position
1680 * and index references in the iter.
1682 * The iter must be unreferrenced by the caller when done.
1683 * The iter navigates (next/previous) in step of unicode
1684 * characters (one unicode character == one cell).
1686 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1687 * given @offset position.
1689 IAnjutaIterable* get_position_from_offset (gint offset);
1692 * ianjuta_editor_get_start_position:
1693 * @obj: Self
1694 * @err: Error propagation and reporting
1696 * Gets the iter positioned at the start of the editor buffer.
1698 * Return value: (transfer none): Cell iter set to the begining of the editor.
1700 IAnjutaIterable* get_start_position ();
1703 * ianjuta_editor_get_end_position:
1704 * @obj: Self
1705 * @err: Error propagation and reporting
1707 * Gets the iter positioned at the end of the editor buffer. The
1708 * returned iter is the end-iter which does not point to any valid
1709 * character in the buffer (it is pointed one step beyond the last
1710 * valid character).
1712 * Return value: (transfer none): Cell iter set to the end of the editor (end-iter).
1714 IAnjutaIterable* get_end_position ();
1717 * SECTION:ianjuta-editor-selection
1718 * @title: IAnjutaEditorSelection
1719 * @short_description: Text editor selection interface
1720 * @see_also:
1721 * @stability: Unstable
1722 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1725 interface IAnjutaEditorSelection
1727 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1729 * ianjuta_editor_selection_has_selection:
1730 * @obj: Self
1731 * @err: Error propagation and reporting
1733 * Returns TRUE if editor has any text selected. The selection
1734 * positions can be retrieved with ianjuta_editor_selection_get_start()
1735 * and ianjuta_editor_selection_get_end().
1737 * Returns: TRUE if there is text selected else FALSE.
1739 gboolean has_selection ();
1742 * ianjuta_editor_selection_get:
1743 * @obj: Self
1744 * @err: Error propagation and reporting
1746 * Gets curerntly selected text in editor.
1748 * Returns: A newly allocated buffer of currently selected characters.
1749 * NULL if there is no selection. The returned buffer must be freed after
1750 * use.
1752 gchar* get ();
1755 * ianjuta_editor_selection_set:
1756 * @obj: Self
1757 * @start: Begin of selection
1758 * @end: End of selection
1759 * @scroll: Scroll selection onscreen
1760 * @err: Error propagation and reporting
1762 * Select characters between start and end. Start and end don't have to
1763 * be ordered.
1765 void set (IAnjutaIterable* start, IAnjutaIterable* end, gboolean scroll);
1768 * ianjuta_editor_selection_get_start:
1769 * @obj: Self
1770 * @err: Error propagation and reporting
1772 * Gets start position of selection text.
1774 * Return: Start of selection or NULL if there is no selection.
1776 IAnjutaIterable* get_start ();
1779 * ianjuta_editor_selection_get_end:
1780 * @obj: Self
1781 * @err: Error propagation and reporting
1783 * Get end position of selection. If there is no selection, returns
1784 * NULL.
1786 * Returns: End of selection or NULL if there is no selection.
1788 IAnjutaIterable* get_end ();
1791 * ianjuta_editor_selection_select_block:
1792 * @obj: Self
1793 * @err: Error propagation and reporting
1795 * Selects current block of code. The definition of block of code
1796 * depends on highlight mode used (programming language). Some
1797 * highlight mode does not have block concept, in that case this
1798 * method does not do anything.
1800 void select_block ();
1803 * ianjuta_editor_selection_select_function:
1804 * @obj: Self
1805 * @err: Error propagation and reporting
1807 * Select current function block. The definition of function block
1808 * depends on highlight mode used (programming language). Some
1809 * highlight mode does not have function concept, in that case this
1810 * method does not do anything.
1812 void select_function ();
1815 * ianjuta_editor_edit_select_all:
1816 * @obj: Self
1817 * @err: Error propagation and reporting
1819 * Select whole buffer.
1821 void select_all ();
1824 * ianjuta_editor_selection_replace:
1825 * @obj: Self
1826 * @text: Replacement text.
1827 * @length: Length of the text to used in @text.
1828 * @err: Error propagation and reporting
1830 * Replaces currently selected text with the @text. Only @length amount
1831 * of characters are used from @text buffer to replace.
1833 void replace (const gchar *text, gint length);
1837 * SECTION:ianjuta-editor-search
1838 * @title: IAnjutaEditorSearch
1839 * @short_description: Text editor search interface
1840 * @see_also:
1841 * @stability: Unstable
1842 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1845 interface IAnjutaEditorSearch
1847 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1850 * ianjuta_editor_search_forward:
1851 * @obj: Self
1852 * @search: String to search for
1853 * @start: Where to search from
1854 * @end: Where to stop searching
1855 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1856 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1857 * @err: Error propagation and reporting
1859 * Search forward from start to end
1862 gboolean forward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1865 * ianjuta_editor_search_backward:
1866 * @obj: Self
1867 * @search: String to search for
1868 * @start: Where to search from
1869 * @end: Where to stop searching
1870 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1871 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1872 * @err: Error propagation and reporting
1874 * Search backward from end to start
1878 gboolean backward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1883 * SECTION:ianjuta-editor-convert
1884 * @title: IAnjutaEditorConvert
1885 * @short_description: Text editor convert interface
1886 * @see_also:
1887 * @stability: Unstable
1888 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1891 interface IAnjutaEditorConvert
1894 * ianjuta_editor_convert_to_upper:
1895 * @obj: Self
1896 * @start_position: Start position.
1897 * @end_position: End position.
1898 * @err: Error propagation and reporting
1900 * change characters from start position to end position to uppercase.
1903 void to_upper (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1906 * ianjuta_editor_convert_to_lower:
1907 * @obj: Self
1908 * @start_position: Start position.
1909 * @end_position: End position.
1910 * @err: Error propagation and reporting
1912 * change characters from start position to end position to lowercase
1915 void to_lower (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1919 * SECTION:ianjuta-editor-line-mode
1920 * @title: IAnjutaEditorLineMode
1921 * @short_description: Text editor line mode
1922 * @see_also:
1923 * @stability: Unstable
1924 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1927 interface IAnjutaEditorLineMode
1930 * IAnjutaEditorLineModeType:
1931 * @IANJUTA_EDITOR_LINE_MODE_LF: Line-Feed (Unix)
1932 * @IANJUTA_EDITOR_LINE_MODE_CR: Carat return (Max)
1933 * @IANJUTA_EDITOR_LINE_MODE_CRLF: Caret return + line-feed (Windows)
1935 * This enumeration is used to specify the type of text. Note that not all
1936 * editors implement this.
1938 enum Type
1942 CRLF
1946 * ianjuta_editor_line_mode_get:
1947 * @obj: Self
1948 * @err: Error propagation and reporting
1950 * Get current line ending mode. It is auto-detected from the
1951 * buffer contents.
1953 Type get ();
1956 * ianjuta_editor_line_mode_set:
1957 * @obj: Self
1958 * @mode: Line mode to set.
1959 * @err: Error propagation and reporting
1961 * Set the line ending mode to the given @mode. Existing line end
1962 * characters in the buffer are not touched. Only the newly added
1963 * texts will have @mode line end characters.
1965 void set (Type mode);
1968 * ianjuta_editor_line_mode_convert:
1969 * @obj: Self
1970 * @mode: Line mode to convert.
1971 * @err: Error propagation and reporting
1973 * Set the line ending mode to the given @mode and convert all line end
1974 * characters in the buffer to @mode line end characters.
1976 void convert (Type mode);
1979 * ianjuta_editor_line_mode_fix:
1980 * @obj: Self
1981 * @err: Error propagation and reporting
1983 * Convert EOL characters to majority of line mode. This is helpful
1984 * when the buffer contains mixed line modes and we want to fix it.
1986 void fix ();
1990 * SECTION:ianjuta-editor-tip
1991 * @title: IAnjutaEditorTip
1992 * @short_description: Editor call tips assistance framework
1993 * @see_also:
1994 * @stability: Unstable
1995 * @include: libanjuta/interfaces/ianjuta-editor-tip.h
1998 interface IAnjutaEditorTip
2001 * ianjuta_editor_tip_show:
2002 * @obj: Self
2003 * @tips: (element-type utf8): list of alternative tips.
2004 * @position: Tip position.
2005 * @err: Error propagation and reporting
2007 * Show tips showing more information on current context. No user feedback
2008 * is required when tips are shown. @position indicates
2009 * the position before which is the known context and after which are
2010 * the suggestions. Usually the editor would use this to
2011 * align the choices displayed such that the carat is just at this
2012 * position when the choices are displayed.
2015 void show (List<const gchar*> tips, IAnjutaIterable *position);
2018 * ianjuta_editor_tip_cancel
2019 * @obj: Self
2020 * @err: Error propagation and reporting
2022 * Cancels the last shown tooltip
2024 void cancel ();
2027 * ianjuta_editor_tip_visible:
2028 * @obj: Self
2029 * @err: Error propagation and reporting
2031 * Returns: whether a tooltip is crrently shown
2033 gboolean visible();
2037 * SECTION:ianjuta-editor-assist
2038 * @title: IAnjutaEditorAssist
2039 * @short_description: Text editor assist interface
2040 * @see_also:
2041 * @stability: Unstable
2042 * @include: libanjuta/interfaces/ianjuta-editor-assist
2045 interface IAnjutaEditorAssist
2047 #include <libanjuta/interfaces/ianjuta-provider.h>
2049 struct Proposal
2051 gchar* label;
2052 gchar* markup;
2053 gchar* info;
2054 gchar* text;
2055 GdkPixbuf* icon;
2056 gpointer data;
2060 * IAnjutaEditorAssist::cancelled
2061 * @obj: Self
2063 * This signal is emitted when the autocompletion is cancelled due to various
2064 * reasons. The provider should avoid to call ianjuta_editor_assist_proposals() after
2065 * this signal.
2067 void ::cancelled ();
2070 * ianjuta_editor_assist_add
2071 * @obj: self
2072 * @provider: a IAnjutaProvider
2073 * @err: Error handling
2075 * Add a provider to the list of completion providers
2077 void add(IAnjutaProvider* provider);
2080 * ianjuta_editor_assist_remove
2081 * @obj: self
2082 * @provider: a IAnjutaProvider
2083 * @err: Error handling
2085 * Remove a provider from the list of completion providers
2087 void remove(IAnjutaProvider* provider);
2090 * ianjuta_editor_assist_invoke
2091 * @obj: self
2092 * @provider: a IAnjutaProvider (can be NULL to use all providers)
2093 * @err: Error handling
2095 * Force invokation of a provider at the current cursor position.
2096 * That means that ianjuta_provider_populate() will be called on the
2097 * provider.
2099 void invoke(IAnjutaProvider* provider);
2102 * ianjuta_editor_assist_proposals:
2103 * @obj: self
2104 * @provider: a IAnjutaProvider
2105 * @proposals: (element-type IAnjutaEditorAssistProposal): a list of IAnjutaProposals
2106 * @finished: whether is was the last call in an async operation
2107 * @err: Error handling
2109 * Add the list of proposals for the current population. You can add
2110 * proposals async as long as the last call sets finished to TRUE. That
2111 * is usually called by the IAnjutaProvider after it was triggered by
2112 * ianjuta_provider_populate()
2115 void proposals(IAnjutaProvider* provider, GList* proposals, gboolean finished);
2119 * SECTION:ianjuta-editor-hover
2120 * @title: IAnjutaEditorHover
2121 * @short_description: Text editor hover interface
2122 * @see_also:
2123 * @stability: Unstable
2124 * @include: libanjuta/interfaces/ianjuta-editor-hover
2127 interface IAnjutaEditorHover
2129 #include <libanjuta/interfaces/ianjuta-iterable.h>
2131 /* IAnjutaEditorHover::hover-over:
2132 * @obj: self
2133 * @position: IAnjutaEditorCell specifying the position the mouse is over
2135 * The mouse is held for a moment over @position. This can be used to show
2136 * all tooltip.
2138 void ::hover_over (IAnjutaIterable* position);
2140 /* IAnjutaEditorHover::hover-leave
2141 * @obj: self
2142 * @position: IAnjutaEditorCell specifying the position the mouse was over
2144 * User moved the mouse away - can be used to clean up things done in
2145 * #IAnjutaEditorHover::hover-over
2147 void ::hover_leave (IAnjutaIterable* position);
2150 * ianjuta_editor_hover_display:
2151 * @obj: Self
2152 * @info: String to display
2153 * @err: Error propagation and reporting
2155 * Show @info as tooltip
2158 void display (IAnjutaIterable* position, const gchar *info);
2162 * SECTION:ianjuta-editor-language
2163 * @title: IAnjutaEditorLanguage
2164 * @short_description: Text editor language interface
2165 * @see_also:
2166 * @stability: Unstable
2167 * @include: libanjuta/interfaces/ianjuta-editor-language.h
2170 interface IAnjutaEditorLanguage
2172 /* IAnjutaEditorLanguage::language-changed:
2173 * @obj: self
2174 * @language: new language
2176 * the language of the editor changed to @language
2178 void ::language_changed (const gchar *language);
2181 * ianjuta_editor_language_get_supported_languages:
2182 * @obj: Self
2183 * @err: Error propagation and reporting
2185 * Return a list of languages supported by the editor
2186 * Note: These list contains the names in the form
2187 * the editor implementation knows them
2188 * Returns: (element-type utf8):
2191 const List<const gchar*> get_supported_languages ();
2194 * ianjuta_editor_language_name:
2195 * @obj: Self
2196 * @err: Error propagation and reporting
2198 * Get a list of languages the editor can highlight
2202 const gchar *get_language_name (const gchar* language);
2205 * ianjuta_editor_language_get_language:
2206 * @obj: Self
2207 * @err: Error propagation and reporting
2209 * Return the name of the currently used language
2213 const gchar *get_language ();
2216 * ianjuta_editor_language_set_language:
2217 * @obj: Self
2218 * @language: Language
2219 * @err: Error propagation and reporting
2221 * Force the editor to use a given language
2225 void set_language (const gchar* language);
2229 * SECTION:ianjuta-editor-folds
2230 * @title: IAnjutaEditorFolds
2231 * @short_description: Text editor folds inteface
2232 * @see_also:
2233 * @stability: Unstable
2234 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
2237 interface IAnjutaEditorFolds
2240 * ianjuta_editor_view_open_folds:
2241 * @obj: Self
2242 * @err: Error propagation and reporting
2244 * Open all folds
2247 void open_all ();
2250 * ianjuta_editor_view_close_folds:
2251 * @obj: Self
2252 * @err: Error propagation and reporting
2254 * Close all folds
2257 void close_all ();
2260 * ianjuta_editor_view_toggle_fold:
2261 * @obj: Self
2262 * @err: Error propagation and reporting
2264 * Open/Close current fold
2267 void toggle_current ();
2271 * SECTION:ianjuta-editor-view
2272 * @title: IAnjutaEditorView
2273 * @short_description: Text editor view interface
2274 * @see_also:
2275 * @stability: Unstable
2276 * @include: libanjuta/interfaces/ianjuta-editor-view.h
2278 * An editor view is a visual representation of the editor. An editor
2279 * can have multiple views. All views of an editor show the same editor
2280 * content (buffer). Consequently, any change done in one view is
2281 * updated in all other views.
2283 interface IAnjutaEditorView
2286 * ianjuta_editor_view_create:
2287 * @obj: Self
2288 * @err: Error propagation and reporting
2290 * Creates a new view for the editor. The newly created view gets
2291 * the user focus and scrolls to the same location as last view.
2293 void create ();
2296 * ianjuta_editor_view_remove_current:
2297 * @obj: Self
2298 * @err: Error propagation and reporting
2300 * Removes currently focused editor view. It does not remove the
2301 * last view of the editor. That is, if currently there is only
2302 * one view of the editor, this function does nothing.
2304 void remove_current ();
2307 * ianjuta_editor_view_get_count:
2308 * @obj: Self
2309 * @err: Error propagation and reporting
2311 * Total number of views currently present. It will never be less
2312 * than 1. Invalid return values are considered error condition.
2314 gint get_count ();
2318 * SECTION:ianjuta-editor-comment
2319 * @title: IAnjutaEditorComment
2320 * @short_description: Text editor comment interface
2321 * @see_also:
2322 * @stability: Unstable
2323 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
2326 interface IAnjutaEditorComment
2329 * ianjuta_editor_comment_block:
2330 * @obj: Self
2331 * @err: Error propagation and reporting
2333 * Comment/Uncomment out selected block
2335 void block();
2338 * ianjuta_editor_comment_box:
2339 * @obj: Self
2340 * @err: Error propagation and reporting
2342 * Comment/Uncomment out selected block
2344 void box();
2347 * ianjuta_editor_comment_stream:
2348 * @obj: Self
2349 * @err: Error propagation and reporting
2351 * Comment/Uncomment out selected block
2353 void stream();
2357 * SECTION:ianjuta-editor-zoom
2358 * @title: IAnjutaEditorZoom
2359 * @short_description: Text editor zoom interface
2360 * @see_also:
2361 * @stability: Unstable
2362 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2365 interface IAnjutaEditorZoom
2368 * ianjuta_editor_zoom_in:
2369 * @obj: Self
2370 * @err: Error propagation and reporting
2372 * Zoom in
2374 void in ();
2377 * ianjuta_editor_zoom_out:
2378 * @obj: Self
2379 * @err: Error propagation and reporting
2381 * Zoom out
2383 void out ();
2387 * SECTION:ianjuta-editor-goto
2388 * @title: IAnjutaEditorGoto
2389 * @short_description: Text editor navigation interface
2390 * @see_also:
2391 * @stability: Unstable
2392 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2395 interface IAnjutaEditorGoto
2398 * ianjuta_editor_goto_start_block:
2399 * @obj: Self
2400 * @err: Error propagation and reporting
2402 * Moves cursor to the start of the current block
2404 void start_block();
2407 * ianjuta_editor_goto_end_block:
2408 * @obj: Self
2409 * @err: Error propagation and reporting
2411 * Moves cursor to the end of the current block
2413 void end_block();
2416 * ianjuta_editor_goto_matching_brace:
2417 * @obj: Self
2418 * @err: Error propagation and reporting
2420 * Moves cursor to matching brace
2422 void matching_brace();
2427 * SECTION:ianjuta-editor-glade-signal
2428 * @title: IAnjutaEditorGladeSignal
2429 * @short_description: Interface for dropping signal handlers
2430 * @see_also:
2431 * @stability: Unstable
2432 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2435 interface IAnjutaEditorGladeSignal
2437 /* IAnjutaEditorGladeSignal::drop-possible
2438 * @obj: self
2439 * @iter: a IAnjutaIterable of the position where drop would happen
2441 * Emitted when a signal is dragged over the editor
2443 * Return value: TRUE if a signal handler can be dropped, FALSE otherwise
2445 gboolean ::drop_possible (IAnjutaIterable* iterator);
2447 /* IAnjutaEditorGladeSignal::drop
2448 * @obj: self
2449 * @iter: a IAnjutaIterable of the position where drop happens
2450 * @signal_data: Signal data in form "widget:signal:handler", e.g.
2451 * "GtkToggleButton:toggled:on_toggle_button_toggled"
2453 * Emitted when a signal was received per drag & drop
2456 void ::drop (IAnjutaIterable* iterator, const gchar* signal_data);
2461 * SECTION:ianjuta-editor-cell
2462 * @title: IAnjutaEditorCell
2463 * @short_description: Text editor character cell
2464 * @see_also:
2465 * @stability: Unstable
2466 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2468 * Represents a cell in editor. A cell corresponds to a unicode
2469 * character along with all associated styles (such as colors and font).
2470 * A cell may or may not have style. If style is supported in the
2471 * editor, it is assumed all cells will have styles and hence every
2472 * IAnjutaEditorCell interface instance will have additionally
2473 * IAnjutaEditorCellStyle implemented.
2475 interface IAnjutaEditorCell
2477 #include <libanjuta/interfaces/ianjuta-editor.h>
2480 * ianjuta_editor_cell_get_character:
2481 * @obj: Self
2482 * @err: Error propagation and reporting
2484 * Returns the unicode character in this cell. A NULL terminated
2485 * string is returned that is the multibyte unicode character.
2486 * NULL is returned if the cell does not have any character.
2488 * Returns: a newly created string representing the cell's unicode
2489 * character.
2491 gchar *get_character ();
2494 * ianjuta_editor_cell_get_length:
2495 * @obj: self
2496 * @err: Error propagation and reporting.
2498 * Gets the length of the cell in bytes. That is, length of the
2499 * unicode character.
2501 * Returns: Length of the unicode character.
2503 gint get_length ();
2506 * ianjuta_editor_cell_get_char:
2507 * @obj: Self
2508 * @err: Error propagation and reporting
2510 * Returns the byte of the unicode character in this cell at given
2511 * index @char_index. @char_index can vary from 0 to length of the
2512 * unicode string minus 1. Out of range index is not allowed
2513 * (asserted) and return is undefined.
2515 * Since there is dynamic allocation of unicode character string
2516 * involved in ianjuta_editor_cell_get_character(), this function
2517 * is mainly useful for fast iteration (such as copying data).
2519 * Returns: a byte character.
2521 gchar get_char (gint char_index);
2523 IAnjutaEditorAttribute get_attribute ();
2526 * SECTION:ianjuta-editor-cell-style
2527 * @title: IAnjutaEditorCellStyle
2528 * @short_description: Text editor cell style interface
2529 * @see_also:
2530 * @stability: Unstable
2531 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2534 interface IAnjutaEditorCellStyle
2536 gchar* get_font_description ();
2537 gchar* get_color();
2538 gchar* get_background_color();
2543 * SECTION:ianjuta-editor-factory
2544 * @title: IAnjutaEditorFactory
2545 * @short_description: Text editor factory that creates IAnjutaEditor objects
2546 * @see_also:
2547 * @stability: Unstable
2548 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2551 interface IAnjutaEditorFactory
2553 #include "ianjuta-editor.h"
2554 #include <gio/gio.h>
2557 * ianjuta_editor_factory_new_editor:
2558 * @obj: Self
2559 * @file: file to open
2560 * @filename: filename to open
2561 * @err: Error propagation and reporting
2563 * Get a new GtkWidget* which implements IAnjutaEditor
2565 * Return value: An object implementing IAnjutaEditor
2567 IAnjutaEditor* new_editor (GFile* file, const gchar* filename);
2571 * SECTION:ianjuta-provider
2572 * @title: IAnjutaProvider
2573 * @short_description: Provider for autocompletion features
2574 * @see_also:
2575 * @stability: Unstable
2576 * @include: libanjuta/interfaces/ianjuta-provider.h
2578 interface IAnjutaProvider
2580 #include "ianjuta-iterable.h"
2583 * ianjuta_provider_populate:
2584 * @obj: Self
2585 * @iter: the text iter where the provider should be populated
2586 * @err: Error propagation and reporting.
2588 * Show completion for the context at position @iter. The provider should
2589 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2591 * Note that this is called after every character typed and the list of proposals
2592 * has to be completely renewed.
2594 void populate(IAnjutaIterable* iter);
2597 * ianjuta_provider_get_start_iter:
2598 * @obj: Self
2599 * @err: Error propagation and reporting.
2601 * Get the iter where the current completion started
2603 * Returns: (transfer none): current start iter
2605 IAnjutaIterable* get_start_iter();
2608 * ianjuta_provider_activate:
2609 * @obj: Self
2610 * @iter: position where the completion occurs
2611 * @data: data assigned to the proposal
2612 * @err: Error propagation and reporting.
2614 * Show completion for the context at position @iter
2616 void activate(IAnjutaIterable* iter, gpointer data);
2619 * ianjuta_provider_get_name:
2620 * @obj: Self
2622 * Return a (translatable) name for the provider
2624 const gchar* get_name();
2629 * SECTION:ianjuta-document-manager
2630 * @title: IAnjutaDocumentManager
2631 * @short_description: Interface for plugin that manages all the editors
2632 * @see_also:
2633 * @stability: Unstable
2634 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2637 interface IAnjutaDocumentManager
2639 #include "ianjuta-document.h"
2640 #include "ianjuta-editor.h"
2641 #include <gio/gio.h>
2644 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT
2646 * Anjuta shell value set by document manager to the current document
2648 #define CURRENT_DOCUMENT "document_manager_current_document"
2650 enum Error
2652 DOESNT_EXIST
2656 * ianjuta_document_manager_get_file:
2657 * @obj: Self
2658 * @filename: short filename
2659 * @err: Error propagation and reporting.
2661 * Given the short filename, finds the file of the filename, if the
2662 * editor that has it loaded is found. If there is no editor that has
2663 * this file opened, returns NULL.
2665 * Return value: (transfer full): the GFile for the given short filename
2667 GFile* get_file (const gchar *filename);
2670 * ianjuta_document_manager_find_document_with_file:
2671 * @obj: Self
2672 * @file: The file to find.
2673 * @err: Error propagation and reporting.
2675 * Finds the document that has the file loaded. Only
2676 * the editor that matches the file will be searched.
2678 * Return value: (transfer none): the document that corresponds to given file. NULL if
2679 * there is no editor loaded with this file.
2681 IAnjutaDocument* find_document_with_file (GFile* file);
2684 * ianjuta_document_manager_goto_file_line:
2685 * @obj: Self
2686 * @file: file to go to.
2687 * @lineno: the line number in the file to go to.
2688 * @err: Error propagation and reporting.
2690 * Loads the given file if not loaded yet, set its editor as current editor
2691 * and moves cursor to the given line in the editor.
2693 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2695 IAnjutaEditor* goto_file_line (GFile* file, gint lineno);
2698 * ianjuta_document_manager_goto_file_line_mark:
2699 * @obj: Self
2700 * @file: file to go to.
2701 * @lineno: the line number in the file to go to.
2702 * @mark: TRUE if the line should be marked with a marker.
2703 * @err: Error propagation and reporting
2705 * Loads the given file if not loaded yet, set its editor as current editor
2706 * and moves cursor to the given line in the editor. Optionally also marks
2707 * the line with line marker if @mark is given TRUE.
2709 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2711 IAnjutaEditor* goto_file_line_mark (GFile* file, gint lineno, gboolean mark);
2714 * ianjuta_document_manager_get_current_document:
2715 * @obj: Self
2716 * @err: Error propagation and reporting.
2718 * Gets the current document.
2720 * Return value: (transfer none): the currently active document. NULL if none is there.
2722 IAnjutaDocument* get_current_document ();
2725 * ianjuta_document_manager_set_current_document:
2726 * @obj: Self
2727 * @document: the document to set as current.
2728 * @err: Error propagation and reporting.
2730 * Sets the given document as current document.
2732 void set_current_document (IAnjutaDocument *document);
2735 * ianjuta_document_manager_get_doc_widgets:
2736 * @obj: Self
2737 * @err: Error propagation and reporting.
2739 * Gets a list of widgets for open documents. Each widget is
2740 * a GTK_WIDGET(IAnjutaDocument*)
2742 * Return value: (element-type GtkWidget) (transfer container): a list of widgets for
2743 * all open documents. The returned list (but not the data in the list) must be
2744 * freed after use.
2746 List<GtkWidget*> get_doc_widgets ();
2749 * ianjuta_document_manager_add_buffer:
2750 * @obj: Self
2751 * @name: Name of the editor buffer.
2752 * @content: Initial content of the buffer.
2753 * @err: Error propagation and reporting.
2755 * Creates a new editor buffer of the given name and sets the given
2756 * content as its initial content.
2758 * Return value: (transfer full): the IAnjutaEditor instance that has been added.
2760 IAnjutaEditor* add_buffer (const gchar *name, const gchar* content);
2763 * ianjuta_document_manager_remove_document:
2764 * @obj: Self
2765 * @document: Document to close.
2766 * @save_before: If true, saves the document before closing.
2767 * @err: Error propagation and reporting.
2769 * Closes and removes the given document. If @save_before is TRUE, also
2770 * saves the document before closing.
2772 * Return value: TRUE if the document was removed, else FALSE.
2774 gboolean remove_document (IAnjutaDocument *document, gboolean save_before);
2777 * ianjuta_document_manager_add_document:
2778 * @obj: Self
2779 * @document: the document to add
2780 * @err: Error propagation and reporting.
2782 * Adds a document to the document manager. This will open a new
2783 * Notebook tab and show the document there
2786 void add_document (IAnjutaDocument* document);
2789 * ianjuta_document_manager_add_bookmark:
2790 * @obj: Self
2791 * @file: File to add the bookmark
2792 * @line: Line of the bookmark
2794 * Add a bookmark
2796 void add_bookmark (GFile* file, gint line);
2800 * SECTION:ianjuta-message-view
2801 * @title: IAnjutaMessageView
2802 * @short_description: A view where messages of different kind can be shown
2803 * @see_also:
2804 * @stability: Unstable
2805 * @include: libanjuta/interfaces/ianjuta-message-view.h
2808 interface IAnjutaMessageView
2811 * IAnjutaMessageViewType:
2812 * @IANJUTA_MESSAGE_VIEW_TYPE_NORMAL: Normal message
2813 * @IANJUTA_MESSAGE_VIEW_TYPE_INFO: Info message (highlighed)
2814 * @IANJUTA_MESSAGE_VIEW_TYPE_ERROR: Error message
2815 * @IANJUTA_MESSAGE_VIEW_TYPE_WARNING: Warning message
2817 * Speficy the type ot the message added to the message view
2819 enum Type
2821 TYPE_NORMAL,
2822 TYPE_INFO,
2823 TYPE_WARNING,
2824 TYPE_ERROR
2828 * IAnjutaMessageView::message-clicked:
2829 * @obj: Self
2830 * @message: text of the clicked message
2832 * Emitted when the user clicks on a message
2834 void ::message_clicked (const gchar *message);
2837 * IAnjutaMessageView::buffer-flushed:
2838 * @obj: Self
2839 * @line: the current line
2841 * Emitted when #ianjuta_message_view_buffer_append found a newline
2843 void ::buffer_flushed (const gchar *line);
2846 * ianjuta_message_view_buffer_append:
2847 * @obj: Self
2848 * @text: text to show as message
2849 * @err: Error propagation and reporting.
2851 * Appends the text in buffer. Flushes the buffer where a newline is found.
2852 * by emiiting buffer_flushed signal. The string is expected to be utf8.
2854 void buffer_append (const gchar *text);
2857 * ianjuta_message_view_append:
2858 * @obj: Self
2859 * @type: type of the message
2860 * @summary: summary of the message
2861 * @details: details of the message
2862 * @err: Error propagation and reporting.
2864 * Append the message with summary displayed and details displayed as tooltip
2866 void append (Type type, const gchar *summary, const gchar *details);
2869 * ianjuta_message_view_clear:
2870 * @obj: Self
2871 * @err: Error propagation and reporting.
2873 * Clear all messages in buffer
2875 void clear ();
2878 * ianjuta_message_view_select_next:
2879 * @obj: Self
2880 * @err: Error propagation and reporting.
2882 * Select next message (of type INFO, WARNING or ERROR)
2884 void select_next ();
2887 * ianjuta_message_view_select_previous:
2888 * @obj: Self
2889 * @err: Error propagation and reporting.
2891 * Select previous message
2893 void select_previous ();
2896 * ianjuta_message_view_get_current_message:
2897 * @obj: Self
2898 * @err: Error propagation and reporting.
2900 * Get the currently selected message
2902 const gchar* get_current_message ();
2905 * ianjuta_message_view_get_all_messages:
2906 * @obj: Self
2907 * @err: Error propagation and reporting.
2909 * Get a list of all messages. The list has to be freed
2910 * Returns: (element-type utf8):
2912 List<const gchar*> get_all_messages ();
2916 * SECTION:ianjuta-message-manager
2917 * @title: IAnjutaMessageManager
2918 * @short_description: The plugin that managers all message views
2919 * @see_also:
2920 * @stability: Unstable
2921 * @include: libanjuta/interfaces/ianjuta-message-manager.h
2924 interface IAnjutaMessageManager
2926 #include "ianjuta-message-view.h"
2927 #include <gdk/gdk.h>
2929 enum Error
2931 DOESNT_EXIST
2934 * ianjuta_message_manager_add_view:
2935 * @obj: Self
2936 * @name: Name/Title of the new view
2937 * @icon: Path to an icon or ""
2938 * @err: Error propagation and reporting
2940 * Adds a new view to the message-manager
2942 * Return value: The new message-view
2944 IAnjutaMessageView* add_view (const gchar *name, const gchar *icon);
2947 * ianjuta_message_manager_remove_view:
2948 * @obj: Self
2949 * @view: The view to remove
2950 * @err: Error propagation and reporting
2952 * Remove view from the message-manager. The view
2953 * will become invalid.
2955 void remove_view (IAnjutaMessageView *view);
2958 * ianjuta_message_manager_get_current_view:
2959 * @obj: Self
2960 * @err: Error propagation and reporting
2962 * Get the view with is currently on top of
2963 * the notebook or NULL if the message-manager is empty.
2965 * Return value: Current view; #IAnjutaMessageView object.
2966 * NULL, if there is no views.
2968 IAnjutaMessageView* get_current_view ();
2971 * ianjuta_message_manager_get_view_by_name:
2972 * @obj: Self
2973 * @name: Name/Title of the view
2974 * @err: Error propagation and reporting
2976 * Get the view with the given name or NULL if
2977 * it does not exist.
2979 * Return value: The message-view or NULL
2981 IAnjutaMessageView* get_view_by_name (const gchar *name);
2984 * ianjuta_message_manager_get_all_views:
2985 * @obj: Self
2986 * @err: Error propagation and reporting
2988 * Get all message-views
2990 * Return value: (element-type IAnjutaMessageView): A GList* of all views. You must not
2991 * manipulate the list.
2993 List<IAnjutaMessageView*> get_all_views ();
2996 * ianjuta_message_manager_set_current_view:
2997 * @obj: Self
2998 * @view: A message view
2999 * @err: Error propagation and reporting
3001 * Set view to be on top of the notebook.
3004 void set_current_view (IAnjutaMessageView *view);
3007 * ianjuta_message_manager_set_view_title:
3008 * @obj: Self
3009 * @view: A message view
3010 * @title: Sets the title of view.
3011 * @err: Error propagation and reporting
3013 * Sets the title of view.
3016 void set_view_title (IAnjutaMessageView *view, const gchar *title);
3019 * ianjuta_message_manager_set_view_icon:
3020 * @obj: Self
3021 * @view: A message view
3022 * @icon: Sets the icon of view.
3023 * @err: Error propagation and reporting
3025 * Sets the icon of view.
3028 void set_view_icon (IAnjutaMessageView *view, GdkPixbufAnimation *icon);
3031 * ianjuta_message_manager_set_view_icon_from_stock:
3032 * @obj: Self
3033 * @view: A message view
3034 * @icon: Sets the icon of view.
3035 * @err: Error propagation and reporting
3037 * Sets the icon of view.
3040 void set_view_icon_from_stock (IAnjutaMessageView *view, const gchar *icon);
3044 * SECTION:ianjuta-file-manager
3045 * @title: IAnjutaFileManager
3046 * @short_description: File manager plugin
3047 * @see_also:
3048 * @stability: Unstable
3049 * @include: libanjuta/interfaces/ianjuta-file-manager.h
3052 interface IAnjutaFileManager
3054 #include <gio/gio.h>
3057 * IANJUTA_FILE_MANAGER_SELECTED_FILE
3059 * Anjuta shell value set by file manager to the selected file.
3061 #define SELECTED_FILE "file_manager_selected_file"
3064 * IAnjutaFileManager::section-changed:
3065 * @obj: Self
3066 * @err: Error propagation and reporting.
3068 * fixme
3070 void ::section_changed (GFile* file);
3073 * ianjuta_file_manager_set_root:
3074 * @obj: Self
3075 * @root_uri: fixme
3076 * @err: Error propagation and reporting.
3078 * fixme
3080 void set_root (const gchar *root_uri);
3083 * ianjuta_file_manager_get_selected:
3084 * @obj: Self
3085 * @err: Error propagation and reporting.
3087 * fixme
3089 GFile* get_selected ();
3092 * ianjuta_file_manager_set_selected:
3093 * @obj: Self
3094 * @file: File to select
3095 * @err: Error propagation and reporting.
3097 * fixme.
3099 void set_selected (GFile* file);
3103 * SECTION:ianjuta-terminal
3104 * @title: IAnjutaTerminal
3105 * @short_description: Interface for command line terminals
3106 * @see_also:
3107 * @stability: Unstable
3108 * @include: libanjuta/interfaces/ianjuta-terminal.h
3111 interface IAnjutaTerminal
3113 #include <sys/types.h>
3116 * IAnjutaTerminal::child_exited:
3117 * @obj: Self
3118 * @pid: pid of terminated child
3119 * @status: status of terminated child as returned by waitpid
3121 * This signal is emitted when a child exit.
3123 void ::child_exited (gint pid, gint status);
3127 * ianjuta_terminal_execute_command:
3128 * @obj: Self
3129 * @directory: Working directory
3130 * @command: Command executed followed by arguments
3131 * @environment: List of additional environment variables
3132 * @err: Error propagation and reporting.
3134 * Run the command in a terminal, setting the working directory
3135 * and environment variables.
3137 * Returns: Process ID
3139 pid_t execute_command (const gchar* directory, const gchar *command, gchar **environment);
3143 * SECTION:ianjuta-project
3144 * @title: IAnjutaProject
3145 * @short_description: Interface implemented by project backend
3146 * @see_also:
3147 * @stability: Unstable
3148 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3150 * This is the new interface that is replacing Gnome Build.
3152 interface IAnjutaProject
3154 #include <libanjuta/anjuta-project.h>
3155 #include <gtk/gtk.h>
3157 /* Types */
3158 enum Error
3160 ERROR_SUCCESS = 0,
3161 ERROR_DOESNT_EXIST,
3162 ERROR_ALREADY_EXISTS,
3163 ERROR_VALIDATION_FAILED,
3164 ERROR_PROJECT_MALFORMED,
3165 ERROR_NOT_SUPPORTED,
3166 ERROR_GENERAL_FAILURE
3169 enum Probe
3170 PROBE_FILES = 10,
3171 PROBE_MAKE_FILES = 100,
3172 PROBE_PROJECT_FILES = 200
3175 /* Signals */
3178 * IAnjutaProject::file-changed:
3179 * @obj: Self
3180 * @node: Node to be reloaded.
3182 * This signal is emitted when the project is changed on the disk. The
3183 * corresponding node has to be reloaded.
3185 void ::file_changed (gpointer node);
3188 * IAnjutaProject::node-changed:
3189 * @obj: Self
3190 * @node: Changed node.
3191 * @error: Error while changing node
3193 * This signal is emitted when a node is changed by a function of this
3194 * interface. The error argument is not NULL if the change was not
3195 * possible. The corresponding node need to be saved.
3197 void ::node_changed (gpointer node, GError *error);
3200 * IAnjutaProject::node-saved:
3201 * @obj: Self
3202 * @node: Saved node.
3203 * @error: Error while saving node
3205 * This signal is emitted when a node is saved. It returns an error if the
3206 * save operation fail.
3208 void ::node_saved (gpointer node, GError *error);
3211 * IAnjutaProject::node-loaded:
3212 * @obj: Self
3213 * @node: Loaded node.
3214 * @error: Error while loading node
3216 * This signal is emitted when a node is loaded. It returns an error if the
3217 * load operation fail.
3219 void ::node_loaded (gpointer node, GError *error);
3223 * ianjuta_project_load_node:
3224 * @obj: Self
3225 * @node: (transfer none): Project node to reload
3226 * @err: Error propagation and reporting
3228 * Reload a project node
3230 * Return value: TRUE if the node has been loaded without error
3232 gboolean load_node (AnjutaProjectNode *node);
3235 * ianjuta_project_save_node:
3236 * @obj: Self
3237 * @node: (transfer none): Project node to save
3238 * @err: Error propagation and reporting
3240 * Save a project node
3242 * Return value: TRUE if the node has been saved without error
3244 gboolean save_node (AnjutaProjectNode *node);
3247 * ianjuta_project_add_node_after:
3248 * @obj: Self
3249 * @parent: (transfer none): Parent
3250 * @sibling: (allow-none) (transfer none): Sibling
3251 * @type: Node type
3252 * @file: (allow-none) (transfer none): Optional file object for the node
3253 * @name: (allow-none) (transfer none): Optional name for the node
3254 * @err: Error propagation and reporting
3256 * Create a new node and insert it after sibling
3258 * Return value: (transfer none): The new node, NULL if error
3260 AnjutaProjectNode *add_node_after (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, const gchar *name);
3263 * ianjuta_project_add_node_before:
3264 * @obj: Self
3265 * @parent: (transfer none): Parent
3266 * @sibling: (allow-none) (transfer none): Sibling
3267 * @type: Node type
3268 * @file: (allow-none) (transfer none): Optional file object for the node
3269 * @name: (allow-none) (transfer none): Optional name for the node
3270 * @err: Error propagation and reporting
3272 * Create a new node and insert it before sibling
3274 * Return value: (transfer none): The new node, NULL if error
3276 AnjutaProjectNode *add_node_before (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, const gchar *name);
3279 * ianjuta_project_remove_node:
3280 * @obj: Self
3281 * @node: (transfer none): Node
3282 * @err: Error propagation and reporting
3284 * Remove a node
3286 * Return value: TRUE if the node can be removed
3288 gboolean remove_node (AnjutaProjectNode *node);
3291 * ianjuta_project_set_property:
3292 * @obj: Self
3293 * @node: (transfer none): Node
3294 * @id: (transfer none): Property
3295 * @name: (allow-none) (transfer none): Name for map property
3296 * @value: (transfer none): Value
3297 * @err: Error propagation and reporting
3299 * Change a properties on node.
3301 * Return value: (allow-none) (transfer none): The new property of NULL if the property cannot be set
3303 AnjutaProjectProperty *set_property (AnjutaProjectNode *parent, const gchar *id, const gchar *name, const gchar *value);
3306 * ianjuta_project_remove_property:
3307 * @obj: Self
3308 * @node: (transfer none): Node
3309 * @id: (transfer none): Property
3310 * @name: (allow-none) (transfer none): Name for map property
3311 * @err: Error propagation and reporting
3313 * Remove a property of the node
3315 * Return value: TRUE if the node is removed
3317 gboolean remove_property (AnjutaProjectNode *node, const gchar *id, const gchar *name);
3320 * ianjuta_project_get_root:
3321 * @obj: Self
3322 * @err: Error propagation and reporting
3324 * Get root_node
3326 * Return value: (transfer none): The root node
3328 AnjutaProjectNode *get_root ();
3331 * ianjuta_project_get_node_info:
3332 * @obj: Self
3333 * @err: Error propagation and reporting
3335 * Return a list of possible node;
3337 * Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): A list
3338 * containing information on all node supported by the project.
3340 const List<AnjutaProjectNodeInfo *> get_node_info();
3343 * ianjuta_project_is_loaded:
3344 * @obj: Self
3345 * @err: Error propagation and reporting
3347 * Return TRUE if the project is loaded;
3349 * Return value: TRUE if the project is completely loaded.
3351 gboolean is_loaded ();
3355 * SECTION:ianjuta-project-backend
3356 * @title: IAnjutaProjectBackend
3357 * @short_description: Interface for creating new project
3358 * @see_also:
3359 * @stability: Unstable
3360 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3363 interface IAnjutaProjectBackend
3365 #include "ianjuta-project.h"
3368 * ianjuta_project_backend_new_project:
3369 * @obj: Self
3370 * @file: (transfer none): Project file or directory
3371 * @err: Error propagation and reporting
3373 * Create a new Anjuta project.
3375 * Return value: (transfer full): An object implementing the
3376 * #IAnjutaProject interface.
3378 IAnjutaProject* new_project (GFile *file);
3382 * ianjuta_project_backend_probe:
3383 * @obj: Self
3384 * @file: (transfer none): Project file or directory
3385 * @err: Error propagation and reporting
3387 * Check if the directory contains a project supported by this
3388 * backend.
3390 * Return value: 0 if the project is invalid and > 0 if the project is
3391 * valid.
3393 gint probe (GFile *directory);
3397 * SECTION:ianjuta-project-manager
3398 * @title: IAnjutaProjectManager
3399 * @short_description: Interface for project managers
3400 * @see_also:
3401 * @stability: Unstable
3402 * @include: libanjuta/interfaces/ianjuta-project-manager.h
3405 interface IAnjutaProjectManager
3408 #include <libanjuta/anjuta-project.h>
3409 #include <libanjuta/interfaces/ianjuta-project.h>
3412 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI
3414 * Anjuta shell value set by project manager to the project root uri.
3416 #define PROJECT_ROOT_URI "project_root_uri"
3419 * IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT
3421 * Anjuta shell value set by project manager to the current project object
3422 * which implement #IAnjutaProject interface.
3424 #define CURRENT_PROJECT "project_manager_current_project"
3427 * IANJUTA_PROJECT_MANAGER_CURRENT_URI
3429 * Anjuta shell value set by project manager to the current uri.
3431 #define CURRENT_URI "project_manager_current_uri"
3433 // Signals
3436 * IAnjutaProjectManager::project_loaded:
3437 * @obj: Self
3438 * @err: Error propagation and reporting.
3440 * Emitted when the project is fully loaded. It can takes a quite long
3441 * time if the project is big. The project is loaded in several parts
3442 * in a thread. All functions are available before having the project
3443 * fully loaded.
3445 void ::project_loaded (GError *error);
3448 * IAnjutaProjectManager::element_added:
3449 * @obj: Self
3450 * @element: A #GFile corrresponding to added element
3451 * @err: Error propagation and reporting.
3453 * Emitted when a new element is added to the project. It can be
3454 * a source, a target or a group. It does not always correspond
3455 * to an existing file. This signal can be emitted several time for
3456 * the same element.
3458 void ::element_added (GFile *element);
3461 * IAnjutaProjectManager::element_removed:
3462 * @obj: Self
3463 * @element: A #GFile corresponding to removed element
3464 * @err: Error propagation and reporting.
3466 * Emitted when an element is removed from a project. It can be
3467 * a source, a target or a group.
3469 void ::element_removed (GFile *element);
3472 * IAnjutaProjectManager::element_selected:
3473 * @obj: Self
3474 * @element_uri: A #GFile corresponding to selected element
3475 * @err: Error propagation and reporting.
3477 * Emitted when an element is selected in the project view. It
3478 * can be a source, a target or a group.
3480 void ::element_selected (GFile *element);
3482 // Methods
3485 * ianjuta_project_manager_get_elements:
3486 * @obj: Self
3487 * @element_type: Select one element type: source, group or target
3488 * @err: Error propagation and reporting.
3490 * Get a list of all elements of this type in the project.
3492 * Returns: (element-type GFile) (transfer full): Get list of #GFile corresponding to
3493 * all valid elements or %NULL if there are no elements of this type. Free the returned
3494 * list with g_list_free() and the files with g_object_unref().
3496 List<GFile *> get_elements (AnjutaProjectNodeType element_type);
3499 * ianjuta_project_manager_get_target_type:
3500 * @obj: Self
3501 * @target: A #GFile corresponding to a target
3502 * @err: Error propagation and reporting.
3504 * Get the type of the corresponding target: program, library...
3506 * Returns: Return the type of the target.
3508 AnjutaProjectNodeType get_target_type (GFile *target);
3511 * ianjuta_project_manager_get_targets:
3512 * @obj: Self
3513 * @target_type: type of the target
3514 * @err: Error propagation and reporting.
3516 * Get a list of targets in the project with the corresponding type.
3518 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to
3519 * each target of the requested type or %NULL if none exists. Free the returned list
3520 * with g_list_free() and the files with g_object_unref().
3522 List<GFile *> get_targets (AnjutaProjectNodeType target_type);
3525 * ianjuta_project_manager_get_parent:
3526 * @obj: Self
3527 * @element: A #GFile corresponding to one child.
3528 * @err: Error propagation and reporting.
3530 * Gets the parent of the corresponding child.
3532 * Returns: The parent of the child, or %NULL if the element is the root.
3534 GFile* get_parent (GFile *element);
3537 * ianjuta_project_manager_get_children:
3538 * @obj: Self
3539 * @element: A #GFile corresponding to a parent.
3540 * @err: Error propagation and reporting.
3542 * Gets the list of all children of the corresponding parent.
3544 * Returns: (element-type GFile) (transfer full): The list of #GFile corresponding to
3545 * each child of the element or %NULL if the element has no child. Free the returned
3546 * list with g_list_free() and the files with g_object_unref().
3548 List<GFile*> get_children (GFile *element);
3551 * ianjuta_project_manager_get_selected:
3552 * @obj: Self
3553 * @err: Error propagation and reporting.
3555 * Gets the currently selected element in the project manager view.
3557 * Returns: (transfer full): A #GFile corresponding to the selected element in the project
3558 * view. You own the returned file; use g_object_unref() to release it.
3560 GFile* get_selected ();
3563 * ianjuta_project_manager_get_capabilities:
3564 * @obj: Self
3565 * @err: Error propagation and reporting.
3567 * Gets the capabilites of project whether it can add group, target
3568 * sources etc.
3570 * Returns: Supported capabilites.
3572 guint get_capabilities ();
3575 * ianjuta_project_manager_add_source:
3576 * @obj: Self.
3577 * @name: Source name or URI.
3578 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3579 * %NULL if you don't care.
3580 * @err: Error propagation and reporting.
3582 * Prompts the user to add a file to the project. If the user selects
3583 * multiple files only the first source file is returned.
3585 * You can add non existing file. In this case the element_added
3586 * signal will be emitted with a non existing file. So it is
3587 * up to the caller to reemit this signal later when the file
3588 * is created.
3590 * Returns: (transfer full): A #GFile corresponding to the new source file in the
3591 * project view. You own the returned file; use g_object_unref() to release it.
3593 GFile* add_source (const gchar *name, GFile *default_target);
3596 * ianjuta_project_manager_add_source_quiet:
3597 * @obj: Self.
3598 * @name: Source name or URI.
3599 * @target: A #GFile corresponding to the parent target or group.
3600 * @err: Error propagation and reporting.
3602 * Adds a file to the project without prompting the user.
3604 * You can add non existing file. In this case the element_added
3605 * signal will be emitted with a non existing file. So it is
3606 * up to the caller to reemit this signal later when the file
3607 * is created.
3609 * Returns: (transfer full): A #GFile corresponding to the new source file in the project
3610 * view. You own the returned file; use g_object_unref() to release it.
3612 GFile* add_source_quiet (const gchar *name, GFile *target);
3615 * ianjuta_project_manager_add_sources:
3616 * @obj: Self.
3617 * @names: (element-type utf8): Sources name or URI to add.
3618 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3619 * %NULL if don't care.
3620 * @err: Error propagation and reporting.
3622 * Prompts the user to add several files to the project. Depending on the
3623 * project backend, it can be possible that the source files must
3624 * be located in a particular directory.
3626 * You can add non existing file. In this case the element_added
3627 * signal will be emitted with a non existing file. So it is
3628 * up to the caller to reemit this signal later when the file
3629 * is created.
3631 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to all
3632 * new source files added in the project. You own the list with the the returned files;
3633 * use g_list_free() and g_object_unref() on each file to release them.
3635 List<GFile*> add_sources (List<const gchar*> names, GFile *default_target);
3638 * ianjuta_project_manager_add_target:
3639 * @obj: Self
3640 * @name: Target name or URI.
3641 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3642 * %NULL if don't care.
3643 * @err: Error propagation and reporting.
3645 * Prompts the user to add a new target to the project. The user can select
3646 * a parent group different from the one set as default.
3648 * Returns: (transfer full): A #GFile corresponding to the new target added in the project.
3649 * You own the returned file; use g_object_unref() to release it.
3651 GFile* add_target (const gchar *name, GFile *default_group);
3654 * ianjuta_project_manager_add_group:
3655 * @obj: Self.
3656 * @name: Group name or URI.
3657 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3658 * %NULL if don't care.
3659 * @err: Error propagation and reporting.
3661 * Prompts the user to add a new group to the project. The user can select
3662 * a parent group different from the one set as default.
3664 * Returns: (transfer full): A #GFile corresponding to the new group added in the project.
3665 * You own the returned file; use g_object_unref() to release it.
3667 GFile* add_group (const gchar *name, GFile *default_group);
3670 * ianjuta_project_manager_is_open:
3671 * @obj: Self
3672 * @err: Error propagation and reporting.
3674 * Gets whether a project is currently opened.
3676 * Returns: %TRUE if a project is opened.
3678 gboolean is_open ();
3681 * ianjuta_project_manager_get_packages:
3682 * @obj: Self
3683 * @err: Error propagation and reporting.
3685 * Returns: (element-type utf8) (transfer container): the list of pkg-config packages that the current project
3686 * requires in it's configure.ac. Can be NULL if there is no project
3687 * opened currently or no package is required.
3689 List<gchar*> get_packages();
3692 * ianjuta_project_manager_get_current_project:
3693 * @obj: Self
3694 * @err: Error propagation and reporting.
3696 * Gets the current project.
3698 * Return value: (transfer none): the currently active project. NULL if none is there.
3700 IAnjutaProject* get_current_project ();
3704 * SECTION:ianjuta-project-chooser
3705 * @title: IAnjutaProjectChooser
3706 * @short_description: Interface for selecting project node
3707 * @see_also:
3708 * @stability: Unstable
3709 * @include: libanjuta/interfaces/ianjuta-project-chooser.h
3712 interface IAnjutaProjectChooser
3715 #include <libanjuta/anjuta-project.h>
3716 #include <libanjuta/interfaces/ianjuta-project-manager.h>
3718 // Signals
3721 * IAnjutaProjectChooser::changed:
3722 * @obj: Self
3724 * Emitted when the selected node is changed.
3726 void ::changed ();
3728 // Methods
3731 * ianjuta_project_chooser_set_project_model:
3732 * @obj: Self
3733 * @manager: A project manager
3734 * @child_type: Select one element type: source, group or target
3735 * @err: Error propagation and reporting.
3737 * Initialize a project chooser button allowing to select a parent node
3738 * where you can add the nodes of type child_type.
3739 * As special cases with
3740 * <variablelist>
3741 * <varlistentry>
3742 * <term>ANJUTA_PROJECT_ROOT</term>
3743 * <listitem><para>all nodes are included</para></listitem>
3744 * </varlistentry>
3745 * <varlistentry>
3746 * <term>ANJUTA_PROJECT_MODULE</term>
3747 * <listitem><para>only modules are included, this can be used
3748 * to add a new package. While ANJUTA_PROJECT_PACKAGE allows you
3749 * to select a target using a package.</para></listitem>
3750 * </varlistentry>
3751 * </variablelist>
3753 * Returns: TRUE if sucessful, other FALSE.
3755 gboolean set_project_model (IAnjutaProjectManager *manager, AnjutaProjectNodeType child_type);
3759 * ianjuta_project_chooser_get_selected:
3760 * @obj: Self
3761 * @err: Error propagation and reporting.
3763 * Gets the currently selected element in the project chooser.
3765 * Returns: (transfer none): A #GFile corresponding to the selected
3766 * element in the project view or %NULL if no valid node is selected.
3767 * The file is owned by the widget If you want to keep a pointer to
3768 * the file you must add a refcount using g_object_ref().
3770 GFile* get_selected ();
3775 * SECTION:ianjuta-todo
3776 * @title: IAnjutaTodo
3777 * @short_description: Task manager interface
3778 * @see_also:
3779 * @stability: Unstable
3780 * @include: libanjuta/interfaces/ianjuta-todo.h
3783 interface IAnjutaTodo
3785 #include <gio/gio.h>
3787 * ianjuta_to_do_load:
3788 * @obj: Self
3789 * @file: fixme
3790 * @err: Error propagation and reporting.
3792 * fixme
3794 void load(GFile *file);
3798 * SECTION:ianjuta-wizard
3799 * @title: IAnjutaWizard
3800 * @short_description: Interface for wizards that can create new stuffs
3801 * @see_also:
3802 * @stability: Unstable
3803 * @include: libanjuta/interfaces/ianjuta-wizard.h
3806 interface IAnjutaWizard
3810 * ianjuta_wizard_activate:
3811 * @obj: Self
3812 * @err: Error propagation and reporting.
3814 * Called when the wizard should start after some user action
3816 void activate();
3820 * SECTION:ianjuta-debugger
3821 * @title: IAnjutaDebugger
3822 * @short_description: Debugger interface
3823 * @see_also: #IAnjutaDebugManager
3824 * @stability: Unstable
3825 * @include: libanjuta/interfaces/ianjuta-debugger.h
3827 * This interface is implemented by debugger backends, by example the gdb
3828 * backend. It is used by the debug manager plugin which provides the
3829 * graphical interface and a simple wrapper: #IAnjutaDebugManager.
3831 * The debugger is in one on these 5 states and emit a signal to the debug
3832 * manager when it changes. Here is figure showing all transitions and
3833 * the signal emitted.
3834 * <figure id="debugger-states">
3835 * <mediaobject>
3836 * <imageobject>
3837 * <imagedata fileref="debugger-states.png" format="PNG"/>
3838 * </imageobject>
3839 * </mediaobject>
3840 * </figure>
3843 interface IAnjutaDebugger
3845 #include "ianjuta-message-view.h"
3846 #include <sys/types.h>
3847 #include <gio/gio.h>
3849 /* Types */
3851 * IAnjutaDebuggerError:
3852 * @IANJUTA_DEBUGGER_OK: No error
3853 * @IANJUTA_DEBUGGER_NOT_READY: Debugger is not ready to execute the command
3854 * @IANJUTA_DEBUGGER_NOT_RUNNING: Debugger is not is running state
3855 * @IANJUTA_DEBUGGER_NOT_STOPPED: Debugger is not is stopped state
3856 * @IANJUTA_DEBUGGER_NOT_LOADED: Debugger is not is loaded state
3857 * @IANJUTA_DEBUGGER_NOT_STARTED: Debugger is not in started state
3858 * @IANJUTA_DEBUGGER_NOT_CONNECTED: Debugger is not connected:
3859 * @IANJUTA_DEBUGGER_NOT_IMPLEMENTED: Corresponding function is not implemented
3860 * @IANJUTA_DEBUGGER_CANCEL: Operation has been cancelled
3861 * @IANJUTA_DEBUGGER_UNABLE_TO_CREATE_VARIABLE: Debugger cannot create variable
3862 * @IANJUTA_DEBUGGER_UNABLE_TO_ACCESS_MEMORY: Debugger cannot access memory
3863 * @IANJUTA_DEBUGGER_UNABLE_TO_OPEN_FILE: Debugger cannot open file
3864 * @IANJUTA_DEBUGGER_UNSUPPORTED_FILE_TYPE: Debugger cannot debug such file
3865 * @IANJUTA_DEBUGGER_UNSUPPORTED_VERSION: Debugger is too old
3866 * @IANJUTA_DEBUGGER_UNABLE_TO_FIND_DEBUGGER: Debugger cannot be found
3867 * @IANJUTA_DEBUGGER_ALREADY_DONE: Command has already been executed
3868 * @IANJUTA_DEBUGGER_PROGRAM_NOT_FOUND: Program cannot be found
3869 * @IANJUTA_DEBUGGER_UNABLE_TO_CONNECT: Unable to connect to debugger
3870 * @IANJUTA_DEBUGGER_UNKNOWN_ERROR: Unknown error
3871 * @IANJUTA_DEBUGGER_OTHER_ERROR: other error
3873 * This enumeration is used to defined the error returned by the debugger
3874 * backend.
3876 enum Error
3878 OK = 0,
3879 NOT_READY,
3880 NOT_RUNNING,
3881 NOT_STOPPED,
3882 NOT_LOADED,
3883 NOT_STARTED,
3884 NOT_CONNECTED,
3885 NOT_IMPLEMENTED,
3886 CANCEL,
3887 UNABLE_TO_CREATE_VARIABLE,
3888 UNABLE_TO_ACCESS_MEMORY,
3889 UNABLE_TO_OPEN_FILE,
3890 UNSUPPORTED_FILE_TYPE,
3891 UNSUPPORTED_VERSION,
3892 UNABLE_TO_FIND_DEBUGGER,
3893 ALREADY_DONE,
3894 PROGRAM_NOT_FOUND,
3895 UNABLE_TO_CONNECT,
3896 UNKNOWN_ERROR,
3897 OTHER_ERROR
3901 * IAnjutaDebuggerOutputType:
3902 * @IANJUTA_DEBUGGER_OUTPUT: Output from debugger
3903 * @IANJUTA_DEBUGGER_WARNING_OUTPUT: Warning from debugger
3904 * @IANJUTA_DEBUGGER_ERROR_OUTPUT: Error from debugger
3905 * @IANJUTA_DEBUGGER_INFO_OUTPUT: Additional message from debugger
3907 * This enumeration is used to defined the kind of output in
3908 * #IAnjutaDebuggerOutputCallback
3910 enum OutputType
3912 OUTPUT,
3913 WARNING_OUTPUT,
3914 ERROR_OUTPUT,
3915 INFO_OUTPUT
3919 * IAnjutaDebuggerState:
3920 * @IANJUTA_DEBUGGER_BUSY: Debugger is executing a command, it can enter in another
3921 * at the end of the command.
3922 * @IANJUTA_DEBUGGER_STOPPED: Debugger is stopped.
3923 * @IANJUTA_DEBUGGER_STARTED: Debugger is started but no program is loaded.
3924 * @IANJUTA_DEBUGGER_PROGRAM_LOADED: Debugger is started and has a program loaded.
3925 * @IANJUTA_DEBUGGER_PROGRAM_STOPPED: Debugger is started and has a program stopped.
3926 * @IANJUTA_DEBUGGER_PROGRAM_RUNNING: Debugger is started and has a program running.
3928 * This enumeration is used to defined the different state of the debugger.
3930 enum State
3932 BUSY,
3933 STOPPED,
3934 STARTED,
3935 PROGRAM_LOADED,
3936 PROGRAM_STOPPED,
3937 PROGRAM_RUNNING
3941 * IAnjutaDebuggerFrame:
3942 * @thread: Thread identifier.
3943 * @level: Level of the frame, 0 is the topmost one.
3944 * @args: List of argument of the caller.
3945 * @file: Source file name where is the program counter.
3946 * @line: Line number in the file above.
3947 * @function: Function name where is the program counter.
3948 * @library: Library name where is the program counter.
3949 * @address: Address of the program counter.
3951 * This structure keeps all information about a stack frame.
3953 struct Frame
3955 gint thread;
3956 guint level;
3957 gchar *args;
3958 gchar *file;
3959 guint line;
3960 gchar *function;
3961 gchar *library;
3962 gulong address;
3966 * IAnjutaDebuggerCallback:
3967 * @data: data
3968 * @user_data: user data passed to the function
3969 * @error: error
3971 * This callback function is used only by #ianjuta_debugger_callback with a
3972 * NULL data.
3974 typedef void (*Callback) (const gpointer data, gpointer user_data, GError* err);
3977 * IAnjutaDebuggerGListCallback:
3978 * @list: (element-type any): list of data
3979 * @user_data: user data passed to the function
3980 * @error: error
3982 * This callback function is used by several debugger functions. Depending on
3983 * the function, the kind of elements in the list is different. It is a string
3984 * for #ianjuta_debugger_list_local or a #IAnjutaDebuggerFrame for
3985 * #ianjuta_debugger_list_frame.
3987 typedef void (*GListCallback) (const GList* list, gpointer user_data, GError* err);
3990 * IAnjutaDebuggerGCharCallback:
3991 * @data: string
3992 * @user_data: user data
3993 * @error: error
3995 * This callback function is used by several debugger functions. The data is
3996 * a string
3998 typedef void (*GCharCallback) (const gchar *value, gpointer user_data, GError* err);
4001 * IAnjutaDebuggerOutputCallback:
4002 * @data: Self
4003 * @user_data: user data
4004 * @error: error
4006 * This callback function is used only by #ianjuta_debugger_callback with a
4007 * NULL data.
4009 typedef void (*OutputCallback) (OutputType type, const gchar *output, gpointer user_data);
4011 /* Signals */
4014 * IAnjutaDebugger::debugger_started:
4015 * @obj: Self
4017 * This signal is emitted when the debugger is started.
4019 void ::debugger_started ();
4022 * IAnjutaDebugger::debugger_stopped:
4023 * @obj: Self
4024 * @err: Error propagation and reporting.
4026 * This signal is emitted when the debugger is stopped. The error
4027 * parameters allow to check it has run correctly.
4029 void ::debugger_stopped (GError *err);
4032 * IAnjutaDebugger::program_loaded:
4033 * @obj: Self
4035 * This signal is emitted when a program is loaded.
4037 void ::program_loaded ();
4040 * IAnjutaDebugger::program_running:
4041 * @obj: Self
4043 * This signal is emitted when the program is running.
4045 void ::program_running ();
4048 * IAnjutaDebugger::program_stopped:
4049 * @obj: Self
4051 * This signal is emitted when the program is interrupted.
4053 void ::program_stopped ();
4056 * IAnjutaDebugger::program_exited:
4057 * @obj: Self
4059 * This signal is emitted when the program exits.
4061 void ::program_exited ();
4064 * IAnjutaDebugger::sharedlib_event:
4065 * @obj: Self
4067 * This signal is emitted when the program load a new shared
4068 * library.
4070 void ::sharedlib_event ();
4073 * IAnjutaDebugger::program_moved:
4074 * @obj: Self
4075 * @pid: process id, 0 when unknown
4076 * @tid: thread id, 0 when unknown
4077 * @address: program counter address, 0 when unknown
4078 * @file: source file where is the program counter, NULL when unknown
4079 * @line: line number if file name above is not NULL
4081 * This signal is emitted when the debugger know the current program
4082 * location. Most of the time, after the program has stopped but it
4083 * could happen even if it is still running.
4085 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
4088 * IAnjutaDebugger::frame_changed:
4089 * @obj: Self
4090 * @frame: frame number
4091 * @thread: thread number
4093 * This signal is emitted when the current frame changes.
4095 void ::frame_changed (guint frame, gint thread);
4098 * IAnjutaDebugger::signal_received:
4099 * @obj: Self
4100 * @name: Signal name
4101 * @description: Signal description
4103 * This signal is emitted when the program received a unix signal.
4105 void ::signal_received (const gchar* name, const gchar* description);
4108 * IAnjutaDebugger::debugger_ready:
4109 * @obj: Self
4110 * @state: debugger status
4112 * This signal is emitted when the debugger is ready to execute
4113 * a new command.
4115 void ::debugger_ready (State state);
4119 * ianjuta_debugger_get_state:
4120 * @obj: Self
4121 * @err: Error propagation and reporting.
4123 * Get the current state of the debugger
4125 * Returns: The current debugger state.
4127 State get_state ();
4133 * ianjuta_debugger_load:
4134 * @obj: Self
4135 * @file: filename
4136 * @mime_type: mime type of the file
4137 * @source_search_directories: (element-type utf8): List of directories to search for
4138 * source files.
4139 * @err: Error propagation and reporting.
4141 * Load a program in the debugger.
4143 * Returns: TRUE if sucessful, other FALSE.
4145 gboolean load (const gchar *file, const gchar *mime_type, const List<const gchar*> source_search_directories);
4148 * ianjuta_debugger_attach:
4149 * @obj: Self
4150 * @pid: pid of the process to debug
4151 * @source_search_directories: (element-type utf8): List of directories to search for
4152 * source files.
4153 * @err: Error propagation and reporting.
4155 * Attach to an already running process.
4157 * Returns: TRUE if sucessful, other FALSE.
4159 gboolean attach (pid_t pid, const List<const gchar*> source_search_directories);
4162 * ianjuta_debugger_set_working_directory:
4163 * @obj: Self
4164 * @dir: working program directory
4165 * @err: Error propagation and reporting.
4167 * Set program working directory.
4169 * Returns: TRUE if sucessful, other FALSE.
4171 gboolean set_working_directory (const gchar *dir);
4174 * ianjuta_debugger_set_environment:
4175 * @obj: Self
4176 * @env: List environment variable
4177 * @err: Error propagation and reporting
4179 * Set environment variable
4181 * Returns: TRUE if sucessfull, other FALSE.
4183 gboolean set_environment (gchar **env);
4186 * ianjuta_debugger_start:
4187 * @obj: Self
4188 * @args: command line argument of the program
4189 * @terminal: TRUE if the program need a terminal
4190 * @stop: TRUE if program is stopped at the beginning
4191 * @err: Error propagation and reporting.
4193 * Start a loaded program under debugger control.
4195 * Returns: TRUE if sucessful, other FALSE.
4197 gboolean start (const gchar *args, gboolean terminal, gboolean stop);
4200 * ianjuta_debugger_connect:
4201 * @obj: Self
4202 * @server: remote server
4203 * @args: command line argument of the program
4204 * @terminal: TRUE if the program need a terminal
4205 * @stop: TRUE if program is stopped at the beginning
4206 * @err: Error propagation and reporting
4208 * Connect to a remote debugger and run program
4210 * Returns: TRUE if sucessfull, otherwise FALSE.
4212 gboolean connect (const gchar *server, const gchar *args, gboolean terminal, gboolean stop);
4215 * ianjuta_debugger_unload:
4216 * @obj: Self
4217 * @err: Error propagation and reporting.
4219 * Unload a program.
4221 * Returns: TRUE if sucessfull, otherwise FALSE.
4223 gboolean unload ();
4226 * ianjuta_debugger_quit:
4227 * @obj: Self
4228 * @err: Error propagation and reporting.
4230 * Quit the debugger, can wait until the debugger is ready.
4232 * Returns: TRUE if sucessful, other FALSE.
4234 gboolean quit ();
4237 * ianjuta_debugger_abort:
4238 * @obj: Self
4239 * @err: Error propagation and reporting.
4241 * Quit the debugger as fast as possible.
4243 * Returns: TRUE if sucessful, otherwise FALSE.
4245 gboolean abort ();
4248 * ianjuta_debugger_run:
4249 * @obj: Self
4250 * @err: Error propagation and reporting.
4252 * Run the program currently loaded.
4254 * Returns: TRUE if sucessful, otherwise FALSE.
4256 gboolean run ();
4259 * ianjuta_debugger_step_in:
4260 * @obj: Self
4261 * @err: Error propagation and reporting.
4263 * Execute a single C instruction of the program currently loaded.
4265 * Returns: TRUE if sucessful, otherwise FALSE.
4267 gboolean step_in ();
4270 * ianjuta_debugger_step_over:
4271 * @obj: Self
4272 * @err: Error propagation and reporting.
4274 * Execute one C instruction, without entering in procedure, of
4275 * the program currently loaded.
4277 * Returns: TRUE if sucessful, otherwise FALSE.
4279 gboolean step_over ();
4282 * ianjuta_debugger_step_out:
4283 * @obj: Self
4284 * @err: Error propagation and reporting.
4286 * Execute the currently loaded program until it goes out of the
4287 * current procedure.
4289 * Returns: TRUE if sucessful, otherwise FALSE.
4291 gboolean step_out ();
4294 * ianjuta_debugger_run_to:
4295 * @obj: Self
4296 * @file: target file name
4297 * @line: target line in file
4298 * @err: Error propagation and reporting.
4300 * Execute the currently loaded program until it reachs the target
4301 * line.
4303 * Returns: TRUE if sucessful, otherwise FALSE.
4305 gboolean run_to (const gchar* file, gint line);
4308 * ianjuta_debugger_run_from:
4309 * @obj: Self
4310 * @file: target file name
4311 * @line: target line in file
4312 * @err: Error propagation and reporting.
4314 * Execute the program from a new position.
4315 * This function is optional.
4317 * Returns: TRUE if sucessful, otherwise FALSE.
4319 gboolean run_from (const gchar *file, gint line);
4322 * ianjuta_debugger_exit:
4323 * @obj: Self
4324 * @err: Error propagation and reporting.
4326 * Exit from the currently loaded program.
4328 * Returns: TRUE if sucessful, otherwise FALSE.
4330 gboolean exit ();
4333 * ianjuta_debugger_interrupt:
4334 * @obj: Self
4335 * @err: Error propagation and reporting.
4337 * Interrupt the program currently running.
4339 * Returns: TRUE if sucessful, otherwise FALSE.
4341 gboolean interrupt ();
4346 * ianjuta_debugger_inspect:
4347 * @obj: Self
4348 * @name: variable name
4349 * @callback: Callback to call with variable value
4350 * @user_data: User data that is passed back to the callback
4351 * @err: Error propagation and reporting.
4353 * Get back the value of the named variable.
4355 * Returns: TRUE if sucessful, otherwise FALSE.
4357 gboolean inspect (const gchar* name, GCharCallback callback, gpointer user_data);
4360 * ianjuta_debugger_evaluate:
4361 * @obj: Self
4362 * @name: variable name
4363 * @value: new variable value
4364 * @callback: Callback to call when the variable has been modified
4365 * @user_data: User data that is passed back to the callback
4366 * @err: Error propagation and reporting.
4368 * Change the value of a variable in the current program.
4370 * Returns: TRUE if sucessful, otherwise FALSE.
4372 gboolean evaluate (const gchar* name, const gchar* value, GCharCallback callback, gpointer user_data);
4375 * ianjuta_debugger_print:
4376 * @obj: Self
4377 * @name: variable name
4378 * @callback: Callback to call with variable value
4379 * @user_data: User data that is passed back to the callback
4380 * @err: Error propagation and reporting.
4382 * Display value of a variable, like inspect.
4384 * Returns: TRUE if sucessful, otherwise FALSE.
4386 gboolean print (const gchar *variable, GCharCallback callback, gpointer user_data);
4389 * ianjuta_debugger_list_local:
4390 * @obj: Self
4391 * @callback: Callback to call with list of local variable
4392 * @user_data: User data that is passed back to the callback
4393 * @err: Error propagation and reporting.
4395 * Get the list of local variables
4397 * Returns: TRUE if sucessful, otherwise FALSE.
4399 gboolean list_local (GListCallback callback, gpointer user_data);
4402 * ianjuta_debugger_list_argument:
4403 * @obj: Self
4404 * @callback: Callback to call with list of arguments
4405 * @user_data: User data that is passed back to the callback
4406 * @err: Error propagation and reporting.
4408 * Get the list of arguments
4410 * Returns: TRUE if sucessful, otherwise FALSE.
4412 gboolean list_argument (GListCallback callback, gpointer user_data);
4415 * ianjuta_debugger_info_signal:
4416 * @obj: Self
4417 * @callback: Callback to call with list of arguments
4418 * @user_data: User data that is passed back to the callback
4419 * @err: Error propagation and reporting.
4421 * Get some informatin about a signal
4423 * Returns: TRUE if sucessful, otherwise FALSE.
4425 gboolean info_signal (GListCallback callback, gpointer user_data);
4428 * ianjuta_debugger_info_sharedlib:
4429 * @obj: Self
4430 * @callback: Callback to call with list of arguments
4431 * @user_data: User data that is passed back to the callback
4432 * @err: Error propagation and reporting.
4434 * Get information about shared libraries.
4436 * Returns: TRUE if sucessful, otherwise FALSE.
4438 gboolean info_sharedlib (GListCallback callback, gpointer user_data);
4441 * ianjuta_debugger_handle_signal:
4442 * @obj: Self
4443 * @name: signal name
4444 * @stop: TRUE if we need to stop signal
4445 * @print: TRUE if we display a message when the signal is emitted
4446 * @ignore: TRUE if we ignore the signal
4447 * @err: Error propagation and reporting.
4449 * It defines how to handle signal received by the program.
4451 * Returns: TRUE if sucessful, otherwise FALSE.
4453 gboolean handle_signal (const gchar *name, gboolean stop, gboolean print, gboolean ignore);
4456 * ianjuta_debugger_info_frame:
4457 * @obj: Self
4458 * @frame: frame number, the top frame has the number 0
4459 * @callback: Callback to call getting a list of strings with all information
4460 * @user_data: User data that is passed back to the callback
4461 * @err: Error propagation and reporting.
4463 * Get some information about the one stack frame.
4464 * This function has been deprecated and is not used anymore in the
4465 * debugger GUI.
4467 * Returns: TRUE if sucessful, otherwise FALSE.
4469 gboolean info_frame (guint frame, GListCallback callback, gpointer user_data);
4472 * ianjuta_debugger_info_args:
4473 * @obj: Self
4474 * @callback: Callback to call getting a list of strings with all information
4475 * @user_data: User data that is passed back to the callback
4476 * @err: Error propagation and reporting.
4478 * Get some informatin about a current functin arguments.
4479 * This function has been deprecated and is not used anymore in the
4480 * debugger GUI.
4482 * Returns: TRUE if sucessful, otherwise FALSE.
4484 gboolean info_args (GListCallback callback, gpointer user_data);
4487 * ianjuta_debugger_info_target:
4488 * @obj: Self
4489 * @callback: Callback to call getting a list of strings with all information
4490 * @user_data: User data that is passed back to the callback
4491 * @err: Error propagation and reporting.
4493 * Get back some information about the target
4494 * This function has been deprecated and is not used anymore in the
4495 * debugger GUI.
4497 * Returns: TRUE if sucessful, otherwise FALSE.
4499 gboolean info_target (GListCallback callback, gpointer user_data);
4502 * ianjuta_debugger_info_program:
4503 * @obj: Self
4504 * @callback: Callback to call getting a list of strings with all information
4505 * @user_data: User data that is passed back to the callback
4506 * @err: Error propagation and reporting.
4508 * Get some informatin about a current program.
4509 * This function has been deprecated and is not used anymore in the
4510 * debugger GUI.
4512 * Returns: TRUE if sucessful, otherwise FALSE.
4514 gboolean info_program (GListCallback callback, gpointer user_data);
4517 * ianjuta_debugger_info_udot:
4518 * @obj: Self
4519 * @callback: Callback to call getting a list of strings with all information
4520 * @user_data: User data that is passed back to the callback
4521 * @err: Error propagation and reporting.
4523 * Get some informatin about OS structures.
4524 * This function has been deprecated and is not used anymore in the
4525 * debugger GUI.
4527 * Returns: TRUE if sucessful, otherwise FALSE.
4529 gboolean info_udot (GListCallback callback, gpointer user_data);
4533 * ianjuta_debugger_info_variables:
4534 * @obj: Self
4535 * @callback: Callback to call getting a list of strings with all information
4536 * @user_data: User data that is passed back to the callback
4537 * @err: Error propagation and reporting.
4539 * Get some informatin about variables.
4540 * This function has been deprecated and is not used anymore in the
4541 * debugger GUI.
4543 * Returns: TRUE if sucessful, otherwise FALSE.
4545 gboolean info_variables (GListCallback callback, gpointer user_data);
4548 * ianjuta_debugger_list_frame:
4549 * @obj: Self
4550 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame
4551 * @user_data: User data that is passed back to the callback
4552 * @err: Error propagation and reporting.
4554 * Get the list of frames.
4556 * Returns: TRUE if sucessful, otherwise FALSE.
4558 gboolean list_frame (GListCallback callback, gpointer user_data);
4561 * ianjuta_debugger_set_frame:
4562 * @obj: Self
4563 * @frame: frame number
4564 * @err: Error propagation and reporting.
4566 * Set the current frame.
4568 * Returns: TRUE if sucessful, otherwise FALSE.
4570 gboolean set_frame (guint frame);
4573 * ianjuta_debugger_list_thread:
4574 * @obj: Self
4575 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame for each thread
4576 * @user_data: User data that is passed back to the callback
4577 * @err: Error propagation and reporting.
4579 * Get the list of threads.
4581 * Returns: TRUE if sucessful, otherwise FALSE.
4583 gboolean list_thread (GListCallback callback, gpointer user_data);
4586 * ianjuta_debugger_set_thread:
4587 * @obj: Self
4588 * @thread: thread number
4589 * @err: Error propagation and reporting.
4591 * Set the current thread.
4593 * Returns: TRUE if sucessful, otherwise FALSE.
4595 gboolean set_thread (gint thread);
4598 * ianjuta_debugger_info_thread:
4599 * @obj: Self
4600 * @thread: thread number
4601 * @callback: Callback to call getting a list of strings with all information
4602 * @user_data: User data that is passed back to the callback
4603 * @err: Error propagation and reporting.
4605 * Get some information about current threads.
4607 * Returns: TRUE if sucessful, otherwise FALSE.
4609 gboolean info_thread (gint thread, GListCallback callback, gpointer user_data);
4612 * ianjuta_debugger_send_command:
4613 * @obj: Self
4614 * @command: command
4615 * @err: Error propagation and reporting.
4617 * Send a command directly to the debugger. Warning, changing the
4618 * debugger states, by sending a run command by example, will
4619 * probably gives some troubles in the debug manager.
4621 * Returns: TRUE if sucessful, otherwise FALSE.
4623 gboolean send_command (const gchar *command);
4626 * ianjuta_debugger_callback:
4627 * @obj: Self
4628 * @callback: Callback to call. the data argument is NULL.
4629 * @user_data: User data that is passed back to the callback
4630 * @err: Error propagation and reporting.
4632 * All commands are executed asynchronously and give back information
4633 * with callbacks. It is difficult to know when a command is really
4634 * executed. But as all commands are executed in order, you can use
4635 * this command to get a call back when all previous commands have
4636 * been executed.
4638 * Returns: TRUE if sucessful, otherwise FALSE.
4640 gboolean callback (Callback callback, gpointer user_data);
4643 * ianjuta_debugger_enable_log:
4644 * @obj: Self
4645 * @log: MessageView used by log
4646 * @err: Error propagation and reporting.
4648 * Log all debuggers commands, mainly useful for debugging.
4650 void enable_log (IAnjutaMessageView *log);
4653 * ianjuta_debugger_disable_log:
4654 * @obj: Self
4655 * @err: Error propagation and reporting.
4657 * Disable debugger log.
4659 void disable_log ();
4662 * ianjuta_debugger_dump_stack_trace:
4663 * @obj: Self
4664 * @callback: Callback to call getting a list of strings
4665 * @user_data: User data that is passed back to the callback
4666 * @err: Error propagation and reporting.
4668 * Return a stack trace valid for a bug reports.
4669 * This function is optional.
4671 * Returns: TRUE if sucessful, otherwise FALSE.
4673 gboolean dump_stack_trace (GListCallback callback, gpointer user_data);
4676 * SECTION:ianjuta-debugger-breakpoint
4677 * @title: IAnjutaDebuggerBreakpoint
4678 * @short_description: Breakpoint Debugger interface
4679 * @see_also:
4680 * @stability: Unstable
4681 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
4684 interface IAnjutaDebuggerBreakpoint
4688 * IAnjutaDebuggerBreakpointType:
4689 * @IANJUTA_DEBUGGER_BREAKPOINT_REMOVED: Set for removed breakpoint
4690 * @IANJUTA_DEBUGGER_BREAKPOINT_UPDATED: Set for changed breakpoint
4691 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE: Set on source line
4692 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS: Set on an addresse
4693 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION: Set on a function name
4694 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_READ: Set on read access
4695 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE: Set on write access
4696 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE: Has enable information
4697 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE: Has ignore information,
4698 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME: Has counter information
4699 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION: Has a condition
4700 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY: Temporary breakpoint, automatically removed when triggered
4701 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_PENDING: Pending breakpoint
4703 * This enumeration defined various characteristics of the breakpoint.
4705 enum Type
4707 REMOVED = 1 << 0,
4708 UPDATED = 1 << 17,
4709 ON_LINE = 1 << 1,
4710 ON_ADDRESS = 1 << 2,
4711 ON_FUNCTION = 1 << 3,
4712 ON_READ = 1 << 4,
4713 ON_WRITE = 1 << 5,
4714 WITH_ENABLE = 1 << 16,
4715 WITH_IGNORE = 1 << 15,
4716 WITH_TIME = 1 << 11,
4717 WITH_CONDITION = 1 << 12,
4718 WITH_TEMPORARY = 1 << 13,
4719 WITH_PENDING = 1 << 14,
4723 * IAnjutaDebuggerBreakpointItem:
4724 * @type: type see #IAnjutaBreakpointType enumeration
4725 * @id: unique identifier
4726 * @file: source file where is the breakpoint
4727 * @line: corresponding source file line number
4728 * @function: corresponding function name
4729 * @address: corresponding address
4730 * @enable: TRUE if the breakpoint is enabled
4731 * @ignore: TRUE if the breakpoint is ignored
4732 * @times: Count how many time the breakpoint is triggered
4733 * @condition: Additional condition for triggering the breakpoint
4734 * @temporary: TRUE if the breakpoint is temporary
4735 * @pending: TRUE if the breakpoint is pending
4737 * This structure keeps all information about a breakpoint.
4739 struct Item
4741 gint type;
4742 guint id;
4743 gchar *file;
4744 guint line;
4745 gchar *function;
4746 gulong address;
4747 gboolean enable;
4748 guint ignore;
4749 guint times;
4750 gchar *condition;
4751 gboolean temporary;
4752 gboolean pending;
4756 * IAnjutaDebuggerBreakpointMethod:
4757 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS: Allow to set breakpoint on address
4758 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION: Allow to set breakpoint on function name
4759 * @IANJUTA_DEBUGGER_BREAKPOINT_ENABLE: Allow to disable breakpoint
4760 * @IANJUTA_DEBUGGER_BREAKPOINT_IGNORE: Allow to ignore breakpoint
4761 * @IANJUTA_DEBUGGER_BREAKPOINT_CONDITION: Allow to add a condition on breakpoint
4763 * Defines which breakpoint characteristics are supported by the debugger
4764 * backend.
4766 enum Method
4768 SET_AT_ADDRESS = 1 << 0,
4769 SET_AT_FUNCTION = 1 << 1,
4770 ENABLE = 1 << 2,
4771 IGNORE = 1 << 3,
4772 CONDITION = 1 << 4
4776 * IAnjutaDebuggerBreakpointCallback:
4777 * @data: a #IAnjutaBreakpointItem object
4778 * @user_data: user data passed to the function
4779 * @error: error
4781 * This callback function is used to return a #IAnjutaBreakpointItem.
4783 typedef void (*Callback) (const Item *data, gpointer user_data, GError* err);
4786 * ianjuta_debugger_breakpoint_implement_breakpoint:
4787 * @obj: Self
4788 * @err: Error propagation and reporting.
4790 * Return all implemented methods.
4792 * Returns: A OR of #IAnjutaDebuggerBreakpointMethod
4793 * corresponding to all implemented optional methods.
4795 gint implement_breakpoint ();
4798 * ianjuta_debugger_breakpoint_set_breakpoint_at_line:
4799 * @obj: Self
4800 * @file: File containing the breakpoint
4801 * @line: Line number where is the breakpoint
4802 * @callback: Callback to call when the breakpoint has been set
4803 * @user_data: User data that is passed back to the callback
4804 * @err: Error propagation and reporting.
4806 * Set a breakpoint at the specified line in the file.
4808 * Returns: TRUE if the request succeed and the callback is called. If
4809 * FALSE, the callback will not be called.
4811 gboolean set_breakpoint_at_line (const gchar* file, guint line, Callback callback, gpointer user_data);
4815 * ianjuta_debugger_breakpoint_set_breakpoint_at_address:
4816 * @obj: Self
4817 * @address: Address of the breakpoint
4818 * @callback: Callback to call when the breakpoint has been set
4819 * @user_data: User data that is passed back to the callback
4820 * @err: Error propagation and reporting.
4822 * Set a breakpoint at the specified address.
4823 * This function is optional.
4825 * Returns: TRUE if the request succeed and the callback is called. If
4826 * FALSE, the callback will not be called.
4828 gboolean set_breakpoint_at_address (gulong address, Callback callback, gpointer user_data);
4831 * ianjuta_debugger_breakpoint_set_breakpoint_at_function:
4832 * @obj: Self
4833 * @file: File containing the breakpoint
4834 * @function: Function name where the breakpoint is put
4835 * @callback: Callback to call when the breakpoint has been set
4836 * @user_data: User data that is passed back to the callback
4837 * @err: Error propagation and reporting.
4839 * Set a breakpoint at the beginning of the specified function.
4840 * This function is optional.
4842 * Returns: TRUE if the request succeed and the callback is called. If
4843 * FALSE, the callback will not be called.
4845 gboolean set_breakpoint_at_function (const gchar* file, const gchar* function, Callback callback, gpointer user_data);
4848 * ianjuta_debugger_breakpoint_clear_breakpoint:
4849 * @obj: Self
4850 * @id: Breakpoint identification number
4851 * @callback: Callback to call when the breakpoint has been cleared
4852 * @user_data: User data that is passed back to the callback
4853 * @err: Error propagation and reporting.
4855 * Clear a breakpoint put by any set functions. The Id of the breakpoint
4856 * is given in the callback of the set functions.
4858 * Returns: TRUE if the request succeed and the callback is called. If
4859 * FALSE, the callback will not be called.
4861 gboolean clear_breakpoint (guint id, Callback callback, gpointer user_data);
4864 * ianjuta_debugger_breakpoint_list_breakpoint:
4865 * @obj: Self
4866 * @callback: Callback to call with the list of #IAnjutaDebuggreBreakpointItem
4867 * @user_data: User data that is passed back to the callback
4868 * @err: Error propagation and reporting.
4870 * List all breakpoints set in the debugger. It is useful to
4871 * know how many time a breakpoint has been hit.
4873 * Returns: TRUE if the request succeed and the callback is called. If
4874 * FALSE, the callback will not be called.
4876 gboolean list_breakpoint (IAnjutaDebuggerGListCallback callback, gpointer user_data);
4879 * ianjuta_debugger_breakpoint_enable_breakpoint:
4880 * @obj: Self
4881 * @id: Breakpoint identification number
4882 * @enable: TRUE to enable the breakpoint, FALSE to disable it
4883 * @callback: Callback to call when the breakpoint has been changed
4884 * @user_data: User data that is passed back to the callback
4885 * @err: Error propagation and reporting.
4887 * Enable of disable a breakpoint. This function is optional.
4889 * Returns: TRUE if the request succeed and the callback is called. If
4890 * FALSE, the callback will not be called.
4892 gboolean enable_breakpoint (guint id, gboolean enable, Callback callback, gpointer user_data);
4895 * ianjuta_debugger_breakpoint_ignore_breakpoint:
4896 * @obj: Self
4897 * @id: Breakpoint identification number
4898 * @ignore: Number of time a breakpoint must be ignored
4899 * @callback: Callback to call when the breakpoint has been changed
4900 * @user_data: User data that is passed back to the callback
4901 * @err: Error propagation and reporting.
4903 * This allow to ignore the breakpoint a number of time before stopping.
4904 * This function is optional.
4906 * Returns: TRUE if the request succeed and the callback is called. If
4907 * FALSE, the callback will not be called.
4909 gboolean ignore_breakpoint (guint id, guint ignore, Callback callback, gpointer user_data);
4912 * ianjuta_debugger_breakpoint_condition_breakpoint:
4913 * @obj: Self
4914 * @id: Breakpoint identification number
4915 * @condition: expression that has to be true
4916 * @callback: Callback to call when the breakpoint has been changed
4917 * @user_data: User data that is passed back to the callback
4918 * @err: Error propagation and reporting.
4920 * Add a condition, evaluate in the program context, on the breakpoint,
4921 * the program will stop when it reachs the breakpoint only if the
4922 * condition is true. This function is optional.
4924 * Returns: TRUE if the request succeed and the callback is called. If
4925 * FALSE, the callback will not be called.
4927 gboolean condition_breakpoint (guint id, const gchar* condition, Callback callback, gpointer user_data);
4931 * SECTION:ianjuta-debugger-variable
4932 * @title: IAnjutaDebuggerVariable
4933 * @short_description: Variables interface for debuggers
4934 * @see_also:
4935 * @stability: Unstable
4936 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
4938 * This interface is used to examine and change values of expression.
4939 * It is based on the MI2 variable object interface of gdb. A
4940 * variable needs to be created before being able to get or set its
4941 * value and list its children.
4943 interface IAnjutaDebuggerVariable
4946 * IAnjutaDebuggerVariableObject:
4947 * @name: unique variable object name created by backend
4948 * @expression: corresponding variable name or expression
4949 * @type: variable type
4950 * @value: variable value
4951 * @changed: TRUE if the variable has changed
4952 * @exited: TRUE if the variable is outside current scope
4953 * @deleted: TRUE if the variable has been removed
4954 * @children: Number of variable children, -1 if unknown
4955 * @has_more: TRUE if the children value is wrong
4957 * Defines a variable object.
4959 struct Object
4961 gchar *name;
4962 gchar *expression;
4963 gchar *type;
4964 gchar *value;
4965 gboolean changed;
4966 gboolean exited;
4967 gboolean deleted;
4968 gint children;
4969 gboolean has_more;
4973 * IAnjutaDebuggerVariableCallback:
4974 * @data: a #IAnjutaDebuggerVariableObject object
4975 * @user_data: user data passed to the function
4976 * @error: error
4978 * This callback function is used to return a #IAnjutaDebuggerVariableObject.
4980 typedef void (*Callback) (const Object *data, gpointer user_data, GError* err);
4983 * ianjuta_debugger_variable_create:
4984 * @obj: Self
4985 * @expression: Variable expression
4986 * @callback: Callback to call when the variable has been created
4987 * @user_data: User data that is passed back to the callback
4988 * @err: Error propagation and reporting.
4990 * Create a new variable object in the current thread and frame.
4992 * Returns: TRUE if the request succeed and the callback is
4993 * called. If FALSE, the callback will not be called.
4995 gboolean create (const gchar *expression, Callback callback, gpointer user_data);
4998 * ianjuta_debugger_variable_list_children:
4999 * @obj: Self
5000 * @name: Variable name
5001 * @from: Starting from this children (zero-based)
5002 * @callback: Callback to call when the children have been
5003 * created with a list of variable objects
5004 * @user_data: User data that is passed back to the callback
5005 * @err: Error propagation and reporting.
5007 * List and create objects for variable object's children.
5008 * The backend can returns only a part of the children, in
5009 * this case a last variable with a NULL name is added to
5010 * the list given to the callback function.
5011 * If the remaining children are wanted, this
5012 * function must be called again with a from argument
5013 * corresponding to the first missing children.
5015 * Returns: TRUE if the request succeed and the callback is
5016 * called. If FALSE, the callback will not be called.
5018 gboolean list_children (const gchar *name, guint from, IAnjutaDebuggerGListCallback callback, gpointer user_data);
5021 * ianjuta_debugger_variable_evaluate:
5022 * @obj: Self
5023 * @name: Variable name
5024 * @callback: Callback to call with the variable value
5025 * @user_data: User data that is passed back to the callback
5026 * @err: Error propagation and reporting.
5028 * Get the value of one variable or child object.
5030 * Returns: TRUE if the request succeed and the callback is
5031 * called. If FALSE, the callback will not be called.
5033 gboolean evaluate (const gchar *name, IAnjutaDebuggerGCharCallback callback, gpointer user_data);
5036 * ianjuta_debugger_variable_assign:
5037 * @obj: Self
5038 * @name: Variable name
5039 * @value: Variable value
5040 * @err: Error propagation and reporting.
5042 * Set the value of one variable or child object.
5044 * Returns: TRUE if the request succeed and the callback is
5045 * called. If FALSE, the callback will not be called.
5047 gboolean assign (const gchar *name, const gchar *value);
5050 * ianjuta_debugger_variable_update:
5051 * @obj: Self
5052 * @callback: Callback to call with the list of all changed
5053 * variable names
5054 * @user_data: User data that is passed back to the callback
5055 * @err: Error propagation and reporting.
5057 * List all changed variable objects since the last call.
5059 * Returns: TRUE if the request succeed and the callback is
5060 * called. If FALSE, the callback will not be called.
5062 gboolean update (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5065 * ianjuta_debugger_variable_destroy:
5066 * @obj: Self
5067 * @name: Variable name
5068 * @err: Error propagation and reporting.
5070 * Delete a previously created variable or child object
5071 * including its own children.
5073 * Returns: TRUE if the request succeed and the callback is
5074 * called. If FALSE, the callback will not be called.
5076 gboolean destroy (const gchar *name);
5080 * SECTION:ianjuta-debugger-register
5081 * @title: IAnjutaDebuggerRegister
5082 * @short_description: Register interface for debuggers
5083 * @see_also:
5084 * @stability: Unstable
5085 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
5087 * This interface is used to examine and change values of CPU registers.
5089 interface IAnjutaDebuggerRegister
5093 * IAnjutaDebuggerRegisterData:
5094 * @num: register identifier
5095 * @name: register name
5096 * @value: register value
5098 * Defines a register data.
5100 struct Data
5102 guint num;
5103 gchar *name;
5104 gchar *value;
5108 * ianjuta_debugger_register_list_register:
5109 * @obj: Self
5110 * @callback: Callback to call with the #IAnjutaDebuggerRegisterData list
5111 * @user_data: User data that is passed back to the callback
5112 * @err: Error propagation and reporting.
5114 * List all registers of the target. This function can be called without
5115 * a program loaded, the value field of register structure is not filled.
5117 * Returns: TRUE if the request succeed and the callback is
5118 * called. If FALSE, the callback will not be called.
5120 gboolean list_register (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5123 * ianjuta_debugger_register_update_register:
5124 * @obj: Self
5125 * @callback: Callback call with the list of all modified #IAnjutaDebuggerRegisterData
5126 * @user_data: User data that is passed back to the callback
5127 * @err: Error propagation and reporting.
5129 * Return all modified registers since the last call. Only the num and
5130 * value field are used.
5132 * Returns: TRUE if the request succeed and the callback is
5133 * called. If FALSE, the callback will not be called.
5135 gboolean update_register (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5138 * ianjuta_debugger_register_write_register:
5139 * @obj: Self
5140 * @value: Modified register with a new value
5141 * @err: Error propagation and reporting.
5143 * Change the value of one register. Only the num and value field are used.
5145 * Returns: TRUE if the request succeed.
5147 gboolean write_register (Data *value);
5151 * SECTION:ianjuta-debugger-memory
5152 * @title: IAnjutaDebuggerMemory
5153 * @short_description: Memory interface for debuggers
5154 * @see_also:
5155 * @stability: Unstable
5156 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
5158 * This interface is used to examine the target memory.
5160 interface IAnjutaDebuggerMemory
5163 * IAnjutaDebuggerRegisterMemoryBlock:
5164 * @address: start address of memory block
5165 * @length: size of memory block
5166 * @data: memory block data
5168 * Represent a block of memory.
5170 struct Block
5172 gulong address;
5173 guint length;
5174 gchar *data;
5178 * IAnjutaDebuggerMemoryCallback:
5179 * @data: a #IAnjutaDebuggerMemoryBlock object
5180 * @user_data: user data passed to the function
5181 * @error: error
5183 * This callback function is used to return a #IAnjutaDebuggerMemoryBlock.
5185 typedef void (*Callback) (const Block *data, gpointer user_data, GError* err);
5188 * ianjuta_debugger_memory_inspect:
5189 * @obj: Self
5190 * @address: Start address of the memory block
5191 * @length: Length of memory block
5192 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
5193 * @user_data: User data that is passed back to the callback
5194 * @err: Error propagation and reporting.
5196 * Read a block of the target memory.
5198 * Returns: TRUE if the request succeed and the callback is
5199 * called. If FALSE, the callback will not be called.
5201 gboolean inspect (gulong address, guint length, Callback callback, gpointer user_data);
5205 * SECTION:ianjuta-debugger-instruction
5206 * @title: IAnjutaDebuggerInstruction
5207 * @short_description: Debugger interface for machine instruction
5208 * @see_also:
5209 * @stability: Unstable
5210 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
5212 * This interface is used to debuger as machine instruction level.
5214 interface IAnjutaDebuggerInstruction
5218 * IAnjutaDebuggerInstructionALine:
5219 * @address: Address of the line
5220 * @label: Optional label
5221 * @text: Diassembled instruction on the line
5223 * Defines a disassembled line
5225 struct ALine
5227 gulong address;
5228 const gchar *label;
5229 const gchar *text;
5233 * IAnjutaDebuggerInstructionDisassembly:
5234 * @size: Number of line
5235 * @data: Array of all lines
5237 * Represents a block of diassembled instructions
5239 struct Disassembly
5241 guint size;
5242 ALine data[];
5246 * IAnjutaDebuggerInstructionCallback:
5247 * @data: a #IAnjutaDebuggerInstructionDisassembly object
5248 * @user_data: user data passed to the function
5249 * @error: error
5251 * This callback function is used to return a #IAnjutaDebuggerInstructionDisassembly.
5253 typedef void (*Callback) (const Disassembly *data, gpointer user_data, GError* err);
5256 * ianjuta_debugger_instruction_disassemble:
5257 * @obj: Self
5258 * @address: Start address of the memory block
5259 * @length: Length of memory block
5260 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
5261 * @user_data: User data that is passed back to the callback
5262 * @err: Error propagation and reporting.
5264 * Disassemble a part of the memory
5266 * Returns: TRUE if the request succeed and the callback is
5267 * called. If FALSE, the callback will not be called.
5269 gboolean disassemble (gulong address, guint length, Callback callback, gpointer user_data);
5272 * ianjuta_debugger_instruction_step_in_instruction:
5273 * @obj: Self
5274 * @err: Error propagation and reporting.
5276 * Execute one assembler instruction in the program.
5278 * Returns: TRUE if the request succeed and the callback is called. If
5279 * FALSE, the callback will not be called.
5281 gboolean step_in_instruction ();
5284 * ianjuta_debugger_instruction_step_over_instruction:
5285 * @obj: Self
5286 * @err: Error propagation and reporting.
5288 * Execute one assembler instruction in the program, if the instruction
5289 * is a function call, continues until the function returns.
5291 * Returns: TRUE if the request succeed and the callback is called. If
5292 * FALSE, the callback will not be called.
5294 gboolean step_over_instruction ();
5297 * ianjuta_debugger_instruction_run_to_address:
5298 * @obj: Self
5299 * @address: Run to this addresss
5300 * @err: Error propagation and reporting.
5302 * Start the program until it reachs the address address
5304 * Returns: TRUE if the request succeed and the callback is called. If
5305 * FALSE, the callback will not be called.
5307 gboolean run_to_address (gulong address);
5310 * ianjuta_debugger_instruction_run_from_address:
5311 * @obj: Self
5312 * @address: Run from this addresss
5313 * @err: Error propagation and reporting.
5315 * Restart the program starting from address address
5317 * Returns: TRUE if the request succeed and the callback is called. If
5318 * FALSE, the callback will not be called.
5320 gboolean run_from_address (gulong address);
5326 * SECTION:ianjuta-debug-manager
5327 * @title: IAnjutaDebugManager
5328 * @short_description: Common graphical interface to all debugger
5329 * @see_also:
5330 * @stability: Unstable
5331 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
5333 * This interface wrap the real debugger plugin and provide a
5334 * common graphical user interface.
5337 interface IAnjutaDebugManager
5339 #include "ianjuta-debugger.h"
5340 #include "ianjuta-debugger-breakpoint.h"
5341 #include <gio/gio.h>
5343 /* Signals */
5346 * IAnjutaDebugManager::debugger_started:
5347 * @obj: Self
5349 * This signal is emitted when the debugger is started.
5351 void ::debugger_started ();
5354 * IAnjutaDebugManager::debugger_stopped:
5355 * @obj: Self
5356 * @err: Error propagation and reporting.
5358 * This signal is emitted when the debugger is stopped.
5360 void ::debugger_stopped (GError *err);
5363 * IAnjutaDebugManager::program_loaded:
5364 * @obj: Self
5366 * This signal is emitted when a program is loaded most of the
5367 * time just before the first program_stopped signal.
5369 void ::program_loaded ();
5372 * IAnjutaDebugManager::program_unloaded:
5373 * @obj: Self
5375 * This signal is emitted when a program is unloaded. If the
5376 * debugger is stopped while a program is loaded, this signal
5377 * is emitted before the debugger_stopped signal.
5379 void ::program_unloaded ();
5382 * IAnjutaDebugManager::program_started:
5383 * @obj: Self
5385 * This signal is emitted when the program is started. If the
5386 * program starts and is stopped by the debugger, a program-stopped
5387 * signal will be emitted too. If the program starts is not stopped
5388 * by the debugger a program-running signal will be emitted.
5390 void ::program_started ();
5393 * IAnjutaDebugManager::program_exited:
5394 * @obj: Self
5396 * This signal is emitted when the program is unloaded. If the
5397 * debugger is stopped while a program is running or stopped, this
5398 * signal is emitted before the program_unloaded signal.
5400 void ::program_exited ();
5403 * IAnjutaDebugManager::program_stopped:
5404 * @obj: Self
5406 * This signal is emitted when the program is stopped.
5408 void ::program_stopped ();
5411 * IAnjutaDebugManager::program_running:
5412 * @obj: Self
5414 * This signal is emitted when the program is running.
5416 void ::program_running ();
5420 * IAnjutaDebugManager::sharedlib_event:
5421 * @obj: Self
5423 * This signal is emitted when a new shared library is loaded. It
5424 * is useful to try to set pending breakpoints those could be in
5425 * the newly loaded library.
5427 void ::sharedlib_event ();
5430 * IAnjutaDebugManager::program_moved:
5431 * @obj: Self
5432 * @pid: process id, 0 when unknown
5433 * @tid: thread id, 0 when unknown
5434 * @address: program counter address, 0 when unknown
5435 * @file: source file where is the program counter, NULL when unknown
5436 * @line: line number if file name above is not NULL
5438 * This signal is emitted when the debugger know the current program
5439 * location. Most of the time, after the program has stopped but it
5440 * could happen even if it is still running.
5442 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
5445 * IAnjutaDebugManager::frame_changed:
5446 * @obj: Self
5447 * @frame: frame
5448 * @thread: thread
5450 * This signal is emitted when the current frame is changed. It is
5451 * equal to the top frame in the interrupted thread when the
5452 * program stops but can be changed afterward by the user.
5453 * Several commands use this current frame, by example the register
5454 * window display the register values for the current thread only.
5456 void ::frame_changed (guint frame, gint thread);
5459 * IAnjutaDebugManager::location_changed:
5460 * @obj: Self
5461 * @address: program counter address, 0 when unknown
5462 * @uri: source file where is the program counter, NULL when unknown
5463 * @line: line number if file name above is not NULL
5465 * This signal is emitted when the current location is changed. It is
5466 * equal to the program location when the program stops but can be
5467 * changed afterward by the user.
5469 void ::location_changed (gulong address, const gchar* uri, guint line);
5472 * IAnjutaDebugManager::signal_received:
5473 * @obj: Self
5474 * @name: Signal name
5475 * @description: Signal description
5477 * This signal is emitted when the debugged program receives a
5478 * unix signal.
5480 void ::signal_received (const gchar* name, const gchar* description);
5483 * IAnjutaDebugManager::breakpoint_changed:
5484 * @obj: Self
5485 * @breakpoint: Breakpoint
5486 * @err: Error propagation and reporting.
5488 * This signal is emitted when a breakpoint is changed. It includes
5489 * new breakpoint and deleted breakpoint.
5491 void ::breakpoint_changed (IAnjutaDebuggerBreakpointItem *breakpoint);
5494 * ianjuta_debug_manager_start:
5495 * @obj: Self
5496 * @uri: uri of the target
5497 * @err: Error propagation and reporting.
5499 * Start the debugger of the given uri
5501 * Returns: TRUE if sucessful, other FALSE.
5503 gboolean start (const gchar *uri);
5506 * ianjuta_debug_manager_start_remote:
5507 * @obj: Self
5508 * @server: server (IP address:port)
5509 * @uri: uri of the local target
5510 * @err: Error propagation and reporting.
5512 * Start the debugger of the given uri
5514 * Returns: TRUE if sucessful, other FALSE.
5516 gboolean start_remote (const gchar *server, const gchar *uri);
5519 * ianjuta_debug_manager_quit:
5520 * @obj: Self
5521 * @err: Error propagation and reporting.
5523 * Quit the debugger, can wait until the debugger is ready.
5525 * Returns: TRUE if sucessful, other FALSE.
5527 gboolean quit ();
5531 * SECTION:ianjuta-vcs
5532 * @title: IAnjutaVcs
5533 * @short_description: Version control system interface
5534 * @see_also:
5535 * @stability: Unstable
5536 * @include: libanjuta/interfaces/ianjuta-vcs.h
5539 interface IAnjutaVcs
5541 #include <gio/gio.h>
5542 #include <libanjuta/anjuta-vcs-status.h>
5543 #include <libanjuta/anjuta-async-notify.h>
5546 * IAnjutaVcsError:
5547 * @IANJUTA_VCS_UNKNOWN_ERROR: Unkown error
5549 * These enumeration is used to specify errors.
5551 enum Error
5553 UNKOWN_ERROR
5557 * IAnjutaVcsStatus
5558 * @obj: Self
5560 * 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
5561 * fold- unfold the tree.
5563 void ::status_changed();
5566 * ianjuta_vcs_add:
5567 * @obj: Self
5568 * @files: (element-type GFile): List of List of files, represented as #Gfile objects, to add
5569 * @notify: #AnjutaAsyncNotify object for finish notification and error
5570 * reporting.
5572 * Add files to the VCS repository.
5574 void add(List<GFile*> files, AnjutaAsyncNotify *notify);
5577 * ianjuta_vcs_remove:
5578 * @obj: Self
5579 * @files: (element-type GFile): List of files, represented as #Gfile objects, to remove
5580 * @notify: #AnjutaAsyncNotify object for finish notification and error
5581 * reporting.
5583 * Remove files from the VCS repository.
5585 void remove(List<GFile*> files, AnjutaAsyncNotify *notify);
5588 * ianjuta_vcs_checkout:
5589 * @obj: Self
5590 * @repository_location: Location of repository to check out
5591 * @dest: Destination of checked out copy
5592 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5593 * @notify: #AnjutaAsyncNotify object for finish notification and error
5594 * reporting.
5596 * Check out a copy of a code repository.
5598 void checkout(const gchar *repository_location, GFile *dest, GCancellable *cancel, AnjutaAsyncNotify *notify);
5601 * ianjuta_vcs_query_status:
5602 * @obj: Self
5603 * @file: File/directory to query
5604 * @callback: callback to call when data for a particular file is available
5605 * @user_data: User data passed to callback
5606 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5607 * @notify: #AnjutaAsyncNotify object for finish notification and error
5608 * reporting.
5610 * Querys the status of files in the repository.
5612 void query_status (GFile* file, StatusCallback callback, gpointer user_data, GCancellable* cancel, AnjutaAsyncNotify *notify);
5615 * IAnjutaVcsStatusCallback:
5616 * @file: File representing the file for which status is given
5617 * @status: #AnjutaVcsStatus for the file represented by @file.
5618 * @user_data: User data
5620 * Callback called for each status record returned by
5621 * ianjuta_vcs_query_status.
5623 typedef void (*StatusCallback) (GFile* file, AnjutaVcsStatus status, gpointer user_data);
5626 * ianjuta_vcs_diff:
5627 * @obj: Self
5628 * @file: File to diff
5629 * @callback: Callback to call when diff data becomes available
5630 * @user_data: User data passed to @callback
5631 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5632 * @notify: #AnjutaAsyncNotify object for finish notification and error
5633 * reporting.
5635 * Generates a unified diff of the file represented by @file.
5637 void diff(GFile* file, DiffCallback callback, gpointer user_data, GCancellable* cancel, AnjutaAsyncNotify *notify);
5640 * IAnjutaVcsDiffCallback:
5641 * @file: File being diffed
5642 * @diff: Diff data
5643 * @user_data: User data
5645 * Called when diff data comes from ianjuta_vcs_diff.
5647 typedef void (*DiffCallback) (GFile* file, const gchar* diff, gpointer user_data);
5651 * SECTION:ianjuta-snippets-manager
5652 * @title: IAnjutaSnippetsManager
5653 * @short_description: Snippets Manager interface
5654 * @see_also:
5655 * @stability: Unstable
5656 * @include: libanjuta/interfaces/ianjuta-macro.h
5659 interface IAnjutaSnippetsManager
5662 * ianjuta_snippets_manager_insert:
5663 * @key: Trigger-key of the snippet
5664 * @editing_session: If after inserting the snippet there should be an editing
5665 * session. Mark as FALSE if not interested in the dynamic capabilities of the
5666 * snippet.
5667 * @obj: Self
5668 * @err: Error propagation and reporting
5670 * Insert snippet in the current editor.
5672 gboolean insert (const gchar* key, gboolean editing_session);
5676 * SECTION:ianjuta-symbol
5677 * @title: IAnjutaSymbol
5678 * @short_description: Source code symbol interface
5679 * @see_also: #IAnjutaSymbolQuery, #IAnjutaSymbolManager
5680 * @stability: Unstable
5681 * @include: libanjuta/interfaces/ianjuta-symbol.h
5683 * This interface is used to define a symbol, normally got from symbol
5684 * queries. A symbol has various fields that can be retrieved by using
5685 * their get methods. A symbol will have only those fields which have
5686 * been selected to be included in their respective queries, so make sure
5687 * the needed fields are correctly specified during query creation.
5689 interface IAnjutaSymbol
5691 #include <gdk/gdk.h>
5692 #include <gio/gio.h>
5695 * IAnjutaSymbolType:
5696 * @IANJUTA_SYMBOL_TYPE_NONE: None spedified.
5697 * @IANJUTA_SYMBOL_TYPE_UNDEF: Unknown type.
5698 * @IANJUTA_SYMBOL_TYPE_CLASS: Class declaration
5699 * @IANJUTA_SYMBOL_TYPE_ENUM: Enum declaration
5700 * @IANJUTA_SYMBOL_TYPE_ENUMERATOR: Enumerator value
5701 * @IANJUTA_SYMBOL_TYPE_FIELD: Field (Java only)
5702 * @IANJUTA_SYMBOL_TYPE_FUNCTION: Function definition
5703 * @IANJUTA_SYMBOL_TYPE_INTERFACE: Interface (Java only)
5704 * @IANJUTA_SYMBOL_TYPE_MEMBER: Member variable of class/struct
5705 * @IANJUTA_SYMBOL_TYPE_METHOD: Class method (Java only)
5706 * @IANJUTA_SYMBOL_TYPE_NAMESPACE: Namespace declaration
5707 * @IANJUTA_SYMBOL_TYPE_PACKAGE: Package (Java only)
5708 * @IANJUTA_SYMBOL_TYPE_PROTOTYPE: Function prototype
5709 * @IANJUTA_SYMBOL_TYPE_STRUCT: Struct declaration
5710 * @IANJUTA_SYMBOL_TYPE_TYPEDEF: Typedef
5711 * @IANJUTA_SYMBOL_TYPE_UNION: Union
5712 * @IANJUTA_SYMBOL_TYPE_VARIABLE: Variable
5713 * @IANJUTA_SYMBOL_TYPE_EXTERNVAR: Extern or forward declaration
5714 * @IANJUTA_SYMBOL_TYPE_MACRO: Macro (without arguments)
5715 * @IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG: Parameterized macro
5716 * @IANJUTA_SYMBOL_TYPE_FILE: File (Pseudo tag)
5717 * @IANJUTA_SYMBOL_TYPE_OTHER: Other (non C/C++/Java tag)
5718 * @IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER: types which are subjected to create a scope.
5719 * @IANJUTA_SYMBOL_TYPE_MAX: Maximum value, used as end marker.
5721 enum Type
5723 TYPE_NONE = 0,
5724 TYPE_UNDEF = 1,
5725 TYPE_CLASS = 2,
5726 TYPE_ENUM = 4,
5727 TYPE_ENUMERATOR = 8,
5728 TYPE_FIELD = 16,
5729 TYPE_FUNCTION = 32,
5730 TYPE_INTERFACE = 64,
5731 TYPE_MEMBER = 128,
5732 TYPE_METHOD = 256,
5733 TYPE_NAMESPACE = 512,
5734 TYPE_PACKAGE = 1024,
5735 TYPE_PROTOTYPE = 2048,
5736 TYPE_STRUCT = 4096,
5737 TYPE_TYPEDEF = 8192,
5738 TYPE_UNION = 16384,
5739 TYPE_VARIABLE = 32768,
5740 TYPE_EXTERNVAR = 65536,
5741 TYPE_MACRO = 131072,
5742 TYPE_MACRO_WITH_ARG = 262144,
5743 TYPE_FILE = 524288,
5744 TYPE_OTHER = 1048576,
5745 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,
5746 TYPE_MAX = 2097151
5750 * IAnjutaSymbolField:
5751 * @IANJUTA_SYMBOL_FIELD_ID: Integer. A unique ID of the symbol
5752 * @IANJUTA_SYMBOL_FIELD_NAME: String. Name of the symbol
5753 * @IANJUTA_SYMBOL_FIELD_FILE_POS: Integer. The file line number where the symbol is found.
5754 * @IANJUTA_SYMBOL_FIELD_SCOPE_DEF_ID: Integer. A unique ID to define scope created by this symbol.
5755 * @IANJUTA_SYMBOL_FIELD_FILE_SCOPE: Boolean: TRUE if symbol is within file scope,
5756 * otherwise FALSE.
5757 * @IANJUTA_SYMBOL_FIELD_SIGNATURE: String. Signature of a method, if symbol is a funtion.
5758 * Namely, the arguments list of the funtion.
5759 * @IANJUTA_SYMBOL_FIELD_RETURNTYPE: String. Return type of a method, if symbol is a function.
5760 * @IANJUTA_SYMBOL_FIELD_FILE_PATH: String. The relative path to the file where the symbol is found.
5761 * @IANJUTA_SYMBOL_FIELD_PROJECT_NAME: String. The project name to which the symbol belongs to.
5762 * @IANJUTA_SYMBOL_FIELD_PROJECT_VERSION: String. The project version to which the symbol belongs to.
5763 * @IANJUTA_SYMBOL_FIELD_IMPLEMENTATION: String. Implementation attribute of a symbol. It may be
5764 * "pure virtual", "virtual", etc.
5765 * @IANJUTA_SYMBOL_FIELD_ACCESS: String. Access attribute of a symbol.
5766 * It may be "public", "private" etc.
5767 * @IANJUTA_SYMBOL_FIELD_KIND: Kind attribute of a symbol, such as
5768 * "enumerator", "namespace", "class" etc.
5769 * @IANJUTA_SYMBOL_FIELD_TYPE: Both string and Integer. Type attribute of a symbol.
5770 * In string form, it is name of the type in string form.
5771 * In integer form, it is IAnjutaSymbolType enumerator value.
5772 * @IANJUTA_SYMBOL_FIELD_TYPE_NAME: type_name attribute of a symbol.
5773 * If a type could be "class" then its type_name may be "MyFooClass" etc.
5774 * @IANJUTA_SYMBOL_FIELD_IS_CONTAINER: Boolean. TRUE if symbol is
5775 * a scope container, such as namespace, class, struct etc., otherwise
5776 * FALSE.
5777 * @IANJUTA_SYMBOL_FIELD_END: The end marker.
5779 * Symbol Fields. Used to define and retrieve results from query. Each of
5780 * these fields are either integer or string. Use the right method to
5781 * retrieve them. That is, for integer use ianjuta_symbol_get_int(),
5782 * for string use ianjuta_symbol_get_string(), and for boolean use
5783 * ianjuta_symbol_get_boolean(). Some fields can be in both forms,
5784 * e.g. #IANJUTA_SYMBOL_FIELD_TYPE.
5786 enum Field
5788 FIELD_ID,
5789 FIELD_NAME,
5790 FIELD_FILE_POS,
5791 FILED_SCOPE_DEF_ID,
5792 FIELD_FILE_SCOPE,
5793 FIELD_SIGNATURE,
5794 FIELD_RETURNTYPE,
5795 FIELD_TYPE,
5796 FIELD_TYPE_NAME,
5797 FIELD_FILE_PATH,
5798 FIELD_PROJECT_NAME,
5799 FIELD_PROJECT_VERSION,
5800 FIELD_IMPLEMENTATION,
5801 FIELD_ACCESS,
5802 FIELD_KIND,
5803 FIELD_IS_CONTAINER,
5804 FIELD_END
5808 * ianjuta_symbol_get_boolean:
5809 * @obj: Self
5810 * @field: The field to retrieve.
5811 * @err: Error propagation and reporting.
5813 * Retreives the boolean value of a boolean @field.
5815 * Returns: The boolean
5817 gboolean get_boolean (Field field);
5820 * ianjuta_symbol_get_int:
5821 * @obj: Self
5822 * @field: The field to retrieve.
5823 * @err: Error propagation and reporting.
5825 * Retreives the integer value of an integer @field.
5827 * Returns: The integer
5829 gint get_int (Field field);
5832 * ianjuta_symbol_get_string:
5833 * @obj: Self
5834 * @field: The field to retrieve.
5835 * @err: Error propagation and reporting.
5837 * Retreives the string value of a string @field.
5839 * Returns: The string
5841 const gchar* get_string (Field field);
5844 * ianjuta_symbol_get_file:
5845 * @obj: Self
5846 * @err: Error propagation and reporting.
5848 * A convenience method to get GFile object for
5849 * #IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the
5850 * symbol is declared. It contains the absolute path of the file
5851 * unlike raw value of field #IANJUTA_SYMBOL_FIELD_FILE_PATH.
5853 * Returns: A GFile object. It must be unrefed after use.
5855 GFile* get_file();
5858 * ianjuta_symbol_get_sym_type:
5859 * @obj: Self
5860 * @err: Error propagation and reporting.
5862 * A convenience method to get value of #IANJUTA_SYMBOL_FIELD_TYPE
5863 * field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
5865 * Returns: a #IAnjutaSymbolType
5867 Type get_sym_type ();
5870 * ianjuta_symbol_get_icon:
5871 * @obj: Self
5872 * @err: Error propagation and reporting.
5874 * A convenience method to get a small icon (16x16) representing the symbol
5875 * kind. You *need* a query with fields #IANJUTA_SYMBOL_FIELD_ACCESS and
5876 * #IANJUTA_SYMBOL_FIELD_KIND selected.
5878 * Returns: a Pixbuf icon representing the symbol. Ref the icon if you
5879 * need to keep it.
5881 const GdkPixbuf *get_icon ();
5885 * SECTION:ianjuta-symbol-query
5886 * @title: IAnjutaSymbolQuery
5887 * @short_description: Source code symbol query interface
5888 * @see_also: #IAnjutaSymbolManager, #IAnjutaSymbol
5889 * @stability: Unstable
5890 * @include: libanjuta/interfaces/ianjuta-symbol-query.h
5892 * A query object will have this interface that allows to tweak various
5893 * query parameters. Except for the #IAnjutaSymbolQueryName and
5894 * #IAnjutaSymbolQueryDb parameters, everything else is changable
5895 * post-creation.
5897 * Note that chaning a query parameter, except for limit and offset will
5898 * result in re-preparing the query the next time it is executed, so it is
5899 * not advisable to change it each time the query is executed. For such
5900 * cases, create different queries with different parameters.
5902 * A query is signified by a name enumeration (#IAnjutaSymbolQueryName) which
5903 * practically determines the query type and its execution condition. Each
5904 * query name is assigned to pre-defined query statement and can only be
5905 * set during creation time. Then only its specific ianjuta_symbol_query_search_*()
5906 * can be used to execute the query. These specific execution methods are
5907 * provided to make it convenient to pass query parameters easily and to
5908 * ensure all the needed parameters are given.
5910 * A query can run in different modes, defined by #IAnjutaSymbolQueryMode, by
5911 * default it is executed in synchrounous mode #IANJUTA_SYMBOL_QUERY_MODE_SYNC
5912 * and can be changed using ianjuta_symbol_query_set_mode().
5913 * #IANJUTA_SYMBOL_QUERY_MODE_ASYNC runs it in asynchronous mode in a separate
5914 * thread and can be canceled with ianjuta_symbol_query_cancel().
5916 * A query runs on a database, defined by #IAnjutaSymbolQueryDb, and can be
5917 * only selected at creatation time.
5919 * In addition, there are many other filters that can be set to the query
5920 * to refine the query results. For example, ianjuta_symbol_query_set_fields()
5921 * is used to set the needed symbol fields to retrieve, ianjuta_symbol_query_set_filters()
5922 * is used to filter the results with symbol types, ianjuta_symbol_query_set_file_scope()
5923 * limits the results to either public or private scope within the source file,
5924 * ianjuta_symbol_query_set_group_by() is used to group the results on a given
5925 * field, ianjuta_symbol_query_set_order_by is used to order the results on a
5926 * given field.
5928 * ianjuta_symbol_query_set_limit() and ianjuta_symbol_query_set_offset() are
5929 * used to change limit and offset of the resultset. Note again that these
5930 * parameters do not require re-preparation of query, so can be safely used
5931 * any time without performance hit.
5933 interface IAnjutaSymbolQuery
5935 #include "ianjuta-iterable.h"
5936 #include "ianjuta-symbol.h"
5939 * IAnjutaSymbolQueryMode:
5940 * @IANJUTA_SYMBOL_QUERY_MODE_SYNC: Syncronous query. The result is immediately
5941 * available as retrun value of search call.
5942 * @IANJUTA_SYMBOL_QUERY_MODE_ASYNC: Asynchronous query. The search call
5943 * return immediately and result delievered as a signal later. The actual
5944 * query is done in a separate thread.
5945 * @IANJUTA_SYMBOL_QUERY_MODE_QUEUED: If the database is busy
5946 * scanning, then the query is performed later when database is ready.
5947 * It returns NULL and result is delivered through async-result signal.
5948 * Only query can stay queued, so calling search multiple times would
5949 * result in only the last one being active.
5951 * This parameter determines the mode of query execution. By default,
5952 * IANJUTA_SYMBOL_QUERY_MODE_SYNC is selected.
5954 enum Mode
5956 MODE_SYNC,
5957 MODE_ASYNC,
5958 MODE_QUEUED
5962 * IAnjutaSymbolQueryDb:
5963 * @IANJUTA_SYMBOL_QUERY_DB_PROJECT: Select project database.
5964 * @IANJUTA_SYMBOL_QUERY_DB_SYSTEM: Select system database.
5966 * Sets the database to use for the query. System database is where
5967 * all system library symbols are found. While project database is where
5968 * currently open project's symbols are found.
5970 enum Db
5972 DB_PROJECT,
5973 DB_SYSTEM
5977 * IAnjutaSymbolQueryName:
5978 * @IANJUTA_SYMBOL_QUERY_SEARCH: Query to perform basic substring search.
5979 * @IANJUTA_SYMBOL_QUERY_SEARCH_ALL: Query to get all symbols
5980 * @IANJUTA_SYMBOL_QUERY_SEARCH_FILE: Query to perform substring search in a file.
5981 * @IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE: Query to perform substring search in a scope.
5982 * @IANJUTA_SYMBOL_QUERY_SEARCH_ID: Query to find the symbol of given ID.
5983 * @IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS: Query to find members of a scope (eg. class).
5984 * @IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS: Query to get parents of a class.
5985 * @IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE: Query to find scope name of a file position.
5986 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE: Query to get the parent scope of a symbol.
5987 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE: Query to get the parent scope of a symbol in the file.
5989 * Names of query that defined what kind of query it is.
5991 enum Name
5993 SEARCH,
5994 SEARCH_ALL,
5995 SEARCH_FILE,
5996 SEARCH_IN_SCOPE,
5997 SEARCH_ID,
5998 SEARCH_MEMBERS,
5999 SEARCH_CLASS_PARENTS,
6000 SEARCH_SCOPE,
6001 SEARCH_PARENT_SCOPE,
6002 SEARCH_PARENT_SCOPE_FILE
6006 * IAnjutaSymbolQueryFileScope:
6007 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_IGNORE: Ignore file scope
6008 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PUBLIC: Only public symbols visible to rest of project.
6009 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PRIVATE: Only private symbols visible inside a file.
6011 * Defines file scope of symbols to query.
6013 enum FileScope
6015 SEARCH_FS_IGNORE,
6016 SEARCH_FS_PUBLIC,
6017 SEARCH_FS_PRIVATE
6021 * IAnjutaSymbolQuery::async_result:
6022 * @ianjutasymbolquery: Self
6023 * @arg1: Query result (IAnjutaIterable, IAnjutaSymbol) of an async
6024 * or queued search. NULL if no result is found or some error happened.
6026 * This signal is emitted for every search of the Query involved in async
6027 * mode, unless cancled by ianjuta_symbol_query_cancel(). For single queued
6028 * query, only result of the last search is emitted (if it wasn't database
6029 * was busy when search was invoked). Unlike in sync counterpart,
6030 * do not unref @result after use.
6032 void ::async_result (GObject* result);
6035 * ianjuta_symbol_query_set_mode:
6036 * @obj: Self
6037 * @mode: The mode of query.
6038 * @err: Error propagation and reporting.
6040 * Sets the mode of Query.
6042 void set_mode (IAnjutaSymbolQueryMode mode);
6045 * ianjuta_symbol_query_set_fields:
6046 * @obj: Self
6047 * @n_fields: Then number of fields to retrieve.
6048 * @fields: The fields to retrieve in the query. The array length must
6049 * be @n_fields.
6050 * @err: Error propagation and reporting.
6052 * Sets the fields of Query.
6054 void set_fields (gint n_fields, IAnjutaSymbolField *fields);
6057 * ianjuta_symbol_query_set_filters:
6058 * @obj: Self
6059 * @filters: The mode of query.
6060 * @include_types: TRUE if filter is positive, FALSE if reversed.
6061 * @err: Error propagation and reporting.
6063 * Sets the bit mask of symbol type filters. if @include_types is TRUE,
6064 * symbols satisfying the given symbol types are selected, otherwise
6065 * they are excluded.
6067 void set_filters (IAnjutaSymbolType filters, gboolean includes_types);
6070 * ianjuta_symbol_query_set_file_scope:
6071 * @obj: Self
6072 * @filescope_search: The filescope to search.
6073 * @err: Error propagation and reporting.
6075 * Sets the filescope search of Query.
6077 void set_file_scope (IAnjutaSymbolQueryFileScope filescope_search);
6080 * ianjuta_symbol_query_set_offset:
6081 * @obj: Self
6082 * @offset: Offset of the resultset.
6083 * @err: Error propagation and reporting.
6085 * Sets the offset index of Query results.
6087 void set_offset (gint offset);
6090 * ianjuta_symbol_query_set_limit:
6091 * @obj: Self
6092 * @limit: The limit of query.
6093 * @err: Error propagation and reporting.
6095 * Sets the limit of Query results. No more than @limit results are
6096 * returned.
6098 void set_limit (gint limit);
6101 * ianjuta_symbol_query_set_group_by:
6102 * @obj: Self
6103 * @field: The field to group results.
6104 * @err: Error propagation and reporting.
6106 * Sets the field with which result of query is grouped. As a result
6107 * there will be no duplicates of with this field.
6109 void set_group_by (IAnjutaSymbolField field);
6112 * ianjuta_symbol_query_set_order_by:
6113 * @obj: Self
6114 * @field: The field to order the result.
6115 * @err: Error propagation and reporting.
6117 * Sets the field with which result of query is ordered.
6119 void set_order_by (IAnjutaSymbolField field);
6122 * ianjuta_symbol_query_set_cancel:
6123 * @obj: Self
6124 * @err: Error propagation and reporting.
6126 * Cancels any pending non-sync searches. After calling this, it is
6127 * guaranteed that "async-result" will not be called any more for any
6128 * past searches. New searches will have their results signaled as
6129 * normal.
6131 void cancel ();
6134 * ianjuta_symbol_query_search:
6135 * @obj: Self
6136 * @pattern: Search pattern in compliance with SQL LIKE syntax
6137 * @err: Error propagation and reporting.
6139 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH query.
6141 IAnjutaIterable* search (const gchar *pattern);
6144 * ianjuta_symbol_query_search_all:
6145 * @obj: Self
6146 * @err: Error propagation and reporting.
6148 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ALL query.
6150 IAnjutaIterable* search_all ();
6153 * ianjuta_symbol_query_search_file:
6154 * @obj: Self
6155 * @pattern: Search pattern in compliance with SQL LIKE syntax
6156 * @file: The file whose symbols are searched.
6157 * @err: Error propagation and reporting.
6159 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_FILE query.
6161 IAnjutaIterable* search_file (const gchar *pattern, const GFile *file);
6164 * ianjuta_symbol_query_search_in_scope:
6165 * @obj: Self
6166 * @pattern: Search pattern in compliance with SQL LIKE syntax
6167 * @scope: The scope inside which symbols are searched.
6168 * @err: Error propagation and reporting.
6170 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE query.
6172 IAnjutaIterable* search_in_scope (const gchar *pattern, IAnjutaSymbol *scope);
6175 * ianjuta_symbol_query_search_members:
6176 * @obj: Self
6177 * @symbol: The symbol whose members to get.
6178 * @err: Error propagation and reporting.
6180 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS query.
6182 IAnjutaIterable* search_members (IAnjutaSymbol *symbol);
6185 * ianjuta_symbol_query_search_class_parents:
6186 * @obj: Self
6187 * @symbol: The class symbol whose parents to get.
6188 * @err: Error propagation and reporting.
6190 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS query.
6192 IAnjutaIterable* search_class_parents (IAnjutaSymbol *symbol);
6195 * ianjuta_symbol_query_search_id:
6196 * @obj: Self
6197 * @symbol: The symbol id whose details to get.
6198 * @err: Error propagation and reporting.
6200 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ID query.
6202 IAnjutaIterable* search_id (gint symbol_id);
6205 * ianjuta_symbol_query_search_scope:
6206 * @obj: Self
6207 * @file_path: The file where the scope is.
6208 * @line: The line where the scope is.
6209 * @err: Error propagation and reporting.
6211 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE query.
6213 IAnjutaIterable* search_scope (const gchar *file_path, gint line);
6216 * ianjuta_symbol_query_search_parent_scope:
6217 * @obj: Self
6218 * @symbol: The symbol whose parent scope is to be found.
6219 * @err: Error propagation and reporting.
6221 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE query.
6223 IAnjutaIterable* search_parent_scope (IAnjutaSymbol *symbol);
6226 * ianjuta_symbol_query_search_parent_scope_file:
6227 * @symbol: The symbol whose parent scope is to be found.
6228 * @obj: Self
6229 * @file_path: The file where the parent scope is to be found.
6230 * @err: Error propagation and reporting.
6232 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE query.
6234 IAnjutaIterable* search_parent_scope_file (IAnjutaSymbol *symbol, const gchar *file_path);
6238 * SECTION:ianjuta-symbol-manager
6239 * @title: IAnjutaSymbolManager
6240 * @short_description: Source code symbols manager inteface
6241 * @see_also: #IAnjutaSymbol
6242 * @stability: Unstable
6243 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
6246 interface IAnjutaSymbolManager
6248 #include <libanjuta/anjuta-async-notify.h>
6249 #include "ianjuta-iterable.h"
6250 #include "ianjuta-symbol.h"
6251 #include "ianjuta-symbol-query.h"
6254 * IAnjutaSymbolManager::prj_scan_end:
6255 * @obj: Self
6257 * This signal is emitted when a scanning of one or more files on project db
6258 * ends.
6260 void ::prj_scan_end (gint process_id);
6263 * IAnjutaSymbolManager::sys_scan_end:
6264 * @obj: Self
6266 * This signal is emitted when a scanning of one or more packages on system db
6267 * ends. This signal doesn't mean that all the scan process for the packages
6268 * is ended, but that just one (or more) is (are).
6270 void ::sys_scan_end (gint process_id);
6273 * ianjuta_symbol_manager_create_query:
6274 * @obj: Self
6275 * @name: Name of the query. It decides what query type it is.
6276 * @db: The database to use.
6277 * @err: Error propagation and reporting.
6279 * Create a query object. By default only #IANJUTA_SYMBOL_FIELD_ID and
6280 * and #IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity,
6281 * offset is set to 0, no filters are set and mode is set to
6282 * #IANJUTA_SYMBOL_QUERY_MODE_SYNC.
6284 * Returns: A #IAnjutaSymbolQuery object
6286 IAnjutaSymbolQuery* create_query (IAnjutaSymbolQueryName name, IAnjutaSymbolQueryDb db);
6289 * ianjuta_symbol_manager_add_package:
6290 * @obj: Self
6291 * @pkg_name: Name of the package to scan. Should be the name given by
6292 * pkg-config. The colon char must be avoided.
6293 * @pkg_version: Version of the package. The colon char must be avoided.
6294 * or by the language implementation (Python, Javascript, etc.)
6295 * @files: A list of GFile's to scan for this package
6297 * Reads the package files into the database asynchronously.
6299 * Returns: TRUE if the package will be loaded into the db, FALSE if the package
6300 * already exists
6302 gboolean add_package (const gchar* pkg_name, const gchar* pkg_version, GList* files);
6305 * ianjuta_symbol_manager_activate_package:
6306 * @obj: Self
6307 * @pkg_name: Name of the package to activate. The colon char must be avoided.
6308 * @pkg_version: Version of the package. The colon char must be avoided.
6310 * Activates the package for searches in the global symbol database.
6312 * Returns: TRUE if the package was loaded (or will be loaded once scanned).
6313 * FALSE if the version given was newer than the version in the database or the
6314 * package was not found. In this case, add_package() should be called.
6316 gboolean activate_package (const gchar *pkg_name, const gchar* pkg_version);
6319 * ianjuta_symbol_manager_deactivate_package:
6320 * @obj: Self
6321 * @pkg_name: name of the package. The colon char must be avoided.
6322 * @pkg_version: Version of the package. The colon char must be avoided.
6324 * Deactivates the package if it was found. If package is NULL, deactivate all
6325 * packages.
6328 void deactivate_package (const gchar* pkg_name, const gchar* pkg_version);
6331 * ianjuta_symbol_manager_deactivate_all:
6332 * @obj: Self
6334 * Deactivates all activate packages
6337 void deactivate_all ();
6341 * SECTION:ianjuta-print
6342 * @title: IAnjutaPrint
6343 * @short_description: Print interface
6344 * @see_also:
6345 * @stability: Unstable
6346 * @include: libanjuta/interfaces/ianjuta-print.h
6349 interface IAnjutaPrint
6352 * ianjuta_print_print:
6353 * @obj: Self
6354 * @err: Error propagation and reporting.
6356 * Print the plugin (the file in case of the editor). In most cases this will show
6357 * a print dialog
6359 void print();
6362 * ianjuta_print_print:
6363 * @obj: Self
6364 * @err: Error propagation and reporting.
6366 * Show print preview dialog
6369 void print_preview();
6373 * SECTION:ianjuta-preferences
6374 * @title: IAnjutaPreferences
6375 * @short_description: Preferences interface
6376 * @see_also:
6377 * @stability: Unstable
6378 * @include: libanjuta/interfaces/ianjuta-preferences
6381 interface IAnjutaPreferences
6383 #include <libanjuta/anjuta-preferences.h>
6385 * ianjuta_preferences_merge:
6386 * @obj: Self
6387 * @prefs: AnjutaPreferences to install to
6388 * @err: Error propagation and reporting.
6390 * When called, the plugin should install it's preferences
6392 void merge(AnjutaPreferences* prefs);
6395 * ianjuta_preferences_unmerge:
6396 * @obj: Self
6397 * @prefs: AnjutaPreferences to install to
6398 * @err: Error propagation and reporting.
6400 * When called, the plugin should uninstall it's preferences
6402 void unmerge(AnjutaPreferences* prefs);
6406 * SECTION:ianjuta-plugin-factory
6407 * @title: IAnjutaPluginFactory
6408 * @short_description: Create Anjuta plugin objects
6409 * @see_also:
6410 * @stability: Unstable
6411 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
6413 * This interface is used to create all Anjuta plugin objects. It is
6414 * already implemented inside Anjuta by an object able to load plugins written
6415 * in C. In order to load plugins in other languages (or in a different way),
6416 * a loader plugin implementing this interface must be written first, probably
6417 * in C.
6420 interface IAnjutaPluginFactory
6422 #include <libanjuta/anjuta-plugin.h>
6423 #include <libanjuta/anjuta-shell.h>
6424 #include <libanjuta/anjuta-plugin-handle.h>
6427 * IAnjutaPluginFactoryError:
6428 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
6429 * missing in .plugin file
6430 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
6431 * double colon following location) is missing in .plugin file
6432 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
6433 * plugin module is probably not installed
6434 * @IANJUTA_PLUGIN_FACTORY_INVALID_MODULE: Module file cannot be
6435 * loaded, not a shared library perhaps
6436 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
6437 * registration function, library is not an anjuta plugin or
6438 * is not for the right version
6439 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
6440 * plugin type, library is not an anjuta plugin or not for
6441 * the right version
6442 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
6444 * These enumeration is used to specify errors.
6446 enum Error
6448 OK = 0,
6449 MISSING_LOCATION,
6450 MISSING_TYPE,
6451 MISSING_MODULE,
6452 INVALID_MODULE,
6453 MISSING_FUNCTION,
6454 INVALID_TYPE,
6455 UNKNOWN_ERROR,
6459 * ianjuta_plugin_factory_new_plugin:
6460 * @obj: Self
6461 * @handle: Plugin information
6462 * @shell: Anjuta shell
6463 * @err: Error propagation and reporting.
6465 * Create a new AnjutaPlugin object from the plugin information handle,
6466 * give it the AnjutaShell object as argument.
6468 * Return value: a new plugin object
6470 AnjutaPlugin* new_plugin (AnjutaPluginHandle* handle, AnjutaShell *shell);
6474 * SECTION:ianjuta-language
6475 * @title: IAnjutaLanguage
6476 * @short_description: Interface to manage multiple programming languages
6477 * @see_also:
6478 * @stability: Unstable
6479 * @include: libanjuta/interfaces/ianjuta-language.h
6483 interface IAnjutaLanguage
6485 #include <libanjuta/interfaces/ianjuta-editor-language.h>
6486 typedef gint Id;
6489 * ianjuta_language_from_mime_type:
6490 * @obj: Self
6491 * @mime_type: A mime type to get the language for
6493 * Returns: A language Id or 0 in case no language was found
6495 Id get_from_mime_type (const gchar* mime_type);
6498 * ianjuta_language_from_string:
6499 * @obj: Self
6500 * @string: A string representation of the language. Note that multiple
6501 * strings may describe the language like C++ and Cpp
6503 * Returns: A language Id or 0 in case no language was found
6505 Id get_from_string (const gchar* string);
6508 * ianjuta_language_get_name:
6509 * @obj: Self
6510 * @id: A valid language id
6512 * Returns: The main name of the language. When you call ianjuta_language_from_string()
6513 * before that method the string you get here might be different to the one you passed
6514 * because the language might have multiple string representations
6516 const gchar* get_name(Id id);
6519 * ianjuta_language_get_make_target:
6520 * @obj: Self
6521 * @id: A valid language id
6523 * Returns: The suffix for the file thats needs to be passed to
6524 * make to compile the file, e.g. ".o" for C
6526 const gchar* get_make_target (Id id);
6529 * ianjuta_language_get_strings:
6530 * @obj: Self
6531 * @id: A valid language id
6533 * Returns: (element-type utf8): A list of strings that represent this language
6535 List<const gchar*> get_strings(Id id);
6538 * ianjuta_language_get_mime_types:
6539 * @obj: Self
6540 * @id: A valid language id
6542 * Returns: (element-type utf8): A list of mime-types that represent this language
6544 List<const gchar*> get_mime_types(Id id);
6547 * ianjuta_language_get_from_editor:
6548 * @obj: Self
6549 * @editor: An object implementing IAnjutaEditorLanguage
6550 * @err: Error propagation
6552 * Conviniece method to get the id directly from the editor
6554 * Returns: A valid language id or 0
6557 IAnjutaLanguageId get_from_editor (IAnjutaEditorLanguage* editor);
6560 * ianjuta_language_get_name_from_editor:
6561 * @obj: Self
6562 * @editor: An object implementing IAnjutaEditorLanguage
6563 * @err: Error propagation
6565 * Conviniece method to get the name directly from the editor
6567 * Returns: A language name or NULL
6570 const gchar* get_name_from_editor (IAnjutaEditorLanguage* editor);
6573 * ianjuta_language_get_languages:
6574 * @obj: Self
6575 * @err: Error propagation
6577 * Returns: (element-type int) (transfer container): a list of ids of the available
6578 * languages. Use GPOINTER_TO_INT() to receive them. The list but not the
6579 * values should be free'd with g_list_free()
6581 GList* get_languages ();
6585 * SECTION:ianjuta-indenter
6586 * @title: IAnjutaIndenter
6587 * @short_description: Interface for automatic indentation
6588 * @see_also:
6589 * @stability: Unstable
6590 * @include: libanjuta/interfaces/ianjuta-indenter.h
6594 interface IAnjutaIndenter
6596 #include <libanjuta/interfaces/ianjuta-iterable.h>
6599 * ianjuta_indenter_indent
6600 * @obj: Self
6601 * @start: Start of the area to indent
6602 * @end: End of the area to indent
6603 * @error: Error propagation
6605 * Indent the area between @start and @end according to the indentation rules
6606 * of the programming language. Usually implemented by language support plugins.
6607 * Only one indenter can be loaded at a time.
6608 * Note: Indenters always affect full lines, so start and end will be moved
6609 * according to the next line start/end.
6611 void indent (IAnjutaIterable* start, IAnjutaIterable* end);