Updated Spanish translation
[anjuta.git] / libanjuta / interfaces / libanjuta.idl
blob6db48ba640617cd647f30a400f1fcd55dad4c293
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 * IAnjutaFile::opened:
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_COMMAND_CHECK: make check
867 * @IANJUTA_BUILDABLE_N_COMMANDS: size of enum
869 * The enumeration is used to speficy the disered build operation
871 enum Command
873 COMMAND_COMPILE,
874 COMMAND_BUILD,
875 COMMAND_BUILD_TARBALL,
876 COMMAND_INSTALL,
877 COMMAND_CONFIGURE,
878 COMMAND_GENERATE,
879 COMMAND_CLEAN,
880 COMMAND_EXECUTE,
881 COMMAND_IS_BUILT,
882 COMMAND_AUTORECONF,
883 COMMAND_DISTCLEAN,
884 COMMAND_CHECK,
885 N_COMMANDS
889 * ianjuta_buildable_set_command:
890 * @obj: Self
891 * @command_id: Command to override.
892 * @command: Build command to override.
893 * @err: Error propagation and reporting.
895 * Overrides the default command for the given command.
897 void set_command (Command command_id, const gchar *command);
900 * ianjuta_buildable_get_command:
901 * @obj: Self
902 * @command_id: Command to get override.
903 * @err: Error propagation and reporting.
905 * Retrieves the currently set command override.
907 * Returns: The overridden command. NULL if no override set.
909 const gchar* get_command (Command command_id);
912 * ianjuta_buildable_reset_commands:
913 * @obj: Self
914 * @err: Error propagation and reporting.
916 * Resets the command overrides to defaults.
918 void reset_commands ();
921 * ianjuta_buildable_build:
922 * @obj: Self
923 * @uri: fixme
924 * @err: Error propagation and reporting.
926 * fixme
928 void build (const gchar *uri);
931 * ianjuta_buildable_clean:
932 * @obj: Self
933 * @uri: fixme
934 * @err: Error propagation and reporting.
936 * fixme
938 void clean (const gchar *uri);
941 * ianjuta_buildable_install:
942 * @obj: Self
943 * @uri: fixme
944 * @err: Error propagation and reporting.
946 * fixme
948 void install (const gchar *uri);
951 * ianjuta_buildable_configure:
952 * @obj: Self
953 * @uri: fixme
954 * @err: Error propagation and reporting.
956 * fixme
958 void configure (const gchar *uri);
961 * ianjuta_buildable_generate:
962 * @obj: Self
963 * @uri: fixme
964 * @err: Error propagation and reporting.
966 * fixme
968 void generate (const gchar *uri);
971 * ianjuta_buildable_execute:
972 * @obj: Self
973 * @uri: fixme
974 * @err: Error propagation and reporting.
976 * fixme
978 void execute (const gchar *uri);
982 * SECTION:ianjuta-help
983 * @title: IAnjutaHelp
984 * @short_description: Implemented by plugins that can provide help support
985 * @see_also:
986 * @stability: Unstable
987 * @include: libanjuta/interfaces/ianjuta-help.h
990 interface IAnjutaHelp
994 * ianjuta_help_search:
995 * @obj: Self
996 * @query: string to search in the help
997 * @err: Error propagation and reporting
999 * Search for string @query in the help and display the result
1001 void search (const gchar *query);
1005 * SECTION:ianjuta-loader
1006 * @title: IAnjutaLoader
1007 * @short_description: Interface to load file or stream
1008 * @see_also:
1009 * @stability: Unstable
1010 * @include: libanjuta/interfaces/ianjuta-loader.h
1012 * Loaders can deterime correct plugin to open a file or stream. They
1013 * themselves can not load it, but will correctly redirect the request to
1014 * an implementor of IAnjutaFile, IAnjutaFileSavable, IAnjutaStream or
1015 * IAnjutaStreamSavable, depending on the mime-type, meta-type or any other
1016 * requirements.
1018 interface IAnjutaLoader
1020 #include <libanjuta/anjuta-plugin.h>
1022 * ianjuta_loader_find_plugins:
1023 * @obj: Self
1024 * @err: Error propagation and reporting.
1026 * Returns: (element-type AnjutaPlugin): all plugins supporting loader interface.
1028 List<AnjutaPlugin*> find_plugins ();
1031 * SECTION:ianjuta-file-loader
1032 * @title: IAnjutaFileLoader
1033 * @short_description: Loader to load files
1034 * @see_also:
1035 * @stability: Unstable
1036 * @include: libanjuta/interfaces/ianjuta-file-loader.h
1038 * Loaders can deterime correct plugin to open a file.
1040 interface IAnjutaFileLoader
1042 #include <gio/gio.h>
1044 * ianjuta_file_loader_load:
1045 * @obj: Self
1046 * @file: File to load
1047 * @readonly: Open in readonly mode.
1048 * @err: Error propagation and reporting
1050 * Determines a plugin which can open the given file, activates it
1051 * opening the file and returns the interface of the plugin activated.
1053 * Return value: Plugin interface used to load the file.
1055 GObject* load (GFile* file, gboolean readonly);
1058 * ianjuta_loader_peek_interface:
1059 * @obj: Self
1060 * @file: Meta file to peek
1061 * @err: Error propagation and reporting
1063 * Peeks the file and determines the interface which can load
1064 * this file.
1066 * Return value: Plugin interface name that can load the file.
1068 gchar* peek_interface (GFile* file);
1072 * SECTION:ianjuta-stream-loader
1073 * @title: IAnjutaStreamLoader
1074 * @short_description: Loader to load streams
1075 * @see_also:
1076 * @stability: Unstable
1077 * @include: libanjuta/interfaces/ianjuta-stream-loader.h
1079 * StreamLoaders can deterime correct plugin to open a stream.
1081 interface IAnjutaStreamLoader
1083 #include <stdio.h>
1086 * ianjuta_stream_loader_load:
1087 * @obj: Self
1088 * @stream: Stream to load
1089 * @readonly: Open in readonly mode.
1090 * @err: Error propagation and reporting
1092 * Determines a plugin which can open the given stream, activates it
1093 * opening the stream and returns the interface of the plugin activated.
1095 * Return value: Plugin interface used to load the stream.
1097 GObject* load (FILE *stream, gboolean readonly);
1100 * ianjuta_stream_loader_peek_interface:
1101 * @obj: Self
1102 * @stream: Stream to load
1103 * @err: Error propagation and reporting
1105 * Peeks the stream and determines the interface which can load
1106 * this stream.
1108 * Return value: Plugin interface name that can load the stream.
1110 gchar* peek_interface (FILE *stream);
1115 * SECTION:ianjuta-document
1116 * @title: IAnjutaDocument
1117 * @short_description: Interface for all kind of editable resources that
1118 * will be managed by IAnjutaDocumentManager
1119 * @see_also:
1120 * @stability: Unstable
1121 * @include: libanjuta/interfaces/ianjuta-document.h
1124 interface IAnjutaDocument
1127 * IAnjutaDocument::update-ui:
1128 * @obj: Self
1130 * This signal is emitted when the document assumes the UI must be updated
1131 * because some internal state of the document has changed. For example, if
1132 * current line position is changed, it needs to be reflected to the UI.
1134 void ::update_ui ();
1137 * ianjuta_document_get_filename:
1138 * @obj: Self
1139 * @err: Error propagation and reporting
1141 * Allows obtaining of the filename the editor was loaded from.
1143 * Return value: The name of the file. Not to be freed by caller.
1145 const gchar* get_filename ();
1148 * ianjuta_document_can_undo:
1149 * @obj: Self
1150 * @err: Error propagation and reporting
1152 * Can the editor undo the last operation?
1154 * Returns: TRUE if editor can undo, else FALSE
1156 gboolean can_undo();
1159 * ianjuta_document_can_redo:
1160 * @obj: Self
1161 * @err: Error propagation and reporting
1163 * Can the editor redo the last operation?
1165 * Returns: TRUE if editor can redo, else FALSE
1167 gboolean can_redo ();
1170 * ianjuta_document_undo:
1171 * @obj: Self
1172 * @err: Error propagation and reporting
1174 * Undo last operation
1176 void undo ();
1179 * ianjuta_document_redo:
1180 * @obj: Self
1181 * @err: Error propagation and reporting
1183 * Redo last undo operation
1185 void redo ();
1188 * ianjuta_document_begin_undo_action:
1189 * @obj: Self
1190 * @err: Error propagation and reporting
1192 * Begins the mark of undoable action. Calls to this are stacked and
1193 * each must be ended with ianjuta_document_end_action().
1195 void begin_undo_action ();
1198 * ianjuta_document_end_undo_action:
1199 * @obj: Self
1200 * @err: Error propagation and reporting
1202 * Ends the mark of undoable action.
1204 void end_undo_action ();
1207 * ianjuta_document_grab_focus:
1208 * @obj: Self
1209 * @err: Error propagation and reporting
1211 * Grabs the focus.
1213 void grab_focus ();
1216 * ianjuta_document_cut:
1217 * @obj: Self
1218 * @err: Error propagation and reporting
1220 * Cut selection to clipboard.
1222 void cut ();
1225 * ianjuta_document_copy:
1226 * @obj: Self
1227 * @err: Error propagation and reporting
1229 * Copy selection to clipboard.
1231 void copy ();
1234 * ianjuta_document_paste:
1235 * @obj: Self
1236 * @err: Error propagation and reporting
1238 * Paste clipboard at current position.
1240 void paste ();
1243 * ianjuta_document_clear:
1244 * @obj: Self
1245 * @err: Error propagation and reporting
1247 * Clear selection
1249 void clear ();
1253 interface IAnjutaGlade
1256 * ianjuta_add_association:
1257 * @obj: Self
1258 * @master: ui file name.
1259 * @slave: source code file name.
1260 * @err: Error propagation and reporting.
1262 * Adds an association of master ui file and slave source code file
1265 void add_association (gchar *master, gchar *slave);
1269 * SECTION:ianjuta-editor
1270 * @title: IAnjutaEditor
1271 * @short_description: Text editor interface
1272 * @see_also:
1273 * @stability: Unstable
1274 * @include: libanjuta/interfaces/ianjuta-editor.h
1277 interface IAnjutaEditor
1279 #include <gtk/gtk.h>
1280 #include <libanjuta/interfaces/ianjuta-iterable.h>
1283 * IANJUTA_EDITOR_PREF_SCHEMA:
1285 * Schema id used to store common editor settings.
1287 #define PREF_SCHEMA "editor"
1290 * IANJUTA_EDITOR_USE_TABS_KEY:
1292 * Boolean key, true is tabs has to be used for indenting.
1294 #define USE_TABS_KEY "use-tabs"
1297 * IANJUTA_EDITOR_TAB_WIDTH_KEY:
1299 * Integer key, defines the size of a tabulation in spaces.
1301 #define TAB_WIDTH_KEY "tab-width"
1304 * IANJUTA_EDITOR_INDENT_WIDTH_KEY:
1306 * Integer key, defines the number a space for one indentation step.
1308 #define INDENT_WIDTH_KEY "indent-width"
1311 enum Error
1313 DOESNT_EXIST
1316 * IAnjutaEditorAttribute:
1317 * @IANJUTA_EDITOR_TEXT: Normal text
1318 * @IANJUTA_EDITOR_KEYWORD: A keyword of the programming language
1319 * @IANJUTA_EDITOR_COMMENT: A comment
1320 * @IANJUTA_EDITOR_STRING: A string
1322 * This enumeration is used to specify the type of text. Note that not all
1323 * editors implement this.
1325 enum Attribute
1327 TEXT,
1328 KEYWORD,
1329 COMMENT,
1330 STRING
1334 * IAnjutaEditor::glade-member-add:
1335 * @widget_typename: Name of the type of the widget that will become a member of the class.
1336 * @widget_name: Name of the widget that will become a member of the class.
1337 * @filename: Path for the .ui file that generated the signal.
1338 * @obj: Self
1340 * This signal is emitted when code for a widget must be generated.
1342 void ::glade_member_add (gchar *widget_typename, gchar *widget_name, gchar *filename);
1345 * IAnjutaEditor::glade-callback-add:
1346 * @widget_typename: Name of the type of the widget.
1347 * @signal_name: Name of the signal.
1348 * @handler_name: Name of the signal handler.
1349 * @object: Name of the object to be passed.
1350 * @swap: The "swap" signal property.
1351 * @after: The "after" signal property.
1352 * @filename: Path for the .ui file that generated the signal.
1353 * @obj: Self
1355 * This signal is emitted when code for a widget must be generated.
1357 void ::glade_callback_add (gchar *widget_typename, gchar *signal_name, gchar *handler_name, gchar *object, gboolean swap, gboolean after, gchar *filename);
1360 * IAnjutaEditor::code-changed:
1361 * @position: The iter position where code has been changed or NULL.
1362 * @code: The code that has been added or NULL.
1363 * @obj: Self
1365 * This signal is emitted when code is changed inside the editor.
1366 * When such information is availabe, @position stores the position where @code was added.
1368 void ::code_changed (IAnjutaIterable *position, gchar *code);
1371 * IAnjutaEditor::char-added:
1372 * @position: The iter position where @ch is added.
1373 * @ch: The character that has been added.
1374 * @obj: Self
1376 * This signal is emitted when any character is added inside the editor.
1377 * The newly added character is @ch which has been inserted at @position.
1379 void ::char_added (IAnjutaIterable *position, gchar ch);
1382 * IAnjutaEditor::backspace:
1383 * @obj: Self
1385 * The signal is emitted when the user presses backspace
1387 void ::backspace ();
1390 * IAnjutaEditor::changed:
1391 * @position: The iter position where change happend.
1392 * @added: TRUE if added, FALSE if deleted.
1393 * @length: Length of the text changed.
1394 * @lines: Number of lines added or removed.
1395 * @text: The text added or removed.
1396 * @obj: Self
1398 * This signal is emitted when any text change happens in editor.
1399 * The changes begin at @position. @text is not garanteed to be NULL
1400 * terminated. Use @length to read the text. @lines represent the
1401 * number of line breaks in the added or removed text.
1403 void ::changed (IAnjutaIterable *position, gboolean added, gint length, gint lines, const gchar *text);
1406 * IAnjutaEditor::cursor-moved:
1407 * @obj: Self
1409 * The signal is a hint that the cursor was moved.
1411 void ::cursor_moved ();
1414 * IAnjutaEditor::line-marks-gutter-clicked:
1415 * @obj: Self
1416 * @double_click: whether the line marks gutter was double clicked
1417 * @location: location of the clicked marker
1419 * The signal is emitted when the user clicks on a marker
1421 void ::line_marks_gutter_clicked (gint location);
1424 * ianjuta_editor_get_tabsize:
1425 * @obj: Self
1426 * @err: Error propagation and reporting
1428 * Returns the tabsize (in spaces) currently used by the editor.
1430 * Returns: tabsize in number of spaces
1432 gint get_tabsize ();
1435 * ianjuta_editor_set_tabsize:
1436 * @obj: Self
1437 * @tabsize: Tabsize in spaces
1438 * @err: Error propagation and reporting
1440 * Sets the tabsize of the editor.
1442 void set_tabsize (gint tabsize);
1445 * ianjuta_editor_get_use_spaces:
1446 * @obj: Self
1447 * @err: Error propagation and reporting
1449 * Returns if the editor uses spaces for filling up tab characters.
1451 * Returns: TRUE if yes, FALSE if no.
1453 gboolean get_use_spaces ();
1456 * ianjuta_editor_set_use_space:
1457 * @obj: Self
1458 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
1459 * @err: Error propagation and reporting
1461 * Sets if the editor should use spaces for filling up tab characters.
1463 void set_use_spaces (gboolean use_spaces);
1466 * ianjuta_editor_set_auto_indent:
1467 * @obj: Self
1468 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
1470 * Sets whether the editor should auto-indent itself. A plugin that does
1471 * custom auto-indent can set this to false and override the preferences
1472 * setting
1474 void set_auto_indent (gboolean auto_indent);
1477 * ianjuta_editor_get_indentsize:
1478 * @obj: Self
1479 * @err: Error propagation and reporting
1481 * Returns the indentation size in spaces currently used by the
1482 * editor.
1484 * Returns: indentation size in number of spaces
1486 gint get_indentsize ();
1489 * ianjuta_editor_set_indentsize:
1490 * @obj: Self
1491 * @indentsize: Indentation size in spaces
1492 * @err: Error propagation and reporting
1494 * Sets the indentation size of the editor.
1496 void set_indentsize (gint indentsize);
1499 * ianjuta_editor_erase_range:
1500 * @obj: Self
1501 * @position_start: Start position of chars to erase.
1502 * @position_end: End position of chars to erase.
1503 * @err: Error propagation and reporting
1505 * Erases the chars between positions pointed by @position_start and
1506 * @position_end. The character pointed by @position_start is included,
1507 * while pointed by @position_end is not include in the range. After
1508 * the erase operation, all active iters, except these two, are no
1509 * longer guranteed to be valid. At the end the operation, these two
1510 * iters point to the same position which is the position where erase
1511 * happend (usually the original @position_start position).
1513 void erase (IAnjutaIterable *position_start, IAnjutaIterable *position_end);
1516 * ianjuta_editor_erase_all:
1517 * @obj: Self
1518 * @err: Error propagation and reporting
1520 * Empties the whole editor buffer. There will be zero characters.
1521 * After the erase operation, none of the active iters are guranteed
1522 * to be valid.
1524 void erase_all ();
1527 * ianjuta_editor_insert:
1528 * @obj: Self
1529 * @position: Character position in editor where insert will take place.
1530 * @text: Text to append.
1531 * @length: Length of @text to use.
1532 * @err: Error propagation and reporting
1534 * Inserts @length characters from @text buffer at given @position of
1535 * editor buffer. If @length is -1, the whole @text is used.
1537 void insert (IAnjutaIterable *position, const gchar *text, gint length);
1540 * ianjuta_editor_append:
1541 * @obj: Self
1542 * @text: Text to append.
1543 * @length: Length of @text to use.
1544 * @err: Error propagation and reporting
1546 * Appends @length characters from @text buffer at the end of editor
1547 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1549 void append (const gchar *text, gint length);
1552 * ianjuta_editor_goto_line:
1553 * @obj: Self
1554 * @lineno: line number where carat will be moved.
1555 * @err: Error propagation and reporting
1557 * Carat is moved to the given @lineno line and text view is scrolled to
1558 * bring it in viewable area of the editor.
1560 void goto_line (gint lineno);
1563 * ianjuta_editor_goto_start:
1564 * @obj: Self
1565 * @err: Error propagation and reporting
1567 * Carat is moved to the begining of editor and text view is scrolled to
1568 * bring it in viewable area of the editor.
1570 void goto_start ();
1573 * ianjuta_editor_goto_end:
1574 * @obj: Self
1575 * @err: Error propagation and reporting
1577 * Carat is moved to the end of editor and text view is scrolled to
1578 * bring it in viewable area of the editor.
1580 void goto_end ();
1583 * ianjuta_editor_goto_position:
1584 * @obj: Self
1585 * @position: Character position where carat will be moved.
1586 * @err: Error propagation and reporting
1588 * Carat is moved to the given @position and text view is scrolled to
1589 * bring @position in viewable area of the editor.
1591 void goto_position (IAnjutaIterable *position);
1594 * ianjuta_editor_get_text:
1595 * @obj: Self
1596 * @begin: Begining iterator
1597 * @end: End iterator
1598 * @err: Error propagation and reporting
1600 * Gets text characters beginning from @begin (including char
1601 * pointed by @begin) and ending with @end (excluding character
1602 * pointed by @end). The characters returned are utf-8 encoded.
1603 * The iterators @begin and @end could be in either order. The returned
1604 * text, however, is in right order. If both @begin and @end points
1605 * to the same position, NULL is returned.
1607 * Returns: A buffer of utf-8 characters.
1608 * The returned buffer must be freed when no longer required.
1610 gchar* get_text (IAnjutaIterable *begin, IAnjutaIterable *end);
1613 * ianjuta_editor_get_text_all:
1614 * @obj: Self
1615 * @err: Error propagation and reporting
1617 * Gets all text characters in the editor.
1618 * The characters returned are utf-8 encoded.
1620 * Returns: A buffer of utf-8 characters containing all text from editor.
1621 * The returned buffer must be freed when no longer required.
1623 gchar* get_text_all ();
1626 * ianjuta_editor_line_from_position:
1627 * @obj: Self
1628 * @position: Position you want to know the line from
1629 * @err: Error propagation and reporting
1631 * Get the line number in which @position locates.
1632 * Returns: Line which corresponds to @position
1635 int get_line_from_position (IAnjutaIterable *position);
1638 * ianjuta_editor_get_lineno:
1639 * @obj: Self
1640 * @err: Error propagation and reporting
1642 * Obtains current line number on which carat is.
1644 * Return value: Line number.
1646 gint get_lineno ();
1649 * ianjuta_editor_get_length:
1650 * @obj: Self
1651 * @err: Error propagation and reporting
1653 * Get length of complete text in editor. This will be the total
1654 * number of bytes in the file or buffer.
1656 * Return value: Text length.
1658 gint get_length ();
1661 * ianjuta_editor_get_current_word:
1662 * @obj: Self
1663 * @err: Error propagation and reporting
1665 * Obtains the word on which carat is currently on.
1667 * Return value: Current word.
1669 gchar* get_current_word ();
1672 * ianjuta_editor_get_current_column:
1673 * @obj: Self
1674 * @err: Error propagation and reporting
1676 * Obtains number of the current column in the editor.
1678 * Return value: Current column.
1680 gint get_column ();
1683 * ianjuta_editor_get_line_begin_position:
1684 * @obj: Self
1685 * @line: fixme
1686 * @err: Error propagation and reporting.
1688 * fixme
1690 * Returns: (transfer full): fixme
1692 IAnjutaIterable* get_line_begin_position (gint line);
1695 * ianjuta_editor_get_line_end_position:
1696 * @obj: Self
1697 * @line: fixme
1698 * @err: Error propagation and reporting.
1700 * fixme
1702 * Returns: (transfer full): fixme
1704 IAnjutaIterable *get_line_end_position (gint line);
1707 * ianjuta_editor_get_overwrite:
1708 * @obj: Self
1709 * @err: Error propagation and reporting
1711 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1713 * Return value: editor mode.
1715 gboolean get_overwrite ();
1719 * ianjuta_editor_set_popup_menu:
1720 * @obj: Self
1721 * @menu: Popupmenu
1722 * @err: Error propagation and reporting
1724 * Set Editor popup menu. This is the menu shown in the editor when one
1725 * right-clicks on it.
1728 void set_popup_menu (GtkWidget *menu);
1731 * ianjuta_editor_get_offset:
1732 * @obj: Self
1733 * @err: Error propagation and reporting
1735 * Get current caret position in integer character offset. Deprecated.
1736 * Use ianjuta_editor_get_position() instead.
1738 * Returns: Current character position since the begining of file.
1740 gint get_offset ();
1743 * ianjuta_editor_get_position:
1744 * @obj: Self
1745 * @err: Error propagation and reporting
1747 * Get current caret position.
1749 * Returns: (transfer full): Iterator that points to the current position.
1751 IAnjutaIterable* get_position ();
1754 * ianjuta_editor_get_position_from_offset:
1755 * @obj: Self
1756 * @offset: Character offset position where the iter will be set
1757 * @err: Error propagation and reporting
1759 * Creates and returns an iter for editor cells. The iter is
1760 * placed at the unicode character position where the given offset
1761 * @offset happens to fall. The returned iter is cell (character)
1762 * iter and not byte iter, so all iter operations
1763 * on it are character (not byte) iteration, including all position
1764 * and index references in the iter.
1766 * The iter must be unreferrenced by the caller when done.
1767 * The iter navigates (next/previous) in step of unicode
1768 * characters (one unicode character == one cell).
1770 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1771 * given @offset position.
1773 IAnjutaIterable* get_position_from_offset (gint offset);
1776 * ianjuta_editor_get_start_position:
1777 * @obj: Self
1778 * @err: Error propagation and reporting
1780 * Gets the iter positioned at the start of the editor buffer.
1782 * Return value: (transfer none): Cell iter set to the begining of the editor.
1784 IAnjutaIterable* get_start_position ();
1787 * ianjuta_editor_get_end_position:
1788 * @obj: Self
1789 * @err: Error propagation and reporting
1791 * Gets the iter positioned at the end of the editor buffer. The
1792 * returned iter is the end-iter which does not point to any valid
1793 * character in the buffer (it is pointed one step beyond the last
1794 * valid character).
1796 * Return value: (transfer none): Cell iter set to the end of the editor (end-iter).
1798 IAnjutaIterable* get_end_position ();
1801 * SECTION:ianjuta-editor-selection
1802 * @title: IAnjutaEditorSelection
1803 * @short_description: Text editor selection interface
1804 * @see_also:
1805 * @stability: Unstable
1806 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1809 interface IAnjutaEditorSelection
1811 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1813 * ianjuta_editor_selection_has_selection:
1814 * @obj: Self
1815 * @err: Error propagation and reporting
1817 * Returns TRUE if editor has any text selected. The selection
1818 * positions can be retrieved with ianjuta_editor_selection_get_start()
1819 * and ianjuta_editor_selection_get_end().
1821 * Returns: TRUE if there is text selected else FALSE.
1823 gboolean has_selection ();
1826 * ianjuta_editor_selection_get:
1827 * @obj: Self
1828 * @err: Error propagation and reporting
1830 * Gets curerntly selected text in editor.
1832 * Returns: A newly allocated buffer of currently selected characters.
1833 * NULL if there is no selection. The returned buffer must be freed after
1834 * use.
1836 gchar* get ();
1839 * ianjuta_editor_selection_set:
1840 * @obj: Self
1841 * @start: Begin of selection
1842 * @end: End of selection
1843 * @scroll: Scroll selection onscreen
1844 * @err: Error propagation and reporting
1846 * Select characters between start and end. Start and end don't have to
1847 * be ordered.
1849 void set (IAnjutaIterable* start, IAnjutaIterable* end, gboolean scroll);
1852 * ianjuta_editor_selection_get_start:
1853 * @obj: Self
1854 * @err: Error propagation and reporting
1856 * Gets start position of selection text.
1858 * Return: Start of selection or NULL if there is no selection.
1860 IAnjutaIterable* get_start ();
1863 * ianjuta_editor_selection_get_end:
1864 * @obj: Self
1865 * @err: Error propagation and reporting
1867 * Get end position of selection. If there is no selection, returns
1868 * NULL.
1870 * Returns: End of selection or NULL if there is no selection.
1872 IAnjutaIterable* get_end ();
1875 * ianjuta_editor_selection_select_block:
1876 * @obj: Self
1877 * @err: Error propagation and reporting
1879 * Selects current block of code. The definition of block of code
1880 * depends on highlight mode used (programming language). Some
1881 * highlight mode does not have block concept, in that case this
1882 * method does not do anything.
1884 void select_block ();
1887 * ianjuta_editor_selection_select_function:
1888 * @obj: Self
1889 * @err: Error propagation and reporting
1891 * Select current function block. The definition of function block
1892 * depends on highlight mode used (programming language). Some
1893 * highlight mode does not have function concept, in that case this
1894 * method does not do anything.
1896 void select_function ();
1899 * ianjuta_editor_edit_select_all:
1900 * @obj: Self
1901 * @err: Error propagation and reporting
1903 * Select whole buffer.
1905 void select_all ();
1908 * ianjuta_editor_selection_replace:
1909 * @obj: Self
1910 * @text: Replacement text.
1911 * @length: Length of the text to used in @text.
1912 * @err: Error propagation and reporting
1914 * Replaces currently selected text with the @text. Only @length amount
1915 * of characters are used from @text buffer to replace.
1917 void replace (const gchar *text, gint length);
1921 * SECTION:ianjuta-editor-search
1922 * @title: IAnjutaEditorSearch
1923 * @short_description: Text editor search interface
1924 * @see_also:
1925 * @stability: Unstable
1926 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1929 interface IAnjutaEditorSearch
1931 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1934 * ianjuta_editor_search_forward:
1935 * @obj: Self
1936 * @search: String to search for
1937 * @start: Where to search from
1938 * @end: Where to stop searching
1939 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1940 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1941 * @err: Error propagation and reporting
1943 * Search forward from start to end
1946 gboolean forward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1949 * ianjuta_editor_search_backward:
1950 * @obj: Self
1951 * @search: String to search for
1952 * @start: Where to search from
1953 * @end: Where to stop searching
1954 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1955 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1956 * @err: Error propagation and reporting
1958 * Search backward from end to start
1962 gboolean backward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1966 * SECTION:ianjuta-editor-convert
1967 * @title: IAnjutaEditorConvert
1968 * @short_description: Text editor convert interface
1969 * @see_also:
1970 * @stability: Unstable
1971 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1974 interface IAnjutaEditorConvert
1977 * ianjuta_editor_convert_to_upper:
1978 * @obj: Self
1979 * @start_position: Start position.
1980 * @end_position: End position.
1981 * @err: Error propagation and reporting
1983 * change characters from start position to end position to uppercase.
1986 void to_upper (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1989 * ianjuta_editor_convert_to_lower:
1990 * @obj: Self
1991 * @start_position: Start position.
1992 * @end_position: End position.
1993 * @err: Error propagation and reporting
1995 * change characters from start position to end position to lowercase
1998 void to_lower (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
2002 * SECTION:ianjuta-editor-line-mode
2003 * @title: IAnjutaEditorLineMode
2004 * @short_description: Text editor line mode
2005 * @see_also:
2006 * @stability: Unstable
2007 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
2010 interface IAnjutaEditorLineMode
2013 * IAnjutaEditorLineModeType:
2014 * @IANJUTA_EDITOR_LINE_MODE_LF: Line-Feed (Unix)
2015 * @IANJUTA_EDITOR_LINE_MODE_CR: Carat return (Max)
2016 * @IANJUTA_EDITOR_LINE_MODE_CRLF: Caret return + line-feed (Windows)
2018 * This enumeration is used to specify the type of text. Note that not all
2019 * editors implement this.
2021 enum Type
2025 CRLF
2029 * ianjuta_editor_line_mode_get:
2030 * @obj: Self
2031 * @err: Error propagation and reporting
2033 * Get current line ending mode. It is auto-detected from the
2034 * buffer contents.
2036 Type get ();
2039 * ianjuta_editor_line_mode_set:
2040 * @obj: Self
2041 * @mode: Line mode to set.
2042 * @err: Error propagation and reporting
2044 * Set the line ending mode to the given @mode. Existing line end
2045 * characters in the buffer are not touched. Only the newly added
2046 * texts will have @mode line end characters.
2048 void set (Type mode);
2051 * ianjuta_editor_line_mode_convert:
2052 * @obj: Self
2053 * @mode: Line mode to convert.
2054 * @err: Error propagation and reporting
2056 * Set the line ending mode to the given @mode and convert all line end
2057 * characters in the buffer to @mode line end characters.
2059 void convert (Type mode);
2062 * ianjuta_editor_line_mode_fix:
2063 * @obj: Self
2064 * @err: Error propagation and reporting
2066 * Convert EOL characters to majority of line mode. This is helpful
2067 * when the buffer contains mixed line modes and we want to fix it.
2069 void fix ();
2073 * SECTION:ianjuta-editor-tip
2074 * @title: IAnjutaEditorTip
2075 * @short_description: Editor call tips assistance framework
2076 * @see_also:
2077 * @stability: Unstable
2078 * @include: libanjuta/interfaces/ianjuta-editor-tip.h
2081 interface IAnjutaEditorTip
2084 * ianjuta_editor_tip_show:
2085 * @obj: Self
2086 * @tips: (element-type utf8): list of alternative tips.
2087 * @position: Tip position.
2088 * @err: Error propagation and reporting
2090 * Show tips showing more information on current context. No user feedback
2091 * is required when tips are shown. @position indicates
2092 * the position before which is the known context and after which are
2093 * the suggestions. Usually the editor would use this to
2094 * align the choices displayed such that the carat is just at this
2095 * position when the choices are displayed.
2098 void show (List<const gchar*> tips, IAnjutaIterable *position);
2101 * ianjuta_editor_tip_cancel:
2102 * @obj: Self
2103 * @err: Error propagation and reporting
2105 * Cancels the last shown tooltip
2107 void cancel ();
2110 * ianjuta_editor_tip_visible:
2111 * @obj: Self
2112 * @err: Error propagation and reporting
2114 * Returns: whether a tooltip is crrently shown
2116 gboolean visible();
2120 * SECTION:ianjuta-editor-assist
2121 * @title: IAnjutaEditorAssist
2122 * @short_description: Text editor assist interface
2123 * @see_also:
2124 * @stability: Unstable
2125 * @include: libanjuta/interfaces/ianjuta-editor-assist
2128 interface IAnjutaEditorAssist
2130 #include <libanjuta/interfaces/ianjuta-provider.h>
2132 struct Proposal
2134 gchar* label;
2135 gchar* markup;
2136 gchar* info;
2137 gchar* text;
2138 GdkPixbuf* icon;
2139 gpointer data;
2143 * IAnjutaEditorAssist::cancelled:
2144 * @obj: Self
2146 * This signal is emitted when the autocompletion is cancelled due to various
2147 * reasons. The provider should avoid to call ianjuta_editor_assist_proposals() after
2148 * this signal.
2150 void ::cancelled ();
2153 * ianjuta_editor_assist_add:
2154 * @obj: self
2155 * @provider: a IAnjutaProvider
2156 * @err: Error handling
2158 * Add a provider to the list of completion providers
2160 void add(IAnjutaProvider* provider);
2163 * ianjuta_editor_assist_remove:
2164 * @obj: self
2165 * @provider: a IAnjutaProvider
2166 * @err: Error handling
2168 * Remove a provider from the list of completion providers
2170 void remove(IAnjutaProvider* provider);
2173 * ianjuta_editor_assist_invoke:
2174 * @obj: self
2175 * @provider: a IAnjutaProvider (can be NULL to use all providers)
2176 * @err: Error handling
2178 * Force invokation of a provider at the current cursor position.
2179 * That means that ianjuta_provider_populate() will be called on the
2180 * provider.
2182 void invoke(IAnjutaProvider* provider);
2185 * ianjuta_editor_assist_proposals:
2186 * @obj: self
2187 * @provider: a IAnjutaProvider
2188 * @proposals: (element-type IAnjutaEditorAssistProposal): a list of IAnjutaProposals
2189 * @pre_word: the word before the cursor
2190 * @finished: whether is was the last call in an async operation
2191 * @err: Error handling
2193 * Add the list of proposals for the current population. You can add
2194 * proposals async as long as the last call sets finished to TRUE. That
2195 * is usually called by the IAnjutaProvider after it was triggered by
2196 * ianjuta_provider_populate()
2199 void proposals(IAnjutaProvider* provider, GList* proposals, const gchar* pre_word, gboolean finished);
2203 * SECTION:ianjuta-editor-hover
2204 * @title: IAnjutaEditorHover
2205 * @short_description: Text editor hover interface
2206 * @see_also:
2207 * @stability: Unstable
2208 * @include: libanjuta/interfaces/ianjuta-editor-hover
2211 interface IAnjutaEditorHover
2213 #include <libanjuta/interfaces/ianjuta-iterable.h>
2216 * IAnjutaEditorHover::hover-over:
2217 * @obj: self
2218 * @position: IAnjutaEditorCell specifying the position the mouse is over
2220 * The mouse is held for a moment over @position. This can be used to show
2221 * all tooltip.
2223 void ::hover_over (IAnjutaIterable* position);
2226 * IAnjutaEditorHover::hover-leave:
2227 * @obj: self
2228 * @position: IAnjutaEditorCell specifying the position the mouse was over
2230 * User moved the mouse away - can be used to clean up things done in
2231 * #IAnjutaEditorHover::hover-over
2233 void ::hover_leave (IAnjutaIterable* position);
2236 * ianjuta_editor_hover_display:
2237 * @obj: Self
2238 * @info: String to display
2239 * @err: Error propagation and reporting
2241 * Show @info as tooltip
2244 void display (IAnjutaIterable* position, const gchar *info);
2248 * SECTION:ianjuta-editor-language
2249 * @title: IAnjutaEditorLanguage
2250 * @short_description: Text editor language interface
2251 * @see_also:
2252 * @stability: Unstable
2253 * @include: libanjuta/interfaces/ianjuta-editor-language.h
2256 interface IAnjutaEditorLanguage
2259 * IAnjutaEditorLanguage::language-changed:
2260 * @obj: self
2261 * @language: new language
2263 * the language of the editor changed to @language
2265 void ::language_changed (const gchar *language);
2268 * ianjuta_editor_language_get_supported_languages:
2269 * @obj: Self
2270 * @err: Error propagation and reporting
2272 * Return a list of languages supported by the editor
2273 * Note: These list contains the names in the form
2274 * the editor implementation knows them
2275 * Returns: (element-type utf8):
2278 const List<const gchar*> get_supported_languages ();
2281 * ianjuta_editor_language_name:
2282 * @obj: Self
2283 * @err: Error propagation and reporting
2285 * Get a list of languages the editor can highlight
2289 const gchar *get_language_name (const gchar* language);
2292 * ianjuta_editor_language_get_language:
2293 * @obj: Self
2294 * @err: Error propagation and reporting
2296 * Return the name of the currently used language
2300 const gchar *get_language ();
2303 * ianjuta_editor_language_set_language:
2304 * @obj: Self
2305 * @language: Language
2306 * @err: Error propagation and reporting
2308 * Force the editor to use a given language
2312 void set_language (const gchar* language);
2316 * SECTION:ianjuta-editor-folds
2317 * @title: IAnjutaEditorFolds
2318 * @short_description: Text editor folds inteface
2319 * @see_also:
2320 * @stability: Unstable
2321 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
2324 interface IAnjutaEditorFolds
2327 * ianjuta_editor_view_open_folds:
2328 * @obj: Self
2329 * @err: Error propagation and reporting
2331 * Open all folds
2334 void open_all ();
2337 * ianjuta_editor_view_close_folds:
2338 * @obj: Self
2339 * @err: Error propagation and reporting
2341 * Close all folds
2344 void close_all ();
2347 * ianjuta_editor_view_toggle_fold:
2348 * @obj: Self
2349 * @err: Error propagation and reporting
2351 * Open/Close current fold
2354 void toggle_current ();
2358 * SECTION:ianjuta-editor-view
2359 * @title: IAnjutaEditorView
2360 * @short_description: Text editor view interface
2361 * @see_also:
2362 * @stability: Unstable
2363 * @include: libanjuta/interfaces/ianjuta-editor-view.h
2365 * An editor view is a visual representation of the editor. An editor
2366 * can have multiple views. All views of an editor show the same editor
2367 * content (buffer). Consequently, any change done in one view is
2368 * updated in all other views.
2370 interface IAnjutaEditorView
2373 * ianjuta_editor_view_create:
2374 * @obj: Self
2375 * @err: Error propagation and reporting
2377 * Creates a new view for the editor. The newly created view gets
2378 * the user focus and scrolls to the same location as last view.
2380 void create ();
2383 * ianjuta_editor_view_remove_current:
2384 * @obj: Self
2385 * @err: Error propagation and reporting
2387 * Removes currently focused editor view. It does not remove the
2388 * last view of the editor. That is, if currently there is only
2389 * one view of the editor, this function does nothing.
2391 void remove_current ();
2394 * ianjuta_editor_view_get_count:
2395 * @obj: Self
2396 * @err: Error propagation and reporting
2398 * Total number of views currently present. It will never be less
2399 * than 1. Invalid return values are considered error condition.
2401 gint get_count ();
2405 * SECTION:ianjuta-editor-comment
2406 * @title: IAnjutaEditorComment
2407 * @short_description: Text editor comment interface
2408 * @see_also:
2409 * @stability: Unstable
2410 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
2413 interface IAnjutaEditorComment
2416 * ianjuta_editor_comment_block:
2417 * @obj: Self
2418 * @err: Error propagation and reporting
2420 * Comment/Uncomment out selected block
2422 void block();
2425 * ianjuta_editor_comment_box:
2426 * @obj: Self
2427 * @err: Error propagation and reporting
2429 * Comment/Uncomment out selected block
2431 void box();
2434 * ianjuta_editor_comment_stream:
2435 * @obj: Self
2436 * @err: Error propagation and reporting
2438 * Comment/Uncomment out selected block
2440 void stream();
2444 * SECTION:ianjuta-editor-zoom
2445 * @title: IAnjutaEditorZoom
2446 * @short_description: Text editor zoom interface
2447 * @see_also:
2448 * @stability: Unstable
2449 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2452 interface IAnjutaEditorZoom
2455 * ianjuta_editor_zoom_in:
2456 * @obj: Self
2457 * @err: Error propagation and reporting
2459 * Zoom in
2461 void in ();
2464 * ianjuta_editor_zoom_out:
2465 * @obj: Self
2466 * @err: Error propagation and reporting
2468 * Zoom out
2470 void out ();
2474 * SECTION:ianjuta-editor-goto
2475 * @title: IAnjutaEditorGoto
2476 * @short_description: Text editor navigation interface
2477 * @see_also:
2478 * @stability: Unstable
2479 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2482 interface IAnjutaEditorGoto
2485 * ianjuta_editor_goto_start_block:
2486 * @obj: Self
2487 * @err: Error propagation and reporting
2489 * Moves cursor to the start of the current block
2491 void start_block();
2494 * ianjuta_editor_goto_end_block:
2495 * @obj: Self
2496 * @err: Error propagation and reporting
2498 * Moves cursor to the end of the current block
2500 void end_block();
2503 * ianjuta_editor_goto_matching_brace:
2504 * @obj: Self
2505 * @err: Error propagation and reporting
2507 * Moves cursor to matching brace
2509 void matching_brace();
2514 * SECTION:ianjuta-editor-glade-signal
2515 * @title: IAnjutaEditorGladeSignal
2516 * @short_description: Interface for dropping signal handlers
2517 * @see_also:
2518 * @stability: Unstable
2519 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2522 interface IAnjutaEditorGladeSignal
2525 * IAnjutaEditorGladeSignal::drop-possible:
2526 * @obj: self
2527 * @iter: a IAnjutaIterable of the position where drop would happen
2529 * Emitted when a signal is dragged over the editor
2531 * Return value: TRUE if a signal handler can be dropped, FALSE otherwise
2533 gboolean ::drop_possible (IAnjutaIterable* iterator);
2536 * IAnjutaEditorGladeSignal::drop:
2537 * @obj: self
2538 * @iter: a IAnjutaIterable of the position where drop happens
2539 * @signal_data: Signal data in form "widget:signal:handler", e.g.
2540 * "GtkToggleButton:toggled:on_toggle_button_toggled"
2542 * Emitted when a signal was received per drag & drop
2545 void ::drop (IAnjutaIterable* iterator, const gchar* signal_data);
2550 * SECTION:ianjuta-editor-cell
2551 * @title: IAnjutaEditorCell
2552 * @short_description: Text editor character cell
2553 * @see_also:
2554 * @stability: Unstable
2555 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2557 * Represents a cell in editor. A cell corresponds to a unicode
2558 * character along with all associated styles (such as colors and font).
2559 * A cell may or may not have style. If style is supported in the
2560 * editor, it is assumed all cells will have styles and hence every
2561 * IAnjutaEditorCell interface instance will have additionally
2562 * IAnjutaEditorCellStyle implemented.
2564 interface IAnjutaEditorCell
2566 #include <libanjuta/interfaces/ianjuta-editor.h>
2569 * ianjuta_editor_cell_get_character:
2570 * @obj: Self
2571 * @err: Error propagation and reporting
2573 * Returns the unicode character in this cell. A NULL terminated
2574 * string is returned that is the multibyte unicode character.
2575 * NULL is returned if the cell does not have any character.
2577 * Returns: a newly created string representing the cell's unicode
2578 * character.
2580 gchar *get_character ();
2583 * ianjuta_editor_cell_get_length:
2584 * @obj: self
2585 * @err: Error propagation and reporting.
2587 * Gets the length of the cell in bytes. That is, length of the
2588 * unicode character.
2590 * Returns: Length of the unicode character.
2592 gint get_length ();
2595 * ianjuta_editor_cell_get_char:
2596 * @obj: Self
2597 * @err: Error propagation and reporting
2599 * Returns the byte of the unicode character in this cell at given
2600 * index @char_index. @char_index can vary from 0 to length of the
2601 * unicode string minus 1. Out of range index is not allowed
2602 * (asserted) and return is undefined.
2604 * Since there is dynamic allocation of unicode character string
2605 * involved in ianjuta_editor_cell_get_character(), this function
2606 * is mainly useful for fast iteration (such as copying data).
2608 * Returns: a byte character.
2610 gchar get_char (gint char_index);
2612 IAnjutaEditorAttribute get_attribute ();
2615 * SECTION:ianjuta-editor-cell-style
2616 * @title: IAnjutaEditorCellStyle
2617 * @short_description: Text editor cell style interface
2618 * @see_also:
2619 * @stability: Unstable
2620 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2623 interface IAnjutaEditorCellStyle
2625 gchar* get_font_description ();
2626 gchar* get_color();
2627 gchar* get_background_color();
2632 * SECTION:ianjuta-editor-factory
2633 * @title: IAnjutaEditorFactory
2634 * @short_description: Text editor factory that creates IAnjutaEditor objects
2635 * @see_also:
2636 * @stability: Unstable
2637 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2640 interface IAnjutaEditorFactory
2642 #include "ianjuta-editor.h"
2643 #include <gio/gio.h>
2646 * ianjuta_editor_factory_new_editor:
2647 * @obj: Self
2648 * @file: file to open
2649 * @filename: filename to open
2650 * @err: Error propagation and reporting
2652 * Get a new GtkWidget* which implements IAnjutaEditor
2654 * Return value: An object implementing IAnjutaEditor
2656 IAnjutaEditor* new_editor (GFile* file, const gchar* filename);
2660 * SECTION:ianjuta-provider
2661 * @title: IAnjutaProvider
2662 * @short_description: Provider for autocompletion features
2663 * @see_also:
2664 * @stability: Unstable
2665 * @include: libanjuta/interfaces/ianjuta-provider.h
2667 interface IAnjutaProvider
2669 #include "ianjuta-iterable.h"
2672 * ianjuta_provider_populate:
2673 * @obj: Self
2674 * @iter: the text iter where the provider should be populated
2675 * @err: Error propagation and reporting.
2677 * Show completion for the context at position @iter. The provider should
2678 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2680 * Note that this is called after every character typed and the list of proposals
2681 * has to be completely renewed.
2683 void populate(IAnjutaIterable* iter);
2686 * ianjuta_provider_get_start_iter:
2687 * @obj: Self
2688 * @err: Error propagation and reporting.
2690 * Get the iter where the current completion started
2692 * Returns: (transfer none): current start iter
2694 IAnjutaIterable* get_start_iter();
2697 * ianjuta_provider_activate:
2698 * @obj: Self
2699 * @iter: position where the completion occurs
2700 * @data: data assigned to the proposal
2701 * @err: Error propagation and reporting.
2703 * Show completion for the context at position @iter
2705 void activate(IAnjutaIterable* iter, gpointer data);
2708 * ianjuta_provider_get_name:
2709 * @obj: Self
2711 * Return a (translatable) name for the provider
2713 const gchar* get_name();
2716 * SECTION:ianjuta-language-provider
2717 * @title: IAnjutaLanguageProvider
2718 * @short_description: Provider for autocompletion features
2719 * @see_also:
2720 * @stability: Unstable
2721 * @include: libanjuta/interfaces/ianjuta-language-provider.h
2723 interface IAnjutaLanguageProvider
2725 #include "ianjuta-editor.h"
2726 #include "ianjuta-iterable.h"
2727 #include "ianjuta-symbol.h"
2730 * IANJUTA_LANGUAGE_PROVIDER_PREF_CALLTIP_ENABLE:
2732 * Boolean key, true is calltips has to be shown.
2734 #define PREF_CALLTIP_ENABLE "calltip-enable"
2737 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_ENABLE:
2739 * Boolean key, true is code completion is enable.
2741 #define PREF_AUTOCOMPLETE_ENABLE "completion-enable"
2744 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC:
2746 * Boolean key, true is adding a space after function call autocompletion
2748 #define PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC "completion-space-after-func"
2751 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC:
2753 * Boolean key, true is adding '(' after function call autocompletion
2755 #define PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC "completion-brace-after-func"
2758 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC:
2760 * Boolean key, true is adding ')' after function call autocompletion
2762 #define PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC "completion-closebrace-after-func"
2765 * ianjuta_language_provider_get_calltip_cache:
2766 * @obj: Self
2767 * @call_context: name of the method to show a calltip
2768 * @err: Error propagation
2770 * Searches for a calltip in the cache
2772 * Returns: (element-type utf8) (transfer container): tips for the
2773 * searched name of the method from the cache,
2774 * NULL if nothing found
2776 List<gchar*> get_calltip_cache (gchar* call_context);
2779 * ianjuta_language_provider_get_calltip_context:
2780 * @obj: Self
2781 * @iter: current cursor position
2782 * @err: Error propagation
2784 * Searches for a calltip context
2786 * Returns: name of the method to show a calltip for or NULL
2788 gchar* get_calltip_context (IAnjutaIterable* iter);
2791 * ianjuta_language_provider_new_calltip:
2792 * @obj: Self
2793 * @call_context: name of the method to create a new calltip
2794 * @iter: current cursor position
2795 * @err: Error propagation
2797 * Creates a new calltip
2799 void new_calltip (gchar* call_context, IAnjutaIterable* iter);
2802 * ianjuta_language_provider_populate_completions:
2803 * @obj: Self
2804 * @iter: the text iter where the provider should be populated
2805 * @err: Error propagation and reporting.
2807 * Show completion for the context at position @iter. The provider should
2808 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2810 * Note that this is called after every character typed and the list of proposals
2811 * has to be completely renewed.
2813 * Returns: (transfer full) (allow-none): the iter where the provider populated, NULL otherwise
2815 IAnjutaIterable* populate_completions (IAnjutaIterable* iter);
2820 * SECTION:ianjuta-document-manager
2821 * @title: IAnjutaDocumentManager
2822 * @short_description: Interface for plugin that manages all the editors
2823 * @see_also:
2824 * @stability: Unstable
2825 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2828 interface IAnjutaDocumentManager
2830 #include "ianjuta-document.h"
2831 #include "ianjuta-editor.h"
2832 #include <gio/gio.h>
2835 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT:
2837 * Anjuta shell value set by document manager to the current document
2839 #define CURRENT_DOCUMENT "document_manager_current_document"
2841 enum Error
2843 DOESNT_EXIST
2847 * IAnjutaDocumentManager::document-added:
2848 * @obj: Self
2849 * @doc: The #IAnjutaDocument that was added.
2850 * @err: Error propagation and reporting.
2852 * Emitted when a document was added to the document manager.
2854 void ::document_added (IAnjutaDocument* doc);
2857 * IAnjutaDocumentManager::document-removed:
2858 * @obj: Self
2859 * @doc: The #IAnjutaDocument that was removed.
2860 * @err: Error propagation and reporting.
2862 * Emitted when a document was removed from the document manager.
2864 void ::document_removed (IAnjutaDocument* doc);
2868 * ianjuta_document_manager_get_file:
2869 * @obj: Self
2870 * @filename: short filename
2871 * @err: Error propagation and reporting.
2873 * Given the short filename, finds the file of the filename, if the
2874 * editor that has it loaded is found. If there is no editor that has
2875 * this file opened, returns NULL.
2877 * Return value: (transfer full): the GFile for the given short filename
2879 GFile* get_file (const gchar *filename);
2882 * ianjuta_document_manager_find_document_with_file:
2883 * @obj: Self
2884 * @file: The file to find.
2885 * @err: Error propagation and reporting.
2887 * Finds the document that has the file loaded. Only
2888 * the editor that matches the file will be searched.
2890 * Return value: (transfer none): the document that corresponds to given file. NULL if
2891 * there is no editor loaded with this file.
2893 IAnjutaDocument* find_document_with_file (GFile* file);
2896 * ianjuta_document_manager_goto_file_line:
2897 * @obj: Self
2898 * @file: file to go to.
2899 * @lineno: the line number in the file to go to.
2900 * @err: Error propagation and reporting.
2902 * Loads the given file if not loaded yet, set its editor as current editor
2903 * and moves cursor to the given line in the editor.
2905 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2907 IAnjutaEditor* goto_file_line (GFile* file, gint lineno);
2910 * ianjuta_document_manager_goto_file_line_mark:
2911 * @obj: Self
2912 * @file: file to go to.
2913 * @lineno: the line number in the file to go to.
2914 * @mark: TRUE if the line should be marked with a marker.
2915 * @err: Error propagation and reporting
2917 * Loads the given file if not loaded yet, set its editor as current editor
2918 * and moves cursor to the given line in the editor. Optionally also marks
2919 * the line with line marker if @mark is given TRUE.
2921 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2923 IAnjutaEditor* goto_file_line_mark (GFile* file, gint lineno, gboolean mark);
2926 * ianjuta_document_manager_get_current_document:
2927 * @obj: Self
2928 * @err: Error propagation and reporting.
2930 * Gets the current document.
2932 * Return value: (transfer none): the currently active document. NULL if none is there.
2934 IAnjutaDocument* get_current_document ();
2937 * ianjuta_document_manager_set_current_document:
2938 * @obj: Self
2939 * @document: the document to set as current.
2940 * @err: Error propagation and reporting.
2942 * Sets the given document as current document.
2944 void set_current_document (IAnjutaDocument *document);
2947 * ianjuta_document_manager_get_doc_widgets:
2948 * @obj: Self
2949 * @err: Error propagation and reporting.
2951 * Gets a list of widgets for open documents. Each widget is
2952 * a GTK_WIDGET(IAnjutaDocument*)
2954 * Return value: (element-type GtkWidget) (transfer container): a list of widgets for
2955 * all open documents. The returned list (but not the data in the list) must be
2956 * freed after use.
2958 List<GtkWidget*> get_doc_widgets ();
2961 * ianjuta_document_manager_add_buffer:
2962 * @obj: Self
2963 * @name: Name of the editor buffer.
2964 * @content: Initial content of the buffer.
2965 * @err: Error propagation and reporting.
2967 * Creates a new editor buffer of the given name and sets the given
2968 * content as its initial content.
2970 * Return value: (transfer full): the IAnjutaEditor instance that has been added.
2972 IAnjutaEditor* add_buffer (const gchar *name, const gchar* content);
2975 * ianjuta_document_manager_remove_document:
2976 * @obj: Self
2977 * @document: Document to close.
2978 * @save_before: If true, saves the document before closing.
2979 * @err: Error propagation and reporting.
2981 * Closes and removes the given document. If @save_before is TRUE, also
2982 * saves the document before closing.
2984 * Return value: TRUE if the document was removed, else FALSE.
2986 gboolean remove_document (IAnjutaDocument *document, gboolean save_before);
2989 * ianjuta_document_manager_add_document:
2990 * @obj: Self
2991 * @document: the document to add
2992 * @err: Error propagation and reporting.
2994 * Adds a document to the document manager. This will open a new
2995 * Notebook tab and show the document there
2998 void add_document (IAnjutaDocument* document);
3001 * ianjuta_document_manager_add_bookmark:
3002 * @obj: Self
3003 * @file: File to add the bookmark
3004 * @line: Line of the bookmark
3006 * Add a bookmark
3008 void add_bookmark (GFile* file, gint line);
3012 * SECTION:ianjuta-message-view
3013 * @title: IAnjutaMessageView
3014 * @short_description: A view where messages of different kind can be shown
3015 * @see_also:
3016 * @stability: Unstable
3017 * @include: libanjuta/interfaces/ianjuta-message-view.h
3020 interface IAnjutaMessageView
3023 * IAnjutaMessageViewType:
3024 * @IANJUTA_MESSAGE_VIEW_TYPE_NORMAL: Normal message
3025 * @IANJUTA_MESSAGE_VIEW_TYPE_INFO: Info message (highlighed)
3026 * @IANJUTA_MESSAGE_VIEW_TYPE_ERROR: Error message
3027 * @IANJUTA_MESSAGE_VIEW_TYPE_WARNING: Warning message
3029 * Speficy the type ot the message added to the message view
3031 enum Type
3033 TYPE_NORMAL,
3034 TYPE_INFO,
3035 TYPE_WARNING,
3036 TYPE_ERROR
3040 * IAnjutaMessageView::message-clicked:
3041 * @obj: Self
3042 * @message: text of the clicked message
3044 * Emitted when the user clicks on a message
3046 void ::message_clicked (const gchar *message);
3049 * IAnjutaMessageView::buffer-flushed:
3050 * @obj: Self
3051 * @line: the current line
3053 * Emitted when #ianjuta_message_view_buffer_append found a newline
3055 void ::buffer_flushed (const gchar *line);
3058 * ianjuta_message_view_buffer_append:
3059 * @obj: Self
3060 * @text: text to show as message
3061 * @err: Error propagation and reporting.
3063 * Appends the text in buffer. Flushes the buffer where a newline is found.
3064 * by emiiting buffer_flushed signal. The string is expected to be utf8.
3066 void buffer_append (const gchar *text);
3069 * ianjuta_message_view_append:
3070 * @obj: Self
3071 * @type: type of the message
3072 * @summary: summary of the message
3073 * @details: details of the message
3074 * @err: Error propagation and reporting.
3076 * Append the message with summary displayed and details displayed as tooltip
3078 void append (Type type, const gchar *summary, const gchar *details);
3081 * ianjuta_message_view_clear:
3082 * @obj: Self
3083 * @err: Error propagation and reporting.
3085 * Clear all messages in buffer
3087 void clear ();
3090 * ianjuta_message_view_select_next:
3091 * @obj: Self
3092 * @err: Error propagation and reporting.
3094 * Select next message (of type INFO, WARNING or ERROR)
3096 void select_next ();
3099 * ianjuta_message_view_select_previous:
3100 * @obj: Self
3101 * @err: Error propagation and reporting.
3103 * Select previous message
3105 void select_previous ();
3108 * ianjuta_message_view_get_current_message:
3109 * @obj: Self
3110 * @err: Error propagation and reporting.
3112 * Get the currently selected message
3114 const gchar* get_current_message ();
3117 * ianjuta_message_view_get_all_messages:
3118 * @obj: Self
3119 * @err: Error propagation and reporting.
3121 * Get a list of all messages. The list has to be freed
3122 * Returns: (element-type utf8):
3124 List<const gchar*> get_all_messages ();
3128 * SECTION:ianjuta-message-manager
3129 * @title: IAnjutaMessageManager
3130 * @short_description: The plugin that managers all message views
3131 * @see_also:
3132 * @stability: Unstable
3133 * @include: libanjuta/interfaces/ianjuta-message-manager.h
3136 interface IAnjutaMessageManager
3138 #include "ianjuta-message-view.h"
3139 #include <gdk/gdk.h>
3141 enum Error
3143 DOESNT_EXIST
3146 * ianjuta_message_manager_add_view:
3147 * @obj: Self
3148 * @name: Name/Title of the new view
3149 * @icon: Path to an icon or ""
3150 * @err: Error propagation and reporting
3152 * Adds a new view to the message-manager
3154 * Return value: The new message-view
3156 IAnjutaMessageView* add_view (const gchar *name, const gchar *icon);
3159 * ianjuta_message_manager_remove_view:
3160 * @obj: Self
3161 * @view: The view to remove
3162 * @err: Error propagation and reporting
3164 * Remove view from the message-manager. The view
3165 * will become invalid.
3167 void remove_view (IAnjutaMessageView *view);
3170 * ianjuta_message_manager_get_current_view:
3171 * @obj: Self
3172 * @err: Error propagation and reporting
3174 * Get the view with is currently on top of
3175 * the notebook or NULL if the message-manager is empty.
3177 * Return value: Current view; #IAnjutaMessageView object.
3178 * NULL, if there is no views.
3180 IAnjutaMessageView* get_current_view ();
3183 * ianjuta_message_manager_get_view_by_name:
3184 * @obj: Self
3185 * @name: Name/Title of the view
3186 * @err: Error propagation and reporting
3188 * Get the view with the given name or NULL if
3189 * it does not exist.
3191 * Return value: The message-view or NULL
3193 IAnjutaMessageView* get_view_by_name (const gchar *name);
3196 * ianjuta_message_manager_get_all_views:
3197 * @obj: Self
3198 * @err: Error propagation and reporting
3200 * Get all message-views
3202 * Return value: (element-type IAnjutaMessageView): A GList* of all views. You must not
3203 * manipulate the list.
3205 List<IAnjutaMessageView*> get_all_views ();
3208 * ianjuta_message_manager_set_current_view:
3209 * @obj: Self
3210 * @view: A message view
3211 * @err: Error propagation and reporting
3213 * Set view to be on top of the notebook.
3216 void set_current_view (IAnjutaMessageView *view);
3219 * ianjuta_message_manager_set_view_title:
3220 * @obj: Self
3221 * @view: A message view
3222 * @title: Sets the title of view.
3223 * @err: Error propagation and reporting
3225 * Sets the title of view.
3228 void set_view_title (IAnjutaMessageView *view, const gchar *title);
3231 * ianjuta_message_manager_set_view_icon:
3232 * @obj: Self
3233 * @view: A message view
3234 * @icon: Sets the icon of view.
3235 * @err: Error propagation and reporting
3237 * Sets the icon of view.
3240 void set_view_icon (IAnjutaMessageView *view, GdkPixbufAnimation *icon);
3243 * ianjuta_message_manager_set_view_icon_from_stock:
3244 * @obj: Self
3245 * @view: A message view
3246 * @icon: Sets the icon of view.
3247 * @err: Error propagation and reporting
3249 * Sets the icon of view.
3252 void set_view_icon_from_stock (IAnjutaMessageView *view, const gchar *icon);
3256 * SECTION:ianjuta-file-manager
3257 * @title: IAnjutaFileManager
3258 * @short_description: File manager plugin
3259 * @see_also:
3260 * @stability: Unstable
3261 * @include: libanjuta/interfaces/ianjuta-file-manager.h
3264 interface IAnjutaFileManager
3266 #include <gio/gio.h>
3269 * IANJUTA_FILE_MANAGER_SELECTED_FILE:
3271 * Anjuta shell value set by file manager to the selected file.
3273 #define SELECTED_FILE "file_manager_selected_file"
3276 * IAnjutaFileManager::section-changed:
3277 * @obj: Self
3278 * @err: Error propagation and reporting.
3280 * fixme
3282 void ::section_changed (GFile* file);
3285 * ianjuta_file_manager_set_root:
3286 * @obj: Self
3287 * @root_uri: fixme
3288 * @err: Error propagation and reporting.
3290 * fixme
3292 void set_root (const gchar *root_uri);
3295 * ianjuta_file_manager_get_selected:
3296 * @obj: Self
3297 * @err: Error propagation and reporting.
3299 * fixme
3301 GFile* get_selected ();
3304 * ianjuta_file_manager_set_selected:
3305 * @obj: Self
3306 * @file: File to select
3307 * @err: Error propagation and reporting.
3309 * fixme.
3311 void set_selected (GFile* file);
3315 * SECTION:ianjuta-terminal
3316 * @title: IAnjutaTerminal
3317 * @short_description: Interface for command line terminals
3318 * @see_also:
3319 * @stability: Unstable
3320 * @include: libanjuta/interfaces/ianjuta-terminal.h
3323 interface IAnjutaTerminal
3325 #include <sys/types.h>
3328 * IAnjutaTerminal::child_exited:
3329 * @obj: Self
3330 * @pid: pid of terminated child
3331 * @status: status of terminated child as returned by waitpid
3333 * This signal is emitted when a child exit.
3335 void ::child_exited (gint pid, gint status);
3339 * ianjuta_terminal_execute_command:
3340 * @obj: Self
3341 * @directory: Working directory
3342 * @command: Command executed followed by arguments
3343 * @environment: (array zero-terminated=1): List of additional environment variables
3344 * @err: Error propagation and reporting.
3346 * Run the command in a terminal, setting the working directory
3347 * and environment variables.
3349 * Returns: Process ID
3351 pid_t execute_command (const gchar* directory, const gchar *command, gchar **environment);
3355 * SECTION:ianjuta-project
3356 * @title: IAnjutaProject
3357 * @short_description: Interface implemented by project backend
3358 * @see_also:
3359 * @stability: Unstable
3360 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3362 * This is the new interface that is replacing Gnome Build.
3364 interface IAnjutaProject
3366 #include <libanjuta/anjuta-project.h>
3367 #include <gtk/gtk.h>
3369 /* Types */
3370 enum Error
3372 ERROR_SUCCESS = 0,
3373 ERROR_DOESNT_EXIST,
3374 ERROR_ALREADY_EXISTS,
3375 ERROR_VALIDATION_FAILED,
3376 ERROR_PROJECT_MALFORMED,
3377 ERROR_WRONG_PARENT,
3378 ERROR_NOT_SUPPORTED,
3379 ERROR_GENERAL_FAILURE
3382 enum Probe
3383 PROBE_FILES = 10,
3384 PROBE_MAKE_FILES = 100,
3385 PROBE_PROJECT_FILES = 200
3388 /* Signals */
3391 * IAnjutaProject::file-changed:
3392 * @obj: Self
3393 * @node: Node to be reloaded.
3395 * This signal is emitted when the project is changed on the disk. The
3396 * corresponding node has to be reloaded.
3398 void ::file_changed (gpointer node);
3401 * IAnjutaProject::node-changed:
3402 * @obj: Self
3403 * @node: Changed node.
3404 * @error: Error while changing node
3406 * This signal is emitted when a node is changed by a function of this
3407 * interface. The error argument is not NULL if the change was not
3408 * possible. The corresponding node need to be saved.
3410 void ::node_changed (gpointer node, GError *error);
3413 * IAnjutaProject::node-saved:
3414 * @obj: Self
3415 * @node: Saved node.
3416 * @error: Error while saving node
3418 * This signal is emitted when a node is saved. It returns an error if the
3419 * save operation fail.
3421 void ::node_saved (gpointer node, GError *error);
3424 * IAnjutaProject::node-loaded:
3425 * @obj: Self
3426 * @node: Loaded node.
3427 * @error: Error while loading node
3429 * This signal is emitted when a node is loaded. It returns an error if the
3430 * load operation fail.
3432 void ::node_loaded (gpointer node, GError *error);
3436 * ianjuta_project_load_node:
3437 * @obj: Self
3438 * @node: (transfer none): Project node to reload
3439 * @err: Error propagation and reporting
3441 * Reload a project node
3443 * Return value: TRUE if the node has been loaded without error
3445 gboolean load_node (AnjutaProjectNode *node);
3448 * ianjuta_project_save_node:
3449 * @obj: Self
3450 * @node: (transfer none): Project node to save
3451 * @err: Error propagation and reporting
3453 * Save a project node
3455 * Return value: TRUE if the node has been saved without error
3457 gboolean save_node (AnjutaProjectNode *node);
3460 * ianjuta_project_add_node_after:
3461 * @obj: Self
3462 * @parent: (transfer none): Parent
3463 * @sibling: (allow-none) (transfer none): Sibling
3464 * @type: Node type
3465 * @file: (allow-none) (transfer none): Optional file object for the node
3466 * @name: (allow-none) (transfer none): Optional name for the node
3467 * @err: Error propagation and reporting
3469 * Create a new node and insert it after sibling
3471 * Return value: (transfer none): The new node, NULL if error
3473 AnjutaProjectNode *add_node_after (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, const gchar *name);
3476 * ianjuta_project_add_node_before:
3477 * @obj: Self
3478 * @parent: (transfer none): Parent
3479 * @sibling: (allow-none) (transfer none): Sibling
3480 * @type: Node type
3481 * @file: (allow-none) (transfer none): Optional file object for the node
3482 * @name: (allow-none) (transfer none): Optional name for the node
3483 * @err: Error propagation and reporting
3485 * Create a new node and insert it before sibling
3487 * Return value: (transfer none): The new node, NULL if error
3489 AnjutaProjectNode *add_node_before (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, const gchar *name);
3492 * ianjuta_project_remove_node:
3493 * @obj: Self
3494 * @node: (transfer none): Node
3495 * @err: Error propagation and reporting
3497 * Remove a node
3499 * Return value: TRUE if the node can be removed
3501 gboolean remove_node (AnjutaProjectNode *node);
3504 * ianjuta_project_set_property:
3505 * @obj: Self
3506 * @node: (transfer none): Node
3507 * @id: (transfer none): Property
3508 * @name: (allow-none) (transfer none): Name for map property
3509 * @value: (transfer none): Value
3510 * @err: Error propagation and reporting
3512 * Change a properties on node.
3514 * Return value: (allow-none) (transfer none): The new property of NULL if the property cannot be set
3516 AnjutaProjectProperty *set_property (AnjutaProjectNode *node, const gchar *id, const gchar *name, const gchar *value);
3519 * ianjuta_project_remove_property:
3520 * @obj: Self
3521 * @node: (transfer none): Node
3522 * @id: (transfer none): Property
3523 * @name: (allow-none) (transfer none): Name for map property
3524 * @err: Error propagation and reporting
3526 * Remove a property of the node
3528 * Return value: TRUE if the node is removed
3530 gboolean remove_property (AnjutaProjectNode *node, const gchar *id, const gchar *name);
3533 * ianjuta_project_get_root:
3534 * @obj: Self
3535 * @err: Error propagation and reporting
3537 * Get root_node
3539 * Return value: (transfer none): The root node
3541 AnjutaProjectNode *get_root ();
3544 * ianjuta_project_get_node_info:
3545 * @obj: Self
3546 * @err: Error propagation and reporting
3548 * Return a list of possible node;
3550 * Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): A list
3551 * containing information on all node supported by the project.
3553 const List<AnjutaProjectNodeInfo *> get_node_info();
3556 * ianjuta_project_is_loaded:
3557 * @obj: Self
3558 * @err: Error propagation and reporting
3560 * Return TRUE if the project is loaded;
3562 * Return value: TRUE if the project is completely loaded.
3564 gboolean is_loaded ();
3568 * SECTION:ianjuta-project-backend
3569 * @title: IAnjutaProjectBackend
3570 * @short_description: Interface for creating new project
3571 * @see_also:
3572 * @stability: Unstable
3573 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3576 interface IAnjutaProjectBackend
3578 #include "ianjuta-project.h"
3581 * ianjuta_project_backend_new_project:
3582 * @obj: Self
3583 * @file: (transfer none): Project file or directory
3584 * @err: Error propagation and reporting
3586 * Create a new Anjuta project.
3588 * Return value: (transfer full): An object implementing the
3589 * #IAnjutaProject interface.
3591 IAnjutaProject* new_project (GFile *file);
3595 * ianjuta_project_backend_probe:
3596 * @obj: Self
3597 * @directory: (transfer none): Project file or directory
3598 * @err: Error propagation and reporting
3600 * Check if the directory contains a project supported by this
3601 * backend.
3603 * Return value: 0 if the project is invalid and > 0 if the project is
3604 * valid.
3606 gint probe (GFile *directory);
3610 * SECTION:ianjuta-project-manager
3611 * @title: IAnjutaProjectManager
3612 * @short_description: Interface for project managers
3613 * @see_also:
3614 * @stability: Unstable
3615 * @include: libanjuta/interfaces/ianjuta-project-manager.h
3618 interface IAnjutaProjectManager
3621 #include <libanjuta/anjuta-project.h>
3622 #include <libanjuta/interfaces/ianjuta-project.h>
3625 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI:
3627 * Anjuta shell value set by project manager to the project root uri.
3629 #define PROJECT_ROOT_URI "project_root_uri"
3632 * IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT:
3634 * Anjuta shell value set by project manager to the current project object
3635 * which implement #IAnjutaProject interface.
3637 #define CURRENT_PROJECT "project_manager_current_project"
3640 * IANJUTA_PROJECT_MANAGER_CURRENT_URI:
3642 * Anjuta shell value set by project manager to the current uri.
3644 #define CURRENT_URI "project_manager_current_uri"
3646 // Signals
3649 * IAnjutaProjectManager::project_loaded:
3650 * @obj: Self
3651 * @err: Error propagation and reporting.
3653 * Emitted when the project is fully loaded. It can takes a quite long
3654 * time if the project is big. The project is loaded in several parts
3655 * in a thread. All functions are available before having the project
3656 * fully loaded.
3658 void ::project_loaded (GError *error);
3661 * IAnjutaProjectManager::element_added:
3662 * @obj: Self
3663 * @element: A #GFile corrresponding to added element
3664 * @err: Error propagation and reporting.
3666 * Emitted when a new element is added to the project. It can be
3667 * a source, a target or a group. It does not always correspond
3668 * to an existing file. This signal can be emitted several time for
3669 * the same element.
3671 void ::element_added (GFile *element);
3674 * IAnjutaProjectManager::element_removed:
3675 * @obj: Self
3676 * @element: A #GFile corresponding to removed element
3677 * @err: Error propagation and reporting.
3679 * Emitted when an element is removed from a project. It can be
3680 * a source, a target or a group.
3682 void ::element_removed (GFile *element);
3685 * IAnjutaProjectManager::element_selected:
3686 * @obj: Self
3687 * @element_uri: A #GFile corresponding to selected element
3688 * @err: Error propagation and reporting.
3690 * Emitted when an element is selected in the project view. It
3691 * can be a source, a target or a group.
3693 void ::element_selected (GFile *element);
3695 // Methods
3698 * ianjuta_project_manager_get_elements:
3699 * @obj: Self
3700 * @element_type: Select one element type: source, group or target
3701 * @err: Error propagation and reporting.
3703 * Get a list of all elements of this type in the project.
3705 * Returns: (element-type GFile) (transfer full): Get list of #GFile corresponding to
3706 * all valid elements or %NULL if there are no elements of this type. Free the returned
3707 * list with g_list_free() and the files with g_object_unref().
3709 List<GFile *> get_elements (AnjutaProjectNodeType element_type);
3712 * ianjuta_project_manager_get_target_type:
3713 * @obj: Self
3714 * @target: A #GFile corresponding to a target
3715 * @err: Error propagation and reporting.
3717 * Get the type of the corresponding target: program, library...
3719 * Returns: Return the type of the target.
3721 AnjutaProjectNodeType get_target_type (GFile *target);
3724 * ianjuta_project_manager_get_targets:
3725 * @obj: Self
3726 * @target_type: type of the target
3727 * @err: Error propagation and reporting.
3729 * Get a list of targets in the project with the corresponding type.
3731 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to
3732 * each target of the requested type or %NULL if none exists. Free the returned list
3733 * with g_list_free() and the files with g_object_unref().
3735 List<GFile *> get_targets (AnjutaProjectNodeType target_type);
3738 * ianjuta_project_manager_get_parent:
3739 * @obj: Self
3740 * @element: A #GFile corresponding to one child.
3741 * @err: Error propagation and reporting.
3743 * Gets the parent of the corresponding child.
3745 * Returns: The parent of the child, or %NULL if the element is the root.
3747 GFile* get_parent (GFile *element);
3750 * ianjuta_project_manager_get_children:
3751 * @obj: Self
3752 * @parent: A #GFile corresponding to the parent.
3753 * @children_type: Select one element type: source, group or target
3754 * @err: Error propagation and reporting.
3756 * Recursively gets the list of all children below the corresponding
3757 * parent having the specify type.
3759 * Returns: (element-type GFile) (transfer full): The list of #GFile
3760 * corresponding to all children or %NULL if the element has no
3761 * children with the corresponding type. Free the returned * list
3762 * with g_list_free() and the files with g_object_unref().
3764 List<GFile*> get_children (GFile *parent, gint children_type);
3767 * ianjuta_project_manager_get_selected:
3768 * @obj: Self
3769 * @err: Error propagation and reporting.
3771 * Gets the currently selected element in the project manager view.
3773 * Returns: (transfer full): A #GFile corresponding to the selected element in the project
3774 * view. You own the returned file; use g_object_unref() to release it.
3776 GFile* get_selected ();
3779 * ianjuta_project_manager_get_capabilities:
3780 * @obj: Self
3781 * @err: Error propagation and reporting.
3783 * Gets the capabilites of project whether it can add group, target
3784 * sources etc.
3786 * Returns: Supported capabilites.
3788 guint get_capabilities ();
3791 * ianjuta_project_manager_add_source:
3792 * @obj: Self.
3793 * @name: Source name or URI.
3794 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3795 * %NULL if you don't care.
3796 * @err: Error propagation and reporting.
3798 * Prompts the user to add a file to the project. If the user selects
3799 * multiple files only the first source file is returned.
3801 * You can add non existing file. In this case the element_added
3802 * signal will be emitted with a non existing file. So it is
3803 * up to the caller to reemit this signal later when the file
3804 * is created.
3806 * Returns: (transfer full): A #GFile corresponding to the new source file in the
3807 * project view. You own the returned file; use g_object_unref() to release it.
3809 GFile* add_source (const gchar *name, GFile *default_target);
3812 * ianjuta_project_manager_add_source_quiet:
3813 * @obj: Self.
3814 * @name: Source name or URI.
3815 * @target: A #GFile corresponding to the parent target or group.
3816 * @err: Error propagation and reporting.
3818 * Adds a file to the project without prompting the user.
3820 * You can add non existing file. In this case the element_added
3821 * signal will be emitted with a non existing file. So it is
3822 * up to the caller to reemit this signal later when the file
3823 * is created.
3825 * Returns: (transfer full): A #GFile corresponding to the new source file in the project
3826 * view. You own the returned file; use g_object_unref() to release it.
3828 GFile* add_source_quiet (const gchar *name, GFile *target);
3831 * ianjuta_project_manager_add_sources:
3832 * @obj: Self.
3833 * @names: (element-type utf8): Sources name or URI to add.
3834 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3835 * %NULL if don't care.
3836 * @err: Error propagation and reporting.
3838 * Prompts the user to add several files to the project. Depending on the
3839 * project backend, it can be possible that the source files must
3840 * be located in a particular directory.
3842 * You can add non existing file. In this case the element_added
3843 * signal will be emitted with a non existing file. So it is
3844 * up to the caller to reemit this signal later when the file
3845 * is created.
3847 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to all
3848 * new source files added in the project. You own the list with the the returned files;
3849 * use g_list_free() and g_object_unref() on each file to release them.
3851 List<GFile*> add_sources (List<const gchar*> names, GFile *default_target);
3854 * ianjuta_project_manager_add_target:
3855 * @obj: Self
3856 * @name: Target name or URI.
3857 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3858 * %NULL if don't care.
3859 * @err: Error propagation and reporting.
3861 * Prompts the user to add a new target to the project. The user can select
3862 * a parent group different from the one set as default.
3864 * Returns: (transfer full): A #GFile corresponding to the new target added in the project.
3865 * You own the returned file; use g_object_unref() to release it.
3867 GFile* add_target (const gchar *name, GFile *default_group);
3870 * ianjuta_project_manager_add_group:
3871 * @obj: Self.
3872 * @name: Group name or URI.
3873 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3874 * %NULL if don't care.
3875 * @err: Error propagation and reporting.
3877 * Prompts the user to add a new group to the project. The user can select
3878 * a parent group different from the one set as default.
3880 * Returns: (transfer full): A #GFile corresponding to the new group added in the project.
3881 * You own the returned file; use g_object_unref() to release it.
3883 GFile* add_group (const gchar *name, GFile *default_group);
3886 * ianjuta_project_manager_remove_file:
3887 * @obj: Self.
3888 * @file: A #GFile that will be removed from the project
3889 * @err: Error propagation and reporting.
3891 * Remove a source file from the project. If the file is used in several
3892 * targets, it is removed from all targets. The file could be removed from
3893 * the disk.
3895 * Returns: %TRUE if the file has been removed from the project else %FALSE
3897 gboolean remove_file (GFile *file);
3900 * ianjuta_project_manager_is_open:
3901 * @obj: Self
3902 * @err: Error propagation and reporting.
3904 * Gets whether a project is currently opened.
3906 * Returns: %TRUE if a project is opened.
3908 gboolean is_open ();
3911 * ianjuta_project_manager_get_packages:
3912 * @obj: Self
3913 * @err: Error propagation and reporting.
3915 * Returns: (element-type utf8) (transfer container): the list of pkg-config packages that the current project
3916 * requires in it's configure.ac. Can be NULL if there is no project
3917 * opened currently or no package is required.
3919 List<gchar*> get_packages();
3922 * ianjuta_project_manager_get_current_project:
3923 * @obj: Self
3924 * @err: Error propagation and reporting.
3926 * Gets the current project.
3928 * Return value: (transfer none): the currently active project. NULL if none is there.
3930 IAnjutaProject* get_current_project ();
3934 * SECTION:ianjuta-project-chooser
3935 * @title: IAnjutaProjectChooser
3936 * @short_description: Interface for selecting project node
3937 * @see_also:
3938 * @stability: Unstable
3939 * @include: libanjuta/interfaces/ianjuta-project-chooser.h
3942 interface IAnjutaProjectChooser
3945 #include <libanjuta/anjuta-project.h>
3946 #include <libanjuta/interfaces/ianjuta-project-manager.h>
3948 // Signals
3951 * IAnjutaProjectChooser::changed:
3952 * @obj: Self
3954 * Emitted when the selected node is changed.
3956 void ::changed ();
3958 // Methods
3961 * ianjuta_project_chooser_set_project_model:
3962 * @obj: Self
3963 * @manager: A project manager
3964 * @child_type: Select one element type: source, group or target
3965 * @err: Error propagation and reporting.
3967 * Initialize a project chooser button allowing to select a parent node
3968 * where you can add the nodes of type child_type.
3969 * As special cases with
3970 * <variablelist>
3971 * <varlistentry>
3972 * <term>ANJUTA_PROJECT_ROOT</term>
3973 * <listitem><para>all nodes are included</para></listitem>
3974 * </varlistentry>
3975 * <varlistentry>
3976 * <term>ANJUTA_PROJECT_MODULE</term>
3977 * <listitem><para>only modules are included, this can be used
3978 * to add a new package. While ANJUTA_PROJECT_PACKAGE allows you
3979 * to select a target using a package.</para></listitem>
3980 * </varlistentry>
3981 * </variablelist>
3983 * Returns: TRUE if sucessful, other FALSE.
3985 gboolean set_project_model (IAnjutaProjectManager *manager, AnjutaProjectNodeType child_type);
3989 * ianjuta_project_chooser_get_selected:
3990 * @obj: Self
3991 * @err: Error propagation and reporting.
3993 * Gets the currently selected element in the project chooser.
3995 * Returns: (transfer none): A #GFile corresponding to the selected
3996 * element in the project view or %NULL if no valid node is selected.
3997 * The file is owned by the widget If you want to keep a pointer to
3998 * the file you must add a refcount using g_object_ref().
4000 GFile* get_selected ();
4005 * SECTION:ianjuta-todo
4006 * @title: IAnjutaTodo
4007 * @short_description: Task manager interface
4008 * @see_also:
4009 * @stability: Unstable
4010 * @include: libanjuta/interfaces/ianjuta-todo.h
4013 interface IAnjutaTodo
4015 #include <gio/gio.h>
4017 * ianjuta_to_do_load:
4018 * @obj: Self
4019 * @file: fixme
4020 * @err: Error propagation and reporting.
4022 * fixme
4024 void load(GFile *file);
4028 * SECTION:ianjuta-wizard
4029 * @title: IAnjutaWizard
4030 * @short_description: Interface for wizards that can create new stuffs
4031 * @see_also:
4032 * @stability: Unstable
4033 * @include: libanjuta/interfaces/ianjuta-wizard.h
4036 interface IAnjutaWizard
4040 * ianjuta_wizard_activate:
4041 * @obj: Self
4042 * @err: Error propagation and reporting.
4044 * Called when the wizard should start after some user action
4046 void activate();
4050 * SECTION:ianjuta-debugger
4051 * @title: IAnjutaDebugger
4052 * @short_description: Debugger interface
4053 * @see_also: #IAnjutaDebugManager
4054 * @stability: Unstable
4055 * @include: libanjuta/interfaces/ianjuta-debugger.h
4057 * This interface is implemented by debugger backends, by example the gdb
4058 * backend. It is used by the debug manager plugin which provides the
4059 * graphical interface and a simple wrapper: #IAnjutaDebugManager.
4061 * The debugger is in one on these 5 states and emit a signal to the debug
4062 * manager when it changes. Here is figure showing all transitions and
4063 * the signal emitted.
4064 * <figure id="debugger-states">
4065 * <mediaobject>
4066 * <imageobject>
4067 * <imagedata fileref="debugger-states.png" format="PNG"/>
4068 * </imageobject>
4069 * </mediaobject>
4070 * </figure>
4073 interface IAnjutaDebugger
4075 #include "ianjuta-message-view.h"
4076 #include <sys/types.h>
4077 #include <gio/gio.h>
4079 /* Types */
4081 * IAnjutaDebuggerError:
4082 * @IANJUTA_DEBUGGER_OK: No error
4083 * @IANJUTA_DEBUGGER_NOT_READY: Debugger is not ready to execute the command
4084 * @IANJUTA_DEBUGGER_NOT_RUNNING: Debugger is not is running state
4085 * @IANJUTA_DEBUGGER_NOT_STOPPED: Debugger is not is stopped state
4086 * @IANJUTA_DEBUGGER_NOT_LOADED: Debugger is not is loaded state
4087 * @IANJUTA_DEBUGGER_NOT_STARTED: Debugger is not in started state
4088 * @IANJUTA_DEBUGGER_NOT_CONNECTED: Debugger is not connected:
4089 * @IANJUTA_DEBUGGER_NOT_IMPLEMENTED: Corresponding function is not implemented
4090 * @IANJUTA_DEBUGGER_CANCEL: Operation has been cancelled
4091 * @IANJUTA_DEBUGGER_UNABLE_TO_CREATE_VARIABLE: Debugger cannot create variable
4092 * @IANJUTA_DEBUGGER_UNABLE_TO_ACCESS_MEMORY: Debugger cannot access memory
4093 * @IANJUTA_DEBUGGER_UNABLE_TO_OPEN_FILE: Debugger cannot open file
4094 * @IANJUTA_DEBUGGER_UNSUPPORTED_FILE_TYPE: Debugger cannot debug such file
4095 * @IANJUTA_DEBUGGER_UNSUPPORTED_VERSION: Debugger is too old
4096 * @IANJUTA_DEBUGGER_UNABLE_TO_FIND_DEBUGGER: Debugger cannot be found
4097 * @IANJUTA_DEBUGGER_ALREADY_DONE: Command has already been executed
4098 * @IANJUTA_DEBUGGER_PROGRAM_NOT_FOUND: Program cannot be found
4099 * @IANJUTA_DEBUGGER_UNABLE_TO_CONNECT: Unable to connect to debugger
4100 * @IANJUTA_DEBUGGER_UNKNOWN_ERROR: Unknown error
4101 * @IANJUTA_DEBUGGER_OTHER_ERROR: other error
4103 * This enumeration is used to defined the error returned by the debugger
4104 * backend.
4106 enum Error
4108 OK = 0,
4109 NOT_READY,
4110 NOT_RUNNING,
4111 NOT_STOPPED,
4112 NOT_LOADED,
4113 NOT_STARTED,
4114 NOT_CONNECTED,
4115 NOT_IMPLEMENTED,
4116 CANCEL,
4117 UNABLE_TO_CREATE_VARIABLE,
4118 UNABLE_TO_ACCESS_MEMORY,
4119 UNABLE_TO_OPEN_FILE,
4120 UNSUPPORTED_FILE_TYPE,
4121 UNSUPPORTED_VERSION,
4122 UNABLE_TO_FIND_DEBUGGER,
4123 ALREADY_DONE,
4124 PROGRAM_NOT_FOUND,
4125 UNABLE_TO_CONNECT,
4126 UNKNOWN_ERROR,
4127 OTHER_ERROR
4131 * IAnjutaDebuggerOutputType:
4132 * @IANJUTA_DEBUGGER_OUTPUT: Output from debugger
4133 * @IANJUTA_DEBUGGER_WARNING_OUTPUT: Warning from debugger
4134 * @IANJUTA_DEBUGGER_ERROR_OUTPUT: Error from debugger
4135 * @IANJUTA_DEBUGGER_INFO_OUTPUT: Additional message from debugger
4137 * This enumeration is used to defined the kind of output in
4138 * #IAnjutaDebuggerOutputCallback
4140 enum OutputType
4142 OUTPUT,
4143 WARNING_OUTPUT,
4144 ERROR_OUTPUT,
4145 INFO_OUTPUT
4149 * IAnjutaDebuggerState:
4150 * @IANJUTA_DEBUGGER_BUSY: Debugger is executing a command, it can enter in another
4151 * at the end of the command.
4152 * @IANJUTA_DEBUGGER_STOPPED: Debugger is stopped.
4153 * @IANJUTA_DEBUGGER_STARTED: Debugger is started but no program is loaded.
4154 * @IANJUTA_DEBUGGER_PROGRAM_LOADED: Debugger is started and has a program loaded.
4155 * @IANJUTA_DEBUGGER_PROGRAM_STOPPED: Debugger is started and has a program stopped.
4156 * @IANJUTA_DEBUGGER_PROGRAM_RUNNING: Debugger is started and has a program running.
4158 * This enumeration is used to defined the different state of the debugger.
4160 enum State
4162 BUSY,
4163 STOPPED,
4164 STARTED,
4165 PROGRAM_LOADED,
4166 PROGRAM_STOPPED,
4167 PROGRAM_RUNNING
4171 * IAnjutaDebuggerFrame:
4172 * @thread: Thread identifier.
4173 * @level: Level of the frame, 0 is the topmost one.
4174 * @args: List of argument of the caller.
4175 * @file: Source file name where is the program counter.
4176 * @line: Line number in the file above.
4177 * @function: Function name where is the program counter.
4178 * @library: Library name where is the program counter.
4179 * @address: Address of the program counter.
4181 * This structure keeps all information about a stack frame.
4183 struct Frame
4185 gint thread;
4186 guint level;
4187 gchar *args;
4188 gchar *file;
4189 guint line;
4190 gchar *function;
4191 gchar *library;
4192 gulong address;
4196 * IAnjutaDebuggerCallback:
4197 * @data: data
4198 * @user_data: user data passed to the function
4199 * @err: error
4201 * This callback function is used only by #ianjuta_debugger_callback with a
4202 * NULL data.
4204 typedef void (*Callback) (const gpointer data, gpointer user_data, GError* err);
4207 * IAnjutaDebuggerGListCallback:
4208 * @list: (element-type any): list of data
4209 * @user_data: user data passed to the function
4210 * @err: error
4212 * This callback function is used by several debugger functions. Depending on
4213 * the function, the kind of elements in the list is different. It is a string
4214 * for #ianjuta_debugger_list_local or a #IAnjutaDebuggerFrame for
4215 * #ianjuta_debugger_list_frame.
4217 typedef void (*GListCallback) (const GList* list, gpointer user_data, GError* err);
4220 * IAnjutaDebuggerGCharCallback:
4221 * @value: string
4222 * @user_data: user data
4223 * @err: error
4225 * This callback function is used by several debugger functions. The data is
4226 * a string
4228 typedef void (*GCharCallback) (const gchar *value, gpointer user_data, GError* err);
4231 * IAnjutaDebuggerOutputCallback:
4232 * @type: kind of output
4233 * @output: string
4234 * @user_data: user data
4236 * This callback function is used only by #ianjuta_debugger_callback with a
4237 * NULL data.
4239 typedef void (*OutputCallback) (OutputType type, const gchar *output, gpointer user_data);
4241 /* Signals */
4244 * IAnjutaDebugger::debugger_started:
4245 * @obj: Self
4247 * This signal is emitted when the debugger is started.
4249 void ::debugger_started ();
4252 * IAnjutaDebugger::debugger_stopped:
4253 * @obj: Self
4254 * @err: Error propagation and reporting.
4256 * This signal is emitted when the debugger is stopped. The error
4257 * parameters allow to check it has run correctly.
4259 void ::debugger_stopped (GError *err);
4262 * IAnjutaDebugger::program_loaded:
4263 * @obj: Self
4265 * This signal is emitted when a program is loaded.
4267 void ::program_loaded ();
4270 * IAnjutaDebugger::program_running:
4271 * @obj: Self
4273 * This signal is emitted when the program is running.
4275 void ::program_running ();
4278 * IAnjutaDebugger::program_stopped:
4279 * @obj: Self
4281 * This signal is emitted when the program is interrupted.
4283 void ::program_stopped ();
4286 * IAnjutaDebugger::program_exited:
4287 * @obj: Self
4289 * This signal is emitted when the program exits.
4291 void ::program_exited ();
4294 * IAnjutaDebugger::sharedlib_event:
4295 * @obj: Self
4297 * This signal is emitted when the program load a new shared
4298 * library.
4300 void ::sharedlib_event ();
4303 * IAnjutaDebugger::program_moved:
4304 * @obj: Self
4305 * @pid: process id, 0 when unknown
4306 * @tid: thread id, 0 when unknown
4307 * @address: program counter address, 0 when unknown
4308 * @file: source file where is the program counter, NULL when unknown
4309 * @line: line number if file name above is not NULL
4311 * This signal is emitted when the debugger know the current program
4312 * location. Most of the time, after the program has stopped but it
4313 * could happen even if it is still running.
4315 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
4318 * IAnjutaDebugger::frame_changed:
4319 * @obj: Self
4320 * @frame: frame number
4321 * @thread: thread number
4323 * This signal is emitted when the current frame changes.
4325 void ::frame_changed (guint frame, gint thread);
4328 * IAnjutaDebugger::signal_received:
4329 * @obj: Self
4330 * @name: Signal name
4331 * @description: Signal description
4333 * This signal is emitted when the program received a unix signal.
4335 void ::signal_received (const gchar* name, const gchar* description);
4338 * IAnjutaDebugger::debugger_ready:
4339 * @obj: Self
4340 * @state: debugger status
4342 * This signal is emitted when the debugger is ready to execute
4343 * a new command.
4345 void ::debugger_ready (State state);
4349 * ianjuta_debugger_get_state:
4350 * @obj: Self
4351 * @err: Error propagation and reporting.
4353 * Get the current state of the debugger
4355 * Returns: The current debugger state.
4357 State get_state ();
4363 * ianjuta_debugger_load:
4364 * @obj: Self
4365 * @file: filename
4366 * @mime_type: mime type of the file
4367 * @source_search_directories: (element-type utf8): List of directories to search for
4368 * source files.
4369 * @err: Error propagation and reporting.
4371 * Load a program in the debugger.
4373 * Returns: TRUE if sucessful, other FALSE.
4375 gboolean load (const gchar *file, const gchar *mime_type, const List<const gchar*> source_search_directories);
4378 * ianjuta_debugger_attach:
4379 * @obj: Self
4380 * @pid: pid of the process to debug
4381 * @source_search_directories: (element-type utf8): List of directories to search for
4382 * source files.
4383 * @err: Error propagation and reporting.
4385 * Attach to an already running process.
4387 * Returns: TRUE if sucessful, other FALSE.
4389 gboolean attach (pid_t pid, const List<const gchar*> source_search_directories);
4392 * ianjuta_debugger_set_working_directory:
4393 * @obj: Self
4394 * @dir: working program directory
4395 * @err: Error propagation and reporting.
4397 * Set program working directory.
4399 * Returns: TRUE if sucessful, other FALSE.
4401 gboolean set_working_directory (const gchar *dir);
4404 * ianjuta_debugger_set_environment:
4405 * @obj: Self
4406 * @env: List environment variable
4407 * @err: Error propagation and reporting
4409 * Set environment variable
4411 * Returns: TRUE if sucessfull, other FALSE.
4413 gboolean set_environment (gchar **env);
4416 * ianjuta_debugger_start:
4417 * @obj: Self
4418 * @args: command line argument of the program
4419 * @terminal: TRUE if the program need a terminal
4420 * @stop: TRUE if program is stopped at the beginning
4421 * @err: Error propagation and reporting.
4423 * Start a loaded program under debugger control.
4425 * Returns: TRUE if sucessful, other FALSE.
4427 gboolean start (const gchar *args, gboolean terminal, gboolean stop);
4430 * ianjuta_debugger_connect:
4431 * @obj: Self
4432 * @server: remote server
4433 * @args: command line argument of the program
4434 * @terminal: TRUE if the program need a terminal
4435 * @stop: TRUE if program is stopped at the beginning
4436 * @err: Error propagation and reporting
4438 * Connect to a remote debugger and run program
4440 * Returns: TRUE if sucessfull, otherwise FALSE.
4442 gboolean connect (const gchar *server, const gchar *args, gboolean terminal, gboolean stop);
4445 * ianjuta_debugger_unload:
4446 * @obj: Self
4447 * @err: Error propagation and reporting.
4449 * Unload a program.
4451 * Returns: TRUE if sucessfull, otherwise FALSE.
4453 gboolean unload ();
4456 * ianjuta_debugger_quit:
4457 * @obj: Self
4458 * @err: Error propagation and reporting.
4460 * Quit the debugger, can wait until the debugger is ready.
4462 * Returns: TRUE if sucessful, other FALSE.
4464 gboolean quit ();
4467 * ianjuta_debugger_abort:
4468 * @obj: Self
4469 * @err: Error propagation and reporting.
4471 * Quit the debugger as fast as possible.
4473 * Returns: TRUE if sucessful, otherwise FALSE.
4475 gboolean abort ();
4478 * ianjuta_debugger_run:
4479 * @obj: Self
4480 * @err: Error propagation and reporting.
4482 * Run the program currently loaded.
4484 * Returns: TRUE if sucessful, otherwise FALSE.
4486 gboolean run ();
4489 * ianjuta_debugger_step_in:
4490 * @obj: Self
4491 * @err: Error propagation and reporting.
4493 * Execute a single C instruction of the program currently loaded.
4495 * Returns: TRUE if sucessful, otherwise FALSE.
4497 gboolean step_in ();
4500 * ianjuta_debugger_step_over:
4501 * @obj: Self
4502 * @err: Error propagation and reporting.
4504 * Execute one C instruction, without entering in procedure, of
4505 * the program currently loaded.
4507 * Returns: TRUE if sucessful, otherwise FALSE.
4509 gboolean step_over ();
4512 * ianjuta_debugger_step_out:
4513 * @obj: Self
4514 * @err: Error propagation and reporting.
4516 * Execute the currently loaded program until it goes out of the
4517 * current procedure.
4519 * Returns: TRUE if sucessful, otherwise FALSE.
4521 gboolean step_out ();
4524 * ianjuta_debugger_run_to:
4525 * @obj: Self
4526 * @file: target file name
4527 * @line: target line in file
4528 * @err: Error propagation and reporting.
4530 * Execute the currently loaded program until it reachs the target
4531 * line.
4533 * Returns: TRUE if sucessful, otherwise FALSE.
4535 gboolean run_to (const gchar* file, gint line);
4538 * ianjuta_debugger_run_from:
4539 * @obj: Self
4540 * @file: target file name
4541 * @line: target line in file
4542 * @err: Error propagation and reporting.
4544 * Execute the program from a new position.
4545 * This function is optional.
4547 * Returns: TRUE if sucessful, otherwise FALSE.
4549 gboolean run_from (const gchar *file, gint line);
4552 * ianjuta_debugger_exit:
4553 * @obj: Self
4554 * @err: Error propagation and reporting.
4556 * Exit from the currently loaded program.
4558 * Returns: TRUE if sucessful, otherwise FALSE.
4560 gboolean exit ();
4563 * ianjuta_debugger_interrupt:
4564 * @obj: Self
4565 * @err: Error propagation and reporting.
4567 * Interrupt the program currently running.
4569 * Returns: TRUE if sucessful, otherwise FALSE.
4571 gboolean interrupt ();
4576 * ianjuta_debugger_inspect:
4577 * @obj: Self
4578 * @name: variable name
4579 * @callback: Callback to call with variable value
4580 * @user_data: User data that is passed back to the callback
4581 * @err: Error propagation and reporting.
4583 * Get back the value of the named variable.
4585 * Returns: TRUE if sucessful, otherwise FALSE.
4587 gboolean inspect (const gchar* name, GCharCallback callback, gpointer user_data);
4590 * ianjuta_debugger_evaluate:
4591 * @obj: Self
4592 * @name: variable name
4593 * @value: new variable value
4594 * @callback: Callback to call when the variable has been modified
4595 * @user_data: User data that is passed back to the callback
4596 * @err: Error propagation and reporting.
4598 * Change the value of a variable in the current program.
4600 * Returns: TRUE if sucessful, otherwise FALSE.
4602 gboolean evaluate (const gchar* name, const gchar* value, GCharCallback callback, gpointer user_data);
4605 * ianjuta_debugger_print:
4606 * @obj: Self
4607 * @name: variable name
4608 * @callback: Callback to call with variable value
4609 * @user_data: User data that is passed back to the callback
4610 * @err: Error propagation and reporting.
4612 * Display value of a variable, like inspect.
4614 * Returns: TRUE if sucessful, otherwise FALSE.
4616 gboolean print (const gchar *name, GCharCallback callback, gpointer user_data);
4619 * ianjuta_debugger_list_local:
4620 * @obj: Self
4621 * @callback: Callback to call with list of local variable
4622 * @user_data: User data that is passed back to the callback
4623 * @err: Error propagation and reporting.
4625 * Get the list of local variables
4627 * Returns: TRUE if sucessful, otherwise FALSE.
4629 gboolean list_local (GListCallback callback, gpointer user_data);
4632 * ianjuta_debugger_list_argument:
4633 * @obj: Self
4634 * @callback: Callback to call with list of arguments
4635 * @user_data: User data that is passed back to the callback
4636 * @err: Error propagation and reporting.
4638 * Get the list of arguments
4640 * Returns: TRUE if sucessful, otherwise FALSE.
4642 gboolean list_argument (GListCallback callback, gpointer user_data);
4645 * ianjuta_debugger_info_signal:
4646 * @obj: Self
4647 * @callback: Callback to call with list of arguments
4648 * @user_data: User data that is passed back to the callback
4649 * @err: Error propagation and reporting.
4651 * Get some informatin about a signal
4653 * Returns: TRUE if sucessful, otherwise FALSE.
4655 gboolean info_signal (GListCallback callback, gpointer user_data);
4658 * ianjuta_debugger_info_sharedlib:
4659 * @obj: Self
4660 * @callback: Callback to call with list of arguments
4661 * @user_data: User data that is passed back to the callback
4662 * @err: Error propagation and reporting.
4664 * Get information about shared libraries.
4666 * Returns: TRUE if sucessful, otherwise FALSE.
4668 gboolean info_sharedlib (GListCallback callback, gpointer user_data);
4671 * ianjuta_debugger_handle_signal:
4672 * @obj: Self
4673 * @name: signal name
4674 * @stop: TRUE if we need to stop signal
4675 * @print: TRUE if we display a message when the signal is emitted
4676 * @ignore: TRUE if we ignore the signal
4677 * @err: Error propagation and reporting.
4679 * It defines how to handle signal received by the program.
4681 * Returns: TRUE if sucessful, otherwise FALSE.
4683 gboolean handle_signal (const gchar *name, gboolean stop, gboolean print, gboolean ignore);
4686 * ianjuta_debugger_info_frame:
4687 * @obj: Self
4688 * @frame: frame number, the top frame has the number 0
4689 * @callback: Callback to call getting a list of strings with all information
4690 * @user_data: User data that is passed back to the callback
4691 * @err: Error propagation and reporting.
4693 * Get some information about the one stack frame.
4694 * This function has been deprecated and is not used anymore in the
4695 * debugger GUI.
4697 * Returns: TRUE if sucessful, otherwise FALSE.
4699 gboolean info_frame (guint frame, GListCallback callback, gpointer user_data);
4702 * ianjuta_debugger_info_args:
4703 * @obj: Self
4704 * @callback: Callback to call getting a list of strings with all information
4705 * @user_data: User data that is passed back to the callback
4706 * @err: Error propagation and reporting.
4708 * Get some informatin about a current functin arguments.
4709 * This function has been deprecated and is not used anymore in the
4710 * debugger GUI.
4712 * Returns: TRUE if sucessful, otherwise FALSE.
4714 gboolean info_args (GListCallback callback, gpointer user_data);
4717 * ianjuta_debugger_info_target:
4718 * @obj: Self
4719 * @callback: Callback to call getting a list of strings with all information
4720 * @user_data: User data that is passed back to the callback
4721 * @err: Error propagation and reporting.
4723 * Get back some information about the target
4724 * This function has been deprecated and is not used anymore in the
4725 * debugger GUI.
4727 * Returns: TRUE if sucessful, otherwise FALSE.
4729 gboolean info_target (GListCallback callback, gpointer user_data);
4732 * ianjuta_debugger_info_program:
4733 * @obj: Self
4734 * @callback: Callback to call getting a list of strings with all information
4735 * @user_data: User data that is passed back to the callback
4736 * @err: Error propagation and reporting.
4738 * Get some informatin about a current program.
4739 * This function has been deprecated and is not used anymore in the
4740 * debugger GUI.
4742 * Returns: TRUE if sucessful, otherwise FALSE.
4744 gboolean info_program (GListCallback callback, gpointer user_data);
4747 * ianjuta_debugger_info_udot:
4748 * @obj: Self
4749 * @callback: Callback to call getting a list of strings with all information
4750 * @user_data: User data that is passed back to the callback
4751 * @err: Error propagation and reporting.
4753 * Get some informatin about OS structures.
4754 * This function has been deprecated and is not used anymore in the
4755 * debugger GUI.
4757 * Returns: TRUE if sucessful, otherwise FALSE.
4759 gboolean info_udot (GListCallback callback, gpointer user_data);
4763 * ianjuta_debugger_info_variables:
4764 * @obj: Self
4765 * @callback: Callback to call getting a list of strings with all information
4766 * @user_data: User data that is passed back to the callback
4767 * @err: Error propagation and reporting.
4769 * Get some informatin about variables.
4770 * This function has been deprecated and is not used anymore in the
4771 * debugger GUI.
4773 * Returns: TRUE if sucessful, otherwise FALSE.
4775 gboolean info_variables (GListCallback callback, gpointer user_data);
4778 * ianjuta_debugger_list_frame:
4779 * @obj: Self
4780 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame
4781 * @user_data: User data that is passed back to the callback
4782 * @err: Error propagation and reporting.
4784 * Get the list of frames.
4786 * Returns: TRUE if sucessful, otherwise FALSE.
4788 gboolean list_frame (GListCallback callback, gpointer user_data);
4791 * ianjuta_debugger_set_frame:
4792 * @obj: Self
4793 * @frame: frame number
4794 * @err: Error propagation and reporting.
4796 * Set the current frame.
4798 * Returns: TRUE if sucessful, otherwise FALSE.
4800 gboolean set_frame (guint frame);
4803 * ianjuta_debugger_list_thread:
4804 * @obj: Self
4805 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame for each thread
4806 * @user_data: User data that is passed back to the callback
4807 * @err: Error propagation and reporting.
4809 * Get the list of threads.
4811 * Returns: TRUE if sucessful, otherwise FALSE.
4813 gboolean list_thread (GListCallback callback, gpointer user_data);
4816 * ianjuta_debugger_set_thread:
4817 * @obj: Self
4818 * @thread: thread number
4819 * @err: Error propagation and reporting.
4821 * Set the current thread.
4823 * Returns: TRUE if sucessful, otherwise FALSE.
4825 gboolean set_thread (gint thread);
4828 * ianjuta_debugger_info_thread:
4829 * @obj: Self
4830 * @thread: thread number
4831 * @callback: Callback to call getting a list of strings with all information
4832 * @user_data: User data that is passed back to the callback
4833 * @err: Error propagation and reporting.
4835 * Get some information about current threads.
4837 * Returns: TRUE if sucessful, otherwise FALSE.
4839 gboolean info_thread (gint thread, GListCallback callback, gpointer user_data);
4842 * ianjuta_debugger_send_command:
4843 * @obj: Self
4844 * @command: command
4845 * @err: Error propagation and reporting.
4847 * Send a command directly to the debugger. Warning, changing the
4848 * debugger states, by sending a run command by example, will
4849 * probably gives some troubles in the debug manager.
4851 * Returns: TRUE if sucessful, otherwise FALSE.
4853 gboolean send_command (const gchar *command);
4856 * ianjuta_debugger_callback:
4857 * @obj: Self
4858 * @callback: Callback to call. the data argument is NULL.
4859 * @user_data: User data that is passed back to the callback
4860 * @err: Error propagation and reporting.
4862 * All commands are executed asynchronously and give back information
4863 * with callbacks. It is difficult to know when a command is really
4864 * executed. But as all commands are executed in order, you can use
4865 * this command to get a call back when all previous commands have
4866 * been executed.
4868 * Returns: TRUE if sucessful, otherwise FALSE.
4870 gboolean callback (Callback callback, gpointer user_data);
4873 * ianjuta_debugger_enable_log:
4874 * @obj: Self
4875 * @log: MessageView used by log
4876 * @err: Error propagation and reporting.
4878 * Log all debuggers commands, mainly useful for debugging.
4880 void enable_log (IAnjutaMessageView *log);
4883 * ianjuta_debugger_disable_log:
4884 * @obj: Self
4885 * @err: Error propagation and reporting.
4887 * Disable debugger log.
4889 void disable_log ();
4892 * ianjuta_debugger_dump_stack_trace:
4893 * @obj: Self
4894 * @callback: Callback to call getting a list of strings
4895 * @user_data: User data that is passed back to the callback
4896 * @err: Error propagation and reporting.
4898 * Return a stack trace valid for a bug reports.
4899 * This function is optional.
4901 * Returns: TRUE if sucessful, otherwise FALSE.
4903 gboolean dump_stack_trace (GListCallback callback, gpointer user_data);
4906 * SECTION:ianjuta-debugger-breakpoint
4907 * @title: IAnjutaDebuggerBreakpoint
4908 * @short_description: Breakpoint Debugger interface
4909 * @see_also:
4910 * @stability: Unstable
4911 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
4914 interface IAnjutaDebuggerBreakpoint
4918 * IAnjutaDebuggerBreakpointType:
4919 * @IANJUTA_DEBUGGER_BREAKPOINT_REMOVED: Set for removed breakpoint
4920 * @IANJUTA_DEBUGGER_BREAKPOINT_UPDATED: Set for changed breakpoint
4921 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE: Set on source line
4922 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS: Set on an addresse
4923 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION: Set on a function name
4924 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_READ: Set on read access
4925 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE: Set on write access
4926 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE: Has enable information
4927 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE: Has ignore information,
4928 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME: Has counter information
4929 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION: Has a condition
4930 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY: Temporary breakpoint, automatically removed when triggered
4931 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_PENDING: Pending breakpoint
4933 * This enumeration defined various characteristics of the breakpoint.
4935 enum Type
4937 REMOVED = 1 << 0,
4938 UPDATED = 1 << 17,
4939 ON_LINE = 1 << 1,
4940 ON_ADDRESS = 1 << 2,
4941 ON_FUNCTION = 1 << 3,
4942 ON_READ = 1 << 4,
4943 ON_WRITE = 1 << 5,
4944 WITH_ENABLE = 1 << 16,
4945 WITH_IGNORE = 1 << 15,
4946 WITH_TIME = 1 << 11,
4947 WITH_CONDITION = 1 << 12,
4948 WITH_TEMPORARY = 1 << 13,
4949 WITH_PENDING = 1 << 14,
4953 * IAnjutaDebuggerBreakpointItem:
4954 * @type: type see #IAnjutaBreakpointType enumeration
4955 * @id: unique identifier
4956 * @file: source file where is the breakpoint
4957 * @line: corresponding source file line number
4958 * @function: corresponding function name
4959 * @address: corresponding address
4960 * @enable: TRUE if the breakpoint is enabled
4961 * @ignore: TRUE if the breakpoint is ignored
4962 * @times: Count how many time the breakpoint is triggered
4963 * @condition: Additional condition for triggering the breakpoint
4964 * @temporary: TRUE if the breakpoint is temporary
4965 * @pending: TRUE if the breakpoint is pending
4967 * This structure keeps all information about a breakpoint.
4969 struct Item
4971 gint type;
4972 guint id;
4973 gchar *file;
4974 guint line;
4975 gchar *function;
4976 gulong address;
4977 gboolean enable;
4978 guint ignore;
4979 guint times;
4980 gchar *condition;
4981 gboolean temporary;
4982 gboolean pending;
4986 * IAnjutaDebuggerBreakpointMethod:
4987 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS: Allow to set breakpoint on address
4988 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION: Allow to set breakpoint on function name
4989 * @IANJUTA_DEBUGGER_BREAKPOINT_ENABLE: Allow to disable breakpoint
4990 * @IANJUTA_DEBUGGER_BREAKPOINT_IGNORE: Allow to ignore breakpoint
4991 * @IANJUTA_DEBUGGER_BREAKPOINT_CONDITION: Allow to add a condition on breakpoint
4993 * Defines which breakpoint characteristics are supported by the debugger
4994 * backend.
4996 enum Method
4998 SET_AT_ADDRESS = 1 << 0,
4999 SET_AT_FUNCTION = 1 << 1,
5000 ENABLE = 1 << 2,
5001 IGNORE = 1 << 3,
5002 CONDITION = 1 << 4
5006 * IAnjutaDebuggerBreakpointCallback:
5007 * @data: a #IAnjutaBreakpointItem object
5008 * @user_data: user data passed to the function
5009 * @err: error
5011 * This callback function is used to return a #IAnjutaBreakpointItem.
5013 typedef void (*Callback) (const Item *data, gpointer user_data, GError* err);
5016 * ianjuta_debugger_breakpoint_implement_breakpoint:
5017 * @obj: Self
5018 * @err: Error propagation and reporting.
5020 * Return all implemented methods.
5022 * Returns: A OR of #IAnjutaDebuggerBreakpointMethod
5023 * corresponding to all implemented optional methods.
5025 gint implement_breakpoint ();
5028 * ianjuta_debugger_breakpoint_set_breakpoint_at_line:
5029 * @obj: Self
5030 * @file: File containing the breakpoint
5031 * @line: Line number where is the breakpoint
5032 * @callback: Callback to call when the breakpoint has been set
5033 * @user_data: User data that is passed back to the callback
5034 * @err: Error propagation and reporting.
5036 * Set a breakpoint at the specified line in the file.
5038 * Returns: TRUE if the request succeed and the callback is called. If
5039 * FALSE, the callback will not be called.
5041 gboolean set_breakpoint_at_line (const gchar* file, guint line, Callback callback, gpointer user_data);
5045 * ianjuta_debugger_breakpoint_set_breakpoint_at_address:
5046 * @obj: Self
5047 * @address: Address of the breakpoint
5048 * @callback: Callback to call when the breakpoint has been set
5049 * @user_data: User data that is passed back to the callback
5050 * @err: Error propagation and reporting.
5052 * Set a breakpoint at the specified address.
5053 * This function is optional.
5055 * Returns: TRUE if the request succeed and the callback is called. If
5056 * FALSE, the callback will not be called.
5058 gboolean set_breakpoint_at_address (gulong address, Callback callback, gpointer user_data);
5061 * ianjuta_debugger_breakpoint_set_breakpoint_at_function:
5062 * @obj: Self
5063 * @file: File containing the breakpoint
5064 * @function: Function name where the breakpoint is put
5065 * @callback: Callback to call when the breakpoint has been set
5066 * @user_data: User data that is passed back to the callback
5067 * @err: Error propagation and reporting.
5069 * Set a breakpoint at the beginning of the specified function.
5070 * This function is optional.
5072 * Returns: TRUE if the request succeed and the callback is called. If
5073 * FALSE, the callback will not be called.
5075 gboolean set_breakpoint_at_function (const gchar* file, const gchar* function, Callback callback, gpointer user_data);
5078 * ianjuta_debugger_breakpoint_clear_breakpoint:
5079 * @obj: Self
5080 * @id: Breakpoint identification number
5081 * @callback: Callback to call when the breakpoint has been cleared
5082 * @user_data: User data that is passed back to the callback
5083 * @err: Error propagation and reporting.
5085 * Clear a breakpoint put by any set functions. The Id of the breakpoint
5086 * is given in the callback of the set functions.
5088 * Returns: TRUE if the request succeed and the callback is called. If
5089 * FALSE, the callback will not be called.
5091 gboolean clear_breakpoint (guint id, Callback callback, gpointer user_data);
5094 * ianjuta_debugger_breakpoint_list_breakpoint:
5095 * @obj: Self
5096 * @callback: Callback to call with the list of #IAnjutaDebuggreBreakpointItem
5097 * @user_data: User data that is passed back to the callback
5098 * @err: Error propagation and reporting.
5100 * List all breakpoints set in the debugger. It is useful to
5101 * know how many time a breakpoint has been hit.
5103 * Returns: TRUE if the request succeed and the callback is called. If
5104 * FALSE, the callback will not be called.
5106 gboolean list_breakpoint (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5109 * ianjuta_debugger_breakpoint_enable_breakpoint:
5110 * @obj: Self
5111 * @id: Breakpoint identification number
5112 * @enable: TRUE to enable the breakpoint, FALSE to disable it
5113 * @callback: Callback to call when the breakpoint has been changed
5114 * @user_data: User data that is passed back to the callback
5115 * @err: Error propagation and reporting.
5117 * Enable of disable a breakpoint. This function is optional.
5119 * Returns: TRUE if the request succeed and the callback is called. If
5120 * FALSE, the callback will not be called.
5122 gboolean enable_breakpoint (guint id, gboolean enable, Callback callback, gpointer user_data);
5125 * ianjuta_debugger_breakpoint_ignore_breakpoint:
5126 * @obj: Self
5127 * @id: Breakpoint identification number
5128 * @ignore: Number of time a breakpoint must be ignored
5129 * @callback: Callback to call when the breakpoint has been changed
5130 * @user_data: User data that is passed back to the callback
5131 * @err: Error propagation and reporting.
5133 * This allow to ignore the breakpoint a number of time before stopping.
5134 * This function is optional.
5136 * Returns: TRUE if the request succeed and the callback is called. If
5137 * FALSE, the callback will not be called.
5139 gboolean ignore_breakpoint (guint id, guint ignore, Callback callback, gpointer user_data);
5142 * ianjuta_debugger_breakpoint_condition_breakpoint:
5143 * @obj: Self
5144 * @id: Breakpoint identification number
5145 * @condition: expression that has to be true
5146 * @callback: Callback to call when the breakpoint has been changed
5147 * @user_data: User data that is passed back to the callback
5148 * @err: Error propagation and reporting.
5150 * Add a condition, evaluate in the program context, on the breakpoint,
5151 * the program will stop when it reachs the breakpoint only if the
5152 * condition is true. This function is optional.
5154 * Returns: TRUE if the request succeed and the callback is called. If
5155 * FALSE, the callback will not be called.
5157 gboolean condition_breakpoint (guint id, const gchar* condition, Callback callback, gpointer user_data);
5161 * SECTION:ianjuta-debugger-variable
5162 * @title: IAnjutaDebuggerVariable
5163 * @short_description: Variables interface for debuggers
5164 * @see_also:
5165 * @stability: Unstable
5166 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
5168 * This interface is used to examine and change values of expression.
5169 * It is based on the MI2 variable object interface of gdb. A
5170 * variable needs to be created before being able to get or set its
5171 * value and list its children.
5173 interface IAnjutaDebuggerVariable
5176 * IAnjutaDebuggerVariableObject:
5177 * @name: unique variable object name created by backend
5178 * @expression: corresponding variable name or expression
5179 * @type: variable type
5180 * @value: variable value
5181 * @changed: TRUE if the variable has changed
5182 * @exited: TRUE if the variable is outside current scope
5183 * @deleted: TRUE if the variable has been removed
5184 * @children: Number of variable children, -1 if unknown
5185 * @has_more: TRUE if the children value is wrong
5187 * Defines a variable object.
5189 struct Object
5191 gchar *name;
5192 gchar *expression;
5193 gchar *type;
5194 gchar *value;
5195 gboolean changed;
5196 gboolean exited;
5197 gboolean deleted;
5198 gint children;
5199 gboolean has_more;
5203 * IAnjutaDebuggerVariableCallback:
5204 * @data: a #IAnjutaDebuggerVariableObject object
5205 * @user_data: user data passed to the function
5206 * @err: error
5208 * This callback function is used to return a #IAnjutaDebuggerVariableObject.
5210 typedef void (*Callback) (const Object *data, gpointer user_data, GError* err);
5213 * ianjuta_debugger_variable_create:
5214 * @obj: Self
5215 * @expression: Variable expression
5216 * @callback: Callback to call when the variable has been created
5217 * @user_data: User data that is passed back to the callback
5218 * @err: Error propagation and reporting.
5220 * Create a new variable object in the current thread and frame.
5222 * Returns: TRUE if the request succeed and the callback is
5223 * called. If FALSE, the callback will not be called.
5225 gboolean create (const gchar *expression, Callback callback, gpointer user_data);
5228 * ianjuta_debugger_variable_list_children:
5229 * @obj: Self
5230 * @name: Variable name
5231 * @from: Starting from this children (zero-based)
5232 * @callback: Callback to call when the children have been
5233 * created with a list of variable objects
5234 * @user_data: User data that is passed back to the callback
5235 * @err: Error propagation and reporting.
5237 * List and create objects for variable object's children.
5238 * The backend can returns only a part of the children, in
5239 * this case a last variable with a NULL name is added to
5240 * the list given to the callback function.
5241 * If the remaining children are wanted, this
5242 * function must be called again with a from argument
5243 * corresponding to the first missing children.
5245 * Returns: TRUE if the request succeed and the callback is
5246 * called. If FALSE, the callback will not be called.
5248 gboolean list_children (const gchar *name, guint from, IAnjutaDebuggerGListCallback callback, gpointer user_data);
5251 * ianjuta_debugger_variable_evaluate:
5252 * @obj: Self
5253 * @name: Variable name
5254 * @callback: Callback to call with the variable value
5255 * @user_data: User data that is passed back to the callback
5256 * @err: Error propagation and reporting.
5258 * Get the value of one variable or child object.
5260 * Returns: TRUE if the request succeed and the callback is
5261 * called. If FALSE, the callback will not be called.
5263 gboolean evaluate (const gchar *name, IAnjutaDebuggerGCharCallback callback, gpointer user_data);
5266 * ianjuta_debugger_variable_assign:
5267 * @obj: Self
5268 * @name: Variable name
5269 * @value: Variable value
5270 * @err: Error propagation and reporting.
5272 * Set the value of one variable or child object.
5274 * Returns: TRUE if the request succeed and the callback is
5275 * called. If FALSE, the callback will not be called.
5277 gboolean assign (const gchar *name, const gchar *value);
5280 * ianjuta_debugger_variable_update:
5281 * @obj: Self
5282 * @callback: Callback to call with the list of all changed
5283 * variable names
5284 * @user_data: User data that is passed back to the callback
5285 * @err: Error propagation and reporting.
5287 * List all changed variable objects since the last call.
5289 * Returns: TRUE if the request succeed and the callback is
5290 * called. If FALSE, the callback will not be called.
5292 gboolean update (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5295 * ianjuta_debugger_variable_destroy:
5296 * @obj: Self
5297 * @name: Variable name
5298 * @err: Error propagation and reporting.
5300 * Delete a previously created variable or child object
5301 * including its own children.
5303 * Returns: TRUE if the request succeed and the callback is
5304 * called. If FALSE, the callback will not be called.
5306 gboolean destroy (const gchar *name);
5310 * SECTION:ianjuta-debugger-register
5311 * @title: IAnjutaDebuggerRegister
5312 * @short_description: Register interface for debuggers
5313 * @see_also:
5314 * @stability: Unstable
5315 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
5317 * This interface is used to examine and change values of CPU registers.
5319 interface IAnjutaDebuggerRegister
5323 * IAnjutaDebuggerRegisterData:
5324 * @num: register identifier
5325 * @name: register name
5326 * @value: register value
5328 * Defines a register data.
5330 struct Data
5332 guint num;
5333 gchar *name;
5334 gchar *value;
5338 * ianjuta_debugger_register_list_register:
5339 * @obj: Self
5340 * @callback: Callback to call with the #IAnjutaDebuggerRegisterData list
5341 * @user_data: User data that is passed back to the callback
5342 * @err: Error propagation and reporting.
5344 * List all registers of the target. This function can be called without
5345 * a program loaded, the value field of register structure is not filled.
5347 * Returns: TRUE if the request succeed and the callback is
5348 * called. If FALSE, the callback will not be called.
5350 gboolean list_register (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5353 * ianjuta_debugger_register_update_register:
5354 * @obj: Self
5355 * @callback: Callback call with the list of all modified #IAnjutaDebuggerRegisterData
5356 * @user_data: User data that is passed back to the callback
5357 * @err: Error propagation and reporting.
5359 * Return all modified registers since the last call. Only the num and
5360 * value field are used.
5362 * Returns: TRUE if the request succeed and the callback is
5363 * called. If FALSE, the callback will not be called.
5365 gboolean update_register (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5368 * ianjuta_debugger_register_write_register:
5369 * @obj: Self
5370 * @value: Modified register with a new value
5371 * @err: Error propagation and reporting.
5373 * Change the value of one register. Only the num and value field are used.
5375 * Returns: TRUE if the request succeed.
5377 gboolean write_register (Data *value);
5381 * SECTION:ianjuta-debugger-memory
5382 * @title: IAnjutaDebuggerMemory
5383 * @short_description: Memory interface for debuggers
5384 * @see_also:
5385 * @stability: Unstable
5386 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
5388 * This interface is used to examine the target memory.
5390 interface IAnjutaDebuggerMemory
5393 * IAnjutaDebuggerRegisterMemoryBlock:
5394 * @address: start address of memory block
5395 * @length: size of memory block
5396 * @data: memory block data
5398 * Represent a block of memory.
5400 struct Block
5402 gulong address;
5403 guint length;
5404 gchar *data;
5408 * IAnjutaDebuggerMemoryCallback:
5409 * @data: a #IAnjutaDebuggerMemoryBlock object
5410 * @user_data: user data passed to the function
5411 * @err: error
5413 * This callback function is used to return a #IAnjutaDebuggerMemoryBlock.
5415 typedef void (*Callback) (const Block *data, gpointer user_data, GError* err);
5418 * ianjuta_debugger_memory_inspect:
5419 * @obj: Self
5420 * @address: Start address of the memory block
5421 * @length: Length of memory block
5422 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
5423 * @user_data: User data that is passed back to the callback
5424 * @err: Error propagation and reporting.
5426 * Read a block of the target memory.
5428 * Returns: TRUE if the request succeed and the callback is
5429 * called. If FALSE, the callback will not be called.
5431 gboolean inspect (gulong address, guint length, Callback callback, gpointer user_data);
5435 * SECTION:ianjuta-debugger-instruction
5436 * @title: IAnjutaDebuggerInstruction
5437 * @short_description: Debugger interface for machine instruction
5438 * @see_also:
5439 * @stability: Unstable
5440 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
5442 * This interface is used to debuger as machine instruction level.
5444 interface IAnjutaDebuggerInstruction
5448 * IAnjutaDebuggerInstructionALine:
5449 * @address: Address of the line
5450 * @label: Optional label
5451 * @text: Diassembled instruction on the line
5453 * Defines a disassembled line
5455 struct ALine
5457 gulong address;
5458 const gchar *label;
5459 const gchar *text;
5463 * IAnjutaDebuggerInstructionDisassembly:
5464 * @size: Number of line
5465 * @data: Array of all lines
5467 * Represents a block of diassembled instructions
5469 struct Disassembly
5471 guint size;
5472 ALine data[];
5476 * IAnjutaDebuggerInstructionCallback:
5477 * @data: a #IAnjutaDebuggerInstructionDisassembly object
5478 * @user_data: user data passed to the function
5479 * @err: error
5481 * This callback function is used to return a #IAnjutaDebuggerInstructionDisassembly.
5483 typedef void (*Callback) (const Disassembly *data, gpointer user_data, GError* err);
5486 * ianjuta_debugger_instruction_disassemble:
5487 * @obj: Self
5488 * @address: Start address of the memory block
5489 * @length: Length of memory block
5490 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
5491 * @user_data: User data that is passed back to the callback
5492 * @err: Error propagation and reporting.
5494 * Disassemble a part of the memory
5496 * Returns: TRUE if the request succeed and the callback is
5497 * called. If FALSE, the callback will not be called.
5499 gboolean disassemble (gulong address, guint length, Callback callback, gpointer user_data);
5502 * ianjuta_debugger_instruction_step_in_instruction:
5503 * @obj: Self
5504 * @err: Error propagation and reporting.
5506 * Execute one assembler instruction in the program.
5508 * Returns: TRUE if the request succeed and the callback is called. If
5509 * FALSE, the callback will not be called.
5511 gboolean step_in_instruction ();
5514 * ianjuta_debugger_instruction_step_over_instruction:
5515 * @obj: Self
5516 * @err: Error propagation and reporting.
5518 * Execute one assembler instruction in the program, if the instruction
5519 * is a function call, continues until the function returns.
5521 * Returns: TRUE if the request succeed and the callback is called. If
5522 * FALSE, the callback will not be called.
5524 gboolean step_over_instruction ();
5527 * ianjuta_debugger_instruction_run_to_address:
5528 * @obj: Self
5529 * @address: Run to this addresss
5530 * @err: Error propagation and reporting.
5532 * Start the program until it reachs the address address
5534 * Returns: TRUE if the request succeed and the callback is called. If
5535 * FALSE, the callback will not be called.
5537 gboolean run_to_address (gulong address);
5540 * ianjuta_debugger_instruction_run_from_address:
5541 * @obj: Self
5542 * @address: Run from this addresss
5543 * @err: Error propagation and reporting.
5545 * Restart the program starting from address address
5547 * Returns: TRUE if the request succeed and the callback is called. If
5548 * FALSE, the callback will not be called.
5550 gboolean run_from_address (gulong address);
5556 * SECTION:ianjuta-debug-manager
5557 * @title: IAnjutaDebugManager
5558 * @short_description: Common graphical interface to all debugger
5559 * @see_also:
5560 * @stability: Unstable
5561 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
5563 * This interface wrap the real debugger plugin and provide a
5564 * common graphical user interface.
5567 interface IAnjutaDebugManager
5569 #include "ianjuta-debugger.h"
5570 #include "ianjuta-debugger-breakpoint.h"
5571 #include <gio/gio.h>
5573 /* Signals */
5576 * IAnjutaDebugManager::debugger_started:
5577 * @obj: Self
5579 * This signal is emitted when the debugger is started.
5581 void ::debugger_started ();
5584 * IAnjutaDebugManager::debugger_stopped:
5585 * @obj: Self
5586 * @err: Error propagation and reporting.
5588 * This signal is emitted when the debugger is stopped.
5590 void ::debugger_stopped (GError *err);
5593 * IAnjutaDebugManager::program_loaded:
5594 * @obj: Self
5596 * This signal is emitted when a program is loaded most of the
5597 * time just before the first program_stopped signal.
5599 void ::program_loaded ();
5602 * IAnjutaDebugManager::program_unloaded:
5603 * @obj: Self
5605 * This signal is emitted when a program is unloaded. If the
5606 * debugger is stopped while a program is loaded, this signal
5607 * is emitted before the debugger_stopped signal.
5609 void ::program_unloaded ();
5612 * IAnjutaDebugManager::program_started:
5613 * @obj: Self
5615 * This signal is emitted when the program is started. If the
5616 * program starts and is stopped by the debugger, a program-stopped
5617 * signal will be emitted too. If the program starts is not stopped
5618 * by the debugger a program-running signal will be emitted.
5620 void ::program_started ();
5623 * IAnjutaDebugManager::program_exited:
5624 * @obj: Self
5626 * This signal is emitted when the program is unloaded. If the
5627 * debugger is stopped while a program is running or stopped, this
5628 * signal is emitted before the program_unloaded signal.
5630 void ::program_exited ();
5633 * IAnjutaDebugManager::program_stopped:
5634 * @obj: Self
5636 * This signal is emitted when the program is stopped.
5638 void ::program_stopped ();
5641 * IAnjutaDebugManager::program_running:
5642 * @obj: Self
5644 * This signal is emitted when the program is running.
5646 void ::program_running ();
5650 * IAnjutaDebugManager::sharedlib_event:
5651 * @obj: Self
5653 * This signal is emitted when a new shared library is loaded. It
5654 * is useful to try to set pending breakpoints those could be in
5655 * the newly loaded library.
5657 void ::sharedlib_event ();
5660 * IAnjutaDebugManager::program_moved:
5661 * @obj: Self
5662 * @pid: process id, 0 when unknown
5663 * @tid: thread id, 0 when unknown
5664 * @address: program counter address, 0 when unknown
5665 * @file: source file where is the program counter, NULL when unknown
5666 * @line: line number if file name above is not NULL
5668 * This signal is emitted when the debugger know the current program
5669 * location. Most of the time, after the program has stopped but it
5670 * could happen even if it is still running.
5672 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
5675 * IAnjutaDebugManager::frame_changed:
5676 * @obj: Self
5677 * @frame: frame
5678 * @thread: thread
5680 * This signal is emitted when the current frame is changed. It is
5681 * equal to the top frame in the interrupted thread when the
5682 * program stops but can be changed afterward by the user.
5683 * Several commands use this current frame, by example the register
5684 * window display the register values for the current thread only.
5686 void ::frame_changed (guint frame, gint thread);
5689 * IAnjutaDebugManager::location_changed:
5690 * @obj: Self
5691 * @address: program counter address, 0 when unknown
5692 * @uri: source file where is the program counter, NULL when unknown
5693 * @line: line number if file name above is not NULL
5695 * This signal is emitted when the current location is changed. It is
5696 * equal to the program location when the program stops but can be
5697 * changed afterward by the user.
5699 void ::location_changed (gulong address, const gchar* uri, guint line);
5702 * IAnjutaDebugManager::signal_received:
5703 * @obj: Self
5704 * @name: Signal name
5705 * @description: Signal description
5707 * This signal is emitted when the debugged program receives a
5708 * unix signal.
5710 void ::signal_received (const gchar* name, const gchar* description);
5713 * IAnjutaDebugManager::breakpoint_changed:
5714 * @obj: Self
5715 * @breakpoint: Breakpoint
5716 * @err: Error propagation and reporting.
5718 * This signal is emitted when a breakpoint is changed. It includes
5719 * new breakpoint and deleted breakpoint.
5721 void ::breakpoint_changed (IAnjutaDebuggerBreakpointItem *breakpoint);
5724 * ianjuta_debug_manager_start:
5725 * @obj: Self
5726 * @uri: uri of the target
5727 * @err: Error propagation and reporting.
5729 * Start the debugger of the given uri
5731 * Returns: TRUE if sucessful, other FALSE.
5733 gboolean start (const gchar *uri);
5736 * ianjuta_debug_manager_start_remote:
5737 * @obj: Self
5738 * @server: server (IP address:port)
5739 * @uri: uri of the local target
5740 * @err: Error propagation and reporting.
5742 * Start the debugger of the given uri
5744 * Returns: TRUE if sucessful, other FALSE.
5746 gboolean start_remote (const gchar *server, const gchar *uri);
5749 * ianjuta_debug_manager_quit:
5750 * @obj: Self
5751 * @err: Error propagation and reporting.
5753 * Quit the debugger, can wait until the debugger is ready.
5755 * Returns: TRUE if sucessful, other FALSE.
5757 gboolean quit ();
5761 * SECTION:ianjuta-vcs
5762 * @title: IAnjutaVcs
5763 * @short_description: Version control system interface
5764 * @see_also:
5765 * @stability: Unstable
5766 * @include: libanjuta/interfaces/ianjuta-vcs.h
5769 interface IAnjutaVcs
5771 #include <gio/gio.h>
5772 #include <libanjuta/anjuta-vcs-status.h>
5773 #include <libanjuta/anjuta-async-notify.h>
5776 * IAnjutaVcsError:
5777 * @IANJUTA_VCS_UNKNOWN_ERROR: Unkown error
5779 * These enumeration is used to specify errors.
5781 enum Error
5783 UNKOWN_ERROR
5787 * IAnjutaVcsStatus:
5788 * @obj: Self
5790 * 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
5791 * fold- unfold the tree.
5793 void ::status_changed();
5796 * ianjuta_vcs_add:
5797 * @obj: Self
5798 * @files: (element-type GFile): List of List of files, represented as #Gfile objects, to add
5799 * @notify: #AnjutaAsyncNotify object for finish notification and error
5800 * reporting.
5802 * Add files to the VCS repository.
5804 void add(List<GFile*> files, AnjutaAsyncNotify *notify);
5807 * ianjuta_vcs_remove:
5808 * @obj: Self
5809 * @files: (element-type GFile): List of files, represented as #Gfile objects, to remove
5810 * @notify: #AnjutaAsyncNotify object for finish notification and error
5811 * reporting.
5813 * Remove files from the VCS repository.
5815 void remove(List<GFile*> files, AnjutaAsyncNotify *notify);
5818 * ianjuta_vcs_checkout:
5819 * @obj: Self
5820 * @repository_location: Location of repository to check out
5821 * @dest: Destination of checked out copy
5822 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5823 * @notify: #AnjutaAsyncNotify object for finish notification and error
5824 * reporting.
5826 * Check out a copy of a code repository.
5828 void checkout(const gchar *repository_location, GFile *dest, GCancellable *cancel, AnjutaAsyncNotify *notify);
5831 * ianjuta_vcs_query_status:
5832 * @obj: Self
5833 * @file: File/directory to query
5834 * @callback: callback to call when data for a particular file is available
5835 * @user_data: User data passed to callback
5836 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5837 * @notify: #AnjutaAsyncNotify object for finish notification and error
5838 * reporting.
5840 * Querys the status of files in the repository.
5842 void query_status (GFile* file, StatusCallback callback, gpointer user_data, GCancellable* cancel, AnjutaAsyncNotify *notify);
5845 * IAnjutaVcsStatusCallback:
5846 * @file: File representing the file for which status is given
5847 * @status: #AnjutaVcsStatus for the file represented by @file.
5848 * @user_data: User data
5850 * Callback called for each status record returned by
5851 * ianjuta_vcs_query_status.
5853 typedef void (*StatusCallback) (GFile* file, AnjutaVcsStatus status, gpointer user_data);
5856 * ianjuta_vcs_diff:
5857 * @obj: Self
5858 * @file: File to diff
5859 * @callback: Callback to call when diff data becomes available
5860 * @user_data: User data passed to @callback
5861 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5862 * @notify: #AnjutaAsyncNotify object for finish notification and error
5863 * reporting.
5865 * Generates a unified diff of the file represented by @file.
5867 void diff(GFile* file, DiffCallback callback, gpointer user_data, GCancellable* cancel, AnjutaAsyncNotify *notify);
5870 * IAnjutaVcsDiffCallback:
5871 * @file: File being diffed
5872 * @diff: Diff data
5873 * @user_data: User data
5875 * Called when diff data comes from ianjuta_vcs_diff.
5877 typedef void (*DiffCallback) (GFile* file, const gchar* diff, gpointer user_data);
5881 * SECTION:ianjuta-snippets-manager
5882 * @title: IAnjutaSnippetsManager
5883 * @short_description: Snippets Manager interface
5884 * @see_also:
5885 * @stability: Unstable
5886 * @include: libanjuta/interfaces/ianjuta-macro.h
5889 interface IAnjutaSnippetsManager
5892 * ianjuta_snippets_manager_insert:
5893 * @key: Trigger-key of the snippet
5894 * @editing_session: If after inserting the snippet there should be an editing
5895 * session. Mark as FALSE if not interested in the dynamic capabilities of the
5896 * snippet.
5897 * @obj: Self
5898 * @err: Error propagation and reporting
5900 * Insert snippet in the current editor.
5902 gboolean insert (const gchar* key, gboolean editing_session);
5906 * SECTION:ianjuta-symbol
5907 * @title: IAnjutaSymbol
5908 * @short_description: Source code symbol interface
5909 * @see_also: #IAnjutaSymbolQuery, #IAnjutaSymbolManager
5910 * @stability: Unstable
5911 * @include: libanjuta/interfaces/ianjuta-symbol.h
5913 * This interface is used to define a symbol, normally got from symbol
5914 * queries. A symbol has various fields that can be retrieved by using
5915 * their get methods. A symbol will have only those fields which have
5916 * been selected to be included in their respective queries, so make sure
5917 * the needed fields are correctly specified during query creation.
5919 interface IAnjutaSymbol
5921 #include <gdk/gdk.h>
5922 #include <gio/gio.h>
5925 * IAnjutaSymbolType:
5926 * @IANJUTA_SYMBOL_TYPE_NONE: None spedified.
5927 * @IANJUTA_SYMBOL_TYPE_UNDEF: Unknown type.
5928 * @IANJUTA_SYMBOL_TYPE_CLASS: Class declaration
5929 * @IANJUTA_SYMBOL_TYPE_ENUM: Enum declaration
5930 * @IANJUTA_SYMBOL_TYPE_ENUMERATOR: Enumerator value
5931 * @IANJUTA_SYMBOL_TYPE_FIELD: Field (Java only)
5932 * @IANJUTA_SYMBOL_TYPE_FUNCTION: Function definition
5933 * @IANJUTA_SYMBOL_TYPE_INTERFACE: Interface (Java only)
5934 * @IANJUTA_SYMBOL_TYPE_MEMBER: Member variable of class/struct
5935 * @IANJUTA_SYMBOL_TYPE_METHOD: Class method (Java only)
5936 * @IANJUTA_SYMBOL_TYPE_NAMESPACE: Namespace declaration
5937 * @IANJUTA_SYMBOL_TYPE_PACKAGE: Package (Java only)
5938 * @IANJUTA_SYMBOL_TYPE_PROTOTYPE: Function prototype
5939 * @IANJUTA_SYMBOL_TYPE_STRUCT: Struct declaration
5940 * @IANJUTA_SYMBOL_TYPE_TYPEDEF: Typedef
5941 * @IANJUTA_SYMBOL_TYPE_UNION: Union
5942 * @IANJUTA_SYMBOL_TYPE_VARIABLE: Variable
5943 * @IANJUTA_SYMBOL_TYPE_EXTERNVAR: Extern or forward declaration
5944 * @IANJUTA_SYMBOL_TYPE_MACRO: Macro (without arguments)
5945 * @IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG: Parameterized macro
5946 * @IANJUTA_SYMBOL_TYPE_FILE: File (Pseudo tag)
5947 * @IANJUTA_SYMBOL_TYPE_OTHER: Other (non C/C++/Java tag)
5948 * @IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER: types which are subjected to create a scope.
5949 * @IANJUTA_SYMBOL_TYPE_MAX: Maximum value, used as end marker.
5951 enum Type
5953 TYPE_NONE = 0,
5954 TYPE_UNDEF = 1,
5955 TYPE_CLASS = 2,
5956 TYPE_ENUM = 4,
5957 TYPE_ENUMERATOR = 8,
5958 TYPE_FIELD = 16,
5959 TYPE_FUNCTION = 32,
5960 TYPE_INTERFACE = 64,
5961 TYPE_MEMBER = 128,
5962 TYPE_METHOD = 256,
5963 TYPE_NAMESPACE = 512,
5964 TYPE_PACKAGE = 1024,
5965 TYPE_PROTOTYPE = 2048,
5966 TYPE_STRUCT = 4096,
5967 TYPE_TYPEDEF = 8192,
5968 TYPE_UNION = 16384,
5969 TYPE_VARIABLE = 32768,
5970 TYPE_EXTERNVAR = 65536,
5971 TYPE_MACRO = 131072,
5972 TYPE_MACRO_WITH_ARG = 262144,
5973 TYPE_FILE = 524288,
5974 TYPE_OTHER = 1048576,
5975 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,
5976 TYPE_MAX = 2097151
5980 * IAnjutaSymbolField:
5981 * @IANJUTA_SYMBOL_FIELD_ID: Integer. A unique ID of the symbol
5982 * @IANJUTA_SYMBOL_FIELD_NAME: String. Name of the symbol
5983 * @IANJUTA_SYMBOL_FIELD_FILE_POS: Integer. The file line number where the symbol is found.
5984 * @IANJUTA_SYMBOL_FIELD_SCOPE_DEF_ID: Integer. A unique ID to define scope created by this symbol.
5985 * @IANJUTA_SYMBOL_FIELD_FILE_SCOPE: Boolean: TRUE if symbol is within file scope,
5986 * otherwise FALSE.
5987 * @IANJUTA_SYMBOL_FIELD_SIGNATURE: String. Signature of a method, if symbol is a funtion.
5988 * Namely, the arguments list of the funtion.
5989 * @IANJUTA_SYMBOL_FIELD_RETURNTYPE: String. Return type of a method, if symbol is a function.
5990 * @IANJUTA_SYMBOL_FIELD_FILE_PATH: String. The relative path to the file where the symbol is found.
5991 * @IANJUTA_SYMBOL_FIELD_PROJECT_NAME: String. The project name to which the symbol belongs to.
5992 * @IANJUTA_SYMBOL_FIELD_PROJECT_VERSION: String. The project version to which the symbol belongs to.
5993 * @IANJUTA_SYMBOL_FIELD_IMPLEMENTATION: String. Implementation attribute of a symbol. It may be
5994 * "pure virtual", "virtual", etc.
5995 * @IANJUTA_SYMBOL_FIELD_ACCESS: String. Access attribute of a symbol.
5996 * It may be "public", "private" etc.
5997 * @IANJUTA_SYMBOL_FIELD_KIND: Kind attribute of a symbol, such as
5998 * "enumerator", "namespace", "class" etc.
5999 * @IANJUTA_SYMBOL_FIELD_TYPE: Both string and Integer. Type attribute of a symbol.
6000 * In string form, it is name of the type in string form.
6001 * In integer form, it is IAnjutaSymbolType enumerator value.
6002 * @IANJUTA_SYMBOL_FIELD_TYPE_NAME: type_name attribute of a symbol.
6003 * If a type could be "class" then its type_name may be "MyFooClass" etc.
6004 * @IANJUTA_SYMBOL_FIELD_IS_CONTAINER: Boolean. TRUE if symbol is
6005 * a scope container, such as namespace, class, struct etc., otherwise
6006 * FALSE.
6007 * @IANJUTA_SYMBOL_FIELD_END: The end marker.
6009 * Symbol Fields. Used to define and retrieve results from query. Each of
6010 * these fields are either integer or string. Use the right method to
6011 * retrieve them. That is, for integer use ianjuta_symbol_get_int(),
6012 * for string use ianjuta_symbol_get_string(), and for boolean use
6013 * ianjuta_symbol_get_boolean(). Some fields can be in both forms,
6014 * e.g. #IANJUTA_SYMBOL_FIELD_TYPE.
6016 enum Field
6018 FIELD_ID,
6019 FIELD_NAME,
6020 FIELD_FILE_POS,
6021 FILED_SCOPE_DEF_ID,
6022 FIELD_FILE_SCOPE,
6023 FIELD_SIGNATURE,
6024 FIELD_RETURNTYPE,
6025 FIELD_TYPE,
6026 FIELD_TYPE_NAME,
6027 FIELD_FILE_PATH,
6028 FIELD_PROJECT_NAME,
6029 FIELD_PROJECT_VERSION,
6030 FIELD_IMPLEMENTATION,
6031 FIELD_ACCESS,
6032 FIELD_KIND,
6033 FIELD_IS_CONTAINER,
6034 FIELD_END
6038 * ianjuta_symbol_get_boolean:
6039 * @obj: Self
6040 * @field: The field to retrieve.
6041 * @err: Error propagation and reporting.
6043 * Retreives the boolean value of a boolean @field.
6045 * Returns: The boolean
6047 gboolean get_boolean (Field field);
6050 * ianjuta_symbol_get_int:
6051 * @obj: Self
6052 * @field: The field to retrieve.
6053 * @err: Error propagation and reporting.
6055 * Retreives the integer value of an integer @field.
6057 * Returns: The integer
6059 gint get_int (Field field);
6062 * ianjuta_symbol_get_string:
6063 * @obj: Self
6064 * @field: The field to retrieve.
6065 * @err: Error propagation and reporting.
6067 * Retreives the string value of a string @field.
6069 * Returns: The string
6071 const gchar* get_string (Field field);
6074 * ianjuta_symbol_get_file:
6075 * @obj: Self
6076 * @err: Error propagation and reporting.
6078 * A convenience method to get GFile object for
6079 * #IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the
6080 * symbol is declared. It contains the absolute path of the file
6081 * unlike raw value of field #IANJUTA_SYMBOL_FIELD_FILE_PATH.
6083 * Returns: A GFile object. It must be unrefed after use.
6085 GFile* get_file();
6088 * ianjuta_symbol_get_sym_type:
6089 * @obj: Self
6090 * @err: Error propagation and reporting.
6092 * A convenience method to get value of #IANJUTA_SYMBOL_FIELD_TYPE
6093 * field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
6095 * Returns: a #IAnjutaSymbolType
6097 Type get_sym_type ();
6100 * ianjuta_symbol_get_icon:
6101 * @obj: Self
6102 * @err: Error propagation and reporting.
6104 * A convenience method to get a small icon (16x16) representing the symbol
6105 * kind. You *need* a query with fields #IANJUTA_SYMBOL_FIELD_ACCESS and
6106 * #IANJUTA_SYMBOL_FIELD_KIND selected.
6108 * Returns: a Pixbuf icon representing the symbol. Ref the icon if you
6109 * need to keep it.
6111 const GdkPixbuf *get_icon ();
6115 * SECTION:ianjuta-symbol-query
6116 * @title: IAnjutaSymbolQuery
6117 * @short_description: Source code symbol query interface
6118 * @see_also: #IAnjutaSymbolManager, #IAnjutaSymbol
6119 * @stability: Unstable
6120 * @include: libanjuta/interfaces/ianjuta-symbol-query.h
6122 * A query object will have this interface that allows to tweak various
6123 * query parameters. Except for the #IAnjutaSymbolQueryName and
6124 * #IAnjutaSymbolQueryDb parameters, everything else is changable
6125 * post-creation.
6127 * Note that chaning a query parameter, except for limit and offset will
6128 * result in re-preparing the query the next time it is executed, so it is
6129 * not advisable to change it each time the query is executed. For such
6130 * cases, create different queries with different parameters.
6132 * A query is signified by a name enumeration (#IAnjutaSymbolQueryName) which
6133 * practically determines the query type and its execution condition. Each
6134 * query name is assigned to pre-defined query statement and can only be
6135 * set during creation time. Then only its specific ianjuta_symbol_query_search_*()
6136 * can be used to execute the query. These specific execution methods are
6137 * provided to make it convenient to pass query parameters easily and to
6138 * ensure all the needed parameters are given.
6140 * A query can run in different modes, defined by #IAnjutaSymbolQueryMode, by
6141 * default it is executed in synchrounous mode #IANJUTA_SYMBOL_QUERY_MODE_SYNC
6142 * and can be changed using ianjuta_symbol_query_set_mode().
6143 * #IANJUTA_SYMBOL_QUERY_MODE_ASYNC runs it in asynchronous mode in a separate
6144 * thread and can be canceled with ianjuta_symbol_query_cancel().
6146 * A query runs on a database, defined by #IAnjutaSymbolQueryDb, and can be
6147 * only selected at creatation time.
6149 * In addition, there are many other filters that can be set to the query
6150 * to refine the query results. For example, ianjuta_symbol_query_set_fields()
6151 * is used to set the needed symbol fields to retrieve, ianjuta_symbol_query_set_filters()
6152 * is used to filter the results with symbol types, ianjuta_symbol_query_set_file_scope()
6153 * limits the results to either public or private scope within the source file,
6154 * ianjuta_symbol_query_set_group_by() is used to group the results on a given
6155 * field, ianjuta_symbol_query_set_order_by is used to order the results on a
6156 * given field.
6158 * ianjuta_symbol_query_set_limit() and ianjuta_symbol_query_set_offset() are
6159 * used to change limit and offset of the resultset. Note again that these
6160 * parameters do not require re-preparation of query, so can be safely used
6161 * any time without performance hit.
6163 interface IAnjutaSymbolQuery
6165 #include "ianjuta-iterable.h"
6166 #include "ianjuta-symbol.h"
6169 * IAnjutaSymbolQueryMode:
6170 * @IANJUTA_SYMBOL_QUERY_MODE_SYNC: Syncronous query. The result is immediately
6171 * available as retrun value of search call.
6172 * @IANJUTA_SYMBOL_QUERY_MODE_ASYNC: Asynchronous query. The search call
6173 * return immediately and result delievered as a signal later. The actual
6174 * query is done in a separate thread.
6175 * @IANJUTA_SYMBOL_QUERY_MODE_QUEUED: If the database is busy
6176 * scanning, then the query is performed later when database is ready.
6177 * It returns NULL and result is delivered through async-result signal.
6178 * Only query can stay queued, so calling search multiple times would
6179 * result in only the last one being active.
6181 * This parameter determines the mode of query execution. By default,
6182 * IANJUTA_SYMBOL_QUERY_MODE_SYNC is selected.
6184 enum Mode
6186 MODE_SYNC,
6187 MODE_ASYNC,
6188 MODE_QUEUED
6192 * IAnjutaSymbolQueryDb:
6193 * @IANJUTA_SYMBOL_QUERY_DB_PROJECT: Select project database.
6194 * @IANJUTA_SYMBOL_QUERY_DB_SYSTEM: Select system database.
6196 * Sets the database to use for the query. System database is where
6197 * all system library symbols are found. While project database is where
6198 * currently open project's symbols are found.
6200 enum Db
6202 DB_PROJECT,
6203 DB_SYSTEM
6207 * IAnjutaSymbolQueryName:
6208 * @IANJUTA_SYMBOL_QUERY_SEARCH: Query to perform basic substring search.
6209 * @IANJUTA_SYMBOL_QUERY_SEARCH_ALL: Query to get all symbols
6210 * @IANJUTA_SYMBOL_QUERY_SEARCH_FILE: Query to perform substring search in a file.
6211 * @IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE: Query to perform substring search in a scope.
6212 * @IANJUTA_SYMBOL_QUERY_SEARCH_ID: Query to find the symbol of given ID.
6213 * @IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS: Query to find members of a scope (eg. class).
6214 * @IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS: Query to get parents of a class.
6215 * @IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE: Query to find scope name of a file position.
6216 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE: Query to get the parent scope of a symbol.
6217 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE: Query to get the parent scope of a symbol in the file.
6219 * Names of query that defined what kind of query it is.
6221 enum Name
6223 SEARCH,
6224 SEARCH_ALL,
6225 SEARCH_FILE,
6226 SEARCH_IN_SCOPE,
6227 SEARCH_ID,
6228 SEARCH_MEMBERS,
6229 SEARCH_CLASS_PARENTS,
6230 SEARCH_SCOPE,
6231 SEARCH_PARENT_SCOPE,
6232 SEARCH_PARENT_SCOPE_FILE
6236 * IAnjutaSymbolQueryFileScope:
6237 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_IGNORE: Ignore file scope
6238 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PUBLIC: Only public symbols visible to rest of project.
6239 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PRIVATE: Only private symbols visible inside a file.
6241 * Defines file scope of symbols to query.
6243 enum FileScope
6245 SEARCH_FS_IGNORE,
6246 SEARCH_FS_PUBLIC,
6247 SEARCH_FS_PRIVATE
6251 * IAnjutaSymbolQuery::async_result:
6252 * @ianjutasymbolquery: Self
6253 * @arg1: Query result (IAnjutaIterable, IAnjutaSymbol) of an async
6254 * or queued search. NULL if no result is found or some error happened.
6256 * This signal is emitted for every search of the Query involved in async
6257 * mode, unless cancled by ianjuta_symbol_query_cancel(). For single queued
6258 * query, only result of the last search is emitted (if it wasn't database
6259 * was busy when search was invoked). Unlike in sync counterpart,
6260 * do not unref @result after use.
6262 void ::async_result (GObject* result);
6265 * ianjuta_symbol_query_set_mode:
6266 * @obj: Self
6267 * @mode: The mode of query.
6268 * @err: Error propagation and reporting.
6270 * Sets the mode of Query.
6272 void set_mode (IAnjutaSymbolQueryMode mode);
6275 * ianjuta_symbol_query_set_fields:
6276 * @obj: Self
6277 * @n_fields: Then number of fields to retrieve.
6278 * @fields: The fields to retrieve in the query. The array length must
6279 * be @n_fields.
6280 * @err: Error propagation and reporting.
6282 * Sets the fields of Query.
6284 void set_fields (gint n_fields, IAnjutaSymbolField *fields);
6287 * ianjuta_symbol_query_set_filters:
6288 * @obj: Self
6289 * @filters: The mode of query.
6290 * @include_types: TRUE if filter is positive, FALSE if reversed.
6291 * @err: Error propagation and reporting.
6293 * Sets the bit mask of symbol type filters. if @include_types is TRUE,
6294 * symbols satisfying the given symbol types are selected, otherwise
6295 * they are excluded.
6297 void set_filters (IAnjutaSymbolType filters, gboolean include_types);
6300 * ianjuta_symbol_query_set_file_scope:
6301 * @obj: Self
6302 * @filescope_search: The filescope to search.
6303 * @err: Error propagation and reporting.
6305 * Sets the filescope search of Query.
6307 void set_file_scope (IAnjutaSymbolQueryFileScope filescope_search);
6310 * ianjuta_symbol_query_set_offset:
6311 * @obj: Self
6312 * @offset: Offset of the resultset.
6313 * @err: Error propagation and reporting.
6315 * Sets the offset index of Query results.
6317 void set_offset (gint offset);
6320 * ianjuta_symbol_query_set_limit:
6321 * @obj: Self
6322 * @limit: The limit of query.
6323 * @err: Error propagation and reporting.
6325 * Sets the limit of Query results. No more than @limit results are
6326 * returned.
6328 void set_limit (gint limit);
6331 * ianjuta_symbol_query_set_group_by:
6332 * @obj: Self
6333 * @field: The field to group results.
6334 * @err: Error propagation and reporting.
6336 * Sets the field with which result of query is grouped. As a result
6337 * there will be no duplicates of with this field.
6339 void set_group_by (IAnjutaSymbolField field);
6342 * ianjuta_symbol_query_set_order_by:
6343 * @obj: Self
6344 * @field: The field to order the result.
6345 * @err: Error propagation and reporting.
6347 * Sets the field with which result of query is ordered.
6349 void set_order_by (IAnjutaSymbolField field);
6352 * ianjuta_symbol_query_set_cancel:
6353 * @obj: Self
6354 * @err: Error propagation and reporting.
6356 * Cancels any pending non-sync searches. After calling this, it is
6357 * guaranteed that "async-result" will not be called any more for any
6358 * past searches. New searches will have their results signaled as
6359 * normal.
6361 void cancel ();
6364 * ianjuta_symbol_query_search:
6365 * @obj: Self
6366 * @pattern: Search pattern in compliance with SQL LIKE syntax
6367 * @err: Error propagation and reporting.
6369 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH query.
6371 IAnjutaIterable* search (const gchar *pattern);
6374 * ianjuta_symbol_query_search_all:
6375 * @obj: Self
6376 * @err: Error propagation and reporting.
6378 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ALL query.
6380 IAnjutaIterable* search_all ();
6383 * ianjuta_symbol_query_search_file:
6384 * @obj: Self
6385 * @pattern: Search pattern in compliance with SQL LIKE syntax
6386 * @file: The file whose symbols are searched.
6387 * @err: Error propagation and reporting.
6389 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_FILE query.
6391 IAnjutaIterable* search_file (const gchar *pattern, const GFile *file);
6394 * ianjuta_symbol_query_search_in_scope:
6395 * @obj: Self
6396 * @pattern: Search pattern in compliance with SQL LIKE syntax
6397 * @scope: The scope inside which symbols are searched.
6398 * @err: Error propagation and reporting.
6400 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE query.
6402 IAnjutaIterable* search_in_scope (const gchar *pattern, IAnjutaSymbol *scope);
6405 * ianjuta_symbol_query_search_members:
6406 * @obj: Self
6407 * @symbol: The symbol whose members to get.
6408 * @err: Error propagation and reporting.
6410 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS query.
6412 IAnjutaIterable* search_members (IAnjutaSymbol *symbol);
6415 * ianjuta_symbol_query_search_class_parents:
6416 * @obj: Self
6417 * @symbol: The class symbol whose parents to get.
6418 * @err: Error propagation and reporting.
6420 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS query.
6422 IAnjutaIterable* search_class_parents (IAnjutaSymbol *symbol);
6425 * ianjuta_symbol_query_search_id:
6426 * @obj: Self
6427 * @symbol: The symbol id whose details to get.
6428 * @err: Error propagation and reporting.
6430 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ID query.
6432 IAnjutaIterable* search_id (gint symbol);
6435 * ianjuta_symbol_query_search_scope:
6436 * @obj: Self
6437 * @file_path: The file where the scope is.
6438 * @line: The line where the scope is.
6439 * @err: Error propagation and reporting.
6441 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE query.
6443 IAnjutaIterable* search_scope (const gchar *file_path, gint line);
6446 * ianjuta_symbol_query_search_parent_scope:
6447 * @obj: Self
6448 * @symbol: The symbol whose parent scope is to be found.
6449 * @err: Error propagation and reporting.
6451 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE query.
6453 IAnjutaIterable* search_parent_scope (IAnjutaSymbol *symbol);
6456 * ianjuta_symbol_query_search_parent_scope_file:
6457 * @symbol: The symbol whose parent scope is to be found.
6458 * @obj: Self
6459 * @file_path: The file where the parent scope is to be found.
6460 * @err: Error propagation and reporting.
6462 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE query.
6464 IAnjutaIterable* search_parent_scope_file (IAnjutaSymbol *symbol, const gchar *file_path);
6468 * SECTION:ianjuta-symbol-manager
6469 * @title: IAnjutaSymbolManager
6470 * @short_description: Source code symbols manager inteface
6471 * @see_also: #IAnjutaSymbol
6472 * @stability: Unstable
6473 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
6476 interface IAnjutaSymbolManager
6478 #include <libanjuta/anjuta-async-notify.h>
6479 #include "ianjuta-iterable.h"
6480 #include "ianjuta-symbol.h"
6481 #include "ianjuta-symbol-query.h"
6482 #include <libanjuta/interfaces/ianjuta-editor.h>
6485 * IAnjutaSymbolManager::prj_scan_end:
6486 * @obj: Self
6488 * This signal is emitted when a scanning of one or more files on project db
6489 * ends.
6491 void ::prj_scan_end (gint process_id);
6494 * IAnjutaSymbolManager::sys_scan_end:
6495 * @obj: Self
6497 * This signal is emitted when a scanning of one or more packages on system db
6498 * ends. This signal doesn't mean that all the scan process for the packages
6499 * is ended, but that just one (or more) is (are).
6501 void ::sys_scan_end (gint process_id);
6504 * ianjuta_symbol_manager_create_query:
6505 * @obj: Self
6506 * @name: Name of the query. It decides what query type it is.
6507 * @db: The database to use.
6508 * @err: Error propagation and reporting.
6510 * Create a query object. By default only #IANJUTA_SYMBOL_FIELD_ID and
6511 * and #IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity,
6512 * offset is set to 0, no filters are set and mode is set to
6513 * #IANJUTA_SYMBOL_QUERY_MODE_SYNC.
6515 * Returns: A #IAnjutaSymbolQuery object
6517 IAnjutaSymbolQuery* create_query (IAnjutaSymbolQueryName name, IAnjutaSymbolQueryDb db);
6520 * ianjuta_symbol_manager_add_package:
6521 * @obj: Self
6522 * @pkg_name: Name of the package to scan. Should be the name given by
6523 * pkg-config. The colon char must be avoided.
6524 * @pkg_version: Version of the package. The colon char must be avoided.
6525 * or by the language implementation (Python, Javascript, etc.)
6526 * @files: A list of GFile's to scan for this package
6528 * Reads the package files into the database asynchronously.
6530 * Returns: TRUE if the package will be loaded into the db, FALSE if the package
6531 * already exists
6533 gboolean add_package (const gchar* pkg_name, const gchar* pkg_version, GList* files);
6536 * ianjuta_symbol_manager_activate_package:
6537 * @obj: Self
6538 * @pkg_name: Name of the package to activate. The colon char must be avoided.
6539 * @pkg_version: Version of the package. The colon char must be avoided.
6541 * Activates the package for searches in the global symbol database.
6543 * Returns: TRUE if the package was loaded (or will be loaded once scanned).
6544 * FALSE if the version given was newer than the version in the database or the
6545 * package was not found. In this case, add_package() should be called.
6547 gboolean activate_package (const gchar *pkg_name, const gchar* pkg_version);
6550 * ianjuta_symbol_manager_deactivate_package:
6551 * @obj: Self
6552 * @pkg_name: name of the package. The colon char must be avoided.
6553 * @pkg_version: Version of the package. The colon char must be avoided.
6555 * Deactivates the package if it was found. If package is NULL, deactivate all
6556 * packages.
6559 void deactivate_package (const gchar* pkg_name, const gchar* pkg_version);
6562 * ianjuta_symbol_manager_deactivate_all:
6563 * @obj: Self
6565 * Deactivates all activate packages
6568 void deactivate_all ();
6572 * SECTION:ianjuta-print
6573 * @title: IAnjutaPrint
6574 * @short_description: Print interface
6575 * @see_also:
6576 * @stability: Unstable
6577 * @include: libanjuta/interfaces/ianjuta-print.h
6580 interface IAnjutaPrint
6583 * ianjuta_print_print:
6584 * @obj: Self
6585 * @err: Error propagation and reporting.
6587 * Print the plugin (the file in case of the editor). In most cases this will show
6588 * a print dialog
6590 void print();
6593 * ianjuta_print_print_preview:
6594 * @obj: Self
6595 * @err: Error propagation and reporting.
6597 * Show print preview dialog
6600 void print_preview();
6604 * SECTION:ianjuta-preferences
6605 * @title: IAnjutaPreferences
6606 * @short_description: Preferences interface
6607 * @see_also:
6608 * @stability: Unstable
6609 * @include: libanjuta/interfaces/ianjuta-preferences
6612 interface IAnjutaPreferences
6614 #include <libanjuta/anjuta-preferences.h>
6616 * ianjuta_preferences_merge:
6617 * @obj: Self
6618 * @prefs: AnjutaPreferences to install to
6619 * @err: Error propagation and reporting.
6621 * When called, the plugin should install it's preferences
6623 void merge(AnjutaPreferences* prefs);
6626 * ianjuta_preferences_unmerge:
6627 * @obj: Self
6628 * @prefs: AnjutaPreferences to install to
6629 * @err: Error propagation and reporting.
6631 * When called, the plugin should uninstall it's preferences
6633 void unmerge(AnjutaPreferences* prefs);
6637 * SECTION:ianjuta-plugin-factory
6638 * @title: IAnjutaPluginFactory
6639 * @short_description: Create Anjuta plugin objects
6640 * @see_also:
6641 * @stability: Unstable
6642 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
6644 * This interface is used to create all Anjuta plugin objects. It is
6645 * already implemented inside Anjuta by an object able to load plugins written
6646 * in C. In order to load plugins in other languages (or in a different way),
6647 * a loader plugin implementing this interface must be written first, probably
6648 * in C.
6651 interface IAnjutaPluginFactory
6653 #include <libanjuta/anjuta-plugin.h>
6654 #include <libanjuta/anjuta-shell.h>
6655 #include <libanjuta/anjuta-plugin-handle.h>
6658 * IAnjutaPluginFactoryError:
6659 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
6660 * missing in .plugin file
6661 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
6662 * double colon following location) is missing in .plugin file
6663 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
6664 * plugin module is probably not installed
6665 * @IANJUTA_PLUGIN_FACTORY_INVALID_MODULE: Module file cannot be
6666 * loaded, not a shared library perhaps
6667 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
6668 * registration function, library is not an anjuta plugin or
6669 * is not for the right version
6670 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
6671 * plugin type, library is not an anjuta plugin or not for
6672 * the right version
6673 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
6675 * These enumeration is used to specify errors.
6677 enum Error
6679 OK = 0,
6680 MISSING_LOCATION,
6681 MISSING_TYPE,
6682 MISSING_MODULE,
6683 INVALID_MODULE,
6684 MISSING_FUNCTION,
6685 INVALID_TYPE,
6686 UNKNOWN_ERROR,
6690 * ianjuta_plugin_factory_new_plugin:
6691 * @obj: Self
6692 * @handle: Plugin information
6693 * @shell: Anjuta shell
6694 * @err: Error propagation and reporting.
6696 * Create a new AnjutaPlugin object from the plugin information handle,
6697 * give it the AnjutaShell object as argument.
6699 * Return value: a new plugin object
6701 AnjutaPlugin* new_plugin (AnjutaPluginHandle* handle, AnjutaShell *shell);
6705 * SECTION:ianjuta-language
6706 * @title: IAnjutaLanguage
6707 * @short_description: Interface to manage multiple programming languages
6708 * @see_also:
6709 * @stability: Unstable
6710 * @include: libanjuta/interfaces/ianjuta-language.h
6714 interface IAnjutaLanguage
6716 #include <libanjuta/interfaces/ianjuta-editor-language.h>
6717 typedef gint Id;
6720 * ianjuta_language_from_mime_type:
6721 * @obj: Self
6722 * @mime_type: A mime type to get the language for
6724 * Returns: A language Id or 0 in case no language was found
6726 Id get_from_mime_type (const gchar* mime_type);
6729 * ianjuta_language_from_string:
6730 * @obj: Self
6731 * @string: A string representation of the language. Note that multiple
6732 * strings may describe the language like C++ and Cpp
6734 * Returns: A language Id or 0 in case no language was found
6736 Id get_from_string (const gchar* string);
6739 * ianjuta_language_get_name:
6740 * @obj: Self
6741 * @id: A valid language id
6743 * Returns: The main name of the language. When you call ianjuta_language_from_string()
6744 * before that method the string you get here might be different to the one you passed
6745 * because the language might have multiple string representations
6747 const gchar* get_name(Id id);
6750 * ianjuta_language_get_make_target:
6751 * @obj: Self
6752 * @id: A valid language id
6754 * Returns: The suffix for the file thats needs to be passed to
6755 * make to compile the file, e.g. ".o" for C
6757 const gchar* get_make_target (Id id);
6760 * ianjuta_language_get_strings:
6761 * @obj: Self
6762 * @id: A valid language id
6764 * Returns: (element-type utf8): A list of strings that represent this language
6766 List<const gchar*> get_strings(Id id);
6769 * ianjuta_language_get_mime_types:
6770 * @obj: Self
6771 * @id: A valid language id
6773 * Returns: (element-type utf8): A list of mime-types that represent this language
6775 List<const gchar*> get_mime_types(Id id);
6778 * ianjuta_language_get_from_editor:
6779 * @obj: Self
6780 * @editor: An object implementing IAnjutaEditorLanguage
6781 * @err: Error propagation
6783 * Conviniece method to get the id directly from the editor
6785 * Returns: A valid language id or 0
6787 IAnjutaLanguageId get_from_editor (IAnjutaEditorLanguage* editor);
6790 * ianjuta_language_get_name_from_editor:
6791 * @obj: Self
6792 * @editor: An object implementing IAnjutaEditorLanguage
6793 * @err: Error propagation
6795 * Conviniece method to get the name directly from the editor
6797 * Returns: A language name or NULL
6799 const gchar* get_name_from_editor (IAnjutaEditorLanguage* editor);
6802 * ianjuta_language_get_languages:
6803 * @obj: Self
6804 * @err: Error propagation
6806 * Returns: (element-type int) (transfer container): a list of ids of the available
6807 * languages. Use GPOINTER_TO_INT() to receive them. The list but not the
6808 * values should be free'd with g_list_free()
6810 GList* get_languages ();
6814 * SECTION:ianjuta-indenter
6815 * @title: IAnjutaIndenter
6816 * @short_description: Interface for automatic indentation
6817 * @see_also:
6818 * @stability: Unstable
6819 * @include: libanjuta/interfaces/ianjuta-indenter.h
6823 interface IAnjutaIndenter
6825 #include <libanjuta/interfaces/ianjuta-iterable.h>
6828 * ianjuta_indenter_indent:
6829 * @obj: Self
6830 * @start: Start of the area to indent
6831 * @end: End of the area to indent
6832 * @err: Error propagation
6834 * Indent the area between @start and @end according to the indentation rules
6835 * of the programming language. Usually implemented by language support plugins.
6836 * Only one indenter can be loaded at a time.
6837 * Note: Indenters always affect full lines, so start and end will be moved
6838 * according to the next line start/end.
6840 void indent (IAnjutaIterable* start, IAnjutaIterable* end);