libanjuta: Allow to set indentation and tab size separately
[anjuta.git] / libanjuta / interfaces / libanjuta.idl
blob277c6c851f9ccb5ea90a7f7fb01066d705248263
1 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
3 //
4 // libanjuta interfaces. Generate stubs with anjuta-idl-compiler.pl
5 //
6 // Copyright (C) 2004 Naba Kumar <naba@gnome.org>
7 //
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Library General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include <glib-object.h>
24 /**
25 * SECTION:ianjuta-file
26 * @title: IAnjutaFile
27 * @short_description: Implemented by plugins that can open files.
28 * @see_also: #IAnjutaFileSavable
29 * @stability: Unstable
30 * @include: libanjuta/interfaces/ianjuta-file.h
32 * Any plugin that can open files should implemented this interface. Along
33 * with the 'File Loader::SupportedMimeTypes' property of the plugin in
34 * .plugin file, it will be used by the loader to open files of that type.
36 interface IAnjutaFile
38 #include <gio/gio.h>
39 /**
40 * ianjuta_file_open:
41 * @obj: Self
42 * @file: file to open.
43 * @err: Error propagation and reporting
45 * The implementor opens the given file.
47 void open (GFile* file);
49 /**
50 * IAnjutaFileSavable::saved:
51 * @obj: Self
53 * This signal is emitted when the content is loaded completely.
55 void ::opened ();
57 /**
58 * ianjuta_file_get_file:
59 * @obj: Self
60 * @err: Error propagation and reporting
62 * Returns the file that was opened with ianjuta_file_open().
64 * Return value: (transfer full): The last file opened.
66 GFile* get_file ();
68 /**
69 * SECTION:ianjuta-file-savable
70 * @title: IAnjutaFileSavable
71 * @short_description: Implemented by plugins that can save files.
72 * @see_also: #IAnjutaFile
73 * @stability: Unstable
74 * @include: libanjuta/interfaces/ianjuta-file-savable.h
76 * Plugins implementing #IAnjutaFile inteface that can also save files
77 * should also implement this interface.
79 interface IAnjutaFileSavable
81 /**
82 * IAnjutaFileSavable::update_save_ui:
83 * @obj: Self
85 * This signal is emitted when the state of the file has
86 * changed. It could be that the user writes in it
87 * and the file becomes dirty or the opposite: after using
88 * undo, the file is back to its saved content. It is triggered
89 * if the file becomes read-only or give a conflict too.
91 void ::update_save_ui ();
93 /**
94 * IAnjutaFileSavable::saved:
95 * @obj: Self
96 * @file: file where the content is saved or NULL if save failed
98 * This signal is emitted when the content is saved.
100 void ::saved (GFile* file);
103 * ianjuta_file_savable_save:
104 * @obj: Self
105 * @err: Error propagation and reporting
107 * Saves the content to the original file from which it was loaded.
108 * The signal saved is always emitted even if the save fails.
110 void save ();
113 * ianjuta_file_savable_save_as:
114 * @obj: Self
115 * @file: File to save the content.
116 * @err: Error propagation and reporting
118 * Saves the content to a different File.
119 * The signal saved is always emitted even if the save fails.
121 void save_as (GFile* file);
124 * ianjuta_file_savable_set_dirty:
125 * @obj: Self
126 * @dirty: Whether the file was edited or not
127 * @err: Error propagation and reporting
129 * if @dirty is TRUE, sets dirty for the content. Save point will be
130 * left and the content will be considered not saved. Otherwise,
131 * content will considered saved and save-point will be entered.
133 void set_dirty (gboolean dirty);
136 * ianjuta_file_savable_is_dirty:
137 * @obj: Self
138 * @err: Error propagation and reporting
140 * Returns the dirty status of the content.
142 * Return value: TRUE if dirty, FALSE otherwise.
144 gboolean is_dirty ();
147 * ianjuta_file_savable_is_read_only:
148 * @obj: Self
149 * @err: Error propagation and reporting
151 * Return is the file is read-only
153 * Return value: TRUE if read-only, FALSE otherwise.
155 gboolean is_read_only ();
158 * ianjuta_file_savable_is_conflict:
159 * @obj: Self
160 * @err: Error propagation and reporting
162 * Return is the file is in conflict. It means the file
163 * has been modified externally and the user needs to
164 * tell which version he wants to use.
166 * Return value: TRUE if conflict, FALSE otherwise.
168 gboolean is_conflict ();
173 * SECTION:ianjuta-stream
174 * @title: IAnjutaStream
175 * @short_description: Implemented by plugins that can open file streams
176 * @see_also:
177 * @stability: Unstable
178 * @include: libanjuta/interfaces/ianjuta-stream.h
181 interface IAnjutaStream
183 #include <stdio.h>
186 * ianjuta_stream_open:
187 * @obj: Self
188 * @stream: Stream to open from.
189 * @err: Error propagation and reporting
191 * The implementor opens the given stream.
193 void open (FILE* stream);
196 * SECTION:ianjuta-stream-savable
197 * @title: IAnjutaStreamSavable
198 * @short_description: Implemented by plugins that can save file streams
199 * @see_also:
200 * @stability: Unstable
201 * @include: libanjuta/interfaces/ianjuta-stream-savable.h
204 interface IAnjutaStreamSavable
207 * ianjuta_stream_save:
208 * @obj: Self
209 * @stream: Stream to save to.
210 * @err: Error propagation and reporting
212 * The implementor saves the content to the given stream.
214 void save (FILE* stream);
219 * SECTION:ianjuta-markable
220 * @title: IAnjutaMarkable
221 * @short_description: Implemented by editors (or views) with markers support
222 * @see_also:
223 * @stability: Unstable
224 * @include: libanjuta/interfaces/ianjuta-markable.h
227 interface IAnjutaMarkable
229 enum Error
231 INVALID_LOCATION
235 * IAnjutaMarkableMarker:
236 * @IANJUTA_MARKABLE_LINEMARKER: Mark a particular line
237 * @IANJUTA_MARKABLE_BOOKMARK: A bookmark
238 * @IANJUTA_MARKABLE_MESSAGE: An (error) message
239 * @IANJUTA_MARKABLE_BREAKPOINT_DISABLED: a disabled breakpoint
240 * @IANJUTA_MARKABLE_BREAKPOINT_ENABLED: a enabled breakpoint
241 * @IANJUTA_MARKABLE_PROGRAM_COUNTER: Marks the program counter position
243 * This enumeration is used to specify the pixmap used for the marker
245 enum Marker
247 LINEMARKER,
248 BOOKMARK,
249 MESSAGE,
250 BREAKPOINT_DISABLED,
251 BREAKPOINT_ENABLED,
252 PROGRAM_COUNTER
256 * IAnjutaMarkable::marker-clicked:
257 * @obj: Self
258 * @double_click: whether the marker was double clicked
259 * @location: location of the clicked marker
261 * The signal is emitted when the user clicks on a marker
263 void ::marker_clicked (gboolean double_click, gint location);
266 * ianjuta_markable_mark:
267 * @obj: Self
268 * @location: Location at which the marker to set.
269 * @marker: Type of marker to be used
270 * @tooltip: (allow-none): optional tooltip displayed with the marker
271 * @err: Error propagation and reporting
273 * Marks the specified location with the given marker type. Location is
274 * implementation depenedent. For example, for an editor location means
275 * lines where markers are set.
277 * Return value: Handle of the location marked. Can be used later to obtain
278 * new location, if it has been moved due to addetions/deletions in the
279 * implementor object.
281 gint mark (gint location, Marker marker, const gchar* tooltip);
284 * ianjuta_markable_location_from_handle:
285 * @obj: Self
286 * @handle: Handle of location.
287 * @err: Error propagation and reporting
289 * Location where a marker is set could have moved by some operation in
290 * the implementation. To retrieve the correct location where the marker
291 * has moved, pass the handle retured by ianjuta_markable_mark() to this
292 * method.
294 * Return value: Current location where the marker was set.
296 gint location_from_handle (gint handle);
299 * ianjuta_markable_unmark:
300 * @obj: Self
301 * @location: Location where the marker is set.
302 * @marker: The marker to unset.
303 * @err: Error propagation and reporting
305 * Clears the @marker at given @location.
307 void unmark (gint location, Marker marker);
310 * ianjuta_markable_is_marker_set:
311 * @obj: Self
312 * @location: Location to check.
313 * @marker: Marker to check.
314 * @err: Error propagation and reporting
316 * Check if the @marker is set at the given @location.
318 * Returns: TRUE if the marker is set at the location, other false.
320 gboolean is_marker_set (gint location, Marker marker);
323 * ianjuta_markable_delete_all_markers:
324 * @obj: Self
325 * @marker: Marker to delete.
326 * @err: Error propagation and reporting
328 * Delete the @marker from all locations.
330 void delete_all_markers (Marker marker);
334 * SECTION:ianjuta-indicable
335 * @title: IAnjutaIndicable
336 * @short_description: Implemented by indicate that indicate a range
337 * @see_also:
338 * @stability: Unstable
339 * @include: libanjuta/interfaces/ianjuta-indicable.h
342 interface IAnjutaIndicable
344 #include <libanjuta/interfaces/ianjuta-iterable.h>
347 * IAnjutaIndicableIndicator:
348 * @IANJUTA_INDICABLE_NONE: No indicator
349 * @IANJUTA_INDICABLE_IMPORTANT: Important indicator
350 * @IANJUTA_INDICABLE_WARNING: Warning indicator
351 * @IANJUTA_INDICABLE_CRITICAL: Critical indicator
353 * This enumeration is used to specify the appearance of the indicator
355 enum Indicator
357 NONE,
358 IMPORTANT,
359 WARNING,
360 CRITICAL
364 * ianjuta_indicable_set:
365 * @obj: Self
366 * @begin_location: Location where the indication should start
367 * @end_location: Location where the indication should end
368 * @indicator: the indicator to use
369 * @err: Error propagation and reporting
371 * Set an indicator
374 void set (IAnjutaIterable *begin_location, IAnjutaIterable *end_location, Indicator indicator);
377 * ianjuta_indicable_clear:
378 * @obj: Self
379 * @err: Error propagation and reporting
381 * Clear all indicators
384 void clear ();
388 * SECTION:ianjuta-iterable
389 * @title: IAnjutaIterable
390 * @short_description: Implemented by objects that can iterate
391 * @see_also:
392 * @stability: Unstable
393 * @include: libanjuta/interfaces/ianjuta-iterable.h
396 interface IAnjutaIterable
399 * ianjuta_iterable_first:
400 * @obj: Self
401 * @err: Error propagation and reporting
403 * Set iter to first element position. Returns FALSE if
404 * there is no element in the iterable (hence does not have first).
405 * The iter points to the first valid item.
407 * Returns: TRUE if sucessful, other FALSE.
409 gboolean first ();
412 * ianjuta_iterable_next:
413 * @obj: Self
414 * @err: Error propagation and reporting
416 * Set the iter position to next element position. Iter can go until one
417 * item past the last item and lands in end-iter. end-iter does not point
418 * to any valid item and signifies end of the list. Returns FALSE if iter
419 * was already at end-iter (iter can not go past it) and remains pointed
420 * to the end-iter.
422 * Returns: TRUE if sucessful, otherwise FALSE if already at end-iter.
424 gboolean next ();
427 * ianjuta_iterable_previous:
428 * @obj: Self
429 * @err: Error propagation and reporting
431 * Set the iter position to previous element position. Returns FALSE if
432 * there is no previous element and the iter remains pointed to the first
433 * element.
435 * Returns: TRUE if sucessful, other FALSE.
437 gboolean previous ();
440 * ianjuta_iterable_last:
441 * @obj: Self
442 * @err: Error propagation and reporting
444 * Set iter position to end-iter (one past last element) position.
445 * Returns FALSE if there is no element in the iterable (already
446 * at end-iter).
448 * Returns: TRUE if sucessful, other FALSE.
450 gboolean last ();
453 * ianjuta_iterable_foreach:
454 * @obj: Self
455 * @callback: Callback to call for each element.
456 * @user_data: user data that is passed back to the callback.
457 * @err: Error propagation and reporting
459 * Call callback for each element in the list. Call back is passed the
460 * same iter, but with different position set (from first to last). This
461 * method does not affect current position. i.e. current position is
462 * restored at the end of this method.
464 void foreach (GFunc callback, gpointer user_data);
467 * ianjuta_iterable_set_position:
468 * @obj: Self
469 * @position: New position for the iter.
470 * @err: Error propagation and reporting
472 * Sets the current position of the iter to @position. The given @position
473 * must be from 0 to length - 1 (#ianjuta_iter_get_length()) to point to
474 * a valid element. Passing @position < 0 will set it to end-iter. It
475 * returns TRUE for the above cases. FLASE will be returned, if
476 * out-of-range @position is passed (@position > length - 1) and iter is
477 * set to end-iter.
479 * Returns: TRUE if successfully set (i.e. @position is within the range or
480 * end-iter). otherwise returns FALSE (i.e. @position is out of data range).
482 gboolean set_position (gint position);
485 * ianjuta_iterable_get_position:
486 * @obj: Self
487 * @err: Error propagation and reporting
489 * Index of the current iter in the iterable. It will be
490 * from 0 to length - 1 (ianjuta_iter_get_length()) if iter is pointed
491 * at valid element. It will return -1 if iter is pointed at end-iter.
493 * Returns: integer index, or -1 for end-iter.
495 gint get_position ();
498 * ianjuta_iterable_get_length:
499 * @obj: Self
500 * @err: Error propagation and reporting
502 * Length of the iterable (number of elements indexable by it).
504 * Returns: total length of the list.
506 gint get_length ();
509 * ianjuta_iterable_clone:
510 * @obj: Self
511 * @err: Error propagation and reporting
513 * Clones the iterable. The returned iterable object must be unreffed
514 * when done.
516 * Returns: (transfer full): A new instance of this iterable pointing at the same location.
518 IAnjutaIterable *clone ();
521 * ianjuta_iterable_assign:
522 * @obj: Self
523 * @src_iter: Source iter from which to copy the assignment.
524 * @err: Error propagation and reporting
526 * Assigns the iter position from @src_iter.
529 void assign (IAnjutaIterable *src_iter);
532 * ianjuta_iterable_compare:
533 * @obj: Self
534 * @iter2: Second iter to compare.
535 * @err: Error propagation and reporting
537 * Compares the position of @iter2 with this @obj. Returns -1
538 * value if this @obj is smaller than @iter2. Returns +1 value
539 * if this @obj is larger than @iter2. And returns 0 if both are equal.
540 * If you want difference of the iter positions, use
541 * #ianjuta_iterable_diff(). This method is meant for fast comparision.
543 * Returns: 0 if equal, -1 if @obj is smaller than @iter2
544 * or +1 if @obj is larger than @iter2.
547 gint compare (IAnjutaIterable *iter2);
550 * ianjuta_iterable_diff:
551 * @obj: Self
552 * @iter2: Second iter to differenciate.
553 * @err: Error propagation and reporting
555 * Compares the position of @iter2 with this @obj and returns difference
556 * in position of the two (@obj - @iter2).
558 * Returns: The position difference of @obj - @iter2
561 gint diff (IAnjutaIterable *iter2);
564 * SECTION:ianjuta-iterable-tree
565 * @title: IAnjutaIterableTree
566 * @short_description: Implemented by tree objects that can iterate
567 * @see_also:
568 * @stability: Unstable
569 * @include: libanjuta/interfaces/ianjuta-iterable-tree.h
572 interface IAnjutaIterableTree
576 * ianjuta_iterable_tree_parent:
577 * @obj: Self
578 * @err: Error propagation and reporting
580 * Set iter position to parent of curernt iter. If there is no parent,
581 * returns FALSE (current iter position is not changed)
583 * Returns: TRUE if sucessful, otherwise FALSE.
585 gboolean parent ();
588 * ianjuta_iterable_tree_children:
589 * @obj: Self
590 * @err: Error propagation and reporting
592 * Iter position set to first child of current iter. If there is no
593 * children, return NULL (iter position is not changed).
595 * Returns: TRUE if sucessful, otherwise FALSE.
597 gboolean children ();
600 * ianjuta_iterable_tree_has_children:
601 * @obj: Self
602 * @err: Error propagation and reporting
604 * Returns true if current iter has children
606 * Returns: TRUE if there are children, otherwise FALSE.
608 gboolean has_children ();
611 * ianjuta_iterable_tree_foreach_post:
612 * @obj: Self
613 * @callback: Callback to call for each element.
614 * @user_data: User data to pass back to callback.
615 * @err: Error propagation and reporting
617 * Call callback for each element in post order.
619 void foreach_post (GFunc callback, gpointer user_data);
622 * ianjuta_iterable_tree_foreach_pre:
623 * @obj: Self
624 * @callback: Callback to call for each element.
625 * @user_data: User data to pass back to callback.
626 * @err: Error propagation and reporting
628 * Call callback for each element in pre order.
630 void foreach_pre (GFunc callback, gpointer user_data);
635 * SECTION:ianjuta-builder
636 * @title: IAnjutaBuilder
637 * @short_description: Implemented by plugins that can build
638 * @see_also:
639 * @stability: Unstable
640 * @include: libanjuta/interfaces/ianjuta-builder.h
643 interface IAnjutaBuilder
646 * IAnjutaBuilderError:
647 * @IANJUTA_BUILDER_SUCCEED: Build succeeded
648 * @IANJUTA_BUILDER_FAILED: Build failed
649 * @IANJUTA_BUILDER_CANCELED: Build was canceld
650 * @IANJUTA_BUILDER_ABORTED: Build aborted
651 * @IANJUTA_BUILDER_INTERRUPTED: Build interruped
652 * @IANJUTA_BUILDER_TERMINATED: Build interruped
653 * @IANJUTA_BUILDER_UNKNOWN_TARGET: The specified target is unknown
654 * @IANJUTA_BUILDER_UNKNOWN_ERROR: Unknown Error
655 * @IANJUTA_BUILDER_OTHER_ERROR: Other Error (no unknown ;-))
657 * Possible build errors
659 enum Error
661 SUCCEED = 0,
662 FAILED,
663 CANCELED = 256,
664 ABORTED,
665 INTERRUPTED,
666 TERMINATED,
667 UNKNOWN_TARGET,
668 UNKNOWN_ERROR,
669 OTHER_ERROR
672 typedef gpointer Handle;
674 typedef void (*Callback) (GObject *sender, IAnjutaBuilderHandle command, GError* err, gpointer user_data);
677 * IANJUTA_BUILDER_ROOT_URI
679 * Build directory uri. It is the same than the project_root_uri for
680 * in source build.
682 #define ROOT_URI "build_root_uri"
685 * IANJUTA_BUILDER_CONFIGURATION_DEBUG
687 * Name of debugging configutation.
689 #define CONFIGURATION_DEBUG "Debug"
692 * IANJUTA_BUILDER_CONFIGURATION_OPTIMIZED
694 * Name of optimized configutation.
696 #define CONFIGURATION_OPTIMIZED "Optimized"
699 * IANJUTA_BUILDER_CONFIGURATION_PROFILING
701 * Name of profiling configutation.
703 #define CONFIGURATION_PROFILING "Profiling"
706 * ianjuta_builder_is_built:
707 * @obj: Self
708 * @uri: target uri
709 * @callback: callback called when command is finished
710 * @user_data: data passed to the callback
711 * @err: Error propagation and reporting.
713 * Check if the corresponding target is up to date or not. This
714 * command doesn't display anything. If this command cannot be
715 * implemented, it is possible to return always TRUE.
716 * When the command is finished, the callback function is called
717 * if defined.
719 * Returns: non null command handle if succeed
721 Handle is_built (const gchar *uri, Callback callback, gpointer user_data);
724 * ianjuta_builder_build:
725 * @obj: Self
726 * @uri: target uri
727 * @callback: callback called when command is finished
728 * @user_data: data passed to the callback
729 * @err: Error propagation and reporting.
731 * Build the specified target.
732 * When the command if finished, the callback function is called
733 * if defined.
735 * Returns: non null command handle if succeed
737 Handle build (const gchar *uri, Callback callback, gpointer user_data);
740 * ianjuta_builder_cancel:
741 * @obj: Self
742 * @handle: handle of the command to cancel
743 * @err: Error propagation and reporting.
745 * Cancel specified command. The callback function will not
746 * be called.
749 void cancel (Handle handle);
752 * ianjuta_builder_list_configuration:
753 * @obj: Self
754 * @err: Error propagation and reporting.
756 * List all defined configuration. These names returned are
757 * the internal non localized names for the following
758 * predefined configuration: Debug, Profiling, Optimized.
759 * The default configuration has no name and is not returned.
761 * Returns: (element-type utf8) (transfer container): a list configuration name. The names are owned
762 * by the plugin, so only the list has to be free using
763 * g_list_free.
765 List<const gchar*> list_configuration();
768 * ianjuta_builder_get_uri_configuration:
769 * @obj: Self
770 * @uri: target uri
771 * @err: Error propagation and reporting.
773 * Get the configuration corresponding to the target uri.
775 * Returns: The configuration name or NULL if the corresponding
776 * configuration cannot be found.
778 const gchar* get_uri_configuration(const gchar *uri);
782 * SECTION:ianjuta-environment
783 * @title: IAnjutaEnvironment
784 * @short_description: Implemented by plugins doing cross compilation
785 * @see_also:
786 * @stability: Unstable
787 * @include: libanjuta/interfaces/ianjuta-environment.h
790 interface IAnjutaEnvironment
793 * IAnjutaEnvironmentError:
794 * @IANJUTA_BUILDER_CONFIG: Configuration of the environment is wrong
795 * @IANJUTA_BUILDER_OTHER_ERROR: Other Error (no unknown ;-))
797 * Possible build errors
799 enum Error
801 CONFIG,
802 OTHER_ERROR
806 * ianjuta_environment_override:
807 * @obj: Self
808 * @dirp: a pointer on the working directory
809 * @argvp: a pointer on a NULL terminated string array
810 * containing the command name in argv[0] and all
811 * its argument
812 * @envp: a pointer on a NULL terminated string array
813 * containing all additional environment variable
814 * used by the command
815 * @err: Error propagation and reporting.
817 * Override a command to work in another build environment
819 * Returns: FALSE if there is an error.
821 gboolean override (gchar **dirp, gchar ***argvp, gchar ***envp);
824 * ianjuta_environment_get_real_directory:
825 * @obj: Self
826 * @dir: A directory path in the environment
827 * @err: Error propagation and reporting.
829 * Convert a directory in the environment to a directory outside.
830 * It is useful when the environment use chroot. Take care that
831 * the input directory string is freed using g_free but and you need to
832 * free the output string when not needed.
834 * Returns: The directory path outside the environment
836 gchar* get_real_directory (gchar *dir);
840 * SECTION:ianjuta-buildable
841 * @title: IAnjutaBuildable
842 * @short_description: Implemented by plugins that can build. This interface
843 * will be replaced by #IAnjutaBuilder (for build functions) and
844 * #IAnjutaEnvironment for ianjuta_buildable_set_command,
845 * ianjuta_buildable_reset_command and ianjuta_buildable_get_command.
846 * @see_also:
847 * @stability: Obsolete
848 * @include: libanjuta/interfaces/ianjuta-buildable.h
851 interface IAnjutaBuildable
855 * IAnjutaBuildableCommand:
856 * @IANJUTA_BUILDABLE_COMMAND_COMPILE: Compile source
857 * @IANJUTA_BUILDABLE_COMMAND_BUILD: Build file (normally using make)
858 * @IANJUTA_BUILDABLE_COMMAND_BUILD_TARBALL: make dist
859 * @IANJUTA_BUILDABLE_COMMAND_INSTALL: make install
860 * @IANJUTA_BUILDABLE_COMMAND_CONFIGURE: ./configure
861 * @IANJUTA_BUILDABLE_COMMAND_GENERATE: ./autogen.sh
862 * @IANJUTA_BUILDABLE_COMMAND_CLEAN: make clean
863 * @IANJUTA_BUILDABLE_COMMAND_EXECUTE: ./hello
864 * @IANJUTA_BUILDABLE_COMMAND_IS_BUILT: check whether object files are up-to-date
865 * @IANJUTA_BUILDABLE_COMMAND_DISTCLEAN: make distclean
866 * @IANJUTA_BUILDABLE_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 * SECTION:ianjuta-editor
1254 * @title: IAnjutaEditor
1255 * @short_description: Text editor interface
1256 * @see_also:
1257 * @stability: Unstable
1258 * @include: libanjuta/interfaces/ianjuta-editor.h
1261 interface IAnjutaEditor
1263 #include <gtk/gtk.h>
1264 #include <libanjuta/interfaces/ianjuta-iterable.h>
1267 * IANJUTA_EDITOR_PREF_SCHEMA
1269 * Schema id used to store common editor settings.
1271 #define PREF_SCHEMA "editor"
1274 * IANJUTA_EDITOR_USE_TABS_KEY
1276 * Boolean key, true is tabs has to be used for indenting.
1278 #define USE_TABS_KEY "use-tabs"
1281 * IANJUTA_EDITOR_TAB_WIDTH_KEY
1283 * Integer key, defines the size of a tabulation in spaces.
1285 #define TAB_WIDTH_KEY "tab-width"
1288 * IANJUTA_EDITOR_INDENT_WIDTH_KEY
1290 * Integer key, defines the number a space for one indentation step.
1292 #define INDENT_WIDTH_KEY "indent-width"
1295 enum Error
1297 DOESNT_EXIST
1300 * IAnjutaEditorAttribute:
1301 * @IANJUTA_EDITOR_TEXT: Normal text
1302 * @IANJUTA_EDITOR_KEYWORD: A keyword of the programming language
1303 * @IANJUTA_EDITOR_COMMENT: A comment
1304 * @IANJUTA_EDITOR_STRING: A string
1306 * This enumeration is used to specify the type of text. Note that not all
1307 * editors implement this.
1309 enum Attribute
1311 TEXT,
1312 KEYWORD,
1313 COMMENT,
1314 STRING
1318 * IAnjutaEditor::glade-member-add:
1319 * @widget_typename: Name of the type of the widget that will become a member of the class.
1320 * @widget_name: Name of the widget that will become a member of the class.
1321 * @filename: Path for the .ui file that generated the signal.
1322 * @obj: Self
1324 * This signal is emitted when code for a widget must be generated.
1326 void ::glade_member_add (gchar *widget_typename, gchar *widget_name, gchar *filename);
1329 * IAnjutaEditor::glade-member-add:
1330 * @widget_typename: Name of the type of the widget.
1331 * @signal_name: Name of the signal.
1332 * @handler_name: Name of the signal handler.
1333 * @object: Name of the object to be passed.
1334 * @swap: The "swap" signal property.
1335 * @after: The "after" signal property.
1336 * @filename: Path for the .ui file that generated the signal.
1337 * @obj: Self
1339 * This signal is emitted when code for a widget must be generated.
1341 void ::glade_callback_add (gchar *widget_typename, gchar *signal_name, gchar *handler_name, gchar *object, gboolean swap, gboolean after, gchar *filename);
1344 * IAnjutaEditor::code-added:
1345 * @position: The iter position where @ch is added.
1346 * @code: The code that has been added.
1347 * @obj: Self
1349 * This signal is emitted when code is added inside the editor.
1350 * The newly added code is @code which has been inserted at @position.
1352 void ::code_added (IAnjutaIterable *position, gchar *code);
1355 * IAnjutaEditor::char-added:
1356 * @position: The iter position where @ch is added.
1357 * @ch: The character that has been added.
1358 * @obj: Self
1360 * This signal is emitted when any character is added inside the editor.
1361 * The newly added character is @ch which has been inserted at @position.
1363 void ::char_added (IAnjutaIterable *position, gchar ch);
1366 * IAnjutaEditor::backspace:
1367 * @obj: Self
1369 * The signal is emitted when the user presses backspace
1371 void ::backspace ();
1374 * IAnjutaEditor::changed:
1375 * @position: The iter position where change happend.
1376 * @added: TRUE if added, FALSE if deleted.
1377 * @length: Length of the text changed.
1378 * @lines: Number of lines added or removed.
1379 * @text: The text added or removed.
1380 * @obj: Self
1382 * This signal is emitted when any text change happens in editor.
1383 * The changes begin at @position. @text is not garanteed to be NULL
1384 * terminated. Use @length to read the text. @lines represent the
1385 * number of line breaks in the added or removed text.
1387 void ::changed (IAnjutaIterable *position, gboolean added, gint length, gint lines, const gchar *text);
1390 * IAnjutaEditor::cursor-moved:
1391 * @obj: Self
1393 * The signal is a hint that the cursor was moved.
1395 void ::cursor_moved ();
1398 * IAnjutaEditor::line-marks-gutter-clicked:
1399 * @obj: Self
1400 * @double_click: whether the line marks gutter was double clicked
1401 * @location: location of the clicked marker
1403 * The signal is emitted when the user clicks on a marker
1405 void ::line_marks_gutter_clicked (gint location);
1408 * ianjuta_editor_get_tabsize:
1409 * @obj: Self
1410 * @err: Error propagation and reporting
1412 * Returns the tabsize (in spaces) currently used by the editor.
1414 * Returns: tabsize in number of spaces
1416 gint get_tabsize ();
1419 * ianjuta_editor_set_tabsize:
1420 * @obj: Self
1421 * @tabsize: Tabsize in spaces
1422 * @err: Error propagation and reporting
1424 * Sets the tabsize of the editor.
1426 void set_tabsize (gint tabsize);
1429 * ianjuta_editor_get_use_spaces:
1430 * @obj: Self
1431 * @err: Error propagation and reporting
1433 * Returns if the editor uses spaces for filling up tab characters.
1435 * Returns: TRUE if yes, FALSE if no.
1437 gboolean get_use_spaces ();
1440 * ianjuta_editor_set_use_space:
1441 * @obj: Self
1442 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
1443 * @err: Error propagation and reporting
1445 * Sets if the editor should use spaces for filling up tab characters.
1447 void set_use_spaces (gboolean use_spaces);
1450 * ianjuta_editor_set_auto_indent:
1451 * @obj: Self
1452 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
1454 * Sets whether the editor should auto-indent itself. A plugin that does
1455 * custom auto-indent can set this to false and override the preferences
1456 * setting
1458 void set_auto_indent (gboolean auto_indent);
1461 * ianjuta_editor_get_indentsize:
1462 * @obj: Self
1463 * @err: Error propagation and reporting
1465 * Returns the indentation size in spaces currently used by the
1466 * editor.
1468 * Returns: indentation size in number of spaces
1470 gint get_indentsize ();
1473 * ianjuta_editor_set_indentsize:
1474 * @obj: Self
1475 * @tabsize: Indentation size in spaces
1476 * @err: Error propagation and reporting
1478 * Sets the indentation size of the editor.
1480 void set_indentsize (gint indentsize);
1483 * ianjuta_editor_erase_range:
1484 * @obj: Self
1485 * @position_start: Start position of chars to erase.
1486 * @position_end: End position of chars to erase.
1487 * @err: Error propagation and reporting
1489 * Erases the chars between positions pointed by @position_start and
1490 * @position_end. The character pointed by @position_start is included,
1491 * while pointed by @position_end is not include in the range. After
1492 * the erase operation, all active iters, except these two, are no
1493 * longer guranteed to be valid. At the end the operation, these two
1494 * iters point to the same position which is the position where erase
1495 * happend (usually the original @position_start position).
1497 void erase (IAnjutaIterable *position_start, IAnjutaIterable *position_end);
1500 * ianjuta_editor_erase_all:
1501 * @obj: Self
1502 * @err: Error propagation and reporting
1504 * Empties the whole editor buffer. There will be zero characters.
1505 * After the erase operation, none of the active iters are guranteed
1506 * to be valid.
1508 void erase_all ();
1511 * ianjuta_editor_insert:
1512 * @obj: Self
1513 * @position: Character position in editor where insert will take place.
1514 * @text: Text to append.
1515 * @length: Length of @text to use.
1516 * @err: Error propagation and reporting
1518 * Inserts @length characters from @text buffer at given @position of
1519 * editor buffer. If @length is -1, the whole @text is used.
1521 void insert (IAnjutaIterable *position, const gchar *text, gint length);
1524 * ianjuta_editor_append:
1525 * @obj: Self
1526 * @text: Text to append.
1527 * @length: Length of @text to use.
1528 * @err: Error propagation and reporting
1530 * Appends @length characters from @text buffer at the end of editor
1531 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1533 void append (const gchar *text, gint length);
1536 * ianjuta_editor_goto_line:
1537 * @obj: Self
1538 * @lineno: line number where carat will be moved.
1539 * @err: Error propagation and reporting
1541 * Carat is moved to the given @lineno line and text view is scrolled to
1542 * bring it in viewable area of the editor.
1544 void goto_line (gint lineno);
1547 * ianjuta_editor_goto_start:
1548 * @obj: Self
1549 * @err: Error propagation and reporting
1551 * Carat is moved to the begining of editor and text view is scrolled to
1552 * bring it in viewable area of the editor.
1554 void goto_start ();
1557 * ianjuta_editor_goto_end:
1558 * @obj: Self
1559 * @err: Error propagation and reporting
1561 * Carat is moved to the end of editor and text view is scrolled to
1562 * bring it in viewable area of the editor.
1564 void goto_end ();
1567 * ianjuta_editor_goto_position:
1568 * @obj: Self
1569 * @position: Character position where carat will be moved.
1570 * @err: Error propagation and reporting
1572 * Carat is moved to the given @position and text view is scrolled to
1573 * bring @position in viewable area of the editor.
1575 void goto_position (IAnjutaIterable *position);
1578 * ianjuta_editor_get_text:
1579 * @obj: Self
1580 * @begin: Begining iterator
1581 * @end: End iterator
1582 * @err: Error propagation and reporting
1584 * Gets text characters beginning from @begin (including char
1585 * pointed by @begin) and ending with @end (excluding character
1586 * pointed by @end). The characters returned are utf-8 encoded.
1587 * The iterators @begin and @end could be in either order. The returned
1588 * text, however, is in right order. If both @begin and @end points
1589 * to the same position, NULL is returned.
1591 * Returns: A buffer of utf-8 characters.
1592 * The returned buffer must be freed when no longer required.
1594 gchar* get_text (IAnjutaIterable *begin, IAnjutaIterable *end);
1597 * ianjuta_editor_get_text_all:
1598 * @obj: Self
1599 * @err: Error propagation and reporting
1601 * Gets all text characters in the editor.
1602 * The characters returned are utf-8 encoded.
1604 * Returns: A buffer of utf-8 characters containing all text from editor.
1605 * The returned buffer must be freed when no longer required.
1607 gchar* get_text_all ();
1610 * ianjuta_editor_line_from_position:
1611 * @obj: Self
1612 * @position: Position you want to know the line from
1613 * @err: Error propagation and reporting
1615 * Get the line number in which @position locates.
1616 * Returns: Line which corresponds to @position
1619 int get_line_from_position (IAnjutaIterable *position);
1622 * ianjuta_editor_get_lineno:
1623 * @obj: Self
1624 * @err: Error propagation and reporting
1626 * Obtains current line number on which carat is.
1628 * Return value: Line number.
1630 gint get_lineno ();
1633 * ianjuta_editor_get_length:
1634 * @obj: Self
1635 * @err: Error propagation and reporting
1637 * Get length of complete text in editor. This will be the total
1638 * number of bytes in the file or buffer.
1640 * Return value: Text length.
1642 gint get_length ();
1645 * ianjuta_editor_get_current_word:
1646 * @obj: Self
1647 * @err: Error propagation and reporting
1649 * Obtains the word on which carat is currently on.
1651 * Return value: Current word.
1653 gchar* get_current_word ();
1656 * ianjuta_editor_get_current_column:
1657 * @obj: Self
1658 * @err: Error propagation and reporting
1660 * Obtains number of the current column in the editor.
1662 * Return value: Current column.
1664 gint get_column ();
1667 * ianjuta_editor_get_line_begin_position:
1668 * @obj: Self
1669 * @line: fixme
1670 * @err: Error propagation and reporting.
1672 * fixme
1674 * Returns: (transfer full): fixme
1676 IAnjutaIterable* get_line_begin_position (gint line);
1679 * ianjuta_editor_get_line_end_position:
1680 * @obj: Self
1681 * @line: fixme
1682 * @err: Error propagation and reporting.
1684 * fixme
1686 * Returns: (transfer full): fixme
1688 IAnjutaIterable *get_line_end_position (gint line);
1691 * ianjuta_editor_get_overwrite:
1692 * @obj: Self
1693 * @err: Error propagation and reporting
1695 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1697 * Return value: editor mode.
1699 gboolean get_overwrite ();
1703 * ianjuta_editor_set_popup_menu:
1704 * @obj: Self
1705 * @menu: Popupmenu
1706 * @err: Error propagation and reporting
1708 * Set Editor popup menu. This is the menu shown in the editor when one
1709 * right-clicks on it.
1712 void set_popup_menu (GtkWidget *menu);
1715 * ianjuta_editor_get_offset:
1716 * @obj: Self
1717 * @err: Error propagation and reporting
1719 * Get current caret position in integer character offset. Deprecated.
1720 * Use ianjuta_editor_get_position() instead.
1722 * Returns: Current character position since the begining of file.
1724 gint get_offset ();
1727 * ianjuta_editor_get_position:
1728 * @obj: Self
1729 * @err: Error propagation and reporting
1731 * Get current caret position.
1733 * Returns: (transfer full): Iterator that points to the current position.
1735 IAnjutaIterable* get_position ();
1738 * ianjuta_editor_get_position_from_offset:
1739 * @obj: Self
1740 * @offset: Character offset position where the iter will be set
1741 * @err: Error propagation and reporting
1743 * Creates and returns an iter for editor cells. The iter is
1744 * placed at the unicode character position where the given offset
1745 * @offset happens to fall. The returned iter is cell (character)
1746 * iter and not byte iter, so all iter operations
1747 * on it are character (not byte) iteration, including all position
1748 * and index references in the iter.
1750 * The iter must be unreferrenced by the caller when done.
1751 * The iter navigates (next/previous) in step of unicode
1752 * characters (one unicode character == one cell).
1754 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1755 * given @offset position.
1757 IAnjutaIterable* get_position_from_offset (gint offset);
1760 * ianjuta_editor_get_start_position:
1761 * @obj: Self
1762 * @err: Error propagation and reporting
1764 * Gets the iter positioned at the start of the editor buffer.
1766 * Return value: (transfer none): Cell iter set to the begining of the editor.
1768 IAnjutaIterable* get_start_position ();
1771 * ianjuta_editor_get_end_position:
1772 * @obj: Self
1773 * @err: Error propagation and reporting
1775 * Gets the iter positioned at the end of the editor buffer. The
1776 * returned iter is the end-iter which does not point to any valid
1777 * character in the buffer (it is pointed one step beyond the last
1778 * valid character).
1780 * Return value: (transfer none): Cell iter set to the end of the editor (end-iter).
1782 IAnjutaIterable* get_end_position ();
1785 * SECTION:ianjuta-editor-selection
1786 * @title: IAnjutaEditorSelection
1787 * @short_description: Text editor selection interface
1788 * @see_also:
1789 * @stability: Unstable
1790 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1793 interface IAnjutaEditorSelection
1795 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1797 * ianjuta_editor_selection_has_selection:
1798 * @obj: Self
1799 * @err: Error propagation and reporting
1801 * Returns TRUE if editor has any text selected. The selection
1802 * positions can be retrieved with ianjuta_editor_selection_get_start()
1803 * and ianjuta_editor_selection_get_end().
1805 * Returns: TRUE if there is text selected else FALSE.
1807 gboolean has_selection ();
1810 * ianjuta_editor_selection_get:
1811 * @obj: Self
1812 * @err: Error propagation and reporting
1814 * Gets curerntly selected text in editor.
1816 * Returns: A newly allocated buffer of currently selected characters.
1817 * NULL if there is no selection. The returned buffer must be freed after
1818 * use.
1820 gchar* get ();
1823 * ianjuta_editor_selection_set:
1824 * @obj: Self
1825 * @start: Begin of selection
1826 * @end: End of selection
1827 * @scroll: Scroll selection onscreen
1828 * @err: Error propagation and reporting
1830 * Select characters between start and end. Start and end don't have to
1831 * be ordered.
1833 void set (IAnjutaIterable* start, IAnjutaIterable* end, gboolean scroll);
1836 * ianjuta_editor_selection_get_start:
1837 * @obj: Self
1838 * @err: Error propagation and reporting
1840 * Gets start position of selection text.
1842 * Return: Start of selection or NULL if there is no selection.
1844 IAnjutaIterable* get_start ();
1847 * ianjuta_editor_selection_get_end:
1848 * @obj: Self
1849 * @err: Error propagation and reporting
1851 * Get end position of selection. If there is no selection, returns
1852 * NULL.
1854 * Returns: End of selection or NULL if there is no selection.
1856 IAnjutaIterable* get_end ();
1859 * ianjuta_editor_selection_select_block:
1860 * @obj: Self
1861 * @err: Error propagation and reporting
1863 * Selects current block of code. The definition of block of code
1864 * depends on highlight mode used (programming language). Some
1865 * highlight mode does not have block concept, in that case this
1866 * method does not do anything.
1868 void select_block ();
1871 * ianjuta_editor_selection_select_function:
1872 * @obj: Self
1873 * @err: Error propagation and reporting
1875 * Select current function block. The definition of function block
1876 * depends on highlight mode used (programming language). Some
1877 * highlight mode does not have function concept, in that case this
1878 * method does not do anything.
1880 void select_function ();
1883 * ianjuta_editor_edit_select_all:
1884 * @obj: Self
1885 * @err: Error propagation and reporting
1887 * Select whole buffer.
1889 void select_all ();
1892 * ianjuta_editor_selection_replace:
1893 * @obj: Self
1894 * @text: Replacement text.
1895 * @length: Length of the text to used in @text.
1896 * @err: Error propagation and reporting
1898 * Replaces currently selected text with the @text. Only @length amount
1899 * of characters are used from @text buffer to replace.
1901 void replace (const gchar *text, gint length);
1905 * SECTION:ianjuta-editor-search
1906 * @title: IAnjutaEditorSearch
1907 * @short_description: Text editor search interface
1908 * @see_also:
1909 * @stability: Unstable
1910 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1913 interface IAnjutaEditorSearch
1915 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1918 * ianjuta_editor_search_forward:
1919 * @obj: Self
1920 * @search: String to search for
1921 * @start: Where to search from
1922 * @end: Where to stop searching
1923 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1924 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1925 * @err: Error propagation and reporting
1927 * Search forward from start to end
1930 gboolean forward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1933 * ianjuta_editor_search_backward:
1934 * @obj: Self
1935 * @search: String to search for
1936 * @start: Where to search from
1937 * @end: Where to stop searching
1938 * @result_start: (out): Will be set to the start of the search_result (or NULL)
1939 * @result_end: (out): Will be set to the end of the search_result (or NULL)
1940 * @err: Error propagation and reporting
1942 * Search backward from end to start
1946 gboolean backward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1951 * SECTION:ianjuta-editor-convert
1952 * @title: IAnjutaEditorConvert
1953 * @short_description: Text editor convert interface
1954 * @see_also:
1955 * @stability: Unstable
1956 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1959 interface IAnjutaEditorConvert
1962 * ianjuta_editor_convert_to_upper:
1963 * @obj: Self
1964 * @start_position: Start position.
1965 * @end_position: End position.
1966 * @err: Error propagation and reporting
1968 * change characters from start position to end position to uppercase.
1971 void to_upper (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1974 * ianjuta_editor_convert_to_lower:
1975 * @obj: Self
1976 * @start_position: Start position.
1977 * @end_position: End position.
1978 * @err: Error propagation and reporting
1980 * change characters from start position to end position to lowercase
1983 void to_lower (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1987 * SECTION:ianjuta-editor-line-mode
1988 * @title: IAnjutaEditorLineMode
1989 * @short_description: Text editor line mode
1990 * @see_also:
1991 * @stability: Unstable
1992 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1995 interface IAnjutaEditorLineMode
1998 * IAnjutaEditorLineModeType:
1999 * @IANJUTA_EDITOR_LINE_MODE_LF: Line-Feed (Unix)
2000 * @IANJUTA_EDITOR_LINE_MODE_CR: Carat return (Max)
2001 * @IANJUTA_EDITOR_LINE_MODE_CRLF: Caret return + line-feed (Windows)
2003 * This enumeration is used to specify the type of text. Note that not all
2004 * editors implement this.
2006 enum Type
2010 CRLF
2014 * ianjuta_editor_line_mode_get:
2015 * @obj: Self
2016 * @err: Error propagation and reporting
2018 * Get current line ending mode. It is auto-detected from the
2019 * buffer contents.
2021 Type get ();
2024 * ianjuta_editor_line_mode_set:
2025 * @obj: Self
2026 * @mode: Line mode to set.
2027 * @err: Error propagation and reporting
2029 * Set the line ending mode to the given @mode. Existing line end
2030 * characters in the buffer are not touched. Only the newly added
2031 * texts will have @mode line end characters.
2033 void set (Type mode);
2036 * ianjuta_editor_line_mode_convert:
2037 * @obj: Self
2038 * @mode: Line mode to convert.
2039 * @err: Error propagation and reporting
2041 * Set the line ending mode to the given @mode and convert all line end
2042 * characters in the buffer to @mode line end characters.
2044 void convert (Type mode);
2047 * ianjuta_editor_line_mode_fix:
2048 * @obj: Self
2049 * @err: Error propagation and reporting
2051 * Convert EOL characters to majority of line mode. This is helpful
2052 * when the buffer contains mixed line modes and we want to fix it.
2054 void fix ();
2058 * SECTION:ianjuta-editor-tip
2059 * @title: IAnjutaEditorTip
2060 * @short_description: Editor call tips assistance framework
2061 * @see_also:
2062 * @stability: Unstable
2063 * @include: libanjuta/interfaces/ianjuta-editor-tip.h
2066 interface IAnjutaEditorTip
2069 * ianjuta_editor_tip_show:
2070 * @obj: Self
2071 * @tips: (element-type utf8): list of alternative tips.
2072 * @position: Tip position.
2073 * @err: Error propagation and reporting
2075 * Show tips showing more information on current context. No user feedback
2076 * is required when tips are shown. @position indicates
2077 * the position before which is the known context and after which are
2078 * the suggestions. Usually the editor would use this to
2079 * align the choices displayed such that the carat is just at this
2080 * position when the choices are displayed.
2083 void show (List<const gchar*> tips, IAnjutaIterable *position);
2086 * ianjuta_editor_tip_cancel
2087 * @obj: Self
2088 * @err: Error propagation and reporting
2090 * Cancels the last shown tooltip
2092 void cancel ();
2095 * ianjuta_editor_tip_visible:
2096 * @obj: Self
2097 * @err: Error propagation and reporting
2099 * Returns: whether a tooltip is crrently shown
2101 gboolean visible();
2105 * SECTION:ianjuta-editor-assist
2106 * @title: IAnjutaEditorAssist
2107 * @short_description: Text editor assist interface
2108 * @see_also:
2109 * @stability: Unstable
2110 * @include: libanjuta/interfaces/ianjuta-editor-assist
2113 interface IAnjutaEditorAssist
2115 #include <libanjuta/interfaces/ianjuta-provider.h>
2117 struct Proposal
2119 gchar* label;
2120 gchar* markup;
2121 gchar* info;
2122 gchar* text;
2123 GdkPixbuf* icon;
2124 gpointer data;
2128 * IAnjutaEditorAssist::cancelled
2129 * @obj: Self
2131 * This signal is emitted when the autocompletion is cancelled due to various
2132 * reasons. The provider should avoid to call ianjuta_editor_assist_proposals() after
2133 * this signal.
2135 void ::cancelled ();
2138 * ianjuta_editor_assist_add
2139 * @obj: self
2140 * @provider: a IAnjutaProvider
2141 * @err: Error handling
2143 * Add a provider to the list of completion providers
2145 void add(IAnjutaProvider* provider);
2148 * ianjuta_editor_assist_remove
2149 * @obj: self
2150 * @provider: a IAnjutaProvider
2151 * @err: Error handling
2153 * Remove a provider from the list of completion providers
2155 void remove(IAnjutaProvider* provider);
2158 * ianjuta_editor_assist_invoke
2159 * @obj: self
2160 * @provider: a IAnjutaProvider (can be NULL to use all providers)
2161 * @err: Error handling
2163 * Force invokation of a provider at the current cursor position.
2164 * That means that ianjuta_provider_populate() will be called on the
2165 * provider.
2167 void invoke(IAnjutaProvider* provider);
2170 * ianjuta_editor_assist_proposals:
2171 * @obj: self
2172 * @provider: a IAnjutaProvider
2173 * @proposals: (element-type IAnjutaEditorAssistProposal): a list of IAnjutaProposals
2174 * @pre_word: the word before the cursor
2175 * @finished: whether is was the last call in an async operation
2176 * @err: Error handling
2178 * Add the list of proposals for the current population. You can add
2179 * proposals async as long as the last call sets finished to TRUE. That
2180 * is usually called by the IAnjutaProvider after it was triggered by
2181 * ianjuta_provider_populate()
2184 void proposals(IAnjutaProvider* provider, GList* proposals, const gchar* pre_word, gboolean finished);
2188 * SECTION:ianjuta-editor-hover
2189 * @title: IAnjutaEditorHover
2190 * @short_description: Text editor hover interface
2191 * @see_also:
2192 * @stability: Unstable
2193 * @include: libanjuta/interfaces/ianjuta-editor-hover
2196 interface IAnjutaEditorHover
2198 #include <libanjuta/interfaces/ianjuta-iterable.h>
2200 /* IAnjutaEditorHover::hover-over:
2201 * @obj: self
2202 * @position: IAnjutaEditorCell specifying the position the mouse is over
2204 * The mouse is held for a moment over @position. This can be used to show
2205 * all tooltip.
2207 void ::hover_over (IAnjutaIterable* position);
2209 /* IAnjutaEditorHover::hover-leave
2210 * @obj: self
2211 * @position: IAnjutaEditorCell specifying the position the mouse was over
2213 * User moved the mouse away - can be used to clean up things done in
2214 * #IAnjutaEditorHover::hover-over
2216 void ::hover_leave (IAnjutaIterable* position);
2219 * ianjuta_editor_hover_display:
2220 * @obj: Self
2221 * @info: String to display
2222 * @err: Error propagation and reporting
2224 * Show @info as tooltip
2227 void display (IAnjutaIterable* position, const gchar *info);
2231 * SECTION:ianjuta-editor-language
2232 * @title: IAnjutaEditorLanguage
2233 * @short_description: Text editor language interface
2234 * @see_also:
2235 * @stability: Unstable
2236 * @include: libanjuta/interfaces/ianjuta-editor-language.h
2239 interface IAnjutaEditorLanguage
2241 /* IAnjutaEditorLanguage::language-changed:
2242 * @obj: self
2243 * @language: new language
2245 * the language of the editor changed to @language
2247 void ::language_changed (const gchar *language);
2250 * ianjuta_editor_language_get_supported_languages:
2251 * @obj: Self
2252 * @err: Error propagation and reporting
2254 * Return a list of languages supported by the editor
2255 * Note: These list contains the names in the form
2256 * the editor implementation knows them
2257 * Returns: (element-type utf8):
2260 const List<const gchar*> get_supported_languages ();
2263 * ianjuta_editor_language_name:
2264 * @obj: Self
2265 * @err: Error propagation and reporting
2267 * Get a list of languages the editor can highlight
2271 const gchar *get_language_name (const gchar* language);
2274 * ianjuta_editor_language_get_language:
2275 * @obj: Self
2276 * @err: Error propagation and reporting
2278 * Return the name of the currently used language
2282 const gchar *get_language ();
2285 * ianjuta_editor_language_set_language:
2286 * @obj: Self
2287 * @language: Language
2288 * @err: Error propagation and reporting
2290 * Force the editor to use a given language
2294 void set_language (const gchar* language);
2298 * SECTION:ianjuta-editor-folds
2299 * @title: IAnjutaEditorFolds
2300 * @short_description: Text editor folds inteface
2301 * @see_also:
2302 * @stability: Unstable
2303 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
2306 interface IAnjutaEditorFolds
2309 * ianjuta_editor_view_open_folds:
2310 * @obj: Self
2311 * @err: Error propagation and reporting
2313 * Open all folds
2316 void open_all ();
2319 * ianjuta_editor_view_close_folds:
2320 * @obj: Self
2321 * @err: Error propagation and reporting
2323 * Close all folds
2326 void close_all ();
2329 * ianjuta_editor_view_toggle_fold:
2330 * @obj: Self
2331 * @err: Error propagation and reporting
2333 * Open/Close current fold
2336 void toggle_current ();
2340 * SECTION:ianjuta-editor-view
2341 * @title: IAnjutaEditorView
2342 * @short_description: Text editor view interface
2343 * @see_also:
2344 * @stability: Unstable
2345 * @include: libanjuta/interfaces/ianjuta-editor-view.h
2347 * An editor view is a visual representation of the editor. An editor
2348 * can have multiple views. All views of an editor show the same editor
2349 * content (buffer). Consequently, any change done in one view is
2350 * updated in all other views.
2352 interface IAnjutaEditorView
2355 * ianjuta_editor_view_create:
2356 * @obj: Self
2357 * @err: Error propagation and reporting
2359 * Creates a new view for the editor. The newly created view gets
2360 * the user focus and scrolls to the same location as last view.
2362 void create ();
2365 * ianjuta_editor_view_remove_current:
2366 * @obj: Self
2367 * @err: Error propagation and reporting
2369 * Removes currently focused editor view. It does not remove the
2370 * last view of the editor. That is, if currently there is only
2371 * one view of the editor, this function does nothing.
2373 void remove_current ();
2376 * ianjuta_editor_view_get_count:
2377 * @obj: Self
2378 * @err: Error propagation and reporting
2380 * Total number of views currently present. It will never be less
2381 * than 1. Invalid return values are considered error condition.
2383 gint get_count ();
2387 * SECTION:ianjuta-editor-comment
2388 * @title: IAnjutaEditorComment
2389 * @short_description: Text editor comment interface
2390 * @see_also:
2391 * @stability: Unstable
2392 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
2395 interface IAnjutaEditorComment
2398 * ianjuta_editor_comment_block:
2399 * @obj: Self
2400 * @err: Error propagation and reporting
2402 * Comment/Uncomment out selected block
2404 void block();
2407 * ianjuta_editor_comment_box:
2408 * @obj: Self
2409 * @err: Error propagation and reporting
2411 * Comment/Uncomment out selected block
2413 void box();
2416 * ianjuta_editor_comment_stream:
2417 * @obj: Self
2418 * @err: Error propagation and reporting
2420 * Comment/Uncomment out selected block
2422 void stream();
2426 * SECTION:ianjuta-editor-zoom
2427 * @title: IAnjutaEditorZoom
2428 * @short_description: Text editor zoom interface
2429 * @see_also:
2430 * @stability: Unstable
2431 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2434 interface IAnjutaEditorZoom
2437 * ianjuta_editor_zoom_in:
2438 * @obj: Self
2439 * @err: Error propagation and reporting
2441 * Zoom in
2443 void in ();
2446 * ianjuta_editor_zoom_out:
2447 * @obj: Self
2448 * @err: Error propagation and reporting
2450 * Zoom out
2452 void out ();
2456 * SECTION:ianjuta-editor-goto
2457 * @title: IAnjutaEditorGoto
2458 * @short_description: Text editor navigation interface
2459 * @see_also:
2460 * @stability: Unstable
2461 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2464 interface IAnjutaEditorGoto
2467 * ianjuta_editor_goto_start_block:
2468 * @obj: Self
2469 * @err: Error propagation and reporting
2471 * Moves cursor to the start of the current block
2473 void start_block();
2476 * ianjuta_editor_goto_end_block:
2477 * @obj: Self
2478 * @err: Error propagation and reporting
2480 * Moves cursor to the end of the current block
2482 void end_block();
2485 * ianjuta_editor_goto_matching_brace:
2486 * @obj: Self
2487 * @err: Error propagation and reporting
2489 * Moves cursor to matching brace
2491 void matching_brace();
2496 * SECTION:ianjuta-editor-glade-signal
2497 * @title: IAnjutaEditorGladeSignal
2498 * @short_description: Interface for dropping signal handlers
2499 * @see_also:
2500 * @stability: Unstable
2501 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2504 interface IAnjutaEditorGladeSignal
2506 /* IAnjutaEditorGladeSignal::drop-possible
2507 * @obj: self
2508 * @iter: a IAnjutaIterable of the position where drop would happen
2510 * Emitted when a signal is dragged over the editor
2512 * Return value: TRUE if a signal handler can be dropped, FALSE otherwise
2514 gboolean ::drop_possible (IAnjutaIterable* iterator);
2516 /* IAnjutaEditorGladeSignal::drop
2517 * @obj: self
2518 * @iter: a IAnjutaIterable of the position where drop happens
2519 * @signal_data: Signal data in form "widget:signal:handler", e.g.
2520 * "GtkToggleButton:toggled:on_toggle_button_toggled"
2522 * Emitted when a signal was received per drag & drop
2525 void ::drop (IAnjutaIterable* iterator, const gchar* signal_data);
2530 * SECTION:ianjuta-editor-cell
2531 * @title: IAnjutaEditorCell
2532 * @short_description: Text editor character cell
2533 * @see_also:
2534 * @stability: Unstable
2535 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2537 * Represents a cell in editor. A cell corresponds to a unicode
2538 * character along with all associated styles (such as colors and font).
2539 * A cell may or may not have style. If style is supported in the
2540 * editor, it is assumed all cells will have styles and hence every
2541 * IAnjutaEditorCell interface instance will have additionally
2542 * IAnjutaEditorCellStyle implemented.
2544 interface IAnjutaEditorCell
2546 #include <libanjuta/interfaces/ianjuta-editor.h>
2549 * ianjuta_editor_cell_get_character:
2550 * @obj: Self
2551 * @err: Error propagation and reporting
2553 * Returns the unicode character in this cell. A NULL terminated
2554 * string is returned that is the multibyte unicode character.
2555 * NULL is returned if the cell does not have any character.
2557 * Returns: a newly created string representing the cell's unicode
2558 * character.
2560 gchar *get_character ();
2563 * ianjuta_editor_cell_get_length:
2564 * @obj: self
2565 * @err: Error propagation and reporting.
2567 * Gets the length of the cell in bytes. That is, length of the
2568 * unicode character.
2570 * Returns: Length of the unicode character.
2572 gint get_length ();
2575 * ianjuta_editor_cell_get_char:
2576 * @obj: Self
2577 * @err: Error propagation and reporting
2579 * Returns the byte of the unicode character in this cell at given
2580 * index @char_index. @char_index can vary from 0 to length of the
2581 * unicode string minus 1. Out of range index is not allowed
2582 * (asserted) and return is undefined.
2584 * Since there is dynamic allocation of unicode character string
2585 * involved in ianjuta_editor_cell_get_character(), this function
2586 * is mainly useful for fast iteration (such as copying data).
2588 * Returns: a byte character.
2590 gchar get_char (gint char_index);
2592 IAnjutaEditorAttribute get_attribute ();
2595 * SECTION:ianjuta-editor-cell-style
2596 * @title: IAnjutaEditorCellStyle
2597 * @short_description: Text editor cell style interface
2598 * @see_also:
2599 * @stability: Unstable
2600 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2603 interface IAnjutaEditorCellStyle
2605 gchar* get_font_description ();
2606 gchar* get_color();
2607 gchar* get_background_color();
2612 * SECTION:ianjuta-editor-factory
2613 * @title: IAnjutaEditorFactory
2614 * @short_description: Text editor factory that creates IAnjutaEditor objects
2615 * @see_also:
2616 * @stability: Unstable
2617 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2620 interface IAnjutaEditorFactory
2622 #include "ianjuta-editor.h"
2623 #include <gio/gio.h>
2626 * ianjuta_editor_factory_new_editor:
2627 * @obj: Self
2628 * @file: file to open
2629 * @filename: filename to open
2630 * @err: Error propagation and reporting
2632 * Get a new GtkWidget* which implements IAnjutaEditor
2634 * Return value: An object implementing IAnjutaEditor
2636 IAnjutaEditor* new_editor (GFile* file, const gchar* filename);
2640 * SECTION:ianjuta-provider
2641 * @title: IAnjutaProvider
2642 * @short_description: Provider for autocompletion features
2643 * @see_also:
2644 * @stability: Unstable
2645 * @include: libanjuta/interfaces/ianjuta-provider.h
2647 interface IAnjutaProvider
2649 #include "ianjuta-iterable.h"
2652 * ianjuta_provider_populate:
2653 * @obj: Self
2654 * @iter: the text iter where the provider should be populated
2655 * @err: Error propagation and reporting.
2657 * Show completion for the context at position @iter. The provider should
2658 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2660 * Note that this is called after every character typed and the list of proposals
2661 * has to be completely renewed.
2663 void populate(IAnjutaIterable* iter);
2666 * ianjuta_provider_get_start_iter:
2667 * @obj: Self
2668 * @err: Error propagation and reporting.
2670 * Get the iter where the current completion started
2672 * Returns: (transfer none): current start iter
2674 IAnjutaIterable* get_start_iter();
2677 * ianjuta_provider_activate:
2678 * @obj: Self
2679 * @iter: position where the completion occurs
2680 * @data: data assigned to the proposal
2681 * @err: Error propagation and reporting.
2683 * Show completion for the context at position @iter
2685 void activate(IAnjutaIterable* iter, gpointer data);
2688 * ianjuta_provider_get_name:
2689 * @obj: Self
2691 * Return a (translatable) name for the provider
2693 const gchar* get_name();
2696 * SECTION:ianjuta-language-provider
2697 * @title: IAnjutaLanguageProvider
2698 * @short_description: Provider for autocompletion features
2699 * @see_also:
2700 * @stability: Unstable
2701 * @include: libanjuta/interfaces/ianjuta-language-provider.h
2703 interface IAnjutaLanguageProvider
2705 #include "ianjuta-editor.h"
2706 #include "ianjuta-iterable.h"
2707 #include "ianjuta-symbol.h"
2710 * IANJUTA_LANGUAGE_PROVIDER_PREF_CALLTIP_ENABLE
2712 * Boolean key, true is calltips has to be shown.
2714 #define PREF_CALLTIP_ENABLE "calltip-enable"
2717 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_ENABLE
2719 * Boolean key, true is code completion is enable.
2721 #define PREF_AUTOCOMPLETE_ENABLE "completion-enable"
2724 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC
2726 * Boolean key, true is adding a space after function call autocompletion
2728 #define PREF_AUTOCOMPLETE_SPACE_AFTER_FUNC "completion-space-after-func"
2731 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC
2733 * Boolean key, true is adding '(' after function call autocompletion
2735 #define PREF_AUTOCOMPLETE_BRACE_AFTER_FUNC "completion-brace-after-func"
2738 * IANJUTA_LANGUAGE_PROVIDER_PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC
2740 * Boolean key, true is adding ')' after function call autocompletion
2742 #define PREF_AUTOCOMPLETE_CLOSEBRACE_AFTER_FUNC "completion-closebrace-after-func"
2745 * ianjuta_language_provider_get_calltip_cache:
2746 * @obj: Self
2747 * @call_context: name of the method to show a calltip
2748 * @err: Error propagation
2750 * Searches for a calltip in the cache
2752 * Returns: (element-type utf8) (transfer container): tips for the
2753 * searched name of the method from the cache,
2754 * NULL if nothing found
2756 List<gchar*> get_calltip_cache (gchar* call_context);
2759 * ianjuta_language_provider_get_calltip_context:
2760 * @obj: Self
2761 * @iter: current cursor position
2762 * @err: Error propagation
2764 * Searches for a calltip context
2766 * Returns: name of the method to show a calltip for or NULL
2768 gchar* get_calltip_context (IAnjutaIterable* iter);
2771 * ianjuta_language_provider_new_calltip:
2772 * @obj: Self
2773 * @call_context: name of the method to create a new calltip
2774 * @iter: current cursor position
2775 * @err: Error propagation
2777 * Creates a new calltip
2779 void new_calltip (gchar* call_context, IAnjutaIterable* iter);
2782 * ianjuta_language_provider_populate_completions:
2783 * @obj: Self
2784 * @iter: the text iter where the provider should be populated
2785 * @err: Error propagation and reporting.
2787 * Show completion for the context at position @iter. The provider should
2788 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2790 * Note that this is called after every character typed and the list of proposals
2791 * has to be completely renewed.
2793 * Returns: (transfer full) (allow-none): the iter where the provider populated, NULL otherwise
2795 IAnjutaIterable* populate_completions (IAnjutaIterable* iter);
2800 * SECTION:ianjuta-document-manager
2801 * @title: IAnjutaDocumentManager
2802 * @short_description: Interface for plugin that manages all the editors
2803 * @see_also:
2804 * @stability: Unstable
2805 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2808 interface IAnjutaDocumentManager
2810 #include "ianjuta-document.h"
2811 #include "ianjuta-editor.h"
2812 #include <gio/gio.h>
2815 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT
2817 * Anjuta shell value set by document manager to the current document
2819 #define CURRENT_DOCUMENT "document_manager_current_document"
2821 enum Error
2823 DOESNT_EXIST
2827 * ianjuta_document_manager_get_file:
2828 * @obj: Self
2829 * @filename: short filename
2830 * @err: Error propagation and reporting.
2832 * Given the short filename, finds the file of the filename, if the
2833 * editor that has it loaded is found. If there is no editor that has
2834 * this file opened, returns NULL.
2836 * Return value: (transfer full): the GFile for the given short filename
2838 GFile* get_file (const gchar *filename);
2841 * ianjuta_document_manager_find_document_with_file:
2842 * @obj: Self
2843 * @file: The file to find.
2844 * @err: Error propagation and reporting.
2846 * Finds the document that has the file loaded. Only
2847 * the editor that matches the file will be searched.
2849 * Return value: (transfer none): the document that corresponds to given file. NULL if
2850 * there is no editor loaded with this file.
2852 IAnjutaDocument* find_document_with_file (GFile* file);
2855 * ianjuta_document_manager_goto_file_line:
2856 * @obj: Self
2857 * @file: file to go to.
2858 * @lineno: the line number in the file to go to.
2859 * @err: Error propagation and reporting.
2861 * Loads the given file if not loaded yet, set its editor as current editor
2862 * and moves cursor to the given line in the editor.
2864 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2866 IAnjutaEditor* goto_file_line (GFile* file, gint lineno);
2869 * ianjuta_document_manager_goto_file_line_mark:
2870 * @obj: Self
2871 * @file: file to go to.
2872 * @lineno: the line number in the file to go to.
2873 * @mark: TRUE if the line should be marked with a marker.
2874 * @err: Error propagation and reporting
2876 * Loads the given file if not loaded yet, set its editor as current editor
2877 * and moves cursor to the given line in the editor. Optionally also marks
2878 * the line with line marker if @mark is given TRUE.
2880 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2882 IAnjutaEditor* goto_file_line_mark (GFile* file, gint lineno, gboolean mark);
2885 * ianjuta_document_manager_get_current_document:
2886 * @obj: Self
2887 * @err: Error propagation and reporting.
2889 * Gets the current document.
2891 * Return value: (transfer none): the currently active document. NULL if none is there.
2893 IAnjutaDocument* get_current_document ();
2896 * ianjuta_document_manager_set_current_document:
2897 * @obj: Self
2898 * @document: the document to set as current.
2899 * @err: Error propagation and reporting.
2901 * Sets the given document as current document.
2903 void set_current_document (IAnjutaDocument *document);
2906 * ianjuta_document_manager_get_doc_widgets:
2907 * @obj: Self
2908 * @err: Error propagation and reporting.
2910 * Gets a list of widgets for open documents. Each widget is
2911 * a GTK_WIDGET(IAnjutaDocument*)
2913 * Return value: (element-type GtkWidget) (transfer container): a list of widgets for
2914 * all open documents. The returned list (but not the data in the list) must be
2915 * freed after use.
2917 List<GtkWidget*> get_doc_widgets ();
2920 * ianjuta_document_manager_add_buffer:
2921 * @obj: Self
2922 * @name: Name of the editor buffer.
2923 * @content: Initial content of the buffer.
2924 * @err: Error propagation and reporting.
2926 * Creates a new editor buffer of the given name and sets the given
2927 * content as its initial content.
2929 * Return value: (transfer full): the IAnjutaEditor instance that has been added.
2931 IAnjutaEditor* add_buffer (const gchar *name, const gchar* content);
2934 * ianjuta_document_manager_remove_document:
2935 * @obj: Self
2936 * @document: Document to close.
2937 * @save_before: If true, saves the document before closing.
2938 * @err: Error propagation and reporting.
2940 * Closes and removes the given document. If @save_before is TRUE, also
2941 * saves the document before closing.
2943 * Return value: TRUE if the document was removed, else FALSE.
2945 gboolean remove_document (IAnjutaDocument *document, gboolean save_before);
2948 * ianjuta_document_manager_add_document:
2949 * @obj: Self
2950 * @document: the document to add
2951 * @err: Error propagation and reporting.
2953 * Adds a document to the document manager. This will open a new
2954 * Notebook tab and show the document there
2957 void add_document (IAnjutaDocument* document);
2960 * ianjuta_document_manager_add_bookmark:
2961 * @obj: Self
2962 * @file: File to add the bookmark
2963 * @line: Line of the bookmark
2965 * Add a bookmark
2967 void add_bookmark (GFile* file, gint line);
2971 * SECTION:ianjuta-message-view
2972 * @title: IAnjutaMessageView
2973 * @short_description: A view where messages of different kind can be shown
2974 * @see_also:
2975 * @stability: Unstable
2976 * @include: libanjuta/interfaces/ianjuta-message-view.h
2979 interface IAnjutaMessageView
2982 * IAnjutaMessageViewType:
2983 * @IANJUTA_MESSAGE_VIEW_TYPE_NORMAL: Normal message
2984 * @IANJUTA_MESSAGE_VIEW_TYPE_INFO: Info message (highlighed)
2985 * @IANJUTA_MESSAGE_VIEW_TYPE_ERROR: Error message
2986 * @IANJUTA_MESSAGE_VIEW_TYPE_WARNING: Warning message
2988 * Speficy the type ot the message added to the message view
2990 enum Type
2992 TYPE_NORMAL,
2993 TYPE_INFO,
2994 TYPE_WARNING,
2995 TYPE_ERROR
2999 * IAnjutaMessageView::message-clicked:
3000 * @obj: Self
3001 * @message: text of the clicked message
3003 * Emitted when the user clicks on a message
3005 void ::message_clicked (const gchar *message);
3008 * IAnjutaMessageView::buffer-flushed:
3009 * @obj: Self
3010 * @line: the current line
3012 * Emitted when #ianjuta_message_view_buffer_append found a newline
3014 void ::buffer_flushed (const gchar *line);
3017 * ianjuta_message_view_buffer_append:
3018 * @obj: Self
3019 * @text: text to show as message
3020 * @err: Error propagation and reporting.
3022 * Appends the text in buffer. Flushes the buffer where a newline is found.
3023 * by emiiting buffer_flushed signal. The string is expected to be utf8.
3025 void buffer_append (const gchar *text);
3028 * ianjuta_message_view_append:
3029 * @obj: Self
3030 * @type: type of the message
3031 * @summary: summary of the message
3032 * @details: details of the message
3033 * @err: Error propagation and reporting.
3035 * Append the message with summary displayed and details displayed as tooltip
3037 void append (Type type, const gchar *summary, const gchar *details);
3040 * ianjuta_message_view_clear:
3041 * @obj: Self
3042 * @err: Error propagation and reporting.
3044 * Clear all messages in buffer
3046 void clear ();
3049 * ianjuta_message_view_select_next:
3050 * @obj: Self
3051 * @err: Error propagation and reporting.
3053 * Select next message (of type INFO, WARNING or ERROR)
3055 void select_next ();
3058 * ianjuta_message_view_select_previous:
3059 * @obj: Self
3060 * @err: Error propagation and reporting.
3062 * Select previous message
3064 void select_previous ();
3067 * ianjuta_message_view_get_current_message:
3068 * @obj: Self
3069 * @err: Error propagation and reporting.
3071 * Get the currently selected message
3073 const gchar* get_current_message ();
3076 * ianjuta_message_view_get_all_messages:
3077 * @obj: Self
3078 * @err: Error propagation and reporting.
3080 * Get a list of all messages. The list has to be freed
3081 * Returns: (element-type utf8):
3083 List<const gchar*> get_all_messages ();
3087 * SECTION:ianjuta-message-manager
3088 * @title: IAnjutaMessageManager
3089 * @short_description: The plugin that managers all message views
3090 * @see_also:
3091 * @stability: Unstable
3092 * @include: libanjuta/interfaces/ianjuta-message-manager.h
3095 interface IAnjutaMessageManager
3097 #include "ianjuta-message-view.h"
3098 #include <gdk/gdk.h>
3100 enum Error
3102 DOESNT_EXIST
3105 * ianjuta_message_manager_add_view:
3106 * @obj: Self
3107 * @name: Name/Title of the new view
3108 * @icon: Path to an icon or ""
3109 * @err: Error propagation and reporting
3111 * Adds a new view to the message-manager
3113 * Return value: The new message-view
3115 IAnjutaMessageView* add_view (const gchar *name, const gchar *icon);
3118 * ianjuta_message_manager_remove_view:
3119 * @obj: Self
3120 * @view: The view to remove
3121 * @err: Error propagation and reporting
3123 * Remove view from the message-manager. The view
3124 * will become invalid.
3126 void remove_view (IAnjutaMessageView *view);
3129 * ianjuta_message_manager_get_current_view:
3130 * @obj: Self
3131 * @err: Error propagation and reporting
3133 * Get the view with is currently on top of
3134 * the notebook or NULL if the message-manager is empty.
3136 * Return value: Current view; #IAnjutaMessageView object.
3137 * NULL, if there is no views.
3139 IAnjutaMessageView* get_current_view ();
3142 * ianjuta_message_manager_get_view_by_name:
3143 * @obj: Self
3144 * @name: Name/Title of the view
3145 * @err: Error propagation and reporting
3147 * Get the view with the given name or NULL if
3148 * it does not exist.
3150 * Return value: The message-view or NULL
3152 IAnjutaMessageView* get_view_by_name (const gchar *name);
3155 * ianjuta_message_manager_get_all_views:
3156 * @obj: Self
3157 * @err: Error propagation and reporting
3159 * Get all message-views
3161 * Return value: (element-type IAnjutaMessageView): A GList* of all views. You must not
3162 * manipulate the list.
3164 List<IAnjutaMessageView*> get_all_views ();
3167 * ianjuta_message_manager_set_current_view:
3168 * @obj: Self
3169 * @view: A message view
3170 * @err: Error propagation and reporting
3172 * Set view to be on top of the notebook.
3175 void set_current_view (IAnjutaMessageView *view);
3178 * ianjuta_message_manager_set_view_title:
3179 * @obj: Self
3180 * @view: A message view
3181 * @title: Sets the title of view.
3182 * @err: Error propagation and reporting
3184 * Sets the title of view.
3187 void set_view_title (IAnjutaMessageView *view, const gchar *title);
3190 * ianjuta_message_manager_set_view_icon:
3191 * @obj: Self
3192 * @view: A message view
3193 * @icon: Sets the icon of view.
3194 * @err: Error propagation and reporting
3196 * Sets the icon of view.
3199 void set_view_icon (IAnjutaMessageView *view, GdkPixbufAnimation *icon);
3202 * ianjuta_message_manager_set_view_icon_from_stock:
3203 * @obj: Self
3204 * @view: A message view
3205 * @icon: Sets the icon of view.
3206 * @err: Error propagation and reporting
3208 * Sets the icon of view.
3211 void set_view_icon_from_stock (IAnjutaMessageView *view, const gchar *icon);
3215 * SECTION:ianjuta-file-manager
3216 * @title: IAnjutaFileManager
3217 * @short_description: File manager plugin
3218 * @see_also:
3219 * @stability: Unstable
3220 * @include: libanjuta/interfaces/ianjuta-file-manager.h
3223 interface IAnjutaFileManager
3225 #include <gio/gio.h>
3228 * IANJUTA_FILE_MANAGER_SELECTED_FILE
3230 * Anjuta shell value set by file manager to the selected file.
3232 #define SELECTED_FILE "file_manager_selected_file"
3235 * IAnjutaFileManager::section-changed:
3236 * @obj: Self
3237 * @err: Error propagation and reporting.
3239 * fixme
3241 void ::section_changed (GFile* file);
3244 * ianjuta_file_manager_set_root:
3245 * @obj: Self
3246 * @root_uri: fixme
3247 * @err: Error propagation and reporting.
3249 * fixme
3251 void set_root (const gchar *root_uri);
3254 * ianjuta_file_manager_get_selected:
3255 * @obj: Self
3256 * @err: Error propagation and reporting.
3258 * fixme
3260 GFile* get_selected ();
3263 * ianjuta_file_manager_set_selected:
3264 * @obj: Self
3265 * @file: File to select
3266 * @err: Error propagation and reporting.
3268 * fixme.
3270 void set_selected (GFile* file);
3274 * SECTION:ianjuta-terminal
3275 * @title: IAnjutaTerminal
3276 * @short_description: Interface for command line terminals
3277 * @see_also:
3278 * @stability: Unstable
3279 * @include: libanjuta/interfaces/ianjuta-terminal.h
3282 interface IAnjutaTerminal
3284 #include <sys/types.h>
3287 * IAnjutaTerminal::child_exited:
3288 * @obj: Self
3289 * @pid: pid of terminated child
3290 * @status: status of terminated child as returned by waitpid
3292 * This signal is emitted when a child exit.
3294 void ::child_exited (gint pid, gint status);
3298 * ianjuta_terminal_execute_command:
3299 * @obj: Self
3300 * @directory: Working directory
3301 * @command: Command executed followed by arguments
3302 * @environment: List of additional environment variables
3303 * @err: Error propagation and reporting.
3305 * Run the command in a terminal, setting the working directory
3306 * and environment variables.
3308 * Returns: Process ID
3310 pid_t execute_command (const gchar* directory, const gchar *command, gchar **environment);
3314 * SECTION:ianjuta-project
3315 * @title: IAnjutaProject
3316 * @short_description: Interface implemented by project backend
3317 * @see_also:
3318 * @stability: Unstable
3319 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3321 * This is the new interface that is replacing Gnome Build.
3323 interface IAnjutaProject
3325 #include <libanjuta/anjuta-project.h>
3326 #include <gtk/gtk.h>
3328 /* Types */
3329 enum Error
3331 ERROR_SUCCESS = 0,
3332 ERROR_DOESNT_EXIST,
3333 ERROR_ALREADY_EXISTS,
3334 ERROR_VALIDATION_FAILED,
3335 ERROR_PROJECT_MALFORMED,
3336 ERROR_WRONG_PARENT,
3337 ERROR_NOT_SUPPORTED,
3338 ERROR_GENERAL_FAILURE
3341 enum Probe
3342 PROBE_FILES = 10,
3343 PROBE_MAKE_FILES = 100,
3344 PROBE_PROJECT_FILES = 200
3347 /* Signals */
3350 * IAnjutaProject::file-changed:
3351 * @obj: Self
3352 * @node: Node to be reloaded.
3354 * This signal is emitted when the project is changed on the disk. The
3355 * corresponding node has to be reloaded.
3357 void ::file_changed (gpointer node);
3360 * IAnjutaProject::node-changed:
3361 * @obj: Self
3362 * @node: Changed node.
3363 * @error: Error while changing node
3365 * This signal is emitted when a node is changed by a function of this
3366 * interface. The error argument is not NULL if the change was not
3367 * possible. The corresponding node need to be saved.
3369 void ::node_changed (gpointer node, GError *error);
3372 * IAnjutaProject::node-saved:
3373 * @obj: Self
3374 * @node: Saved node.
3375 * @error: Error while saving node
3377 * This signal is emitted when a node is saved. It returns an error if the
3378 * save operation fail.
3380 void ::node_saved (gpointer node, GError *error);
3383 * IAnjutaProject::node-loaded:
3384 * @obj: Self
3385 * @node: Loaded node.
3386 * @error: Error while loading node
3388 * This signal is emitted when a node is loaded. It returns an error if the
3389 * load operation fail.
3391 void ::node_loaded (gpointer node, GError *error);
3395 * ianjuta_project_load_node:
3396 * @obj: Self
3397 * @node: (transfer none): Project node to reload
3398 * @err: Error propagation and reporting
3400 * Reload a project node
3402 * Return value: TRUE if the node has been loaded without error
3404 gboolean load_node (AnjutaProjectNode *node);
3407 * ianjuta_project_save_node:
3408 * @obj: Self
3409 * @node: (transfer none): Project node to save
3410 * @err: Error propagation and reporting
3412 * Save a project node
3414 * Return value: TRUE if the node has been saved without error
3416 gboolean save_node (AnjutaProjectNode *node);
3419 * ianjuta_project_add_node_after:
3420 * @obj: Self
3421 * @parent: (transfer none): Parent
3422 * @sibling: (allow-none) (transfer none): Sibling
3423 * @type: Node type
3424 * @file: (allow-none) (transfer none): Optional file object for the node
3425 * @name: (allow-none) (transfer none): Optional name for the node
3426 * @err: Error propagation and reporting
3428 * Create a new node and insert it after sibling
3430 * Return value: (transfer none): The new node, NULL if error
3432 AnjutaProjectNode *add_node_after (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, const gchar *name);
3435 * ianjuta_project_add_node_before:
3436 * @obj: Self
3437 * @parent: (transfer none): Parent
3438 * @sibling: (allow-none) (transfer none): Sibling
3439 * @type: Node type
3440 * @file: (allow-none) (transfer none): Optional file object for the node
3441 * @name: (allow-none) (transfer none): Optional name for the node
3442 * @err: Error propagation and reporting
3444 * Create a new node and insert it before sibling
3446 * Return value: (transfer none): The new node, NULL if error
3448 AnjutaProjectNode *add_node_before (AnjutaProjectNode *parent, AnjutaProjectNode *sibling, AnjutaProjectNodeType type, GFile *file, const gchar *name);
3451 * ianjuta_project_remove_node:
3452 * @obj: Self
3453 * @node: (transfer none): Node
3454 * @err: Error propagation and reporting
3456 * Remove a node
3458 * Return value: TRUE if the node can be removed
3460 gboolean remove_node (AnjutaProjectNode *node);
3463 * ianjuta_project_set_property:
3464 * @obj: Self
3465 * @node: (transfer none): Node
3466 * @id: (transfer none): Property
3467 * @name: (allow-none) (transfer none): Name for map property
3468 * @value: (transfer none): Value
3469 * @err: Error propagation and reporting
3471 * Change a properties on node.
3473 * Return value: (allow-none) (transfer none): The new property of NULL if the property cannot be set
3475 AnjutaProjectProperty *set_property (AnjutaProjectNode *parent, const gchar *id, const gchar *name, const gchar *value);
3478 * ianjuta_project_remove_property:
3479 * @obj: Self
3480 * @node: (transfer none): Node
3481 * @id: (transfer none): Property
3482 * @name: (allow-none) (transfer none): Name for map property
3483 * @err: Error propagation and reporting
3485 * Remove a property of the node
3487 * Return value: TRUE if the node is removed
3489 gboolean remove_property (AnjutaProjectNode *node, const gchar *id, const gchar *name);
3492 * ianjuta_project_get_root:
3493 * @obj: Self
3494 * @err: Error propagation and reporting
3496 * Get root_node
3498 * Return value: (transfer none): The root node
3500 AnjutaProjectNode *get_root ();
3503 * ianjuta_project_get_node_info:
3504 * @obj: Self
3505 * @err: Error propagation and reporting
3507 * Return a list of possible node;
3509 * Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): A list
3510 * containing information on all node supported by the project.
3512 const List<AnjutaProjectNodeInfo *> get_node_info();
3515 * ianjuta_project_is_loaded:
3516 * @obj: Self
3517 * @err: Error propagation and reporting
3519 * Return TRUE if the project is loaded;
3521 * Return value: TRUE if the project is completely loaded.
3523 gboolean is_loaded ();
3527 * SECTION:ianjuta-project-backend
3528 * @title: IAnjutaProjectBackend
3529 * @short_description: Interface for creating new project
3530 * @see_also:
3531 * @stability: Unstable
3532 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3535 interface IAnjutaProjectBackend
3537 #include "ianjuta-project.h"
3540 * ianjuta_project_backend_new_project:
3541 * @obj: Self
3542 * @file: (transfer none): Project file or directory
3543 * @err: Error propagation and reporting
3545 * Create a new Anjuta project.
3547 * Return value: (transfer full): An object implementing the
3548 * #IAnjutaProject interface.
3550 IAnjutaProject* new_project (GFile *file);
3554 * ianjuta_project_backend_probe:
3555 * @obj: Self
3556 * @file: (transfer none): Project file or directory
3557 * @err: Error propagation and reporting
3559 * Check if the directory contains a project supported by this
3560 * backend.
3562 * Return value: 0 if the project is invalid and > 0 if the project is
3563 * valid.
3565 gint probe (GFile *directory);
3569 * SECTION:ianjuta-project-manager
3570 * @title: IAnjutaProjectManager
3571 * @short_description: Interface for project managers
3572 * @see_also:
3573 * @stability: Unstable
3574 * @include: libanjuta/interfaces/ianjuta-project-manager.h
3577 interface IAnjutaProjectManager
3580 #include <libanjuta/anjuta-project.h>
3581 #include <libanjuta/interfaces/ianjuta-project.h>
3584 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI
3586 * Anjuta shell value set by project manager to the project root uri.
3588 #define PROJECT_ROOT_URI "project_root_uri"
3591 * IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT
3593 * Anjuta shell value set by project manager to the current project object
3594 * which implement #IAnjutaProject interface.
3596 #define CURRENT_PROJECT "project_manager_current_project"
3599 * IANJUTA_PROJECT_MANAGER_CURRENT_URI
3601 * Anjuta shell value set by project manager to the current uri.
3603 #define CURRENT_URI "project_manager_current_uri"
3605 // Signals
3608 * IAnjutaProjectManager::project_loaded:
3609 * @obj: Self
3610 * @err: Error propagation and reporting.
3612 * Emitted when the project is fully loaded. It can takes a quite long
3613 * time if the project is big. The project is loaded in several parts
3614 * in a thread. All functions are available before having the project
3615 * fully loaded.
3617 void ::project_loaded (GError *error);
3620 * IAnjutaProjectManager::element_added:
3621 * @obj: Self
3622 * @element: A #GFile corrresponding to added element
3623 * @err: Error propagation and reporting.
3625 * Emitted when a new element is added to the project. It can be
3626 * a source, a target or a group. It does not always correspond
3627 * to an existing file. This signal can be emitted several time for
3628 * the same element.
3630 void ::element_added (GFile *element);
3633 * IAnjutaProjectManager::element_removed:
3634 * @obj: Self
3635 * @element: A #GFile corresponding to removed element
3636 * @err: Error propagation and reporting.
3638 * Emitted when an element is removed from a project. It can be
3639 * a source, a target or a group.
3641 void ::element_removed (GFile *element);
3644 * IAnjutaProjectManager::element_selected:
3645 * @obj: Self
3646 * @element_uri: A #GFile corresponding to selected element
3647 * @err: Error propagation and reporting.
3649 * Emitted when an element is selected in the project view. It
3650 * can be a source, a target or a group.
3652 void ::element_selected (GFile *element);
3654 // Methods
3657 * ianjuta_project_manager_get_elements:
3658 * @obj: Self
3659 * @element_type: Select one element type: source, group or target
3660 * @err: Error propagation and reporting.
3662 * Get a list of all elements of this type in the project.
3664 * Returns: (element-type GFile) (transfer full): Get list of #GFile corresponding to
3665 * all valid elements or %NULL if there are no elements of this type. Free the returned
3666 * list with g_list_free() and the files with g_object_unref().
3668 List<GFile *> get_elements (AnjutaProjectNodeType element_type);
3671 * ianjuta_project_manager_get_target_type:
3672 * @obj: Self
3673 * @target: A #GFile corresponding to a target
3674 * @err: Error propagation and reporting.
3676 * Get the type of the corresponding target: program, library...
3678 * Returns: Return the type of the target.
3680 AnjutaProjectNodeType get_target_type (GFile *target);
3683 * ianjuta_project_manager_get_targets:
3684 * @obj: Self
3685 * @target_type: type of the target
3686 * @err: Error propagation and reporting.
3688 * Get a list of targets in the project with the corresponding type.
3690 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to
3691 * each target of the requested type or %NULL if none exists. Free the returned list
3692 * with g_list_free() and the files with g_object_unref().
3694 List<GFile *> get_targets (AnjutaProjectNodeType target_type);
3697 * ianjuta_project_manager_get_parent:
3698 * @obj: Self
3699 * @element: A #GFile corresponding to one child.
3700 * @err: Error propagation and reporting.
3702 * Gets the parent of the corresponding child.
3704 * Returns: The parent of the child, or %NULL if the element is the root.
3706 GFile* get_parent (GFile *element);
3709 * ianjuta_project_manager_get_children:
3710 * @obj: Self
3711 * @parent: A #GFile corresponding to the parent.
3712 * @children_type: Select one element type: source, group or target
3713 * @err: Error propagation and reporting.
3715 * Recursively gets the list of all children below the corresponding
3716 * parent having the specify type.
3718 * Returns: (element-type GFile) (transfer full): The list of #GFile
3719 * corresponding to all children or %NULL if the element has no
3720 * children with the corresponding type. Free the returned * list
3721 * with g_list_free() and the files with g_object_unref().
3723 List<GFile*> get_children (GFile *parent, gint children_type);
3726 * ianjuta_project_manager_get_selected:
3727 * @obj: Self
3728 * @err: Error propagation and reporting.
3730 * Gets the currently selected element in the project manager view.
3732 * Returns: (transfer full): A #GFile corresponding to the selected element in the project
3733 * view. You own the returned file; use g_object_unref() to release it.
3735 GFile* get_selected ();
3738 * ianjuta_project_manager_get_capabilities:
3739 * @obj: Self
3740 * @err: Error propagation and reporting.
3742 * Gets the capabilites of project whether it can add group, target
3743 * sources etc.
3745 * Returns: Supported capabilites.
3747 guint get_capabilities ();
3750 * ianjuta_project_manager_add_source:
3751 * @obj: Self.
3752 * @name: Source name or URI.
3753 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3754 * %NULL if you don't care.
3755 * @err: Error propagation and reporting.
3757 * Prompts the user to add a file to the project. If the user selects
3758 * multiple files only the first source file is returned.
3760 * You can add non existing file. In this case the element_added
3761 * signal will be emitted with a non existing file. So it is
3762 * up to the caller to reemit this signal later when the file
3763 * is created.
3765 * Returns: (transfer full): A #GFile corresponding to the new source file in the
3766 * project view. You own the returned file; use g_object_unref() to release it.
3768 GFile* add_source (const gchar *name, GFile *default_target);
3771 * ianjuta_project_manager_add_source_quiet:
3772 * @obj: Self.
3773 * @name: Source name or URI.
3774 * @target: A #GFile corresponding to the parent target or group.
3775 * @err: Error propagation and reporting.
3777 * Adds a file to the project without prompting the user.
3779 * You can add non existing file. In this case the element_added
3780 * signal will be emitted with a non existing file. So it is
3781 * up to the caller to reemit this signal later when the file
3782 * is created.
3784 * Returns: (transfer full): A #GFile corresponding to the new source file in the project
3785 * view. You own the returned file; use g_object_unref() to release it.
3787 GFile* add_source_quiet (const gchar *name, GFile *target);
3790 * ianjuta_project_manager_add_sources:
3791 * @obj: Self.
3792 * @names: (element-type utf8): Sources name or URI to add.
3793 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3794 * %NULL if don't care.
3795 * @err: Error propagation and reporting.
3797 * Prompts the user to add several files to the project. Depending on the
3798 * project backend, it can be possible that the source files must
3799 * be located in a particular directory.
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: (element-type GFile) (transfer full): A list of #GFile corresponding to all
3807 * new source files added in the project. You own the list with the the returned files;
3808 * use g_list_free() and g_object_unref() on each file to release them.
3810 List<GFile*> add_sources (List<const gchar*> names, GFile *default_target);
3813 * ianjuta_project_manager_add_target:
3814 * @obj: Self
3815 * @name: Target name or URI.
3816 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3817 * %NULL if don't care.
3818 * @err: Error propagation and reporting.
3820 * Prompts the user to add a new target to the project. The user can select
3821 * a parent group different from the one set as default.
3823 * Returns: (transfer full): A #GFile corresponding to the new target added in the project.
3824 * You own the returned file; use g_object_unref() to release it.
3826 GFile* add_target (const gchar *name, GFile *default_group);
3829 * ianjuta_project_manager_add_group:
3830 * @obj: Self.
3831 * @name: Group name or URI.
3832 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3833 * %NULL if don't care.
3834 * @err: Error propagation and reporting.
3836 * Prompts the user to add a new group to the project. The user can select
3837 * a parent group different from the one set as default.
3839 * Returns: (transfer full): A #GFile corresponding to the new group added in the project.
3840 * You own the returned file; use g_object_unref() to release it.
3842 GFile* add_group (const gchar *name, GFile *default_group);
3845 * ianjuta_project_manager_is_open:
3846 * @obj: Self
3847 * @err: Error propagation and reporting.
3849 * Gets whether a project is currently opened.
3851 * Returns: %TRUE if a project is opened.
3853 gboolean is_open ();
3856 * ianjuta_project_manager_get_packages:
3857 * @obj: Self
3858 * @err: Error propagation and reporting.
3860 * Returns: (element-type utf8) (transfer container): the list of pkg-config packages that the current project
3861 * requires in it's configure.ac. Can be NULL if there is no project
3862 * opened currently or no package is required.
3864 List<gchar*> get_packages();
3867 * ianjuta_project_manager_get_current_project:
3868 * @obj: Self
3869 * @err: Error propagation and reporting.
3871 * Gets the current project.
3873 * Return value: (transfer none): the currently active project. NULL if none is there.
3875 IAnjutaProject* get_current_project ();
3879 * SECTION:ianjuta-project-chooser
3880 * @title: IAnjutaProjectChooser
3881 * @short_description: Interface for selecting project node
3882 * @see_also:
3883 * @stability: Unstable
3884 * @include: libanjuta/interfaces/ianjuta-project-chooser.h
3887 interface IAnjutaProjectChooser
3890 #include <libanjuta/anjuta-project.h>
3891 #include <libanjuta/interfaces/ianjuta-project-manager.h>
3893 // Signals
3896 * IAnjutaProjectChooser::changed:
3897 * @obj: Self
3899 * Emitted when the selected node is changed.
3901 void ::changed ();
3903 // Methods
3906 * ianjuta_project_chooser_set_project_model:
3907 * @obj: Self
3908 * @manager: A project manager
3909 * @child_type: Select one element type: source, group or target
3910 * @err: Error propagation and reporting.
3912 * Initialize a project chooser button allowing to select a parent node
3913 * where you can add the nodes of type child_type.
3914 * As special cases with
3915 * <variablelist>
3916 * <varlistentry>
3917 * <term>ANJUTA_PROJECT_ROOT</term>
3918 * <listitem><para>all nodes are included</para></listitem>
3919 * </varlistentry>
3920 * <varlistentry>
3921 * <term>ANJUTA_PROJECT_MODULE</term>
3922 * <listitem><para>only modules are included, this can be used
3923 * to add a new package. While ANJUTA_PROJECT_PACKAGE allows you
3924 * to select a target using a package.</para></listitem>
3925 * </varlistentry>
3926 * </variablelist>
3928 * Returns: TRUE if sucessful, other FALSE.
3930 gboolean set_project_model (IAnjutaProjectManager *manager, AnjutaProjectNodeType child_type);
3934 * ianjuta_project_chooser_get_selected:
3935 * @obj: Self
3936 * @err: Error propagation and reporting.
3938 * Gets the currently selected element in the project chooser.
3940 * Returns: (transfer none): A #GFile corresponding to the selected
3941 * element in the project view or %NULL if no valid node is selected.
3942 * The file is owned by the widget If you want to keep a pointer to
3943 * the file you must add a refcount using g_object_ref().
3945 GFile* get_selected ();
3950 * SECTION:ianjuta-todo
3951 * @title: IAnjutaTodo
3952 * @short_description: Task manager interface
3953 * @see_also:
3954 * @stability: Unstable
3955 * @include: libanjuta/interfaces/ianjuta-todo.h
3958 interface IAnjutaTodo
3960 #include <gio/gio.h>
3962 * ianjuta_to_do_load:
3963 * @obj: Self
3964 * @file: fixme
3965 * @err: Error propagation and reporting.
3967 * fixme
3969 void load(GFile *file);
3973 * SECTION:ianjuta-wizard
3974 * @title: IAnjutaWizard
3975 * @short_description: Interface for wizards that can create new stuffs
3976 * @see_also:
3977 * @stability: Unstable
3978 * @include: libanjuta/interfaces/ianjuta-wizard.h
3981 interface IAnjutaWizard
3985 * ianjuta_wizard_activate:
3986 * @obj: Self
3987 * @err: Error propagation and reporting.
3989 * Called when the wizard should start after some user action
3991 void activate();
3995 * SECTION:ianjuta-debugger
3996 * @title: IAnjutaDebugger
3997 * @short_description: Debugger interface
3998 * @see_also: #IAnjutaDebugManager
3999 * @stability: Unstable
4000 * @include: libanjuta/interfaces/ianjuta-debugger.h
4002 * This interface is implemented by debugger backends, by example the gdb
4003 * backend. It is used by the debug manager plugin which provides the
4004 * graphical interface and a simple wrapper: #IAnjutaDebugManager.
4006 * The debugger is in one on these 5 states and emit a signal to the debug
4007 * manager when it changes. Here is figure showing all transitions and
4008 * the signal emitted.
4009 * <figure id="debugger-states">
4010 * <mediaobject>
4011 * <imageobject>
4012 * <imagedata fileref="debugger-states.png" format="PNG"/>
4013 * </imageobject>
4014 * </mediaobject>
4015 * </figure>
4018 interface IAnjutaDebugger
4020 #include "ianjuta-message-view.h"
4021 #include <sys/types.h>
4022 #include <gio/gio.h>
4024 /* Types */
4026 * IAnjutaDebuggerError:
4027 * @IANJUTA_DEBUGGER_OK: No error
4028 * @IANJUTA_DEBUGGER_NOT_READY: Debugger is not ready to execute the command
4029 * @IANJUTA_DEBUGGER_NOT_RUNNING: Debugger is not is running state
4030 * @IANJUTA_DEBUGGER_NOT_STOPPED: Debugger is not is stopped state
4031 * @IANJUTA_DEBUGGER_NOT_LOADED: Debugger is not is loaded state
4032 * @IANJUTA_DEBUGGER_NOT_STARTED: Debugger is not in started state
4033 * @IANJUTA_DEBUGGER_NOT_CONNECTED: Debugger is not connected:
4034 * @IANJUTA_DEBUGGER_NOT_IMPLEMENTED: Corresponding function is not implemented
4035 * @IANJUTA_DEBUGGER_CANCEL: Operation has been cancelled
4036 * @IANJUTA_DEBUGGER_UNABLE_TO_CREATE_VARIABLE: Debugger cannot create variable
4037 * @IANJUTA_DEBUGGER_UNABLE_TO_ACCESS_MEMORY: Debugger cannot access memory
4038 * @IANJUTA_DEBUGGER_UNABLE_TO_OPEN_FILE: Debugger cannot open file
4039 * @IANJUTA_DEBUGGER_UNSUPPORTED_FILE_TYPE: Debugger cannot debug such file
4040 * @IANJUTA_DEBUGGER_UNSUPPORTED_VERSION: Debugger is too old
4041 * @IANJUTA_DEBUGGER_UNABLE_TO_FIND_DEBUGGER: Debugger cannot be found
4042 * @IANJUTA_DEBUGGER_ALREADY_DONE: Command has already been executed
4043 * @IANJUTA_DEBUGGER_PROGRAM_NOT_FOUND: Program cannot be found
4044 * @IANJUTA_DEBUGGER_UNABLE_TO_CONNECT: Unable to connect to debugger
4045 * @IANJUTA_DEBUGGER_UNKNOWN_ERROR: Unknown error
4046 * @IANJUTA_DEBUGGER_OTHER_ERROR: other error
4048 * This enumeration is used to defined the error returned by the debugger
4049 * backend.
4051 enum Error
4053 OK = 0,
4054 NOT_READY,
4055 NOT_RUNNING,
4056 NOT_STOPPED,
4057 NOT_LOADED,
4058 NOT_STARTED,
4059 NOT_CONNECTED,
4060 NOT_IMPLEMENTED,
4061 CANCEL,
4062 UNABLE_TO_CREATE_VARIABLE,
4063 UNABLE_TO_ACCESS_MEMORY,
4064 UNABLE_TO_OPEN_FILE,
4065 UNSUPPORTED_FILE_TYPE,
4066 UNSUPPORTED_VERSION,
4067 UNABLE_TO_FIND_DEBUGGER,
4068 ALREADY_DONE,
4069 PROGRAM_NOT_FOUND,
4070 UNABLE_TO_CONNECT,
4071 UNKNOWN_ERROR,
4072 OTHER_ERROR
4076 * IAnjutaDebuggerOutputType:
4077 * @IANJUTA_DEBUGGER_OUTPUT: Output from debugger
4078 * @IANJUTA_DEBUGGER_WARNING_OUTPUT: Warning from debugger
4079 * @IANJUTA_DEBUGGER_ERROR_OUTPUT: Error from debugger
4080 * @IANJUTA_DEBUGGER_INFO_OUTPUT: Additional message from debugger
4082 * This enumeration is used to defined the kind of output in
4083 * #IAnjutaDebuggerOutputCallback
4085 enum OutputType
4087 OUTPUT,
4088 WARNING_OUTPUT,
4089 ERROR_OUTPUT,
4090 INFO_OUTPUT
4094 * IAnjutaDebuggerState:
4095 * @IANJUTA_DEBUGGER_BUSY: Debugger is executing a command, it can enter in another
4096 * at the end of the command.
4097 * @IANJUTA_DEBUGGER_STOPPED: Debugger is stopped.
4098 * @IANJUTA_DEBUGGER_STARTED: Debugger is started but no program is loaded.
4099 * @IANJUTA_DEBUGGER_PROGRAM_LOADED: Debugger is started and has a program loaded.
4100 * @IANJUTA_DEBUGGER_PROGRAM_STOPPED: Debugger is started and has a program stopped.
4101 * @IANJUTA_DEBUGGER_PROGRAM_RUNNING: Debugger is started and has a program running.
4103 * This enumeration is used to defined the different state of the debugger.
4105 enum State
4107 BUSY,
4108 STOPPED,
4109 STARTED,
4110 PROGRAM_LOADED,
4111 PROGRAM_STOPPED,
4112 PROGRAM_RUNNING
4116 * IAnjutaDebuggerFrame:
4117 * @thread: Thread identifier.
4118 * @level: Level of the frame, 0 is the topmost one.
4119 * @args: List of argument of the caller.
4120 * @file: Source file name where is the program counter.
4121 * @line: Line number in the file above.
4122 * @function: Function name where is the program counter.
4123 * @library: Library name where is the program counter.
4124 * @address: Address of the program counter.
4126 * This structure keeps all information about a stack frame.
4128 struct Frame
4130 gint thread;
4131 guint level;
4132 gchar *args;
4133 gchar *file;
4134 guint line;
4135 gchar *function;
4136 gchar *library;
4137 gulong address;
4141 * IAnjutaDebuggerCallback:
4142 * @data: data
4143 * @user_data: user data passed to the function
4144 * @error: error
4146 * This callback function is used only by #ianjuta_debugger_callback with a
4147 * NULL data.
4149 typedef void (*Callback) (const gpointer data, gpointer user_data, GError* err);
4152 * IAnjutaDebuggerGListCallback:
4153 * @list: (element-type any): list of data
4154 * @user_data: user data passed to the function
4155 * @error: error
4157 * This callback function is used by several debugger functions. Depending on
4158 * the function, the kind of elements in the list is different. It is a string
4159 * for #ianjuta_debugger_list_local or a #IAnjutaDebuggerFrame for
4160 * #ianjuta_debugger_list_frame.
4162 typedef void (*GListCallback) (const GList* list, gpointer user_data, GError* err);
4165 * IAnjutaDebuggerGCharCallback:
4166 * @data: string
4167 * @user_data: user data
4168 * @error: error
4170 * This callback function is used by several debugger functions. The data is
4171 * a string
4173 typedef void (*GCharCallback) (const gchar *value, gpointer user_data, GError* err);
4176 * IAnjutaDebuggerOutputCallback:
4177 * @data: Self
4178 * @user_data: user data
4179 * @error: error
4181 * This callback function is used only by #ianjuta_debugger_callback with a
4182 * NULL data.
4184 typedef void (*OutputCallback) (OutputType type, const gchar *output, gpointer user_data);
4186 /* Signals */
4189 * IAnjutaDebugger::debugger_started:
4190 * @obj: Self
4192 * This signal is emitted when the debugger is started.
4194 void ::debugger_started ();
4197 * IAnjutaDebugger::debugger_stopped:
4198 * @obj: Self
4199 * @err: Error propagation and reporting.
4201 * This signal is emitted when the debugger is stopped. The error
4202 * parameters allow to check it has run correctly.
4204 void ::debugger_stopped (GError *err);
4207 * IAnjutaDebugger::program_loaded:
4208 * @obj: Self
4210 * This signal is emitted when a program is loaded.
4212 void ::program_loaded ();
4215 * IAnjutaDebugger::program_running:
4216 * @obj: Self
4218 * This signal is emitted when the program is running.
4220 void ::program_running ();
4223 * IAnjutaDebugger::program_stopped:
4224 * @obj: Self
4226 * This signal is emitted when the program is interrupted.
4228 void ::program_stopped ();
4231 * IAnjutaDebugger::program_exited:
4232 * @obj: Self
4234 * This signal is emitted when the program exits.
4236 void ::program_exited ();
4239 * IAnjutaDebugger::sharedlib_event:
4240 * @obj: Self
4242 * This signal is emitted when the program load a new shared
4243 * library.
4245 void ::sharedlib_event ();
4248 * IAnjutaDebugger::program_moved:
4249 * @obj: Self
4250 * @pid: process id, 0 when unknown
4251 * @tid: thread id, 0 when unknown
4252 * @address: program counter address, 0 when unknown
4253 * @file: source file where is the program counter, NULL when unknown
4254 * @line: line number if file name above is not NULL
4256 * This signal is emitted when the debugger know the current program
4257 * location. Most of the time, after the program has stopped but it
4258 * could happen even if it is still running.
4260 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
4263 * IAnjutaDebugger::frame_changed:
4264 * @obj: Self
4265 * @frame: frame number
4266 * @thread: thread number
4268 * This signal is emitted when the current frame changes.
4270 void ::frame_changed (guint frame, gint thread);
4273 * IAnjutaDebugger::signal_received:
4274 * @obj: Self
4275 * @name: Signal name
4276 * @description: Signal description
4278 * This signal is emitted when the program received a unix signal.
4280 void ::signal_received (const gchar* name, const gchar* description);
4283 * IAnjutaDebugger::debugger_ready:
4284 * @obj: Self
4285 * @state: debugger status
4287 * This signal is emitted when the debugger is ready to execute
4288 * a new command.
4290 void ::debugger_ready (State state);
4294 * ianjuta_debugger_get_state:
4295 * @obj: Self
4296 * @err: Error propagation and reporting.
4298 * Get the current state of the debugger
4300 * Returns: The current debugger state.
4302 State get_state ();
4308 * ianjuta_debugger_load:
4309 * @obj: Self
4310 * @file: filename
4311 * @mime_type: mime type of the file
4312 * @source_search_directories: (element-type utf8): List of directories to search for
4313 * source files.
4314 * @err: Error propagation and reporting.
4316 * Load a program in the debugger.
4318 * Returns: TRUE if sucessful, other FALSE.
4320 gboolean load (const gchar *file, const gchar *mime_type, const List<const gchar*> source_search_directories);
4323 * ianjuta_debugger_attach:
4324 * @obj: Self
4325 * @pid: pid of the process to debug
4326 * @source_search_directories: (element-type utf8): List of directories to search for
4327 * source files.
4328 * @err: Error propagation and reporting.
4330 * Attach to an already running process.
4332 * Returns: TRUE if sucessful, other FALSE.
4334 gboolean attach (pid_t pid, const List<const gchar*> source_search_directories);
4337 * ianjuta_debugger_set_working_directory:
4338 * @obj: Self
4339 * @dir: working program directory
4340 * @err: Error propagation and reporting.
4342 * Set program working directory.
4344 * Returns: TRUE if sucessful, other FALSE.
4346 gboolean set_working_directory (const gchar *dir);
4349 * ianjuta_debugger_set_environment:
4350 * @obj: Self
4351 * @env: List environment variable
4352 * @err: Error propagation and reporting
4354 * Set environment variable
4356 * Returns: TRUE if sucessfull, other FALSE.
4358 gboolean set_environment (gchar **env);
4361 * ianjuta_debugger_start:
4362 * @obj: Self
4363 * @args: command line argument of the program
4364 * @terminal: TRUE if the program need a terminal
4365 * @stop: TRUE if program is stopped at the beginning
4366 * @err: Error propagation and reporting.
4368 * Start a loaded program under debugger control.
4370 * Returns: TRUE if sucessful, other FALSE.
4372 gboolean start (const gchar *args, gboolean terminal, gboolean stop);
4375 * ianjuta_debugger_connect:
4376 * @obj: Self
4377 * @server: remote server
4378 * @args: command line argument of the program
4379 * @terminal: TRUE if the program need a terminal
4380 * @stop: TRUE if program is stopped at the beginning
4381 * @err: Error propagation and reporting
4383 * Connect to a remote debugger and run program
4385 * Returns: TRUE if sucessfull, otherwise FALSE.
4387 gboolean connect (const gchar *server, const gchar *args, gboolean terminal, gboolean stop);
4390 * ianjuta_debugger_unload:
4391 * @obj: Self
4392 * @err: Error propagation and reporting.
4394 * Unload a program.
4396 * Returns: TRUE if sucessfull, otherwise FALSE.
4398 gboolean unload ();
4401 * ianjuta_debugger_quit:
4402 * @obj: Self
4403 * @err: Error propagation and reporting.
4405 * Quit the debugger, can wait until the debugger is ready.
4407 * Returns: TRUE if sucessful, other FALSE.
4409 gboolean quit ();
4412 * ianjuta_debugger_abort:
4413 * @obj: Self
4414 * @err: Error propagation and reporting.
4416 * Quit the debugger as fast as possible.
4418 * Returns: TRUE if sucessful, otherwise FALSE.
4420 gboolean abort ();
4423 * ianjuta_debugger_run:
4424 * @obj: Self
4425 * @err: Error propagation and reporting.
4427 * Run the program currently loaded.
4429 * Returns: TRUE if sucessful, otherwise FALSE.
4431 gboolean run ();
4434 * ianjuta_debugger_step_in:
4435 * @obj: Self
4436 * @err: Error propagation and reporting.
4438 * Execute a single C instruction of the program currently loaded.
4440 * Returns: TRUE if sucessful, otherwise FALSE.
4442 gboolean step_in ();
4445 * ianjuta_debugger_step_over:
4446 * @obj: Self
4447 * @err: Error propagation and reporting.
4449 * Execute one C instruction, without entering in procedure, of
4450 * the program currently loaded.
4452 * Returns: TRUE if sucessful, otherwise FALSE.
4454 gboolean step_over ();
4457 * ianjuta_debugger_step_out:
4458 * @obj: Self
4459 * @err: Error propagation and reporting.
4461 * Execute the currently loaded program until it goes out of the
4462 * current procedure.
4464 * Returns: TRUE if sucessful, otherwise FALSE.
4466 gboolean step_out ();
4469 * ianjuta_debugger_run_to:
4470 * @obj: Self
4471 * @file: target file name
4472 * @line: target line in file
4473 * @err: Error propagation and reporting.
4475 * Execute the currently loaded program until it reachs the target
4476 * line.
4478 * Returns: TRUE if sucessful, otherwise FALSE.
4480 gboolean run_to (const gchar* file, gint line);
4483 * ianjuta_debugger_run_from:
4484 * @obj: Self
4485 * @file: target file name
4486 * @line: target line in file
4487 * @err: Error propagation and reporting.
4489 * Execute the program from a new position.
4490 * This function is optional.
4492 * Returns: TRUE if sucessful, otherwise FALSE.
4494 gboolean run_from (const gchar *file, gint line);
4497 * ianjuta_debugger_exit:
4498 * @obj: Self
4499 * @err: Error propagation and reporting.
4501 * Exit from the currently loaded program.
4503 * Returns: TRUE if sucessful, otherwise FALSE.
4505 gboolean exit ();
4508 * ianjuta_debugger_interrupt:
4509 * @obj: Self
4510 * @err: Error propagation and reporting.
4512 * Interrupt the program currently running.
4514 * Returns: TRUE if sucessful, otherwise FALSE.
4516 gboolean interrupt ();
4521 * ianjuta_debugger_inspect:
4522 * @obj: Self
4523 * @name: variable name
4524 * @callback: Callback to call with variable value
4525 * @user_data: User data that is passed back to the callback
4526 * @err: Error propagation and reporting.
4528 * Get back the value of the named variable.
4530 * Returns: TRUE if sucessful, otherwise FALSE.
4532 gboolean inspect (const gchar* name, GCharCallback callback, gpointer user_data);
4535 * ianjuta_debugger_evaluate:
4536 * @obj: Self
4537 * @name: variable name
4538 * @value: new variable value
4539 * @callback: Callback to call when the variable has been modified
4540 * @user_data: User data that is passed back to the callback
4541 * @err: Error propagation and reporting.
4543 * Change the value of a variable in the current program.
4545 * Returns: TRUE if sucessful, otherwise FALSE.
4547 gboolean evaluate (const gchar* name, const gchar* value, GCharCallback callback, gpointer user_data);
4550 * ianjuta_debugger_print:
4551 * @obj: Self
4552 * @name: variable name
4553 * @callback: Callback to call with variable value
4554 * @user_data: User data that is passed back to the callback
4555 * @err: Error propagation and reporting.
4557 * Display value of a variable, like inspect.
4559 * Returns: TRUE if sucessful, otherwise FALSE.
4561 gboolean print (const gchar *variable, GCharCallback callback, gpointer user_data);
4564 * ianjuta_debugger_list_local:
4565 * @obj: Self
4566 * @callback: Callback to call with list of local variable
4567 * @user_data: User data that is passed back to the callback
4568 * @err: Error propagation and reporting.
4570 * Get the list of local variables
4572 * Returns: TRUE if sucessful, otherwise FALSE.
4574 gboolean list_local (GListCallback callback, gpointer user_data);
4577 * ianjuta_debugger_list_argument:
4578 * @obj: Self
4579 * @callback: Callback to call with list of arguments
4580 * @user_data: User data that is passed back to the callback
4581 * @err: Error propagation and reporting.
4583 * Get the list of arguments
4585 * Returns: TRUE if sucessful, otherwise FALSE.
4587 gboolean list_argument (GListCallback callback, gpointer user_data);
4590 * ianjuta_debugger_info_signal:
4591 * @obj: Self
4592 * @callback: Callback to call with list of arguments
4593 * @user_data: User data that is passed back to the callback
4594 * @err: Error propagation and reporting.
4596 * Get some informatin about a signal
4598 * Returns: TRUE if sucessful, otherwise FALSE.
4600 gboolean info_signal (GListCallback callback, gpointer user_data);
4603 * ianjuta_debugger_info_sharedlib:
4604 * @obj: Self
4605 * @callback: Callback to call with list of arguments
4606 * @user_data: User data that is passed back to the callback
4607 * @err: Error propagation and reporting.
4609 * Get information about shared libraries.
4611 * Returns: TRUE if sucessful, otherwise FALSE.
4613 gboolean info_sharedlib (GListCallback callback, gpointer user_data);
4616 * ianjuta_debugger_handle_signal:
4617 * @obj: Self
4618 * @name: signal name
4619 * @stop: TRUE if we need to stop signal
4620 * @print: TRUE if we display a message when the signal is emitted
4621 * @ignore: TRUE if we ignore the signal
4622 * @err: Error propagation and reporting.
4624 * It defines how to handle signal received by the program.
4626 * Returns: TRUE if sucessful, otherwise FALSE.
4628 gboolean handle_signal (const gchar *name, gboolean stop, gboolean print, gboolean ignore);
4631 * ianjuta_debugger_info_frame:
4632 * @obj: Self
4633 * @frame: frame number, the top frame has the number 0
4634 * @callback: Callback to call getting a list of strings with all information
4635 * @user_data: User data that is passed back to the callback
4636 * @err: Error propagation and reporting.
4638 * Get some information about the one stack frame.
4639 * This function has been deprecated and is not used anymore in the
4640 * debugger GUI.
4642 * Returns: TRUE if sucessful, otherwise FALSE.
4644 gboolean info_frame (guint frame, GListCallback callback, gpointer user_data);
4647 * ianjuta_debugger_info_args:
4648 * @obj: Self
4649 * @callback: Callback to call getting a list of strings with all information
4650 * @user_data: User data that is passed back to the callback
4651 * @err: Error propagation and reporting.
4653 * Get some informatin about a current functin arguments.
4654 * This function has been deprecated and is not used anymore in the
4655 * debugger GUI.
4657 * Returns: TRUE if sucessful, otherwise FALSE.
4659 gboolean info_args (GListCallback callback, gpointer user_data);
4662 * ianjuta_debugger_info_target:
4663 * @obj: Self
4664 * @callback: Callback to call getting a list of strings with all information
4665 * @user_data: User data that is passed back to the callback
4666 * @err: Error propagation and reporting.
4668 * Get back some information about the target
4669 * This function has been deprecated and is not used anymore in the
4670 * debugger GUI.
4672 * Returns: TRUE if sucessful, otherwise FALSE.
4674 gboolean info_target (GListCallback callback, gpointer user_data);
4677 * ianjuta_debugger_info_program:
4678 * @obj: Self
4679 * @callback: Callback to call getting a list of strings with all information
4680 * @user_data: User data that is passed back to the callback
4681 * @err: Error propagation and reporting.
4683 * Get some informatin about a current program.
4684 * This function has been deprecated and is not used anymore in the
4685 * debugger GUI.
4687 * Returns: TRUE if sucessful, otherwise FALSE.
4689 gboolean info_program (GListCallback callback, gpointer user_data);
4692 * ianjuta_debugger_info_udot:
4693 * @obj: Self
4694 * @callback: Callback to call getting a list of strings with all information
4695 * @user_data: User data that is passed back to the callback
4696 * @err: Error propagation and reporting.
4698 * Get some informatin about OS structures.
4699 * This function has been deprecated and is not used anymore in the
4700 * debugger GUI.
4702 * Returns: TRUE if sucessful, otherwise FALSE.
4704 gboolean info_udot (GListCallback callback, gpointer user_data);
4708 * ianjuta_debugger_info_variables:
4709 * @obj: Self
4710 * @callback: Callback to call getting a list of strings with all information
4711 * @user_data: User data that is passed back to the callback
4712 * @err: Error propagation and reporting.
4714 * Get some informatin about variables.
4715 * This function has been deprecated and is not used anymore in the
4716 * debugger GUI.
4718 * Returns: TRUE if sucessful, otherwise FALSE.
4720 gboolean info_variables (GListCallback callback, gpointer user_data);
4723 * ianjuta_debugger_list_frame:
4724 * @obj: Self
4725 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame
4726 * @user_data: User data that is passed back to the callback
4727 * @err: Error propagation and reporting.
4729 * Get the list of frames.
4731 * Returns: TRUE if sucessful, otherwise FALSE.
4733 gboolean list_frame (GListCallback callback, gpointer user_data);
4736 * ianjuta_debugger_set_frame:
4737 * @obj: Self
4738 * @frame: frame number
4739 * @err: Error propagation and reporting.
4741 * Set the current frame.
4743 * Returns: TRUE if sucessful, otherwise FALSE.
4745 gboolean set_frame (guint frame);
4748 * ianjuta_debugger_list_thread:
4749 * @obj: Self
4750 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame for each thread
4751 * @user_data: User data that is passed back to the callback
4752 * @err: Error propagation and reporting.
4754 * Get the list of threads.
4756 * Returns: TRUE if sucessful, otherwise FALSE.
4758 gboolean list_thread (GListCallback callback, gpointer user_data);
4761 * ianjuta_debugger_set_thread:
4762 * @obj: Self
4763 * @thread: thread number
4764 * @err: Error propagation and reporting.
4766 * Set the current thread.
4768 * Returns: TRUE if sucessful, otherwise FALSE.
4770 gboolean set_thread (gint thread);
4773 * ianjuta_debugger_info_thread:
4774 * @obj: Self
4775 * @thread: thread number
4776 * @callback: Callback to call getting a list of strings with all information
4777 * @user_data: User data that is passed back to the callback
4778 * @err: Error propagation and reporting.
4780 * Get some information about current threads.
4782 * Returns: TRUE if sucessful, otherwise FALSE.
4784 gboolean info_thread (gint thread, GListCallback callback, gpointer user_data);
4787 * ianjuta_debugger_send_command:
4788 * @obj: Self
4789 * @command: command
4790 * @err: Error propagation and reporting.
4792 * Send a command directly to the debugger. Warning, changing the
4793 * debugger states, by sending a run command by example, will
4794 * probably gives some troubles in the debug manager.
4796 * Returns: TRUE if sucessful, otherwise FALSE.
4798 gboolean send_command (const gchar *command);
4801 * ianjuta_debugger_callback:
4802 * @obj: Self
4803 * @callback: Callback to call. the data argument is NULL.
4804 * @user_data: User data that is passed back to the callback
4805 * @err: Error propagation and reporting.
4807 * All commands are executed asynchronously and give back information
4808 * with callbacks. It is difficult to know when a command is really
4809 * executed. But as all commands are executed in order, you can use
4810 * this command to get a call back when all previous commands have
4811 * been executed.
4813 * Returns: TRUE if sucessful, otherwise FALSE.
4815 gboolean callback (Callback callback, gpointer user_data);
4818 * ianjuta_debugger_enable_log:
4819 * @obj: Self
4820 * @log: MessageView used by log
4821 * @err: Error propagation and reporting.
4823 * Log all debuggers commands, mainly useful for debugging.
4825 void enable_log (IAnjutaMessageView *log);
4828 * ianjuta_debugger_disable_log:
4829 * @obj: Self
4830 * @err: Error propagation and reporting.
4832 * Disable debugger log.
4834 void disable_log ();
4837 * ianjuta_debugger_dump_stack_trace:
4838 * @obj: Self
4839 * @callback: Callback to call getting a list of strings
4840 * @user_data: User data that is passed back to the callback
4841 * @err: Error propagation and reporting.
4843 * Return a stack trace valid for a bug reports.
4844 * This function is optional.
4846 * Returns: TRUE if sucessful, otherwise FALSE.
4848 gboolean dump_stack_trace (GListCallback callback, gpointer user_data);
4851 * SECTION:ianjuta-debugger-breakpoint
4852 * @title: IAnjutaDebuggerBreakpoint
4853 * @short_description: Breakpoint Debugger interface
4854 * @see_also:
4855 * @stability: Unstable
4856 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
4859 interface IAnjutaDebuggerBreakpoint
4863 * IAnjutaDebuggerBreakpointType:
4864 * @IANJUTA_DEBUGGER_BREAKPOINT_REMOVED: Set for removed breakpoint
4865 * @IANJUTA_DEBUGGER_BREAKPOINT_UPDATED: Set for changed breakpoint
4866 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE: Set on source line
4867 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS: Set on an addresse
4868 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION: Set on a function name
4869 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_READ: Set on read access
4870 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE: Set on write access
4871 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE: Has enable information
4872 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE: Has ignore information,
4873 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME: Has counter information
4874 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION: Has a condition
4875 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY: Temporary breakpoint, automatically removed when triggered
4876 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_PENDING: Pending breakpoint
4878 * This enumeration defined various characteristics of the breakpoint.
4880 enum Type
4882 REMOVED = 1 << 0,
4883 UPDATED = 1 << 17,
4884 ON_LINE = 1 << 1,
4885 ON_ADDRESS = 1 << 2,
4886 ON_FUNCTION = 1 << 3,
4887 ON_READ = 1 << 4,
4888 ON_WRITE = 1 << 5,
4889 WITH_ENABLE = 1 << 16,
4890 WITH_IGNORE = 1 << 15,
4891 WITH_TIME = 1 << 11,
4892 WITH_CONDITION = 1 << 12,
4893 WITH_TEMPORARY = 1 << 13,
4894 WITH_PENDING = 1 << 14,
4898 * IAnjutaDebuggerBreakpointItem:
4899 * @type: type see #IAnjutaBreakpointType enumeration
4900 * @id: unique identifier
4901 * @file: source file where is the breakpoint
4902 * @line: corresponding source file line number
4903 * @function: corresponding function name
4904 * @address: corresponding address
4905 * @enable: TRUE if the breakpoint is enabled
4906 * @ignore: TRUE if the breakpoint is ignored
4907 * @times: Count how many time the breakpoint is triggered
4908 * @condition: Additional condition for triggering the breakpoint
4909 * @temporary: TRUE if the breakpoint is temporary
4910 * @pending: TRUE if the breakpoint is pending
4912 * This structure keeps all information about a breakpoint.
4914 struct Item
4916 gint type;
4917 guint id;
4918 gchar *file;
4919 guint line;
4920 gchar *function;
4921 gulong address;
4922 gboolean enable;
4923 guint ignore;
4924 guint times;
4925 gchar *condition;
4926 gboolean temporary;
4927 gboolean pending;
4931 * IAnjutaDebuggerBreakpointMethod:
4932 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS: Allow to set breakpoint on address
4933 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION: Allow to set breakpoint on function name
4934 * @IANJUTA_DEBUGGER_BREAKPOINT_ENABLE: Allow to disable breakpoint
4935 * @IANJUTA_DEBUGGER_BREAKPOINT_IGNORE: Allow to ignore breakpoint
4936 * @IANJUTA_DEBUGGER_BREAKPOINT_CONDITION: Allow to add a condition on breakpoint
4938 * Defines which breakpoint characteristics are supported by the debugger
4939 * backend.
4941 enum Method
4943 SET_AT_ADDRESS = 1 << 0,
4944 SET_AT_FUNCTION = 1 << 1,
4945 ENABLE = 1 << 2,
4946 IGNORE = 1 << 3,
4947 CONDITION = 1 << 4
4951 * IAnjutaDebuggerBreakpointCallback:
4952 * @data: a #IAnjutaBreakpointItem object
4953 * @user_data: user data passed to the function
4954 * @error: error
4956 * This callback function is used to return a #IAnjutaBreakpointItem.
4958 typedef void (*Callback) (const Item *data, gpointer user_data, GError* err);
4961 * ianjuta_debugger_breakpoint_implement_breakpoint:
4962 * @obj: Self
4963 * @err: Error propagation and reporting.
4965 * Return all implemented methods.
4967 * Returns: A OR of #IAnjutaDebuggerBreakpointMethod
4968 * corresponding to all implemented optional methods.
4970 gint implement_breakpoint ();
4973 * ianjuta_debugger_breakpoint_set_breakpoint_at_line:
4974 * @obj: Self
4975 * @file: File containing the breakpoint
4976 * @line: Line number where is the breakpoint
4977 * @callback: Callback to call when the breakpoint has been set
4978 * @user_data: User data that is passed back to the callback
4979 * @err: Error propagation and reporting.
4981 * Set a breakpoint at the specified line in the file.
4983 * Returns: TRUE if the request succeed and the callback is called. If
4984 * FALSE, the callback will not be called.
4986 gboolean set_breakpoint_at_line (const gchar* file, guint line, Callback callback, gpointer user_data);
4990 * ianjuta_debugger_breakpoint_set_breakpoint_at_address:
4991 * @obj: Self
4992 * @address: Address of the breakpoint
4993 * @callback: Callback to call when the breakpoint has been set
4994 * @user_data: User data that is passed back to the callback
4995 * @err: Error propagation and reporting.
4997 * Set a breakpoint at the specified address.
4998 * This function is optional.
5000 * Returns: TRUE if the request succeed and the callback is called. If
5001 * FALSE, the callback will not be called.
5003 gboolean set_breakpoint_at_address (gulong address, Callback callback, gpointer user_data);
5006 * ianjuta_debugger_breakpoint_set_breakpoint_at_function:
5007 * @obj: Self
5008 * @file: File containing the breakpoint
5009 * @function: Function name where the breakpoint is put
5010 * @callback: Callback to call when the breakpoint has been set
5011 * @user_data: User data that is passed back to the callback
5012 * @err: Error propagation and reporting.
5014 * Set a breakpoint at the beginning of the specified function.
5015 * This function is optional.
5017 * Returns: TRUE if the request succeed and the callback is called. If
5018 * FALSE, the callback will not be called.
5020 gboolean set_breakpoint_at_function (const gchar* file, const gchar* function, Callback callback, gpointer user_data);
5023 * ianjuta_debugger_breakpoint_clear_breakpoint:
5024 * @obj: Self
5025 * @id: Breakpoint identification number
5026 * @callback: Callback to call when the breakpoint has been cleared
5027 * @user_data: User data that is passed back to the callback
5028 * @err: Error propagation and reporting.
5030 * Clear a breakpoint put by any set functions. The Id of the breakpoint
5031 * is given in the callback of the set functions.
5033 * Returns: TRUE if the request succeed and the callback is called. If
5034 * FALSE, the callback will not be called.
5036 gboolean clear_breakpoint (guint id, Callback callback, gpointer user_data);
5039 * ianjuta_debugger_breakpoint_list_breakpoint:
5040 * @obj: Self
5041 * @callback: Callback to call with the list of #IAnjutaDebuggreBreakpointItem
5042 * @user_data: User data that is passed back to the callback
5043 * @err: Error propagation and reporting.
5045 * List all breakpoints set in the debugger. It is useful to
5046 * know how many time a breakpoint has been hit.
5048 * Returns: TRUE if the request succeed and the callback is called. If
5049 * FALSE, the callback will not be called.
5051 gboolean list_breakpoint (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5054 * ianjuta_debugger_breakpoint_enable_breakpoint:
5055 * @obj: Self
5056 * @id: Breakpoint identification number
5057 * @enable: TRUE to enable the breakpoint, FALSE to disable it
5058 * @callback: Callback to call when the breakpoint has been changed
5059 * @user_data: User data that is passed back to the callback
5060 * @err: Error propagation and reporting.
5062 * Enable of disable a breakpoint. This function is optional.
5064 * Returns: TRUE if the request succeed and the callback is called. If
5065 * FALSE, the callback will not be called.
5067 gboolean enable_breakpoint (guint id, gboolean enable, Callback callback, gpointer user_data);
5070 * ianjuta_debugger_breakpoint_ignore_breakpoint:
5071 * @obj: Self
5072 * @id: Breakpoint identification number
5073 * @ignore: Number of time a breakpoint must be ignored
5074 * @callback: Callback to call when the breakpoint has been changed
5075 * @user_data: User data that is passed back to the callback
5076 * @err: Error propagation and reporting.
5078 * This allow to ignore the breakpoint a number of time before stopping.
5079 * This function is optional.
5081 * Returns: TRUE if the request succeed and the callback is called. If
5082 * FALSE, the callback will not be called.
5084 gboolean ignore_breakpoint (guint id, guint ignore, Callback callback, gpointer user_data);
5087 * ianjuta_debugger_breakpoint_condition_breakpoint:
5088 * @obj: Self
5089 * @id: Breakpoint identification number
5090 * @condition: expression that has to be true
5091 * @callback: Callback to call when the breakpoint has been changed
5092 * @user_data: User data that is passed back to the callback
5093 * @err: Error propagation and reporting.
5095 * Add a condition, evaluate in the program context, on the breakpoint,
5096 * the program will stop when it reachs the breakpoint only if the
5097 * condition is true. This function is optional.
5099 * Returns: TRUE if the request succeed and the callback is called. If
5100 * FALSE, the callback will not be called.
5102 gboolean condition_breakpoint (guint id, const gchar* condition, Callback callback, gpointer user_data);
5106 * SECTION:ianjuta-debugger-variable
5107 * @title: IAnjutaDebuggerVariable
5108 * @short_description: Variables interface for debuggers
5109 * @see_also:
5110 * @stability: Unstable
5111 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
5113 * This interface is used to examine and change values of expression.
5114 * It is based on the MI2 variable object interface of gdb. A
5115 * variable needs to be created before being able to get or set its
5116 * value and list its children.
5118 interface IAnjutaDebuggerVariable
5121 * IAnjutaDebuggerVariableObject:
5122 * @name: unique variable object name created by backend
5123 * @expression: corresponding variable name or expression
5124 * @type: variable type
5125 * @value: variable value
5126 * @changed: TRUE if the variable has changed
5127 * @exited: TRUE if the variable is outside current scope
5128 * @deleted: TRUE if the variable has been removed
5129 * @children: Number of variable children, -1 if unknown
5130 * @has_more: TRUE if the children value is wrong
5132 * Defines a variable object.
5134 struct Object
5136 gchar *name;
5137 gchar *expression;
5138 gchar *type;
5139 gchar *value;
5140 gboolean changed;
5141 gboolean exited;
5142 gboolean deleted;
5143 gint children;
5144 gboolean has_more;
5148 * IAnjutaDebuggerVariableCallback:
5149 * @data: a #IAnjutaDebuggerVariableObject object
5150 * @user_data: user data passed to the function
5151 * @error: error
5153 * This callback function is used to return a #IAnjutaDebuggerVariableObject.
5155 typedef void (*Callback) (const Object *data, gpointer user_data, GError* err);
5158 * ianjuta_debugger_variable_create:
5159 * @obj: Self
5160 * @expression: Variable expression
5161 * @callback: Callback to call when the variable has been created
5162 * @user_data: User data that is passed back to the callback
5163 * @err: Error propagation and reporting.
5165 * Create a new variable object in the current thread and frame.
5167 * Returns: TRUE if the request succeed and the callback is
5168 * called. If FALSE, the callback will not be called.
5170 gboolean create (const gchar *expression, Callback callback, gpointer user_data);
5173 * ianjuta_debugger_variable_list_children:
5174 * @obj: Self
5175 * @name: Variable name
5176 * @from: Starting from this children (zero-based)
5177 * @callback: Callback to call when the children have been
5178 * created with a list of variable objects
5179 * @user_data: User data that is passed back to the callback
5180 * @err: Error propagation and reporting.
5182 * List and create objects for variable object's children.
5183 * The backend can returns only a part of the children, in
5184 * this case a last variable with a NULL name is added to
5185 * the list given to the callback function.
5186 * If the remaining children are wanted, this
5187 * function must be called again with a from argument
5188 * corresponding to the first missing children.
5190 * Returns: TRUE if the request succeed and the callback is
5191 * called. If FALSE, the callback will not be called.
5193 gboolean list_children (const gchar *name, guint from, IAnjutaDebuggerGListCallback callback, gpointer user_data);
5196 * ianjuta_debugger_variable_evaluate:
5197 * @obj: Self
5198 * @name: Variable name
5199 * @callback: Callback to call with the variable value
5200 * @user_data: User data that is passed back to the callback
5201 * @err: Error propagation and reporting.
5203 * Get the value of one variable or child object.
5205 * Returns: TRUE if the request succeed and the callback is
5206 * called. If FALSE, the callback will not be called.
5208 gboolean evaluate (const gchar *name, IAnjutaDebuggerGCharCallback callback, gpointer user_data);
5211 * ianjuta_debugger_variable_assign:
5212 * @obj: Self
5213 * @name: Variable name
5214 * @value: Variable value
5215 * @err: Error propagation and reporting.
5217 * Set the value of one variable or child object.
5219 * Returns: TRUE if the request succeed and the callback is
5220 * called. If FALSE, the callback will not be called.
5222 gboolean assign (const gchar *name, const gchar *value);
5225 * ianjuta_debugger_variable_update:
5226 * @obj: Self
5227 * @callback: Callback to call with the list of all changed
5228 * variable names
5229 * @user_data: User data that is passed back to the callback
5230 * @err: Error propagation and reporting.
5232 * List all changed variable objects since the last call.
5234 * Returns: TRUE if the request succeed and the callback is
5235 * called. If FALSE, the callback will not be called.
5237 gboolean update (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5240 * ianjuta_debugger_variable_destroy:
5241 * @obj: Self
5242 * @name: Variable name
5243 * @err: Error propagation and reporting.
5245 * Delete a previously created variable or child object
5246 * including its own children.
5248 * Returns: TRUE if the request succeed and the callback is
5249 * called. If FALSE, the callback will not be called.
5251 gboolean destroy (const gchar *name);
5255 * SECTION:ianjuta-debugger-register
5256 * @title: IAnjutaDebuggerRegister
5257 * @short_description: Register interface for debuggers
5258 * @see_also:
5259 * @stability: Unstable
5260 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
5262 * This interface is used to examine and change values of CPU registers.
5264 interface IAnjutaDebuggerRegister
5268 * IAnjutaDebuggerRegisterData:
5269 * @num: register identifier
5270 * @name: register name
5271 * @value: register value
5273 * Defines a register data.
5275 struct Data
5277 guint num;
5278 gchar *name;
5279 gchar *value;
5283 * ianjuta_debugger_register_list_register:
5284 * @obj: Self
5285 * @callback: Callback to call with the #IAnjutaDebuggerRegisterData list
5286 * @user_data: User data that is passed back to the callback
5287 * @err: Error propagation and reporting.
5289 * List all registers of the target. This function can be called without
5290 * a program loaded, the value field of register structure is not filled.
5292 * Returns: TRUE if the request succeed and the callback is
5293 * called. If FALSE, the callback will not be called.
5295 gboolean list_register (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5298 * ianjuta_debugger_register_update_register:
5299 * @obj: Self
5300 * @callback: Callback call with the list of all modified #IAnjutaDebuggerRegisterData
5301 * @user_data: User data that is passed back to the callback
5302 * @err: Error propagation and reporting.
5304 * Return all modified registers since the last call. Only the num and
5305 * value field are used.
5307 * Returns: TRUE if the request succeed and the callback is
5308 * called. If FALSE, the callback will not be called.
5310 gboolean update_register (IAnjutaDebuggerGListCallback callback, gpointer user_data);
5313 * ianjuta_debugger_register_write_register:
5314 * @obj: Self
5315 * @value: Modified register with a new value
5316 * @err: Error propagation and reporting.
5318 * Change the value of one register. Only the num and value field are used.
5320 * Returns: TRUE if the request succeed.
5322 gboolean write_register (Data *value);
5326 * SECTION:ianjuta-debugger-memory
5327 * @title: IAnjutaDebuggerMemory
5328 * @short_description: Memory interface for debuggers
5329 * @see_also:
5330 * @stability: Unstable
5331 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
5333 * This interface is used to examine the target memory.
5335 interface IAnjutaDebuggerMemory
5338 * IAnjutaDebuggerRegisterMemoryBlock:
5339 * @address: start address of memory block
5340 * @length: size of memory block
5341 * @data: memory block data
5343 * Represent a block of memory.
5345 struct Block
5347 gulong address;
5348 guint length;
5349 gchar *data;
5353 * IAnjutaDebuggerMemoryCallback:
5354 * @data: a #IAnjutaDebuggerMemoryBlock object
5355 * @user_data: user data passed to the function
5356 * @error: error
5358 * This callback function is used to return a #IAnjutaDebuggerMemoryBlock.
5360 typedef void (*Callback) (const Block *data, gpointer user_data, GError* err);
5363 * ianjuta_debugger_memory_inspect:
5364 * @obj: Self
5365 * @address: Start address of the memory block
5366 * @length: Length of memory block
5367 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
5368 * @user_data: User data that is passed back to the callback
5369 * @err: Error propagation and reporting.
5371 * Read a block of the target memory.
5373 * Returns: TRUE if the request succeed and the callback is
5374 * called. If FALSE, the callback will not be called.
5376 gboolean inspect (gulong address, guint length, Callback callback, gpointer user_data);
5380 * SECTION:ianjuta-debugger-instruction
5381 * @title: IAnjutaDebuggerInstruction
5382 * @short_description: Debugger interface for machine instruction
5383 * @see_also:
5384 * @stability: Unstable
5385 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
5387 * This interface is used to debuger as machine instruction level.
5389 interface IAnjutaDebuggerInstruction
5393 * IAnjutaDebuggerInstructionALine:
5394 * @address: Address of the line
5395 * @label: Optional label
5396 * @text: Diassembled instruction on the line
5398 * Defines a disassembled line
5400 struct ALine
5402 gulong address;
5403 const gchar *label;
5404 const gchar *text;
5408 * IAnjutaDebuggerInstructionDisassembly:
5409 * @size: Number of line
5410 * @data: Array of all lines
5412 * Represents a block of diassembled instructions
5414 struct Disassembly
5416 guint size;
5417 ALine data[];
5421 * IAnjutaDebuggerInstructionCallback:
5422 * @data: a #IAnjutaDebuggerInstructionDisassembly object
5423 * @user_data: user data passed to the function
5424 * @error: error
5426 * This callback function is used to return a #IAnjutaDebuggerInstructionDisassembly.
5428 typedef void (*Callback) (const Disassembly *data, gpointer user_data, GError* err);
5431 * ianjuta_debugger_instruction_disassemble:
5432 * @obj: Self
5433 * @address: Start address of the memory block
5434 * @length: Length of memory block
5435 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
5436 * @user_data: User data that is passed back to the callback
5437 * @err: Error propagation and reporting.
5439 * Disassemble a part of the memory
5441 * Returns: TRUE if the request succeed and the callback is
5442 * called. If FALSE, the callback will not be called.
5444 gboolean disassemble (gulong address, guint length, Callback callback, gpointer user_data);
5447 * ianjuta_debugger_instruction_step_in_instruction:
5448 * @obj: Self
5449 * @err: Error propagation and reporting.
5451 * Execute one assembler instruction in the program.
5453 * Returns: TRUE if the request succeed and the callback is called. If
5454 * FALSE, the callback will not be called.
5456 gboolean step_in_instruction ();
5459 * ianjuta_debugger_instruction_step_over_instruction:
5460 * @obj: Self
5461 * @err: Error propagation and reporting.
5463 * Execute one assembler instruction in the program, if the instruction
5464 * is a function call, continues until the function returns.
5466 * Returns: TRUE if the request succeed and the callback is called. If
5467 * FALSE, the callback will not be called.
5469 gboolean step_over_instruction ();
5472 * ianjuta_debugger_instruction_run_to_address:
5473 * @obj: Self
5474 * @address: Run to this addresss
5475 * @err: Error propagation and reporting.
5477 * Start the program until it reachs the address address
5479 * Returns: TRUE if the request succeed and the callback is called. If
5480 * FALSE, the callback will not be called.
5482 gboolean run_to_address (gulong address);
5485 * ianjuta_debugger_instruction_run_from_address:
5486 * @obj: Self
5487 * @address: Run from this addresss
5488 * @err: Error propagation and reporting.
5490 * Restart the program starting from address address
5492 * Returns: TRUE if the request succeed and the callback is called. If
5493 * FALSE, the callback will not be called.
5495 gboolean run_from_address (gulong address);
5501 * SECTION:ianjuta-debug-manager
5502 * @title: IAnjutaDebugManager
5503 * @short_description: Common graphical interface to all debugger
5504 * @see_also:
5505 * @stability: Unstable
5506 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
5508 * This interface wrap the real debugger plugin and provide a
5509 * common graphical user interface.
5512 interface IAnjutaDebugManager
5514 #include "ianjuta-debugger.h"
5515 #include "ianjuta-debugger-breakpoint.h"
5516 #include <gio/gio.h>
5518 /* Signals */
5521 * IAnjutaDebugManager::debugger_started:
5522 * @obj: Self
5524 * This signal is emitted when the debugger is started.
5526 void ::debugger_started ();
5529 * IAnjutaDebugManager::debugger_stopped:
5530 * @obj: Self
5531 * @err: Error propagation and reporting.
5533 * This signal is emitted when the debugger is stopped.
5535 void ::debugger_stopped (GError *err);
5538 * IAnjutaDebugManager::program_loaded:
5539 * @obj: Self
5541 * This signal is emitted when a program is loaded most of the
5542 * time just before the first program_stopped signal.
5544 void ::program_loaded ();
5547 * IAnjutaDebugManager::program_unloaded:
5548 * @obj: Self
5550 * This signal is emitted when a program is unloaded. If the
5551 * debugger is stopped while a program is loaded, this signal
5552 * is emitted before the debugger_stopped signal.
5554 void ::program_unloaded ();
5557 * IAnjutaDebugManager::program_started:
5558 * @obj: Self
5560 * This signal is emitted when the program is started. If the
5561 * program starts and is stopped by the debugger, a program-stopped
5562 * signal will be emitted too. If the program starts is not stopped
5563 * by the debugger a program-running signal will be emitted.
5565 void ::program_started ();
5568 * IAnjutaDebugManager::program_exited:
5569 * @obj: Self
5571 * This signal is emitted when the program is unloaded. If the
5572 * debugger is stopped while a program is running or stopped, this
5573 * signal is emitted before the program_unloaded signal.
5575 void ::program_exited ();
5578 * IAnjutaDebugManager::program_stopped:
5579 * @obj: Self
5581 * This signal is emitted when the program is stopped.
5583 void ::program_stopped ();
5586 * IAnjutaDebugManager::program_running:
5587 * @obj: Self
5589 * This signal is emitted when the program is running.
5591 void ::program_running ();
5595 * IAnjutaDebugManager::sharedlib_event:
5596 * @obj: Self
5598 * This signal is emitted when a new shared library is loaded. It
5599 * is useful to try to set pending breakpoints those could be in
5600 * the newly loaded library.
5602 void ::sharedlib_event ();
5605 * IAnjutaDebugManager::program_moved:
5606 * @obj: Self
5607 * @pid: process id, 0 when unknown
5608 * @tid: thread id, 0 when unknown
5609 * @address: program counter address, 0 when unknown
5610 * @file: source file where is the program counter, NULL when unknown
5611 * @line: line number if file name above is not NULL
5613 * This signal is emitted when the debugger know the current program
5614 * location. Most of the time, after the program has stopped but it
5615 * could happen even if it is still running.
5617 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
5620 * IAnjutaDebugManager::frame_changed:
5621 * @obj: Self
5622 * @frame: frame
5623 * @thread: thread
5625 * This signal is emitted when the current frame is changed. It is
5626 * equal to the top frame in the interrupted thread when the
5627 * program stops but can be changed afterward by the user.
5628 * Several commands use this current frame, by example the register
5629 * window display the register values for the current thread only.
5631 void ::frame_changed (guint frame, gint thread);
5634 * IAnjutaDebugManager::location_changed:
5635 * @obj: Self
5636 * @address: program counter address, 0 when unknown
5637 * @uri: source file where is the program counter, NULL when unknown
5638 * @line: line number if file name above is not NULL
5640 * This signal is emitted when the current location is changed. It is
5641 * equal to the program location when the program stops but can be
5642 * changed afterward by the user.
5644 void ::location_changed (gulong address, const gchar* uri, guint line);
5647 * IAnjutaDebugManager::signal_received:
5648 * @obj: Self
5649 * @name: Signal name
5650 * @description: Signal description
5652 * This signal is emitted when the debugged program receives a
5653 * unix signal.
5655 void ::signal_received (const gchar* name, const gchar* description);
5658 * IAnjutaDebugManager::breakpoint_changed:
5659 * @obj: Self
5660 * @breakpoint: Breakpoint
5661 * @err: Error propagation and reporting.
5663 * This signal is emitted when a breakpoint is changed. It includes
5664 * new breakpoint and deleted breakpoint.
5666 void ::breakpoint_changed (IAnjutaDebuggerBreakpointItem *breakpoint);
5669 * ianjuta_debug_manager_start:
5670 * @obj: Self
5671 * @uri: uri of the target
5672 * @err: Error propagation and reporting.
5674 * Start the debugger of the given uri
5676 * Returns: TRUE if sucessful, other FALSE.
5678 gboolean start (const gchar *uri);
5681 * ianjuta_debug_manager_start_remote:
5682 * @obj: Self
5683 * @server: server (IP address:port)
5684 * @uri: uri of the local target
5685 * @err: Error propagation and reporting.
5687 * Start the debugger of the given uri
5689 * Returns: TRUE if sucessful, other FALSE.
5691 gboolean start_remote (const gchar *server, const gchar *uri);
5694 * ianjuta_debug_manager_quit:
5695 * @obj: Self
5696 * @err: Error propagation and reporting.
5698 * Quit the debugger, can wait until the debugger is ready.
5700 * Returns: TRUE if sucessful, other FALSE.
5702 gboolean quit ();
5706 * SECTION:ianjuta-vcs
5707 * @title: IAnjutaVcs
5708 * @short_description: Version control system interface
5709 * @see_also:
5710 * @stability: Unstable
5711 * @include: libanjuta/interfaces/ianjuta-vcs.h
5714 interface IAnjutaVcs
5716 #include <gio/gio.h>
5717 #include <libanjuta/anjuta-vcs-status.h>
5718 #include <libanjuta/anjuta-async-notify.h>
5721 * IAnjutaVcsError:
5722 * @IANJUTA_VCS_UNKNOWN_ERROR: Unkown error
5724 * These enumeration is used to specify errors.
5726 enum Error
5728 UNKOWN_ERROR
5732 * IAnjutaVcsStatus
5733 * @obj: Self
5735 * 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
5736 * fold- unfold the tree.
5738 void ::status_changed();
5741 * ianjuta_vcs_add:
5742 * @obj: Self
5743 * @files: (element-type GFile): List of List of files, represented as #Gfile objects, to add
5744 * @notify: #AnjutaAsyncNotify object for finish notification and error
5745 * reporting.
5747 * Add files to the VCS repository.
5749 void add(List<GFile*> files, AnjutaAsyncNotify *notify);
5752 * ianjuta_vcs_remove:
5753 * @obj: Self
5754 * @files: (element-type GFile): List of files, represented as #Gfile objects, to remove
5755 * @notify: #AnjutaAsyncNotify object for finish notification and error
5756 * reporting.
5758 * Remove files from the VCS repository.
5760 void remove(List<GFile*> files, AnjutaAsyncNotify *notify);
5763 * ianjuta_vcs_checkout:
5764 * @obj: Self
5765 * @repository_location: Location of repository to check out
5766 * @dest: Destination of checked out copy
5767 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5768 * @notify: #AnjutaAsyncNotify object for finish notification and error
5769 * reporting.
5771 * Check out a copy of a code repository.
5773 void checkout(const gchar *repository_location, GFile *dest, GCancellable *cancel, AnjutaAsyncNotify *notify);
5776 * ianjuta_vcs_query_status:
5777 * @obj: Self
5778 * @file: File/directory to query
5779 * @callback: callback to call when data for a particular file is available
5780 * @user_data: User data passed to callback
5781 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5782 * @notify: #AnjutaAsyncNotify object for finish notification and error
5783 * reporting.
5785 * Querys the status of files in the repository.
5787 void query_status (GFile* file, StatusCallback callback, gpointer user_data, GCancellable* cancel, AnjutaAsyncNotify *notify);
5790 * IAnjutaVcsStatusCallback:
5791 * @file: File representing the file for which status is given
5792 * @status: #AnjutaVcsStatus for the file represented by @file.
5793 * @user_data: User data
5795 * Callback called for each status record returned by
5796 * ianjuta_vcs_query_status.
5798 typedef void (*StatusCallback) (GFile* file, AnjutaVcsStatus status, gpointer user_data);
5801 * ianjuta_vcs_diff:
5802 * @obj: Self
5803 * @file: File to diff
5804 * @callback: Callback to call when diff data becomes available
5805 * @user_data: User data passed to @callback
5806 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5807 * @notify: #AnjutaAsyncNotify object for finish notification and error
5808 * reporting.
5810 * Generates a unified diff of the file represented by @file.
5812 void diff(GFile* file, DiffCallback callback, gpointer user_data, GCancellable* cancel, AnjutaAsyncNotify *notify);
5815 * IAnjutaVcsDiffCallback:
5816 * @file: File being diffed
5817 * @diff: Diff data
5818 * @user_data: User data
5820 * Called when diff data comes from ianjuta_vcs_diff.
5822 typedef void (*DiffCallback) (GFile* file, const gchar* diff, gpointer user_data);
5826 * SECTION:ianjuta-snippets-manager
5827 * @title: IAnjutaSnippetsManager
5828 * @short_description: Snippets Manager interface
5829 * @see_also:
5830 * @stability: Unstable
5831 * @include: libanjuta/interfaces/ianjuta-macro.h
5834 interface IAnjutaSnippetsManager
5837 * ianjuta_snippets_manager_insert:
5838 * @key: Trigger-key of the snippet
5839 * @editing_session: If after inserting the snippet there should be an editing
5840 * session. Mark as FALSE if not interested in the dynamic capabilities of the
5841 * snippet.
5842 * @obj: Self
5843 * @err: Error propagation and reporting
5845 * Insert snippet in the current editor.
5847 gboolean insert (const gchar* key, gboolean editing_session);
5851 * SECTION:ianjuta-symbol
5852 * @title: IAnjutaSymbol
5853 * @short_description: Source code symbol interface
5854 * @see_also: #IAnjutaSymbolQuery, #IAnjutaSymbolManager
5855 * @stability: Unstable
5856 * @include: libanjuta/interfaces/ianjuta-symbol.h
5858 * This interface is used to define a symbol, normally got from symbol
5859 * queries. A symbol has various fields that can be retrieved by using
5860 * their get methods. A symbol will have only those fields which have
5861 * been selected to be included in their respective queries, so make sure
5862 * the needed fields are correctly specified during query creation.
5864 interface IAnjutaSymbol
5866 #include <gdk/gdk.h>
5867 #include <gio/gio.h>
5870 * IAnjutaSymbolType:
5871 * @IANJUTA_SYMBOL_TYPE_NONE: None spedified.
5872 * @IANJUTA_SYMBOL_TYPE_UNDEF: Unknown type.
5873 * @IANJUTA_SYMBOL_TYPE_CLASS: Class declaration
5874 * @IANJUTA_SYMBOL_TYPE_ENUM: Enum declaration
5875 * @IANJUTA_SYMBOL_TYPE_ENUMERATOR: Enumerator value
5876 * @IANJUTA_SYMBOL_TYPE_FIELD: Field (Java only)
5877 * @IANJUTA_SYMBOL_TYPE_FUNCTION: Function definition
5878 * @IANJUTA_SYMBOL_TYPE_INTERFACE: Interface (Java only)
5879 * @IANJUTA_SYMBOL_TYPE_MEMBER: Member variable of class/struct
5880 * @IANJUTA_SYMBOL_TYPE_METHOD: Class method (Java only)
5881 * @IANJUTA_SYMBOL_TYPE_NAMESPACE: Namespace declaration
5882 * @IANJUTA_SYMBOL_TYPE_PACKAGE: Package (Java only)
5883 * @IANJUTA_SYMBOL_TYPE_PROTOTYPE: Function prototype
5884 * @IANJUTA_SYMBOL_TYPE_STRUCT: Struct declaration
5885 * @IANJUTA_SYMBOL_TYPE_TYPEDEF: Typedef
5886 * @IANJUTA_SYMBOL_TYPE_UNION: Union
5887 * @IANJUTA_SYMBOL_TYPE_VARIABLE: Variable
5888 * @IANJUTA_SYMBOL_TYPE_EXTERNVAR: Extern or forward declaration
5889 * @IANJUTA_SYMBOL_TYPE_MACRO: Macro (without arguments)
5890 * @IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG: Parameterized macro
5891 * @IANJUTA_SYMBOL_TYPE_FILE: File (Pseudo tag)
5892 * @IANJUTA_SYMBOL_TYPE_OTHER: Other (non C/C++/Java tag)
5893 * @IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER: types which are subjected to create a scope.
5894 * @IANJUTA_SYMBOL_TYPE_MAX: Maximum value, used as end marker.
5896 enum Type
5898 TYPE_NONE = 0,
5899 TYPE_UNDEF = 1,
5900 TYPE_CLASS = 2,
5901 TYPE_ENUM = 4,
5902 TYPE_ENUMERATOR = 8,
5903 TYPE_FIELD = 16,
5904 TYPE_FUNCTION = 32,
5905 TYPE_INTERFACE = 64,
5906 TYPE_MEMBER = 128,
5907 TYPE_METHOD = 256,
5908 TYPE_NAMESPACE = 512,
5909 TYPE_PACKAGE = 1024,
5910 TYPE_PROTOTYPE = 2048,
5911 TYPE_STRUCT = 4096,
5912 TYPE_TYPEDEF = 8192,
5913 TYPE_UNION = 16384,
5914 TYPE_VARIABLE = 32768,
5915 TYPE_EXTERNVAR = 65536,
5916 TYPE_MACRO = 131072,
5917 TYPE_MACRO_WITH_ARG = 262144,
5918 TYPE_FILE = 524288,
5919 TYPE_OTHER = 1048576,
5920 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,
5921 TYPE_MAX = 2097151
5925 * IAnjutaSymbolField:
5926 * @IANJUTA_SYMBOL_FIELD_ID: Integer. A unique ID of the symbol
5927 * @IANJUTA_SYMBOL_FIELD_NAME: String. Name of the symbol
5928 * @IANJUTA_SYMBOL_FIELD_FILE_POS: Integer. The file line number where the symbol is found.
5929 * @IANJUTA_SYMBOL_FIELD_SCOPE_DEF_ID: Integer. A unique ID to define scope created by this symbol.
5930 * @IANJUTA_SYMBOL_FIELD_FILE_SCOPE: Boolean: TRUE if symbol is within file scope,
5931 * otherwise FALSE.
5932 * @IANJUTA_SYMBOL_FIELD_SIGNATURE: String. Signature of a method, if symbol is a funtion.
5933 * Namely, the arguments list of the funtion.
5934 * @IANJUTA_SYMBOL_FIELD_RETURNTYPE: String. Return type of a method, if symbol is a function.
5935 * @IANJUTA_SYMBOL_FIELD_FILE_PATH: String. The relative path to the file where the symbol is found.
5936 * @IANJUTA_SYMBOL_FIELD_PROJECT_NAME: String. The project name to which the symbol belongs to.
5937 * @IANJUTA_SYMBOL_FIELD_PROJECT_VERSION: String. The project version to which the symbol belongs to.
5938 * @IANJUTA_SYMBOL_FIELD_IMPLEMENTATION: String. Implementation attribute of a symbol. It may be
5939 * "pure virtual", "virtual", etc.
5940 * @IANJUTA_SYMBOL_FIELD_ACCESS: String. Access attribute of a symbol.
5941 * It may be "public", "private" etc.
5942 * @IANJUTA_SYMBOL_FIELD_KIND: Kind attribute of a symbol, such as
5943 * "enumerator", "namespace", "class" etc.
5944 * @IANJUTA_SYMBOL_FIELD_TYPE: Both string and Integer. Type attribute of a symbol.
5945 * In string form, it is name of the type in string form.
5946 * In integer form, it is IAnjutaSymbolType enumerator value.
5947 * @IANJUTA_SYMBOL_FIELD_TYPE_NAME: type_name attribute of a symbol.
5948 * If a type could be "class" then its type_name may be "MyFooClass" etc.
5949 * @IANJUTA_SYMBOL_FIELD_IS_CONTAINER: Boolean. TRUE if symbol is
5950 * a scope container, such as namespace, class, struct etc., otherwise
5951 * FALSE.
5952 * @IANJUTA_SYMBOL_FIELD_END: The end marker.
5954 * Symbol Fields. Used to define and retrieve results from query. Each of
5955 * these fields are either integer or string. Use the right method to
5956 * retrieve them. That is, for integer use ianjuta_symbol_get_int(),
5957 * for string use ianjuta_symbol_get_string(), and for boolean use
5958 * ianjuta_symbol_get_boolean(). Some fields can be in both forms,
5959 * e.g. #IANJUTA_SYMBOL_FIELD_TYPE.
5961 enum Field
5963 FIELD_ID,
5964 FIELD_NAME,
5965 FIELD_FILE_POS,
5966 FILED_SCOPE_DEF_ID,
5967 FIELD_FILE_SCOPE,
5968 FIELD_SIGNATURE,
5969 FIELD_RETURNTYPE,
5970 FIELD_TYPE,
5971 FIELD_TYPE_NAME,
5972 FIELD_FILE_PATH,
5973 FIELD_PROJECT_NAME,
5974 FIELD_PROJECT_VERSION,
5975 FIELD_IMPLEMENTATION,
5976 FIELD_ACCESS,
5977 FIELD_KIND,
5978 FIELD_IS_CONTAINER,
5979 FIELD_END
5983 * ianjuta_symbol_get_boolean:
5984 * @obj: Self
5985 * @field: The field to retrieve.
5986 * @err: Error propagation and reporting.
5988 * Retreives the boolean value of a boolean @field.
5990 * Returns: The boolean
5992 gboolean get_boolean (Field field);
5995 * ianjuta_symbol_get_int:
5996 * @obj: Self
5997 * @field: The field to retrieve.
5998 * @err: Error propagation and reporting.
6000 * Retreives the integer value of an integer @field.
6002 * Returns: The integer
6004 gint get_int (Field field);
6007 * ianjuta_symbol_get_string:
6008 * @obj: Self
6009 * @field: The field to retrieve.
6010 * @err: Error propagation and reporting.
6012 * Retreives the string value of a string @field.
6014 * Returns: The string
6016 const gchar* get_string (Field field);
6019 * ianjuta_symbol_get_file:
6020 * @obj: Self
6021 * @err: Error propagation and reporting.
6023 * A convenience method to get GFile object for
6024 * #IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the
6025 * symbol is declared. It contains the absolute path of the file
6026 * unlike raw value of field #IANJUTA_SYMBOL_FIELD_FILE_PATH.
6028 * Returns: A GFile object. It must be unrefed after use.
6030 GFile* get_file();
6033 * ianjuta_symbol_get_sym_type:
6034 * @obj: Self
6035 * @err: Error propagation and reporting.
6037 * A convenience method to get value of #IANJUTA_SYMBOL_FIELD_TYPE
6038 * field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
6040 * Returns: a #IAnjutaSymbolType
6042 Type get_sym_type ();
6045 * ianjuta_symbol_get_icon:
6046 * @obj: Self
6047 * @err: Error propagation and reporting.
6049 * A convenience method to get a small icon (16x16) representing the symbol
6050 * kind. You *need* a query with fields #IANJUTA_SYMBOL_FIELD_ACCESS and
6051 * #IANJUTA_SYMBOL_FIELD_KIND selected.
6053 * Returns: a Pixbuf icon representing the symbol. Ref the icon if you
6054 * need to keep it.
6056 const GdkPixbuf *get_icon ();
6060 * SECTION:ianjuta-symbol-query
6061 * @title: IAnjutaSymbolQuery
6062 * @short_description: Source code symbol query interface
6063 * @see_also: #IAnjutaSymbolManager, #IAnjutaSymbol
6064 * @stability: Unstable
6065 * @include: libanjuta/interfaces/ianjuta-symbol-query.h
6067 * A query object will have this interface that allows to tweak various
6068 * query parameters. Except for the #IAnjutaSymbolQueryName and
6069 * #IAnjutaSymbolQueryDb parameters, everything else is changable
6070 * post-creation.
6072 * Note that chaning a query parameter, except for limit and offset will
6073 * result in re-preparing the query the next time it is executed, so it is
6074 * not advisable to change it each time the query is executed. For such
6075 * cases, create different queries with different parameters.
6077 * A query is signified by a name enumeration (#IAnjutaSymbolQueryName) which
6078 * practically determines the query type and its execution condition. Each
6079 * query name is assigned to pre-defined query statement and can only be
6080 * set during creation time. Then only its specific ianjuta_symbol_query_search_*()
6081 * can be used to execute the query. These specific execution methods are
6082 * provided to make it convenient to pass query parameters easily and to
6083 * ensure all the needed parameters are given.
6085 * A query can run in different modes, defined by #IAnjutaSymbolQueryMode, by
6086 * default it is executed in synchrounous mode #IANJUTA_SYMBOL_QUERY_MODE_SYNC
6087 * and can be changed using ianjuta_symbol_query_set_mode().
6088 * #IANJUTA_SYMBOL_QUERY_MODE_ASYNC runs it in asynchronous mode in a separate
6089 * thread and can be canceled with ianjuta_symbol_query_cancel().
6091 * A query runs on a database, defined by #IAnjutaSymbolQueryDb, and can be
6092 * only selected at creatation time.
6094 * In addition, there are many other filters that can be set to the query
6095 * to refine the query results. For example, ianjuta_symbol_query_set_fields()
6096 * is used to set the needed symbol fields to retrieve, ianjuta_symbol_query_set_filters()
6097 * is used to filter the results with symbol types, ianjuta_symbol_query_set_file_scope()
6098 * limits the results to either public or private scope within the source file,
6099 * ianjuta_symbol_query_set_group_by() is used to group the results on a given
6100 * field, ianjuta_symbol_query_set_order_by is used to order the results on a
6101 * given field.
6103 * ianjuta_symbol_query_set_limit() and ianjuta_symbol_query_set_offset() are
6104 * used to change limit and offset of the resultset. Note again that these
6105 * parameters do not require re-preparation of query, so can be safely used
6106 * any time without performance hit.
6108 interface IAnjutaSymbolQuery
6110 #include "ianjuta-iterable.h"
6111 #include "ianjuta-symbol.h"
6114 * IAnjutaSymbolQueryMode:
6115 * @IANJUTA_SYMBOL_QUERY_MODE_SYNC: Syncronous query. The result is immediately
6116 * available as retrun value of search call.
6117 * @IANJUTA_SYMBOL_QUERY_MODE_ASYNC: Asynchronous query. The search call
6118 * return immediately and result delievered as a signal later. The actual
6119 * query is done in a separate thread.
6120 * @IANJUTA_SYMBOL_QUERY_MODE_QUEUED: If the database is busy
6121 * scanning, then the query is performed later when database is ready.
6122 * It returns NULL and result is delivered through async-result signal.
6123 * Only query can stay queued, so calling search multiple times would
6124 * result in only the last one being active.
6126 * This parameter determines the mode of query execution. By default,
6127 * IANJUTA_SYMBOL_QUERY_MODE_SYNC is selected.
6129 enum Mode
6131 MODE_SYNC,
6132 MODE_ASYNC,
6133 MODE_QUEUED
6137 * IAnjutaSymbolQueryDb:
6138 * @IANJUTA_SYMBOL_QUERY_DB_PROJECT: Select project database.
6139 * @IANJUTA_SYMBOL_QUERY_DB_SYSTEM: Select system database.
6141 * Sets the database to use for the query. System database is where
6142 * all system library symbols are found. While project database is where
6143 * currently open project's symbols are found.
6145 enum Db
6147 DB_PROJECT,
6148 DB_SYSTEM
6152 * IAnjutaSymbolQueryName:
6153 * @IANJUTA_SYMBOL_QUERY_SEARCH: Query to perform basic substring search.
6154 * @IANJUTA_SYMBOL_QUERY_SEARCH_ALL: Query to get all symbols
6155 * @IANJUTA_SYMBOL_QUERY_SEARCH_FILE: Query to perform substring search in a file.
6156 * @IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE: Query to perform substring search in a scope.
6157 * @IANJUTA_SYMBOL_QUERY_SEARCH_ID: Query to find the symbol of given ID.
6158 * @IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS: Query to find members of a scope (eg. class).
6159 * @IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS: Query to get parents of a class.
6160 * @IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE: Query to find scope name of a file position.
6161 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE: Query to get the parent scope of a symbol.
6162 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE: Query to get the parent scope of a symbol in the file.
6164 * Names of query that defined what kind of query it is.
6166 enum Name
6168 SEARCH,
6169 SEARCH_ALL,
6170 SEARCH_FILE,
6171 SEARCH_IN_SCOPE,
6172 SEARCH_ID,
6173 SEARCH_MEMBERS,
6174 SEARCH_CLASS_PARENTS,
6175 SEARCH_SCOPE,
6176 SEARCH_PARENT_SCOPE,
6177 SEARCH_PARENT_SCOPE_FILE
6181 * IAnjutaSymbolQueryFileScope:
6182 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_IGNORE: Ignore file scope
6183 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PUBLIC: Only public symbols visible to rest of project.
6184 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PRIVATE: Only private symbols visible inside a file.
6186 * Defines file scope of symbols to query.
6188 enum FileScope
6190 SEARCH_FS_IGNORE,
6191 SEARCH_FS_PUBLIC,
6192 SEARCH_FS_PRIVATE
6196 * IAnjutaSymbolQuery::async_result:
6197 * @ianjutasymbolquery: Self
6198 * @arg1: Query result (IAnjutaIterable, IAnjutaSymbol) of an async
6199 * or queued search. NULL if no result is found or some error happened.
6201 * This signal is emitted for every search of the Query involved in async
6202 * mode, unless cancled by ianjuta_symbol_query_cancel(). For single queued
6203 * query, only result of the last search is emitted (if it wasn't database
6204 * was busy when search was invoked). Unlike in sync counterpart,
6205 * do not unref @result after use.
6207 void ::async_result (GObject* result);
6210 * ianjuta_symbol_query_set_mode:
6211 * @obj: Self
6212 * @mode: The mode of query.
6213 * @err: Error propagation and reporting.
6215 * Sets the mode of Query.
6217 void set_mode (IAnjutaSymbolQueryMode mode);
6220 * ianjuta_symbol_query_set_fields:
6221 * @obj: Self
6222 * @n_fields: Then number of fields to retrieve.
6223 * @fields: The fields to retrieve in the query. The array length must
6224 * be @n_fields.
6225 * @err: Error propagation and reporting.
6227 * Sets the fields of Query.
6229 void set_fields (gint n_fields, IAnjutaSymbolField *fields);
6232 * ianjuta_symbol_query_set_filters:
6233 * @obj: Self
6234 * @filters: The mode of query.
6235 * @include_types: TRUE if filter is positive, FALSE if reversed.
6236 * @err: Error propagation and reporting.
6238 * Sets the bit mask of symbol type filters. if @include_types is TRUE,
6239 * symbols satisfying the given symbol types are selected, otherwise
6240 * they are excluded.
6242 void set_filters (IAnjutaSymbolType filters, gboolean includes_types);
6245 * ianjuta_symbol_query_set_file_scope:
6246 * @obj: Self
6247 * @filescope_search: The filescope to search.
6248 * @err: Error propagation and reporting.
6250 * Sets the filescope search of Query.
6252 void set_file_scope (IAnjutaSymbolQueryFileScope filescope_search);
6255 * ianjuta_symbol_query_set_offset:
6256 * @obj: Self
6257 * @offset: Offset of the resultset.
6258 * @err: Error propagation and reporting.
6260 * Sets the offset index of Query results.
6262 void set_offset (gint offset);
6265 * ianjuta_symbol_query_set_limit:
6266 * @obj: Self
6267 * @limit: The limit of query.
6268 * @err: Error propagation and reporting.
6270 * Sets the limit of Query results. No more than @limit results are
6271 * returned.
6273 void set_limit (gint limit);
6276 * ianjuta_symbol_query_set_group_by:
6277 * @obj: Self
6278 * @field: The field to group results.
6279 * @err: Error propagation and reporting.
6281 * Sets the field with which result of query is grouped. As a result
6282 * there will be no duplicates of with this field.
6284 void set_group_by (IAnjutaSymbolField field);
6287 * ianjuta_symbol_query_set_order_by:
6288 * @obj: Self
6289 * @field: The field to order the result.
6290 * @err: Error propagation and reporting.
6292 * Sets the field with which result of query is ordered.
6294 void set_order_by (IAnjutaSymbolField field);
6297 * ianjuta_symbol_query_set_cancel:
6298 * @obj: Self
6299 * @err: Error propagation and reporting.
6301 * Cancels any pending non-sync searches. After calling this, it is
6302 * guaranteed that "async-result" will not be called any more for any
6303 * past searches. New searches will have their results signaled as
6304 * normal.
6306 void cancel ();
6309 * ianjuta_symbol_query_search:
6310 * @obj: Self
6311 * @pattern: Search pattern in compliance with SQL LIKE syntax
6312 * @err: Error propagation and reporting.
6314 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH query.
6316 IAnjutaIterable* search (const gchar *pattern);
6319 * ianjuta_symbol_query_search_all:
6320 * @obj: Self
6321 * @err: Error propagation and reporting.
6323 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ALL query.
6325 IAnjutaIterable* search_all ();
6328 * ianjuta_symbol_query_search_file:
6329 * @obj: Self
6330 * @pattern: Search pattern in compliance with SQL LIKE syntax
6331 * @file: The file whose symbols are searched.
6332 * @err: Error propagation and reporting.
6334 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_FILE query.
6336 IAnjutaIterable* search_file (const gchar *pattern, const GFile *file);
6339 * ianjuta_symbol_query_search_in_scope:
6340 * @obj: Self
6341 * @pattern: Search pattern in compliance with SQL LIKE syntax
6342 * @scope: The scope inside which symbols are searched.
6343 * @err: Error propagation and reporting.
6345 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE query.
6347 IAnjutaIterable* search_in_scope (const gchar *pattern, IAnjutaSymbol *scope);
6350 * ianjuta_symbol_query_search_members:
6351 * @obj: Self
6352 * @symbol: The symbol whose members to get.
6353 * @err: Error propagation and reporting.
6355 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS query.
6357 IAnjutaIterable* search_members (IAnjutaSymbol *symbol);
6360 * ianjuta_symbol_query_search_class_parents:
6361 * @obj: Self
6362 * @symbol: The class symbol whose parents to get.
6363 * @err: Error propagation and reporting.
6365 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS query.
6367 IAnjutaIterable* search_class_parents (IAnjutaSymbol *symbol);
6370 * ianjuta_symbol_query_search_id:
6371 * @obj: Self
6372 * @symbol: The symbol id whose details to get.
6373 * @err: Error propagation and reporting.
6375 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ID query.
6377 IAnjutaIterable* search_id (gint symbol_id);
6380 * ianjuta_symbol_query_search_scope:
6381 * @obj: Self
6382 * @file_path: The file where the scope is.
6383 * @line: The line where the scope is.
6384 * @err: Error propagation and reporting.
6386 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE query.
6388 IAnjutaIterable* search_scope (const gchar *file_path, gint line);
6391 * ianjuta_symbol_query_search_parent_scope:
6392 * @obj: Self
6393 * @symbol: The symbol whose parent scope is to be found.
6394 * @err: Error propagation and reporting.
6396 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE query.
6398 IAnjutaIterable* search_parent_scope (IAnjutaSymbol *symbol);
6401 * ianjuta_symbol_query_search_parent_scope_file:
6402 * @symbol: The symbol whose parent scope is to be found.
6403 * @obj: Self
6404 * @file_path: The file where the parent scope is to be found.
6405 * @err: Error propagation and reporting.
6407 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE query.
6409 IAnjutaIterable* search_parent_scope_file (IAnjutaSymbol *symbol, const gchar *file_path);
6413 * SECTION:ianjuta-symbol-manager
6414 * @title: IAnjutaSymbolManager
6415 * @short_description: Source code symbols manager inteface
6416 * @see_also: #IAnjutaSymbol
6417 * @stability: Unstable
6418 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
6421 interface IAnjutaSymbolManager
6423 #include <libanjuta/anjuta-async-notify.h>
6424 #include "ianjuta-iterable.h"
6425 #include "ianjuta-symbol.h"
6426 #include "ianjuta-symbol-query.h"
6429 * IAnjutaSymbolManager::prj_scan_end:
6430 * @obj: Self
6432 * This signal is emitted when a scanning of one or more files on project db
6433 * ends.
6435 void ::prj_scan_end (gint process_id);
6438 * IAnjutaSymbolManager::sys_scan_end:
6439 * @obj: Self
6441 * This signal is emitted when a scanning of one or more packages on system db
6442 * ends. This signal doesn't mean that all the scan process for the packages
6443 * is ended, but that just one (or more) is (are).
6445 void ::sys_scan_end (gint process_id);
6448 * ianjuta_symbol_manager_create_query:
6449 * @obj: Self
6450 * @name: Name of the query. It decides what query type it is.
6451 * @db: The database to use.
6452 * @err: Error propagation and reporting.
6454 * Create a query object. By default only #IANJUTA_SYMBOL_FIELD_ID and
6455 * and #IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity,
6456 * offset is set to 0, no filters are set and mode is set to
6457 * #IANJUTA_SYMBOL_QUERY_MODE_SYNC.
6459 * Returns: A #IAnjutaSymbolQuery object
6461 IAnjutaSymbolQuery* create_query (IAnjutaSymbolQueryName name, IAnjutaSymbolQueryDb db);
6464 * ianjuta_symbol_manager_add_package:
6465 * @obj: Self
6466 * @pkg_name: Name of the package to scan. Should be the name given by
6467 * pkg-config. The colon char must be avoided.
6468 * @pkg_version: Version of the package. The colon char must be avoided.
6469 * or by the language implementation (Python, Javascript, etc.)
6470 * @files: A list of GFile's to scan for this package
6472 * Reads the package files into the database asynchronously.
6474 * Returns: TRUE if the package will be loaded into the db, FALSE if the package
6475 * already exists
6477 gboolean add_package (const gchar* pkg_name, const gchar* pkg_version, GList* files);
6480 * ianjuta_symbol_manager_activate_package:
6481 * @obj: Self
6482 * @pkg_name: Name of the package to activate. The colon char must be avoided.
6483 * @pkg_version: Version of the package. The colon char must be avoided.
6485 * Activates the package for searches in the global symbol database.
6487 * Returns: TRUE if the package was loaded (or will be loaded once scanned).
6488 * FALSE if the version given was newer than the version in the database or the
6489 * package was not found. In this case, add_package() should be called.
6491 gboolean activate_package (const gchar *pkg_name, const gchar* pkg_version);
6494 * ianjuta_symbol_manager_deactivate_package:
6495 * @obj: Self
6496 * @pkg_name: name of the package. The colon char must be avoided.
6497 * @pkg_version: Version of the package. The colon char must be avoided.
6499 * Deactivates the package if it was found. If package is NULL, deactivate all
6500 * packages.
6503 void deactivate_package (const gchar* pkg_name, const gchar* pkg_version);
6506 * ianjuta_symbol_manager_deactivate_all:
6507 * @obj: Self
6509 * Deactivates all activate packages
6512 void deactivate_all ();
6516 * SECTION:ianjuta-print
6517 * @title: IAnjutaPrint
6518 * @short_description: Print interface
6519 * @see_also:
6520 * @stability: Unstable
6521 * @include: libanjuta/interfaces/ianjuta-print.h
6524 interface IAnjutaPrint
6527 * ianjuta_print_print:
6528 * @obj: Self
6529 * @err: Error propagation and reporting.
6531 * Print the plugin (the file in case of the editor). In most cases this will show
6532 * a print dialog
6534 void print();
6537 * ianjuta_print_print:
6538 * @obj: Self
6539 * @err: Error propagation and reporting.
6541 * Show print preview dialog
6544 void print_preview();
6548 * SECTION:ianjuta-preferences
6549 * @title: IAnjutaPreferences
6550 * @short_description: Preferences interface
6551 * @see_also:
6552 * @stability: Unstable
6553 * @include: libanjuta/interfaces/ianjuta-preferences
6556 interface IAnjutaPreferences
6558 #include <libanjuta/anjuta-preferences.h>
6560 * ianjuta_preferences_merge:
6561 * @obj: Self
6562 * @prefs: AnjutaPreferences to install to
6563 * @err: Error propagation and reporting.
6565 * When called, the plugin should install it's preferences
6567 void merge(AnjutaPreferences* prefs);
6570 * ianjuta_preferences_unmerge:
6571 * @obj: Self
6572 * @prefs: AnjutaPreferences to install to
6573 * @err: Error propagation and reporting.
6575 * When called, the plugin should uninstall it's preferences
6577 void unmerge(AnjutaPreferences* prefs);
6581 * SECTION:ianjuta-plugin-factory
6582 * @title: IAnjutaPluginFactory
6583 * @short_description: Create Anjuta plugin objects
6584 * @see_also:
6585 * @stability: Unstable
6586 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
6588 * This interface is used to create all Anjuta plugin objects. It is
6589 * already implemented inside Anjuta by an object able to load plugins written
6590 * in C. In order to load plugins in other languages (or in a different way),
6591 * a loader plugin implementing this interface must be written first, probably
6592 * in C.
6595 interface IAnjutaPluginFactory
6597 #include <libanjuta/anjuta-plugin.h>
6598 #include <libanjuta/anjuta-shell.h>
6599 #include <libanjuta/anjuta-plugin-handle.h>
6602 * IAnjutaPluginFactoryError:
6603 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
6604 * missing in .plugin file
6605 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
6606 * double colon following location) is missing in .plugin file
6607 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
6608 * plugin module is probably not installed
6609 * @IANJUTA_PLUGIN_FACTORY_INVALID_MODULE: Module file cannot be
6610 * loaded, not a shared library perhaps
6611 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
6612 * registration function, library is not an anjuta plugin or
6613 * is not for the right version
6614 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
6615 * plugin type, library is not an anjuta plugin or not for
6616 * the right version
6617 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
6619 * These enumeration is used to specify errors.
6621 enum Error
6623 OK = 0,
6624 MISSING_LOCATION,
6625 MISSING_TYPE,
6626 MISSING_MODULE,
6627 INVALID_MODULE,
6628 MISSING_FUNCTION,
6629 INVALID_TYPE,
6630 UNKNOWN_ERROR,
6634 * ianjuta_plugin_factory_new_plugin:
6635 * @obj: Self
6636 * @handle: Plugin information
6637 * @shell: Anjuta shell
6638 * @err: Error propagation and reporting.
6640 * Create a new AnjutaPlugin object from the plugin information handle,
6641 * give it the AnjutaShell object as argument.
6643 * Return value: a new plugin object
6645 AnjutaPlugin* new_plugin (AnjutaPluginHandle* handle, AnjutaShell *shell);
6649 * SECTION:ianjuta-language
6650 * @title: IAnjutaLanguage
6651 * @short_description: Interface to manage multiple programming languages
6652 * @see_also:
6653 * @stability: Unstable
6654 * @include: libanjuta/interfaces/ianjuta-language.h
6658 interface IAnjutaLanguage
6660 #include <libanjuta/interfaces/ianjuta-editor-language.h>
6661 typedef gint Id;
6664 * ianjuta_language_from_mime_type:
6665 * @obj: Self
6666 * @mime_type: A mime type to get the language for
6668 * Returns: A language Id or 0 in case no language was found
6670 Id get_from_mime_type (const gchar* mime_type);
6673 * ianjuta_language_from_string:
6674 * @obj: Self
6675 * @string: A string representation of the language. Note that multiple
6676 * strings may describe the language like C++ and Cpp
6678 * Returns: A language Id or 0 in case no language was found
6680 Id get_from_string (const gchar* string);
6683 * ianjuta_language_get_name:
6684 * @obj: Self
6685 * @id: A valid language id
6687 * Returns: The main name of the language. When you call ianjuta_language_from_string()
6688 * before that method the string you get here might be different to the one you passed
6689 * because the language might have multiple string representations
6691 const gchar* get_name(Id id);
6694 * ianjuta_language_get_make_target:
6695 * @obj: Self
6696 * @id: A valid language id
6698 * Returns: The suffix for the file thats needs to be passed to
6699 * make to compile the file, e.g. ".o" for C
6701 const gchar* get_make_target (Id id);
6704 * ianjuta_language_get_strings:
6705 * @obj: Self
6706 * @id: A valid language id
6708 * Returns: (element-type utf8): A list of strings that represent this language
6710 List<const gchar*> get_strings(Id id);
6713 * ianjuta_language_get_mime_types:
6714 * @obj: Self
6715 * @id: A valid language id
6717 * Returns: (element-type utf8): A list of mime-types that represent this language
6719 List<const gchar*> get_mime_types(Id id);
6722 * ianjuta_language_get_from_editor:
6723 * @obj: Self
6724 * @editor: An object implementing IAnjutaEditorLanguage
6725 * @err: Error propagation
6727 * Conviniece method to get the id directly from the editor
6729 * Returns: A valid language id or 0
6731 IAnjutaLanguageId get_from_editor (IAnjutaEditorLanguage* editor);
6734 * ianjuta_language_get_name_from_editor:
6735 * @obj: Self
6736 * @editor: An object implementing IAnjutaEditorLanguage
6737 * @err: Error propagation
6739 * Conviniece method to get the name directly from the editor
6741 * Returns: A language name or NULL
6743 const gchar* get_name_from_editor (IAnjutaEditorLanguage* editor);
6746 * ianjuta_language_get_languages:
6747 * @obj: Self
6748 * @err: Error propagation
6750 * Returns: (element-type int) (transfer container): a list of ids of the available
6751 * languages. Use GPOINTER_TO_INT() to receive them. The list but not the
6752 * values should be free'd with g_list_free()
6754 GList* get_languages ();
6758 * SECTION:ianjuta-indenter
6759 * @title: IAnjutaIndenter
6760 * @short_description: Interface for automatic indentation
6761 * @see_also:
6762 * @stability: Unstable
6763 * @include: libanjuta/interfaces/ianjuta-indenter.h
6767 interface IAnjutaIndenter
6769 #include <libanjuta/interfaces/ianjuta-iterable.h>
6772 * ianjuta_indenter_indent
6773 * @obj: Self
6774 * @start: Start of the area to indent
6775 * @end: End of the area to indent
6776 * @error: Error propagation
6778 * Indent the area between @start and @end according to the indentation rules
6779 * of the programming language. Usually implemented by language support plugins.
6780 * Only one indenter can be loaded at a time.
6781 * Note: Indenters always affect full lines, so start and end will be moved
6782 * according to the next line start/end.
6784 void indent (IAnjutaIterable* start, IAnjutaIterable* end);