1 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 // libanjuta interfaces. Generate stubs with anjuta-idl-compiler.pl
6 // Copyright (C) 2004 Naba Kumar <naba@gnome.org>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Library General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #include
<glib
-object.h
>
25 * SECTION:ianjuta-file
27 * @short_description: Implemented by plugins that can open files.
28 * @see_also: #IAnjutaFileSavable
29 * @stability: Unstable
30 * @include: libanjuta/interfaces/ianjuta-file.h
32 * Any plugin that can open files should implemented this interface. Along
33 * with the 'File Loader::SupportedMimeTypes' property of the plugin in
34 * .plugin file, it will be used by the loader to open files of that type.
42 * @file: file to open.
43 * @err: Error propagation and reporting
45 * The implementor opens the given file.
47 void open
(GFile
* file
);
50 * ianjuta_file_get_file:
52 * @err: Error propagation and reporting
54 * Returns the file that was opened with ianjuta_file_open().
56 * Return value: (transfer full): The last file opened.
61 * SECTION:ianjuta-file-savable
62 * @title: IAnjutaFileSavable
63 * @short_description: Implemented by plugins that can save files.
64 * @see_also: #IAnjutaFile
65 * @stability: Unstable
66 * @include: libanjuta/interfaces/ianjuta-file-savable.h
68 * Plugins implementing #IAnjutaFile inteface that can also save files
69 * should also implement this interface.
71 interface IAnjutaFileSavable
74 * IAnjutaFileSavable::update_save_ui:
77 * This signal is emitted when the state of the file has
78 * changed. It could be that the user writes in it
79 * and the file becomes dirty or the opposite: after using
80 * undo, the file is back to its saved content. It is triggered
81 * if the file becomes read-only or give a conflict too.
83 void ::update_save_ui
();
86 * IAnjutaFileSavable::saved:
88 * @file: file where the content is saved or NULL if save failed
90 * This signal is emitted when the content is saved.
92 void ::saved
(GFile
* file
);
95 * ianjuta_file_savable_save:
97 * @err: Error propagation and reporting
99 * Saves the content to the original file from which it was loaded.
100 * The signal saved is always emitted even if the save fails.
105 * ianjuta_file_savable_save_as:
107 * @file: File to save the content.
108 * @err: Error propagation and reporting
110 * Saves the content to a different File.
111 * The signal saved is always emitted even if the save fails.
113 void save_as
(GFile
* file
);
116 * ianjuta_file_savable_set_dirty:
118 * @dirty: Whether the file was edited or not
119 * @err: Error propagation and reporting
121 * if @dirty is TRUE, sets dirty for the content. Save point will be
122 * left and the content will be considered not saved. Otherwise,
123 * content will considered saved and save-point will be entered.
125 void set_dirty
(gboolean dirty
);
128 * ianjuta_file_savable_is_dirty:
130 * @err: Error propagation and reporting
132 * Returns the dirty status of the content.
134 * Return value: TRUE if dirty, FALSE otherwise.
136 gboolean is_dirty
();
139 * ianjuta_file_savable_is_read_only:
141 * @err: Error propagation and reporting
143 * Return is the file is read-only
145 * Return value: TRUE if read-only, FALSE otherwise.
147 gboolean is_read_only
();
150 * ianjuta_file_savable_is_conflict:
152 * @err: Error propagation and reporting
154 * Return is the file is in conflict. It means the file
155 * has been modified externally and the user needs to
156 * tell which version he wants to use.
158 * Return value: TRUE if conflict, FALSE otherwise.
160 gboolean is_conflict
();
165 * SECTION:ianjuta-stream
166 * @title: IAnjutaStream
167 * @short_description: Implemented by plugins that can open file streams
169 * @stability: Unstable
170 * @include: libanjuta/interfaces/ianjuta-stream.h
173 interface IAnjutaStream
178 * ianjuta_stream_open:
180 * @stream: Stream to open from.
181 * @err: Error propagation and reporting
183 * The implementor opens the given stream.
185 void open
(FILE
* stream
);
188 * SECTION:ianjuta-stream-savable
189 * @title: IAnjutaStreamSavable
190 * @short_description: Implemented by plugins that can save file streams
192 * @stability: Unstable
193 * @include: libanjuta/interfaces/ianjuta-stream-savable.h
196 interface IAnjutaStreamSavable
199 * ianjuta_stream_save:
201 * @stream: Stream to save to.
202 * @err: Error propagation and reporting
204 * The implementor saves the content to the given stream.
206 void save
(FILE
* stream
);
211 * SECTION:ianjuta-markable
212 * @title: IAnjutaMarkable
213 * @short_description: Implemented by editors (or views) with markers support
215 * @stability: Unstable
216 * @include: libanjuta/interfaces/ianjuta-markable.h
219 interface IAnjutaMarkable
227 * IAnjutaMarkableMarker:
228 * @IANJUTA_MARKABLE_LINEMARKER: Mark a particular line
229 * @IANJUTA_MARKABLE_BOOKMARK: A bookmark
230 * @IANJUTA_MARKABLE_MESSAGE: An (error) message
231 * @IANJUTA_MARKABLE_BREAKPOINT_DISABLED: a disabled breakpoint
232 * @IANJUTA_MARKABLE_BREAKPOINT_ENABLED: a enabled breakpoint
233 * @IANJUTA_MARKABLE_PROGRAM_COUNTER: Marks the program counter position
235 * This enumeration is used to specify the pixmap used for the marker
248 * IAnjutaMarkable::marker-clicked:
250 * @double_click: whether the marker was double clicked
251 * @location: location of the clicked marker
253 * The signal is emitted when the user clicks on a marker
255 void ::marker_clicked
(gboolean double_click
, gint location
);
258 * ianjuta_markable_mark:
260 * @location: Location at which the marker to set.
261 * @marker: Type of marker to be used
262 * @tooltip: (allow-none): optional tooltip displayed with the marker
263 * @err: Error propagation and reporting
265 * Marks the specified location with the given marker type. Location is
266 * implementation depenedent. For example, for an editor location means
267 * lines where markers are set.
269 * Return value: Handle of the location marked. Can be used later to obtain
270 * new location, if it has been moved due to addetions/deletions in the
271 * implementor object.
273 gint mark
(gint location
, Marker marker
, const gchar
* tooltip
);
276 * ianjuta_markable_location_from_handle:
278 * @handle: Handle of location.
279 * @err: Error propagation and reporting
281 * Location where a marker is set could have moved by some operation in
282 * the implementation. To retrieve the correct location where the marker
283 * has moved, pass the handle retured by ianjuta_markable_mark() to this
286 * Return value: Current location where the marker was set.
288 gint location_from_handle
(gint
handle);
291 * ianjuta_markable_unmark:
293 * @location: Location where the marker is set.
294 * @marker: The marker to unset.
295 * @err: Error propagation and reporting
297 * Clears the @marker at given @location.
299 void unmark
(gint location
, Marker marker
);
302 * ianjuta_markable_is_marker_set:
304 * @location: Location to check.
305 * @marker: Marker to check.
306 * @err: Error propagation and reporting
308 * Check if the @marker is set at the given @location.
310 * Returns: TRUE if the marker is set at the location, other false.
312 gboolean is_marker_set
(gint location
, Marker marker
);
315 * ianjuta_markable_delete_all_markers:
317 * @marker: Marker to delete.
318 * @err: Error propagation and reporting
320 * Delete the @marker from all locations.
322 void delete_all_markers
(Marker marker
);
326 * SECTION:ianjuta-indicable
327 * @title: IAnjutaIndicable
328 * @short_description: Implemented by indicate that indicate a range
330 * @stability: Unstable
331 * @include: libanjuta/interfaces/ianjuta-indicable.h
334 interface IAnjutaIndicable
336 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
339 * IAnjutaIndicableIndicator:
340 * @IANJUTA_INDICABLE_NONE: No indicator
341 * @IANJUTA_INDICABLE_IMPORTANT: Important indicator
342 * @IANJUTA_INDICABLE_WARNING: Warning indicator
343 * @IANJUTA_INDICABLE_CRITICAL: Critical indicator
345 * This enumeration is used to specify the appearance of the indicator
356 * ianjuta_indicable_set:
358 * @begin_location: Location where the indication should start
359 * @end_location: Location where the indication should end
360 * @indicator: the indicator to use
361 * @err: Error propagation and reporting
366 void set
(IAnjutaIterable
*begin_location
, IAnjutaIterable
*end_location
, Indicator indicator
);
369 * ianjuta_indicable_clear:
371 * @err: Error propagation and reporting
373 * Clear all indicators
380 * SECTION:ianjuta-iterable
381 * @title: IAnjutaIterable
382 * @short_description: Implemented by objects that can iterate
384 * @stability: Unstable
385 * @include: libanjuta/interfaces/ianjuta-iterable.h
388 interface IAnjutaIterable
391 * ianjuta_iterable_first:
393 * @err: Error propagation and reporting
395 * Set iter to first element position. Returns FALSE if
396 * there is no element in the iterable (hence does not have first).
397 * The iter points to the first valid item.
399 * Returns: TRUE if sucessful, other FALSE.
404 * ianjuta_iterable_next:
406 * @err: Error propagation and reporting
408 * Set the iter position to next element position. Iter can go until one
409 * item past the last item and lands in end-iter. end-iter does not point
410 * to any valid item and signifies end of the list. Returns FALSE if iter
411 * was already at end-iter (iter can not go past it) and remains pointed
414 * Returns: TRUE if sucessful, otherwise FALSE if already at end-iter.
419 * ianjuta_iterable_previous:
421 * @err: Error propagation and reporting
423 * Set the iter position to previous element position. Returns FALSE if
424 * there is no previous element and the iter remains pointed to the first
427 * Returns: TRUE if sucessful, other FALSE.
429 gboolean previous
();
432 * ianjuta_iterable_last:
434 * @err: Error propagation and reporting
436 * Set iter position to end-iter (one past last element) position.
437 * Returns FALSE if there is no element in the iterable (already
440 * Returns: TRUE if sucessful, other FALSE.
445 * ianjuta_iterable_foreach:
447 * @callback: Callback to call for each element.
448 * @user_data: user data that is passed back to the callback.
449 * @err: Error propagation and reporting
451 * Call callback for each element in the list. Call back is passed the
452 * same iter, but with different position set (from first to last). This
453 * method does not affect current position. i.e. current position is
454 * restored at the end of this method.
456 void foreach
(GFunc
callback, gpointer user_data
);
459 * ianjuta_iterable_set_position:
461 * @position: New position for the iter.
462 * @err: Error propagation and reporting
464 * Sets the current position of the iter to @position. The given @position
465 * must be from 0 to length - 1 (#ianjuta_iter_get_length()) to point to
466 * a valid element. Passing @position < 0 will set it to end-iter. It
467 * returns TRUE for the above cases. FLASE will be returned, if
468 * out-of-range @position is passed (@position > length - 1) and iter is
471 * Returns: TRUE if successfully set (i.e. @position is within the range or
472 * end-iter). otherwise returns FALSE (i.e. @position is out of data range).
474 gboolean set_position
(gint position
);
477 * ianjuta_iterable_get_position:
479 * @err: Error propagation and reporting
481 * Index of the current iter in the iterable. It will be
482 * from 0 to length - 1 (ianjuta_iter_get_length()) if iter is pointed
483 * at valid element. It will return -1 if iter is pointed at end-iter.
485 * Returns: integer index, or -1 for end-iter.
487 gint get_position
();
490 * ianjuta_iterable_get_length:
492 * @err: Error propagation and reporting
494 * Length of the iterable (number of elements indexable by it).
496 * Returns: total length of the list.
501 * ianjuta_iterable_clone:
503 * @err: Error propagation and reporting
505 * Clones the iterable. The returned iterable object must be unreffed
508 * Returns: (transfer full): A new instance of this iterable pointing at the same location.
510 IAnjutaIterable
*clone
();
513 * ianjuta_iterable_assign:
515 * @src_iter: Source iter from which to copy the assignment.
516 * @err: Error propagation and reporting
518 * Assigns the iter position from @src_iter.
521 void assign
(IAnjutaIterable
*src_iter
);
524 * ianjuta_iterable_compare:
526 * @iter2: Second iter to compare.
527 * @err: Error propagation and reporting
529 * Compares the position of @iter2 with this @obj. Returns -1
530 * value if this @obj is smaller than @iter2. Returns +1 value
531 * if this @obj is larger than @iter2. And returns 0 if both are equal.
532 * If you want difference of the iter positions, use
533 * #ianjuta_iterable_diff(). This method is meant for fast comparision.
535 * Returns: 0 if equal, -1 if @obj is smaller than @iter2
536 * or +1 if @obj is larger than @iter2.
539 gint compare
(IAnjutaIterable
*iter2
);
542 * ianjuta_iterable_diff:
544 * @iter2: Second iter to differenciate.
545 * @err: Error propagation and reporting
547 * Compares the position of @iter2 with this @obj and returns difference
548 * in position of the two (@obj - @iter2).
550 * Returns: The position difference of @obj - @iter2
553 gint diff
(IAnjutaIterable
*iter2
);
556 * SECTION:ianjuta-iterable-tree
557 * @title: IAnjutaIterableTree
558 * @short_description: Implemented by tree objects that can iterate
560 * @stability: Unstable
561 * @include: libanjuta/interfaces/ianjuta-iterable-tree.h
564 interface IAnjutaIterableTree
568 * ianjuta_iterable_tree_parent:
570 * @err: Error propagation and reporting
572 * Set iter position to parent of curernt iter. If there is no parent,
573 * returns FALSE (current iter position is not changed)
575 * Returns: TRUE if sucessful, otherwise FALSE.
580 * ianjuta_iterable_tree_children:
582 * @err: Error propagation and reporting
584 * Iter position set to first child of current iter. If there is no
585 * children, return NULL (iter position is not changed).
587 * Returns: TRUE if sucessful, otherwise FALSE.
589 gboolean children
();
592 * ianjuta_iterable_tree_has_children:
594 * @err: Error propagation and reporting
596 * Returns true if current iter has children
598 * Returns: TRUE if there are children, otherwise FALSE.
600 gboolean has_children
();
603 * ianjuta_iterable_tree_foreach_post:
605 * @callback: Callback to call for each element.
606 * @user_data: User data to pass back to callback.
607 * @err: Error propagation and reporting
609 * Call callback for each element in post order.
611 void foreach_post
(GFunc
callback, gpointer user_data
);
614 * ianjuta_iterable_tree_foreach_pre:
616 * @callback: Callback to call for each element.
617 * @user_data: User data to pass back to callback.
618 * @err: Error propagation and reporting
620 * Call callback for each element in pre order.
622 void foreach_pre
(GFunc
callback, gpointer user_data
);
627 * SECTION:ianjuta-builder
628 * @title: IAnjutaBuilder
629 * @short_description: Implemented by plugins that can build
631 * @stability: Unstable
632 * @include: libanjuta/interfaces/ianjuta-builder.h
635 interface IAnjutaBuilder
638 * IAnjutaBuilderError:
639 * @IANJUTA_BUILDER_SUCCEED: Build succeeded
640 * @IANJUTA_BUILDER_FAILED: Build failed
641 * @IANJUTA_BUILDER_CANCELED: Build was canceld
642 * @IANJUTA_BUILDER_ABORTED: Build aborted
643 * @IANJUTA_BUILDER_INTERRUPTED: Build interruped
644 * @IANJUTA_BUILDER_TERMINATED: Build interruped
645 * @IANJUTA_BUILDER_UNKNOWN_TARGET: The specified target is unknown
646 * @IANJUTA_BUILDER_UNKNOWN_ERROR: Unknown Error
647 * @IANJUTA_BUILDER_OTHER_ERROR: Other Error (no unknown ;-))
649 * Possible build errors
664 typedef gpointer
Handle;
666 typedef void (*Callback) (GObject
*sender
, IAnjutaBuilderHandle command
, GError
* err
, gpointer user_data
);
669 * IANJUTA_BUILDER_ROOT_URI
671 * Build directory uri. It is the same than the project_root_uri for
674 #define ROOT_URI
"build_root_uri"
677 * IANJUTA_BUILDER_CONFIGURATION_DEBUG
679 * Name of debugging configutation.
681 #define CONFIGURATION_DEBUG
"Debug"
684 * IANJUTA_BUILDER_CONFIGURATION_OPTIMIZED
686 * Name of optimized configutation.
688 #define CONFIGURATION_OPTIMIZED
"Optimized"
691 * IANJUTA_BUILDER_CONFIGURATION_PROFILING
693 * Name of profiling configutation.
695 #define CONFIGURATION_PROFILING
"Profiling"
698 * ianjuta_builder_is_built:
701 * @callback: callback called when command is finished
702 * @user_data: data passed to the callback
703 * @err: Error propagation and reporting.
705 * Check if the corresponding target is up to date or not. This
706 * command doesn't display anything. If this command cannot be
707 * implemented, it is possible to return always TRUE.
708 * When the command is finished, the callback function is called
711 * Returns: non null command handle if succeed
713 Handle is_built
(const gchar
*uri
, Callback callback, gpointer user_data
);
716 * ianjuta_builder_build:
719 * @callback: callback called when command is finished
720 * @user_data: data passed to the callback
721 * @err: Error propagation and reporting.
723 * Build the specified target.
724 * When the command if finished, the callback function is called
727 * Returns: non null command handle if succeed
729 Handle build
(const gchar
*uri
, Callback callback, gpointer user_data
);
732 * ianjuta_builder_cancel:
734 * @handle: handle of the command to cancel
735 * @err: Error propagation and reporting.
737 * Cancel specified command. The callback function will not
741 void cancel
(Handle handle);
744 * ianjuta_builder_list_configuration:
746 * @err: Error propagation and reporting.
748 * List all defined configuration. These names returned are
749 * the internal non localized names for the following
750 * predefined configuration: Debug, Profiling, Optimized.
751 * The default configuration has no name and is not returned.
753 * Returns: (element-type utf8) (transfer container): a list configuration name. The names are owned
754 * by the plugin, so only the list has to be free using
757 List
<const gchar
*> list_configuration
();
760 * ianjuta_builder_get_uri_configuration:
763 * @err: Error propagation and reporting.
765 * Get the configuration corresponding to the target uri.
767 * Returns: The configuration name or NULL if the corresponding
768 * configuration cannot be found.
770 const gchar
* get_uri_configuration
(const gchar
*uri
);
774 * SECTION:ianjuta-environment
775 * @title: IAnjutaEnvironment
776 * @short_description: Implemented by plugins doing cross compilation
778 * @stability: Unstable
779 * @include: libanjuta/interfaces/ianjuta-environment.h
782 interface IAnjutaEnvironment
785 * IAnjutaEnvironmentError:
786 * @IANJUTA_BUILDER_CONFIG: Configuration of the environment is wrong
787 * @IANJUTA_BUILDER_OTHER_ERROR: Other Error (no unknown ;-))
789 * Possible build errors
798 * ianjuta_environment_override:
800 * @dirp: a pointer on the working directory
801 * @argvp: a pointer on a NULL terminated string array
802 * containing the command name in argv[0] and all
804 * @envp: a pointer on a NULL terminated string array
805 * containing all additional environment variable
806 * used by the command
807 * @err: Error propagation and reporting.
809 * Override a command to work in another build environment
811 * Returns: FALSE if there is an error.
813 gboolean override
(gchar
**dirp
, gchar
***argvp
, gchar
***envp
);
816 * ianjuta_environment_get_real_directory:
818 * @dir: A directory path in the environment
819 * @err: Error propagation and reporting.
821 * Convert a directory in the environment to a directory outside.
822 * It is useful when the environment use chroot. Take care that
823 * the input directory string is freed using g_free but and you need to
824 * free the output string when not needed.
826 * Returns: The directory path outside the environment
828 gchar
* get_real_directory
(gchar
*dir
);
832 * SECTION:ianjuta-buildable
833 * @title: IAnjutaBuildable
834 * @short_description: Implemented by plugins that can build. This interface
835 * will be replaced by #IAnjutaBuilder (for build functions) and
836 * #IAnjutaEnvironment for ianjuta_buildable_set_command,
837 * ianjuta_buildable_reset_command and ianjuta_buildable_get_command.
839 * @stability: Obsolete
840 * @include: libanjuta/interfaces/ianjuta-buildable.h
843 interface IAnjutaBuildable
847 * IAnjutaBuildableCommand:
848 * @IANJUTA_BUILDABLE_COMMAND_COMPILE: Compile source
849 * @IANJUTA_BUILDABLE_COMMAND_BUILD: Build file (normally using make)
850 * @IANJUTA_BUILDABLE_COMMAND_BUILD_TARBALL: make dist
851 * @IANJUTA_BUILDABLE_COMMAND_INSTALL: make install
852 * @IANJUTA_BUILDABLE_COMMAND_CONFIGURE: ./configure
853 * @IANJUTA_BUILDABLE_COMMAND_GENERATE: ./autogen.sh
854 * @IANJUTA_BUILDABLE_COMMAND_CLEAN: make clean
855 * @IANJUTA_BUILDABLE_COMMAND_EXECUTE: ./hello
856 * @IANJUTA_BUILDABLE_COMMAND_IS_BUILT: check whether object files are up-to-date
857 * @IANJUTA_BUILDABLE_COMMAND_DISTCLEAN: make distclean
858 * @IANJUTA_BUILDABLE_N_COMMANDS: size of enum
860 * The enumeration is used to speficy the disered build operation
866 COMMAND_BUILD_TARBALL
,
879 * ianjuta_buildable_set_command:
881 * @command_id: Command to override.
882 * @command: Build command to override.
883 * @err: Error propagation and reporting.
885 * Overrides the default command for the given command.
887 void set_command
(Command command_id
, const gchar
*command
);
890 * ianjuta_buildable_get_command:
892 * @command_id: Command to get override.
893 * @err: Error propagation and reporting.
895 * Retrieves the currently set command override.
897 * Returns: The overridden command. NULL if no override set.
899 const gchar
* get_command
(Command command_id
);
902 * ianjuta_buildable_reset_commands:
904 * @err: Error propagation and reporting.
906 * Resets the command overrides to defaults.
908 void reset_commands
();
911 * ianjuta_buildable_build:
914 * @err: Error propagation and reporting.
918 void build
(const gchar
*uri
);
921 * ianjuta_buildable_clean:
924 * @err: Error propagation and reporting.
928 void clean
(const gchar
*uri
);
931 * ianjuta_buildable_install:
934 * @err: Error propagation and reporting.
938 void install
(const gchar
*uri
);
941 * ianjuta_buildable_configure:
944 * @err: Error propagation and reporting.
948 void configure
(const gchar
*uri
);
951 * ianjuta_buildable_generate:
954 * @err: Error propagation and reporting.
958 void generate
(const gchar
*uri
);
961 * ianjuta_buildable_execute:
964 * @err: Error propagation and reporting.
968 void execute
(const gchar
*uri
);
972 * SECTION:ianjuta-help
973 * @title: IAnjutaHelp
974 * @short_description: Implemented by plugins that can provide help support
976 * @stability: Unstable
977 * @include: libanjuta/interfaces/ianjuta-help.h
980 interface IAnjutaHelp
984 * ianjuta_help_search:
986 * @query: string to search in the help
987 * @err: Error propagation and reporting
989 * Search for string @query in the help and display the result
991 void search
(const gchar
*query
);
995 * SECTION:ianjuta-loader
996 * @title: IAnjutaLoader
997 * @short_description: Interface to load file or stream
999 * @stability: Unstable
1000 * @include: libanjuta/interfaces/ianjuta-loader.h
1002 * Loaders can deterime correct plugin to open a file or stream. They
1003 * themselves can not load it, but will correctly redirect the request to
1004 * an implementor of IAnjutaFile, IAnjutaFileSavable, IAnjutaStream or
1005 * IAnjutaStreamSavable, depending on the mime-type, meta-type or any other
1008 interface IAnjutaLoader
1010 #include
<libanjuta
/anjuta
-plugin.h
>
1012 * ianjuta_loader_find_plugins:
1014 * @err: Error propagation and reporting.
1016 * Returns: (element-type AnjutaPlugin): all plugins supporting loader interface.
1018 List
<AnjutaPlugin
*> find_plugins
();
1021 * SECTION:ianjuta-file-loader
1022 * @title: IAnjutaFileLoader
1023 * @short_description: Loader to load files
1025 * @stability: Unstable
1026 * @include: libanjuta/interfaces/ianjuta-file-loader.h
1028 * Loaders can deterime correct plugin to open a file.
1030 interface IAnjutaFileLoader
1032 #include
<gio
/gio.h
>
1034 * ianjuta_file_loader_load:
1036 * @file: File to load
1037 * @readonly: Open in readonly mode.
1038 * @err: Error propagation and reporting
1040 * Determines a plugin which can open the given file, activates it
1041 * opening the file and returns the interface of the plugin activated.
1043 * Return value: Plugin interface used to load the file.
1045 GObject
* load
(GFile
* file
, gboolean
readonly);
1048 * ianjuta_loader_peek_interface:
1050 * @file: Meta file to peek
1051 * @err: Error propagation and reporting
1053 * Peeks the file and determines the interface which can load
1056 * Return value: Plugin interface name that can load the file.
1058 gchar
* peek_interface
(GFile
* file
);
1062 * SECTION:ianjuta-stream-loader
1063 * @title: IAnjutaStreamLoader
1064 * @short_description: Loader to load streams
1066 * @stability: Unstable
1067 * @include: libanjuta/interfaces/ianjuta-stream-loader.h
1069 * StreamLoaders can deterime correct plugin to open a stream.
1071 interface IAnjutaStreamLoader
1076 * ianjuta_stream_loader_load:
1078 * @stream: Stream to load
1079 * @readonly: Open in readonly mode.
1080 * @err: Error propagation and reporting
1082 * Determines a plugin which can open the given stream, activates it
1083 * opening the stream and returns the interface of the plugin activated.
1085 * Return value: Plugin interface used to load the stream.
1087 GObject
* load
(FILE
*stream
, gboolean
readonly);
1090 * ianjuta_stream_loader_peek_interface:
1092 * @stream: Stream to load
1093 * @err: Error propagation and reporting
1095 * Peeks the stream and determines the interface which can load
1098 * Return value: Plugin interface name that can load the stream.
1100 gchar
* peek_interface
(FILE
*stream
);
1105 * SECTION:ianjuta-document
1106 * @title: IAnjutaDocument
1107 * @short_description: Interface for all kind of editable resources that
1108 * will be managed by IAnjutaDocumentManager
1110 * @stability: Unstable
1111 * @include: libanjuta/interfaces/ianjuta-document.h
1114 interface IAnjutaDocument
1117 * IAnjutaDocument::update-ui:
1120 * This signal is emitted when the document assumes the UI must be updated
1121 * because some internal state of the document has changed. For example, if
1122 * current line position is changed, it needs to be reflected to the UI.
1124 void ::update_ui
();
1127 * ianjuta_document_get_filename:
1129 * @err: Error propagation and reporting
1131 * Allows obtaining of the filename the editor was loaded from.
1133 * Return value: The name of the file. Not to be freed by caller.
1135 const gchar
* get_filename
();
1138 * ianjuta_document_can_undo:
1140 * @err: Error propagation and reporting
1142 * Can the editor undo the last operation?
1144 * Returns: TRUE if editor can undo, else FALSE
1146 gboolean can_undo
();
1149 * ianjuta_document_can_redo:
1151 * @err: Error propagation and reporting
1153 * Can the editor redo the last operation?
1155 * Returns: TRUE if editor can redo, else FALSE
1157 gboolean can_redo
();
1160 * ianjuta_document_undo:
1162 * @err: Error propagation and reporting
1164 * Undo last operation
1169 * ianjuta_document_redo:
1171 * @err: Error propagation and reporting
1173 * Redo last undo operation
1178 * ianjuta_document_begin_undo_action:
1180 * @err: Error propagation and reporting
1182 * Begins the mark of undoable action. Calls to this are stacked and
1183 * each must be ended with ianjuta_document_end_action().
1185 void begin_undo_action
();
1188 * ianjuta_document_end_undo_action:
1190 * @err: Error propagation and reporting
1192 * Ends the mark of undoable action.
1194 void end_undo_action
();
1197 * ianjuta_document_grab_focus:
1199 * @err: Error propagation and reporting
1206 * ianjuta_document_cut:
1208 * @err: Error propagation and reporting
1210 * Cut selection to clipboard.
1215 * ianjuta_document_copy:
1217 * @err: Error propagation and reporting
1219 * Copy selection to clipboard.
1224 * ianjuta_document_paste:
1226 * @err: Error propagation and reporting
1228 * Paste clipboard at current position.
1233 * ianjuta_document_clear:
1235 * @err: Error propagation and reporting
1243 * SECTION:ianjuta-editor
1244 * @title: IAnjutaEditor
1245 * @short_description: Text editor interface
1247 * @stability: Unstable
1248 * @include: libanjuta/interfaces/ianjuta-editor.h
1251 interface IAnjutaEditor
1253 #include
<gtk
/gtk.h
>
1254 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
1261 * IAnjutaEditorAttribute:
1262 * @IANJUTA_EDITOR_TEXT: Normal text
1263 * @IANJUTA_EDITOR_KEYWORD: A keyword of the programming language
1264 * @IANJUTA_EDITOR_COMMENT: A comment
1265 * @IANJUTA_EDITOR_STRING: A string
1267 * This enumeration is used to specify the type of text. Note that not all
1268 * editors implement this.
1279 * IAnjutaEditor::glade-member-add:
1280 * @widget_typename: Name of the type of the widget that will become a member of the class.
1281 * @widget_name: Name of the widget that will become a member of the class.
1282 * @filename: Path for the .ui file that generated the signal.
1285 * This signal is emitted when code for a widget must be generated.
1287 void ::glade_member_add
(gchar
*widget_typename
, gchar
*widget_name
, gchar
*filename
);
1290 * IAnjutaEditor::code-added:
1291 * @position: The iter position where @ch is added.
1292 * @code: The code that has been added.
1295 * This signal is emitted when code is added inside the editor.
1296 * The newly added code is @code which has been inserted at @position.
1298 void ::code_added
(IAnjutaIterable
*position
, gchar
*code
);
1301 * IAnjutaEditor::char-added:
1302 * @position: The iter position where @ch is added.
1303 * @ch: The character that has been added.
1306 * This signal is emitted when any character is added inside the editor.
1307 * The newly added character is @ch which has been inserted at @position.
1309 void ::char_added
(IAnjutaIterable
*position
, gchar ch
);
1312 * IAnjutaEditor::backspace:
1315 * The signal is emitted when the user presses backspace
1317 void ::backspace
();
1320 * IAnjutaEditor::changed:
1321 * @position: The iter position where change happend.
1322 * @added: TRUE if added, FALSE if deleted.
1323 * @length: Length of the text changed.
1324 * @lines: Number of lines added or removed.
1325 * @text: The text added or removed.
1328 * This signal is emitted when any text change happens in editor.
1329 * The changes begin at @position. @text is not garanteed to be NULL
1330 * terminated. Use @length to read the text. @lines represent the
1331 * number of line breaks in the added or removed text.
1333 void ::changed
(IAnjutaIterable
*position
, gboolean added
, gint length
, gint lines
, const gchar
*text
);
1336 * IAnjutaEditor::cursor-moved:
1339 * The signal is a hint that the cursor was moved.
1341 void ::cursor_moved
();
1344 * IAnjutaEditor::line-marks-gutter-clicked:
1346 * @double_click: whether the line marks gutter was double clicked
1347 * @location: location of the clicked marker
1349 * The signal is emitted when the user clicks on a marker
1351 void ::line_marks_gutter_clicked
(gint location
);
1354 * ianjuta_editor_get_tabsize:
1356 * @err: Error propagation and reporting
1358 * Returns the tabsize (in spaces) currently used by the editor.
1360 * Returns: tabsize in number of spaces
1362 gint get_tabsize
();
1365 * ianjuta_editor_set_tabsize:
1367 * @tabsize: Tabsize in spaces
1368 * @err: Error propagation and reporting
1370 * Sets the tabsize of the editor.
1372 void set_tabsize
(gint tabsize
);
1375 * ianjuta_editor_get_use_spaces:
1377 * @err: Error propagation and reporting
1379 * Returns if the editor uses spaces for filling up tab characters.
1381 * Returns: TRUE if yes, FALSE if no.
1383 gboolean get_use_spaces
();
1386 * ianjuta_editor_set_use_space:
1388 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
1389 * @err: Error propagation and reporting
1391 * Sets if the editor should use spaces for filling up tab characters.
1393 void set_use_spaces
(gboolean use_spaces
);
1396 * ianjuta_editor_set_auto_indent:
1398 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
1400 * Sets whether the editor should auto-indent itself. A plugin that does
1401 * custom auto-indent can set this to false and override the preferences
1404 void set_auto_indent
(gboolean auto_indent
);
1407 * ianjuta_editor_erase_range:
1409 * @position_start: Start position of chars to erase.
1410 * @position_end: End position of chars to erase.
1411 * @err: Error propagation and reporting
1413 * Erases the chars between positions pointed by @position_start and
1414 * @position_end. The character pointed by @position_start is included,
1415 * while pointed by @position_end is not include in the range. After
1416 * the erase operation, all active iters, except these two, are no
1417 * longer guranteed to be valid. At the end the operation, these two
1418 * iters point to the same position which is the position where erase
1419 * happend (usually the original @position_start position).
1421 void erase
(IAnjutaIterable
*position_start
, IAnjutaIterable
*position_end
);
1424 * ianjuta_editor_erase_all:
1426 * @err: Error propagation and reporting
1428 * Empties the whole editor buffer. There will be zero characters.
1429 * After the erase operation, none of the active iters are guranteed
1435 * ianjuta_editor_insert:
1437 * @position: Character position in editor where insert will take place.
1438 * @text: Text to append.
1439 * @length: Length of @text to use.
1440 * @err: Error propagation and reporting
1442 * Inserts @length characters from @text buffer at given @position of
1443 * editor buffer. If @length is -1, the whole @text is used.
1445 void insert
(IAnjutaIterable
*position
, const gchar
*text
, gint length
);
1448 * ianjuta_editor_append:
1450 * @text: Text to append.
1451 * @length: Length of @text to use.
1452 * @err: Error propagation and reporting
1454 * Appends @length characters from @text buffer at the end of editor
1455 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1457 void append
(const gchar
*text
, gint length
);
1460 * ianjuta_editor_goto_line:
1462 * @lineno: line number where carat will be moved.
1463 * @err: Error propagation and reporting
1465 * Carat is moved to the given @lineno line and text view is scrolled to
1466 * bring it in viewable area of the editor.
1468 void goto_line
(gint lineno
);
1471 * ianjuta_editor_goto_start:
1473 * @err: Error propagation and reporting
1475 * Carat is moved to the begining of editor and text view is scrolled to
1476 * bring it in viewable area of the editor.
1481 * ianjuta_editor_goto_end:
1483 * @err: Error propagation and reporting
1485 * Carat is moved to the end of editor and text view is scrolled to
1486 * bring it in viewable area of the editor.
1491 * ianjuta_editor_goto_position:
1493 * @position: Character position where carat will be moved.
1494 * @err: Error propagation and reporting
1496 * Carat is moved to the given @position and text view is scrolled to
1497 * bring @position in viewable area of the editor.
1499 void goto_position
(IAnjutaIterable
*position
);
1502 * ianjuta_editor_get_text:
1504 * @begin: Begining iterator
1505 * @end: End iterator
1506 * @err: Error propagation and reporting
1508 * Gets text characters beginning from @begin (including char
1509 * pointed by @begin) and ending with @end (excluding character
1510 * pointed by @end). The characters returned are utf-8 encoded.
1511 * The iterators @begin and @end could be in either order. The returned
1512 * text, however, is in right order. If both @begin and @end points
1513 * to the same position, NULL is returned.
1515 * Returns: A buffer of utf-8 characters.
1516 * The returned buffer must be freed when no longer required.
1518 gchar
* get_text
(IAnjutaIterable
*begin
, IAnjutaIterable
*end
);
1521 * ianjuta_editor_get_text_all:
1523 * @err: Error propagation and reporting
1525 * Gets all text characters in the editor.
1526 * The characters returned are utf-8 encoded.
1528 * Returns: A buffer of utf-8 characters containing all text from editor.
1529 * The returned buffer must be freed when no longer required.
1531 gchar
* get_text_all
();
1534 * ianjuta_editor_line_from_position:
1536 * @position: Position you want to know the line from
1537 * @err: Error propagation and reporting
1539 * Get the line number in which @position locates.
1540 * Returns: Line which corresponds to @position
1543 int get_line_from_position
(IAnjutaIterable
*position
);
1546 * ianjuta_editor_get_lineno:
1548 * @err: Error propagation and reporting
1550 * Obtains current line number on which carat is.
1552 * Return value: Line number.
1557 * ianjuta_editor_get_length:
1559 * @err: Error propagation and reporting
1561 * Get length of complete text in editor. This will be the total
1562 * number of bytes in the file or buffer.
1564 * Return value: Text length.
1569 * ianjuta_editor_get_current_word:
1571 * @err: Error propagation and reporting
1573 * Obtains the word on which carat is currently on.
1575 * Return value: Current word.
1577 gchar
* get_current_word
();
1580 * ianjuta_editor_get_current_column:
1582 * @err: Error propagation and reporting
1584 * Obtains number of the current column in the editor.
1586 * Return value: Current column.
1591 * ianjuta_editor_get_line_begin_position:
1594 * @err: Error propagation and reporting.
1598 * Returns: (transfer full): fixme
1600 IAnjutaIterable
* get_line_begin_position
(gint line
);
1603 * ianjuta_editor_get_line_end_position:
1606 * @err: Error propagation and reporting.
1610 * Returns: (transfer full): fixme
1612 IAnjutaIterable
*get_line_end_position
(gint line
);
1615 * ianjuta_editor_get_overwrite:
1617 * @err: Error propagation and reporting
1619 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1621 * Return value: editor mode.
1623 gboolean get_overwrite
();
1627 * ianjuta_editor_set_popup_menu:
1630 * @err: Error propagation and reporting
1632 * Set Editor popup menu. This is the menu shown in the editor when one
1633 * right-clicks on it.
1636 void set_popup_menu
(GtkWidget
*menu
);
1639 * ianjuta_editor_get_offset:
1641 * @err: Error propagation and reporting
1643 * Get current caret position in integer character offset. Deprecated.
1644 * Use ianjuta_editor_get_position() instead.
1646 * Returns: Current character position since the begining of file.
1651 * ianjuta_editor_get_position:
1653 * @err: Error propagation and reporting
1655 * Get current caret position.
1657 * Returns: (transfer full): Iterator that points to the current position.
1659 IAnjutaIterable
* get_position
();
1662 * ianjuta_editor_get_position_from_offset:
1664 * @offset: Character offset position where the iter will be set
1665 * @err: Error propagation and reporting
1667 * Creates and returns an iter for editor cells. The iter is
1668 * placed at the unicode character position where the given offset
1669 * @offset happens to fall. The returned iter is cell (character)
1670 * iter and not byte iter, so all iter operations
1671 * on it are character (not byte) iteration, including all position
1672 * and index references in the iter.
1674 * The iter must be unreferrenced by the caller when done.
1675 * The iter navigates (next/previous) in step of unicode
1676 * characters (one unicode character == one cell).
1678 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1679 * given @offset position.
1681 IAnjutaIterable
* get_position_from_offset
(gint offset
);
1684 * ianjuta_editor_get_start_position:
1686 * @err: Error propagation and reporting
1688 * Gets the iter positioned at the start of the editor buffer.
1690 * Return value: Cell iter set to the begining of the editor.
1692 IAnjutaIterable
* get_start_position
();
1695 * ianjuta_editor_get_end_position:
1697 * @err: Error propagation and reporting
1699 * Gets the iter positioned at the end of the editor buffer. The
1700 * returned iter is the end-iter which does not point to any valid
1701 * character in the buffer (it is pointed one step beyond the last
1704 * Retrun value: Cell iter set to the end of the editor (end-iter).
1706 IAnjutaIterable
* get_end_position
();
1709 * SECTION:ianjuta-editor-selection
1710 * @title: IAnjutaEditorSelection
1711 * @short_description: Text editor selection interface
1713 * @stability: Unstable
1714 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1717 interface IAnjutaEditorSelection
1719 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1721 * ianjuta_editor_selection_has_selection:
1723 * @err: Error propagation and reporting
1725 * Returns TRUE if editor has any text selected. The selection
1726 * positions can be retrieved with ianjuta_editor_selection_get_start()
1727 * and ianjuta_editor_selection_get_end().
1729 * Returns: TRUE if there is text selected else FALSE.
1731 gboolean has_selection
();
1734 * ianjuta_editor_selection_get:
1736 * @err: Error propagation and reporting
1738 * Gets curerntly selected text in editor.
1740 * Returns: A newly allocated buffer of currently selected characters.
1741 * NULL if there is no selection. The returned buffer must be freed after
1747 * ianjuta_editor_selection_set:
1749 * @start: Begin of selection
1750 * @end: End of selection
1751 * @scroll: Scroll selection onscreen
1752 * @err: Error propagation and reporting
1754 * Select characters between start and end. Start and end don't have to
1757 void set
(IAnjutaIterable
* start
, IAnjutaIterable
* end
, gboolean scroll
);
1760 * ianjuta_editor_selection_get_start:
1762 * @err: Error propagation and reporting
1764 * Gets start position of selection text.
1766 * Return: Start of selection or NULL if there is no selection.
1768 IAnjutaIterable
* get_start
();
1771 * ianjuta_editor_selection_get_end:
1773 * @err: Error propagation and reporting
1775 * Get end position of selection. If there is no selection, returns
1778 * Returns: End of selection or NULL if there is no selection.
1780 IAnjutaIterable
* get_end
();
1783 * ianjuta_editor_selection_select_block:
1785 * @err: Error propagation and reporting
1787 * Selects current block of code. The definition of block of code
1788 * depends on highlight mode used (programming language). Some
1789 * highlight mode does not have block concept, in that case this
1790 * method does not do anything.
1792 void select_block
();
1795 * ianjuta_editor_selection_select_function:
1797 * @err: Error propagation and reporting
1799 * Select current function block. The definition of function block
1800 * depends on highlight mode used (programming language). Some
1801 * highlight mode does not have function concept, in that case this
1802 * method does not do anything.
1804 void select_function
();
1807 * ianjuta_editor_edit_select_all:
1809 * @err: Error propagation and reporting
1811 * Select whole buffer.
1816 * ianjuta_editor_selection_replace:
1818 * @text: Replacement text.
1819 * @length: Length of the text to used in @text.
1820 * @err: Error propagation and reporting
1822 * Replaces currently selected text with the @text. Only @length amount
1823 * of characters are used from @text buffer to replace.
1825 void replace
(const gchar
*text
, gint length
);
1829 * SECTION:ianjuta-editor-search
1830 * @title: IAnjutaEditorSearch
1831 * @short_description: Text editor search interface
1833 * @stability: Unstable
1834 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1837 interface IAnjutaEditorSearch
1839 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1842 * ianjuta_editor_search_forward:
1844 * @search: String to search for
1845 * @start: Where to search from
1846 * @end: Where to stop searching
1847 * @result_start: Will be set to the start of the search_result (or NULL)
1848 * @result_end: Will be set to the end of the search_result (or NULL)
1849 * @err: Error propagation and reporting
1851 * Search forward from start to end
1854 gboolean forward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1857 * ianjuta_editor_search_backward:
1859 * @search: String to search for
1860 * @start: Where to search from
1861 * @end: Where to stop searching
1862 * @result_start: Will be set to the start of the search_result (or NULL)
1863 * @result_end: Will be set to the end of the search_result (or NULL)
1864 * @err: Error propagation and reporting
1866 * Search backward from end to start
1870 gboolean backward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1875 * SECTION:ianjuta-editor-convert
1876 * @title: IAnjutaEditorConvert
1877 * @short_description: Text editor convert interface
1879 * @stability: Unstable
1880 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1883 interface IAnjutaEditorConvert
1886 * ianjuta_editor_convert_to_upper:
1888 * @start_position: Start position.
1889 * @end_position: End position.
1890 * @err: Error propagation and reporting
1892 * change characters from start position to end position to uppercase.
1895 void to_upper
(IAnjutaIterable
*start_position
, IAnjutaIterable
*end_position
);
1898 * ianjuta_editor_convert_to_lower:
1900 * @start_position: Start position.
1901 * @end_position: End position.
1902 * @err: Error propagation and reporting
1904 * change characters from start position to end position to lowercase
1907 void to_lower
(IAnjutaIterable
*start_position
, IAnjutaIterable
*end_position
);
1911 * SECTION:ianjuta-editor-line-mode
1912 * @title: IAnjutaEditorLineMode
1913 * @short_description: Text editor line mode
1915 * @stability: Unstable
1916 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1919 interface IAnjutaEditorLineMode
1922 * IAnjutaEditorLineModeType:
1923 * @IANJUTA_EDITOR_LINE_MODE_LF: Line-Feed (Unix)
1924 * @IANJUTA_EDITOR_LINE_MODE_CR: Carat return (Max)
1925 * @IANJUTA_EDITOR_LINE_MODE_CRLF: Caret return + line-feed (Windows)
1927 * This enumeration is used to specify the type of text. Note that not all
1928 * editors implement this.
1938 * ianjuta_editor_line_mode_get:
1940 * @err: Error propagation and reporting
1942 * Get current line ending mode. It is auto-detected from the
1948 * ianjuta_editor_line_mode_set:
1950 * @mode: Line mode to set.
1951 * @err: Error propagation and reporting
1953 * Set the line ending mode to the given @mode. Existing line end
1954 * characters in the buffer are not touched. Only the newly added
1955 * texts will have @mode line end characters.
1957 void set
(Type mode
);
1960 * ianjuta_editor_line_mode_convert:
1962 * @mode: Line mode to convert.
1963 * @err: Error propagation and reporting
1965 * Set the line ending mode to the given @mode and convert all line end
1966 * characters in the buffer to @mode line end characters.
1968 void convert
(Type mode
);
1971 * ianjuta_editor_line_mode_fix:
1973 * @err: Error propagation and reporting
1975 * Convert EOL characters to majority of line mode. This is helpful
1976 * when the buffer contains mixed line modes and we want to fix it.
1982 * SECTION:ianjuta-editor-tip
1983 * @title: IAnjutaEditorTip
1984 * @short_description: Editor call tips assistance framework
1986 * @stability: Unstable
1987 * @include: libanjuta/interfaces/ianjuta-editor-tip.h
1990 interface IAnjutaEditorTip
1993 * ianjuta_editor_tip_show:
1995 * @tips: (element-type utf8): list of alternative tips.
1996 * @position: Tip position.
1997 * @err: Error propagation and reporting
1999 * Show tips showing more information on current context. No user feedback
2000 * is required when tips are shown. @position indicates
2001 * the position before which is the known context and after which are
2002 * the suggestions. Usually the editor would use this to
2003 * align the choices displayed such that the carat is just at this
2004 * position when the choices are displayed.
2007 void show
(List
<const gchar
*> tips
, IAnjutaIterable
*position
);
2010 * ianjuta_editor_tip_cancel
2012 * @err: Error propagation and reporting
2014 * Cancels the last shown tooltip
2019 * ianjuta_editor_tip_visible:
2021 * @err: Error propagation and reporting
2023 * Returns: whether a tooltip is crrently shown
2029 * SECTION:ianjuta-editor-assist
2030 * @title: IAnjutaEditorAssist
2031 * @short_description: Text editor assist interface
2033 * @stability: Unstable
2034 * @include: libanjuta/interfaces/ianjuta-editor-assist
2037 interface IAnjutaEditorAssist
2039 #include
<libanjuta
/interfaces
/ianjuta
-provider.h
>
2052 * IAnjutaEditorAssist::cancelled
2055 * This signal is emitted when the autocompletion is cancelled due to various
2056 * reasons. The provider should avoid to call ianjuta_editor_assist_proposals() after
2059 void ::cancelled
();
2062 * ianjuta_editor_assist_add
2064 * @provider: a IAnjutaProvider
2065 * @err: Error handling
2067 * Add a provider to the list of completion providers
2069 void add
(IAnjutaProvider
* provider
);
2072 * ianjuta_editor_assist_remove
2074 * @provider: a IAnjutaProvider
2075 * @err: Error handling
2077 * Remove a provider from the list of completion providers
2079 void remove
(IAnjutaProvider
* provider
);
2082 * ianjuta_editor_assist_invoke
2084 * @provider: a IAnjutaProvider (can be NULL to use all providers)
2085 * @err: Error handling
2087 * Force invokation of a provider at the current cursor position.
2088 * That means that ianjuta_provider_populate() will be called on the
2091 void invoke
(IAnjutaProvider
* provider
);
2094 * ianjuta_editor_assist_proposals:
2096 * @provider: a IAnjutaProvider
2097 * @proposals: (element-type IAnjutaEditorAssistProposal): a list of IAnjutaProposals
2098 * @finished: whether is was the last call in an async operation
2099 * @err: Error handling
2101 * Add the list of proposals for the current population. You can add
2102 * proposals async as long as the last call sets finished to TRUE. That
2103 * is usually called by the IAnjutaProvider after it was triggered by
2104 * ianjuta_provider_populate()
2107 void proposals
(IAnjutaProvider
* provider
, GList
* proposals
, gboolean finished
);
2111 * SECTION:ianjuta-editor-hover
2112 * @title: IAnjutaEditorHover
2113 * @short_description: Text editor hover interface
2115 * @stability: Unstable
2116 * @include: libanjuta/interfaces/ianjuta-editor-hover
2119 interface IAnjutaEditorHover
2121 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
2123 /* IAnjutaEditorHover::hover-over:
2125 * @position: IAnjutaEditorCell specifying the position the mouse is over
2127 * The mouse is held for a moment over @position. This can be used to show
2130 void ::hover_over
(IAnjutaIterable
* position
);
2132 /* IAnjutaEditorHover::hover-leave
2134 * @position: IAnjutaEditorCell specifying the position the mouse was over
2136 * User moved the mouse away - can be used to clean up things done in
2137 * #IAnjutaEditorHover::hover-over
2139 void ::hover_leave
(IAnjutaIterable
* position
);
2142 * ianjuta_editor_hover_display:
2144 * @info: String to display
2145 * @err: Error propagation and reporting
2147 * Show @info as tooltip
2150 void display
(IAnjutaIterable
* position
, const gchar
*info
);
2154 * SECTION:ianjuta-editor-language
2155 * @title: IAnjutaEditorLanguage
2156 * @short_description: Text editor language interface
2158 * @stability: Unstable
2159 * @include: libanjuta/interfaces/ianjuta-editor-language.h
2162 interface IAnjutaEditorLanguage
2164 /* IAnjutaEditorLanguage::language-changed:
2166 * @language: new language
2168 * the language of the editor changed to @language
2170 void ::language_changed
(const gchar
*language
);
2173 * ianjuta_editor_language_get_supported_languages:
2175 * @err: Error propagation and reporting
2177 * Return a list of languages supported by the editor
2178 * Note: These list contains the names in the form
2179 * the editor implementation knows them
2180 * Returns: (element-type utf8):
2183 const List
<const gchar
*> get_supported_languages
();
2186 * ianjuta_editor_language_name:
2188 * @err: Error propagation and reporting
2190 * Get a list of languages the editor can highlight
2194 const gchar
*get_language_name
(const gchar
* language
);
2197 * ianjuta_editor_language_get_language:
2199 * @err: Error propagation and reporting
2201 * Return the name of the currently used language
2205 const gchar
*get_language
();
2208 * ianjuta_editor_language_set_language:
2210 * @language: Language
2211 * @err: Error propagation and reporting
2213 * Force the editor to use a given language
2217 void set_language
(const gchar
* language
);
2221 * SECTION:ianjuta-editor-folds
2222 * @title: IAnjutaEditorFolds
2223 * @short_description: Text editor folds inteface
2225 * @stability: Unstable
2226 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
2229 interface IAnjutaEditorFolds
2232 * ianjuta_editor_view_open_folds:
2234 * @err: Error propagation and reporting
2242 * ianjuta_editor_view_close_folds:
2244 * @err: Error propagation and reporting
2252 * ianjuta_editor_view_toggle_fold:
2254 * @err: Error propagation and reporting
2256 * Open/Close current fold
2259 void toggle_current
();
2263 * SECTION:ianjuta-editor-view
2264 * @title: IAnjutaEditorView
2265 * @short_description: Text editor view interface
2267 * @stability: Unstable
2268 * @include: libanjuta/interfaces/ianjuta-editor-view.h
2270 * An editor view is a visual representation of the editor. An editor
2271 * can have multiple views. All views of an editor show the same editor
2272 * content (buffer). Consequently, any change done in one view is
2273 * updated in all other views.
2275 interface IAnjutaEditorView
2278 * ianjuta_editor_view_create:
2280 * @err: Error propagation and reporting
2282 * Creates a new view for the editor. The newly created view gets
2283 * the user focus and scrolls to the same location as last view.
2288 * ianjuta_editor_view_remove_current:
2290 * @err: Error propagation and reporting
2292 * Removes currently focused editor view. It does not remove the
2293 * last view of the editor. That is, if currently there is only
2294 * one view of the editor, this function does nothing.
2296 void remove_current
();
2299 * ianjuta_editor_view_get_count:
2301 * @err: Error propagation and reporting
2303 * Total number of views currently present. It will never be less
2304 * than 1. Invalid return values are considered error condition.
2310 * SECTION:ianjuta-editor-comment
2311 * @title: IAnjutaEditorComment
2312 * @short_description: Text editor comment interface
2314 * @stability: Unstable
2315 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
2318 interface IAnjutaEditorComment
2321 * ianjuta_editor_comment_block:
2323 * @err: Error propagation and reporting
2325 * Comment/Uncomment out selected block
2330 * ianjuta_editor_comment_box:
2332 * @err: Error propagation and reporting
2334 * Comment/Uncomment out selected block
2339 * ianjuta_editor_comment_stream:
2341 * @err: Error propagation and reporting
2343 * Comment/Uncomment out selected block
2349 * SECTION:ianjuta-editor-zoom
2350 * @title: IAnjutaEditorZoom
2351 * @short_description: Text editor zoom interface
2353 * @stability: Unstable
2354 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2357 interface IAnjutaEditorZoom
2360 * ianjuta_editor_zoom_in:
2362 * @err: Error propagation and reporting
2369 * ianjuta_editor_zoom_out:
2371 * @err: Error propagation and reporting
2379 * SECTION:ianjuta-editor-goto
2380 * @title: IAnjutaEditorGoto
2381 * @short_description: Text editor navigation interface
2383 * @stability: Unstable
2384 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2387 interface IAnjutaEditorGoto
2390 * ianjuta_editor_goto_start_block:
2392 * @err: Error propagation and reporting
2394 * Moves cursor to the start of the current block
2399 * ianjuta_editor_goto_end_block:
2401 * @err: Error propagation and reporting
2403 * Moves cursor to the end of the current block
2408 * ianjuta_editor_goto_matching_brace:
2410 * @err: Error propagation and reporting
2412 * Moves cursor to matching brace
2414 void matching_brace
();
2419 * SECTION:ianjuta-editor-glade-signal
2420 * @title: IAnjutaEditorGladeSignal
2421 * @short_description: Interface for dropping signal handlers
2423 * @stability: Unstable
2424 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2427 interface IAnjutaEditorGladeSignal
2429 /* IAnjutaEditorGladeSignal::drop-possible
2431 * @iter: a IAnjutaIterable of the position where drop would happen
2433 * Emitted when a signal is dragged over the editor
2435 * Return value: TRUE if a signal handler can be dropped, FALSE otherwise
2437 gboolean
::drop_possible
(IAnjutaIterable
* iterator
);
2439 /* IAnjutaEditorGladeSignal::drop
2441 * @iter: a IAnjutaIterable of the position where drop happens
2442 * @signal_data: Signal data in form "widget:signal:handler", e.g.
2443 * "GtkToggleButton:toggled:on_toggle_button_toggled"
2445 * Emitted when a signal was received per drag & drop
2448 void ::drop
(IAnjutaIterable
* iterator
, const gchar
* signal_data
);
2453 * SECTION:ianjuta-editor-cell
2454 * @title: IAnjutaEditorCell
2455 * @short_description: Text editor character cell
2457 * @stability: Unstable
2458 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2460 * Represents a cell in editor. A cell corresponds to a unicode
2461 * character along with all associated styles (such as colors and font).
2462 * A cell may or may not have style. If style is supported in the
2463 * editor, it is assumed all cells will have styles and hence every
2464 * IAnjutaEditorCell interface instance will have additionally
2465 * IAnjutaEditorCellStyle implemented.
2467 interface IAnjutaEditorCell
2469 #include
<libanjuta
/interfaces
/ianjuta
-editor.h
>
2472 * ianjuta_editor_cell_get_character:
2474 * @err: Error propagation and reporting
2476 * Returns the unicode character in this cell. A NULL terminated
2477 * string is returned that is the multibyte unicode character.
2478 * NULL is returned if the cell does not have any character.
2480 * Returns: a newly created string representing the cell's unicode
2483 gchar
*get_character
();
2486 * ianjuta_editor_cell_get_length:
2488 * @err: Error propagation and reporting.
2490 * Gets the length of the cell in bytes. That is, length of the
2491 * unicode character.
2493 * Returns: Length of the unicode character.
2498 * ianjuta_editor_cell_get_char:
2500 * @err: Error propagation and reporting
2502 * Returns the byte of the unicode character in this cell at given
2503 * index @char_index. @char_index can vary from 0 to length of the
2504 * unicode string minus 1. Out of range index is not allowed
2505 * (asserted) and return is undefined.
2507 * Since there is dynamic allocation of unicode character string
2508 * involved in ianjuta_editor_cell_get_character(), this function
2509 * is mainly useful for fast iteration (such as copying data).
2511 * Returns: a byte character.
2513 gchar get_char
(gint char_index
);
2515 IAnjutaEditorAttribute get_attribute
();
2518 * SECTION:ianjuta-editor-cell-style
2519 * @title: IAnjutaEditorCellStyle
2520 * @short_description: Text editor cell style interface
2522 * @stability: Unstable
2523 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2526 interface IAnjutaEditorCellStyle
2528 gchar
* get_font_description
();
2530 gchar
* get_background_color
();
2535 * SECTION:ianjuta-editor-factory
2536 * @title: IAnjutaEditorFactory
2537 * @short_description: Text editor factory that creates IAnjutaEditor objects
2539 * @stability: Unstable
2540 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2543 interface IAnjutaEditorFactory
2545 #include
"ianjuta-editor.h"
2546 #include
<gio
/gio.h
>
2549 * ianjuta_editor_factory_new_editor:
2551 * @file: file to open
2552 * @filename: filename to open
2553 * @err: Error propagation and reporting
2555 * Get a new GtkWidget* which implements IAnjutaEditor
2557 * Return value: An object implementing IAnjutaEditor
2559 IAnjutaEditor
* new_editor
(GFile
* file
, const gchar
* filename
);
2563 * SECTION:ianjuta-provider
2564 * @title: IAnjutaProvider
2565 * @short_description: Provider for autocompletion features
2567 * @stability: Unstable
2568 * @include: libanjuta/interfaces/ianjuta-provider.h
2570 interface IAnjutaProvider
2572 #include
"ianjuta-iterable.h"
2575 * ianjuta_provider_populate:
2577 * @iter: the text iter where the provider should be populated
2578 * @err: Error propagation and reporting.
2580 * Show completion for the context at position @iter. The provider should
2581 * call ianjuta_editor_assist_proposals here to add proposals to the list.
2583 * Note that this is called after every character typed and the list of proposals
2584 * has to be completely renewed.
2586 void populate
(IAnjutaIterable
* iter
);
2589 * ianjuta_provider_get_start_iter:
2591 * @err: Error propagation and reporting.
2593 * Get the iter where the current completion started
2595 * Returns: (transfer none): current start iter
2597 IAnjutaIterable
* get_start_iter
();
2600 * ianjuta_provider_activate:
2602 * @iter: position where the completion occurs
2603 * @data: data assigned to the proposal
2604 * @err: Error propagation and reporting.
2606 * Show completion for the context at position @iter
2608 void activate
(IAnjutaIterable
* iter
, gpointer data
);
2611 * ianjuta_provider_get_name:
2614 * Return a (translatable) name for the provider
2616 const gchar
* get_name
();
2621 * SECTION:ianjuta-document-manager
2622 * @title: IAnjutaDocumentManager
2623 * @short_description: Interface for plugin that manages all the editors
2625 * @stability: Unstable
2626 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2629 interface IAnjutaDocumentManager
2631 #include
"ianjuta-document.h"
2632 #include
"ianjuta-editor.h"
2633 #include
<gio
/gio.h
>
2636 * IANJUTA_DOCUMENT_MANAGER_CURRENT_DOCUMENT
2638 * Anjuta shell value set by document manager to the current document
2640 #define CURRENT_DOCUMENT
"document_manager_current_document"
2648 * ianjuta_document_manager_get_file:
2650 * @filename: short filename
2651 * @err: Error propagation and reporting.
2653 * Given the short filename, finds the file of the filename, if the
2654 * editor that has it loaded is found. If there is no editor that has
2655 * this file opened, returns NULL.
2657 * Return value: (transfer full): the GFile for the given short filename
2659 GFile
* get_file
(const gchar
*filename
);
2662 * ianjuta_document_manager_find_document_with_file:
2664 * @file: The file to find.
2665 * @err: Error propagation and reporting.
2667 * Finds the document that has the file loaded. Only
2668 * the editor that matches the file will be searched.
2670 * Return value: (transfer none): the document that corresponds to given file. NULL if
2671 * there is no editor loaded with this file.
2673 IAnjutaDocument
* find_document_with_file
(GFile
* file
);
2676 * ianjuta_document_manager_goto_file_line:
2678 * @file: file to go to.
2679 * @lineno: the line number in the file to go to.
2680 * @err: Error propagation and reporting.
2682 * Loads the given file if not loaded yet, set its editor as current editor
2683 * and moves cursor to the given line in the editor.
2685 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2687 IAnjutaEditor
* goto_file_line
(GFile
* file
, gint lineno
);
2690 * ianjuta_document_manager_goto_file_line_mark:
2692 * @file: file to go to.
2693 * @lineno: the line number in the file to go to.
2694 * @mark: TRUE if the line should be marked with a marker.
2695 * @err: Error propagation and reporting
2697 * Loads the given file if not loaded yet, set its editor as current editor
2698 * and moves cursor to the given line in the editor. Optionally also marks
2699 * the line with line marker if @mark is given TRUE.
2701 * Return value: (transfer none): the editor where the mark has been put. NULL if none.
2703 IAnjutaEditor
* goto_file_line_mark
(GFile
* file
, gint lineno
, gboolean mark
);
2706 * ianjuta_document_manager_get_current_document:
2708 * @err: Error propagation and reporting.
2710 * Gets the current document.
2712 * Return value: (transfer none): the currently active document. NULL if none is there.
2714 IAnjutaDocument
* get_current_document
();
2717 * ianjuta_document_manager_set_current_document:
2719 * @document: the document to set as current.
2720 * @err: Error propagation and reporting.
2722 * Sets the given document as current document.
2724 void set_current_document
(IAnjutaDocument
*document
);
2727 * ianjuta_document_manager_get_doc_widgets:
2729 * @err: Error propagation and reporting.
2731 * Gets a list of widgets for open documents. Each widget is
2732 * a GTK_WIDGET(IAnjutaDocument*)
2734 * Return value: (element-type GtkWidget) (transfer container): a list of widgets for
2735 * all open documents. The returned list (but not the data in the list) must be
2738 List
<GtkWidget
*> get_doc_widgets
();
2741 * ianjuta_document_manager_add_buffer:
2743 * @name: Name of the editor buffer.
2744 * @content: Initial content of the buffer.
2745 * @err: Error propagation and reporting.
2747 * Creates a new editor buffer of the given name and sets the given
2748 * content as its initial content.
2750 * Return value: (transfer full): the IAnjutaEditor instance that has been added.
2752 IAnjutaEditor
* add_buffer
(const gchar
*name
, const gchar
* content
);
2755 * ianjuta_document_manager_remove_document:
2757 * @document: Document to close.
2758 * @save_before: If true, saves the document before closing.
2759 * @err: Error propagation and reporting.
2761 * Closes and removes the given document. If @save_before is TRUE, also
2762 * saves the document before closing.
2764 * Return value: TRUE if the document was removed, else FALSE.
2766 gboolean remove_document
(IAnjutaDocument
*document
, gboolean save_before
);
2769 * ianjuta_document_manager_add_document:
2771 * @document: the document to add
2772 * @err: Error propagation and reporting.
2774 * Adds a document to the document manager. This will open a new
2775 * Notebook tab and show the document there
2778 void add_document
(IAnjutaDocument
* document
);
2781 * ianjuta_document_manager_add_bookmark:
2783 * @file: File to add the bookmark
2784 * @line: Line of the bookmark
2788 void add_bookmark
(GFile
* file
, gint line
);
2792 * SECTION:ianjuta-message-view
2793 * @title: IAnjutaMessageView
2794 * @short_description: A view where messages of different kind can be shown
2796 * @stability: Unstable
2797 * @include: libanjuta/interfaces/ianjuta-message-view.h
2800 interface IAnjutaMessageView
2803 * IAnjutaMessageViewType:
2804 * @IANJUTA_MESSAGE_VIEW_TYPE_NORMAL: Normal message
2805 * @IANJUTA_MESSAGE_VIEW_TYPE_INFO: Info message (highlighed)
2806 * @IANJUTA_MESSAGE_VIEW_TYPE_ERROR: Error message
2807 * @IANJUTA_MESSAGE_VIEW_TYPE_WARNING: Warning message
2809 * Speficy the type ot the message added to the message view
2820 * IAnjutaMessageView::message-clicked:
2822 * @message: text of the clicked message
2824 * Emitted when the user clicks on a message
2826 void ::message_clicked
(const gchar
*message);
2829 * IAnjutaMessageView::buffer-flushed:
2831 * @line: the current line
2833 * Emitted when #ianjuta_message_view_buffer_append found a newline
2835 void ::buffer_flushed
(const gchar
*line
);
2838 * ianjuta_message_view_buffer_append:
2840 * @text: text to show as message
2841 * @err: Error propagation and reporting.
2843 * Appends the text in buffer. Flushes the buffer where a newline is found.
2844 * by emiiting buffer_flushed signal. The string is expected to be utf8.
2846 void buffer_append
(const gchar
*text
);
2849 * ianjuta_message_view_append:
2851 * @type: type of the message
2852 * @summary: summary of the message
2853 * @details: details of the message
2854 * @err: Error propagation and reporting.
2856 * Append the message with summary displayed and details displayed as tooltip
2858 void append
(Type type
, const gchar
*summary
, const gchar
*details
);
2861 * ianjuta_message_view_clear:
2863 * @err: Error propagation and reporting.
2865 * Clear all messages in buffer
2870 * ianjuta_message_view_select_next:
2872 * @err: Error propagation and reporting.
2874 * Select next message (of type INFO, WARNING or ERROR)
2876 void select_next
();
2879 * ianjuta_message_view_select_previous:
2881 * @err: Error propagation and reporting.
2883 * Select previous message
2885 void select_previous
();
2888 * ianjuta_message_view_get_current_message:
2890 * @err: Error propagation and reporting.
2892 * Get the currently selected message
2894 const gchar
* get_current_message
();
2897 * ianjuta_message_view_get_all_messages:
2899 * @err: Error propagation and reporting.
2901 * Get a list of all messages. The list has to be freed
2902 * Returns: (element-type utf8):
2904 List
<const gchar
*> get_all_messages
();
2908 * SECTION:ianjuta-message-manager
2909 * @title: IAnjutaMessageManager
2910 * @short_description: The plugin that managers all message views
2912 * @stability: Unstable
2913 * @include: libanjuta/interfaces/ianjuta-message-manager.h
2916 interface IAnjutaMessageManager
2918 #include
"ianjuta-message-view.h"
2919 #include
<gdk
/gdk.h
>
2926 * ianjuta_message_manager_add_view:
2928 * @name: Name/Title of the new view
2929 * @icon: Path to an icon or ""
2930 * @err: Error propagation and reporting
2932 * Adds a new view to the message-manager
2934 * Return value: The new message-view
2936 IAnjutaMessageView
* add_view
(const gchar
*name
, const gchar
*icon
);
2939 * ianjuta_message_manager_remove_view:
2941 * @view: The view to remove
2942 * @err: Error propagation and reporting
2944 * Remove view from the message-manager. The view
2945 * will become invalid.
2947 void remove_view
(IAnjutaMessageView
*view
);
2950 * ianjuta_message_manager_get_current_view:
2952 * @err: Error propagation and reporting
2954 * Get the view with is currently on top of
2955 * the notebook or NULL if the message-manager is empty.
2957 * Return value: Current view; #IAnjutaMessageView object.
2958 * NULL, if there is no views.
2960 IAnjutaMessageView
* get_current_view
();
2963 * ianjuta_message_manager_get_view_by_name:
2965 * @name: Name/Title of the view
2966 * @err: Error propagation and reporting
2968 * Get the view with the given name or NULL if
2969 * it does not exist.
2971 * Return value: The message-view or NULL
2973 IAnjutaMessageView
* get_view_by_name
(const gchar
*name
);
2976 * ianjuta_message_manager_get_all_views:
2978 * @err: Error propagation and reporting
2980 * Get all message-views
2982 * Return value: (element-type IAnjutaMessageView): A GList* of all views. You must not
2983 * manipulate the list.
2985 List
<IAnjutaMessageView
*> get_all_views
();
2988 * ianjuta_message_manager_set_current_view:
2990 * @view: A message view
2991 * @err: Error propagation and reporting
2993 * Set view to be on top of the notebook.
2996 void set_current_view
(IAnjutaMessageView
*view
);
2999 * ianjuta_message_manager_set_view_title:
3001 * @view: A message view
3002 * @title: Sets the title of view.
3003 * @err: Error propagation and reporting
3005 * Sets the title of view.
3008 void set_view_title
(IAnjutaMessageView
*view
, const gchar
*title
);
3011 * ianjuta_message_manager_set_view_icon:
3013 * @view: A message view
3014 * @icon: Sets the icon of view.
3015 * @err: Error propagation and reporting
3017 * Sets the icon of view.
3020 void set_view_icon
(IAnjutaMessageView
*view
, GdkPixbufAnimation
*icon
);
3023 * ianjuta_message_manager_set_view_icon_from_stock:
3025 * @view: A message view
3026 * @icon: Sets the icon of view.
3027 * @err: Error propagation and reporting
3029 * Sets the icon of view.
3032 void set_view_icon_from_stock
(IAnjutaMessageView
*view
, const gchar
*icon
);
3036 * SECTION:ianjuta-file-manager
3037 * @title: IAnjutaFileManager
3038 * @short_description: File manager plugin
3040 * @stability: Unstable
3041 * @include: libanjuta/interfaces/ianjuta-file-manager.h
3044 interface IAnjutaFileManager
3046 #include
<gio
/gio.h
>
3049 * IANJUTA_FILE_MANAGER_SELECTED_FILE
3051 * Anjuta shell value set by file manager to the selected file.
3053 #define SELECTED_FILE
"file_manager_selected_file"
3056 * IAnjutaFileManager::section-changed:
3058 * @err: Error propagation and reporting.
3062 void ::section_changed
(GFile
* file
);
3065 * ianjuta_file_manager_set_root:
3068 * @err: Error propagation and reporting.
3072 void set_root
(const gchar
*root_uri
);
3075 * ianjuta_file_manager_get_selected:
3077 * @err: Error propagation and reporting.
3081 GFile
* get_selected
();
3084 * ianjuta_file_manager_set_selected:
3086 * @file: File to select
3087 * @err: Error propagation and reporting.
3091 void set_selected
(GFile
* file
);
3095 * SECTION:ianjuta-terminal
3096 * @title: IAnjutaTerminal
3097 * @short_description: Interface for command line terminals
3099 * @stability: Unstable
3100 * @include: libanjuta/interfaces/ianjuta-terminal.h
3103 interface IAnjutaTerminal
3105 #include
<sys
/types.h
>
3108 * IAnjutaTerminal::child_exited:
3110 * @pid: pid of terminated child
3111 * @status: status of terminated child as returned by waitpid
3113 * This signal is emitted when a child exit.
3115 void ::child_exited
(gint pid
, gint status
);
3119 * ianjuta_terminal_execute_command:
3121 * @directory: Working directory
3122 * @command: Command executed followed by arguments
3123 * @environment: List of additional environment variables
3124 * @err: Error propagation and reporting.
3126 * Run the command in a terminal, setting the working directory
3127 * and environment variables.
3129 * Returns: Process ID
3131 pid_t execute_command
(const gchar
* directory
, const gchar
*command
, gchar
**environment
);
3135 * SECTION:ianjuta-project
3136 * @title: IAnjutaProject
3137 * @short_description: Interface implemented by project backend
3139 * @stability: Unstable
3140 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3142 * This is the new interface that is replacing Gnome Build.
3144 interface IAnjutaProject
3146 #include
<libanjuta
/anjuta
-project.h
>
3147 #include
<gtk
/gtk.h
>
3154 ERROR_ALREADY_EXISTS
,
3155 ERROR_VALIDATION_FAILED
,
3156 ERROR_PROJECT_MALFORMED
,
3157 ERROR_NOT_SUPPORTED
,
3158 ERROR_GENERAL_FAILURE
3163 PROBE_MAKE_FILES
= 100,
3164 PROBE_PROJECT_FILES
= 200
3170 * IAnjutaProject::file-changed:
3172 * @node: Node to be reloaded.
3174 * This signal is emitted when the project is changed on the disk. The
3175 * corresponding node has to be reloaded.
3177 void ::file_changed
(gpointer node
);
3180 * IAnjutaProject::node-changed:
3182 * @node: Changed node.
3183 * @error: Error while changing node
3185 * This signal is emitted when a node is changed by a function of this
3186 * interface. The error argument is not NULL if the change was not
3187 * possible. The corresponding node need to be saved.
3189 void ::node_changed
(gpointer node
, GError
*error
);
3192 * IAnjutaProject::node-saved:
3194 * @node: Saved node.
3195 * @error: Error while saving node
3197 * This signal is emitted when a node is saved. It returns an error if the
3198 * save operation fail.
3200 void ::node_saved
(gpointer node
, GError
*error
);
3203 * IAnjutaProject::node-loaded:
3205 * @node: Loaded node.
3206 * @error: Error while loading node
3208 * This signal is emitted when a node is loaded. It returns an error if the
3209 * load operation fail.
3211 void ::node_loaded
(gpointer node
, GError
*error
);
3215 * ianjuta_project_load_node:
3217 * @node: (transfer none): Project node to reload
3218 * @err: Error propagation and reporting
3220 * Reload a project node
3222 * Return value: TRUE if the node has been loaded without error
3224 gboolean load_node
(AnjutaProjectNode
*node
);
3227 * ianjuta_project_save_node:
3229 * @node: (transfer none): Project node to save
3230 * @err: Error propagation and reporting
3232 * Save a project node
3234 * Return value: TRUE if the node has been saved without error
3236 gboolean save_node
(AnjutaProjectNode
*node
);
3239 * ianjuta_project_add_node_after:
3241 * @parent: (transfer none): Parent
3242 * @sibling: (allow-none) (transfer none): Sibling
3244 * @file: (allow-none) (transfer none): Optional file object for the node
3245 * @name: (allow-none) (transfer none): Optional name for the node
3246 * @err: Error propagation and reporting
3248 * Create a new node and insert it after sibling
3250 * Return value: (transfer none): The new node, NULL if error
3252 AnjutaProjectNode
*add_node_after
(AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
);
3255 * ianjuta_project_add_node_before:
3257 * @parent: (transfer none): Parent
3258 * @sibling: (allow-none) (transfer none): Sibling
3260 * @file: (allow-none) (transfer none): Optional file object for the node
3261 * @name: (allow-none) (transfer none): Optional name for the node
3262 * @err: Error propagation and reporting
3264 * Create a new node and insert it before sibling
3266 * Return value: (transfer none): The new node, NULL if error
3268 AnjutaProjectNode
*add_node_before
(AnjutaProjectNode
*parent
, AnjutaProjectNode
*sibling
, AnjutaProjectNodeType type
, GFile
*file
, const gchar
*name
);
3271 * ianjuta_project_remove_node:
3273 * @node: (transfer none): Node
3274 * @err: Error propagation and reporting
3278 * Return value: TRUE if the node can be removed
3280 gboolean remove_node
(AnjutaProjectNode
*node
);
3283 * ianjuta_project_set_property:
3285 * @node: (transfer none): Node
3286 * @id: (transfer none): Property
3287 * @name: (allow-none) (transfer none): Name for map property
3288 * @value: (transfer none): Value
3289 * @err: Error propagation and reporting
3291 * Change a properties on node.
3293 * Return value: (allow-none) (transfer none): The new property of NULL if the property cannot be set
3295 AnjutaProjectProperty
*set_property
(AnjutaProjectNode
*parent
, const gchar
*id, const gchar
*name
, const gchar
*value
);
3298 * ianjuta_project_remove_property:
3300 * @node: (transfer none): Node
3301 * @id: (transfer none): Property
3302 * @name: (allow-none) (transfer none): Name for map property
3303 * @err: Error propagation and reporting
3305 * Remove a property of the node
3307 * Return value: TRUE if the node is removed
3309 gboolean remove_property
(AnjutaProjectNode
*node
, const gchar
*id, const gchar
*name
);
3312 * ianjuta_project_get_root:
3314 * @err: Error propagation and reporting
3318 * Return value: (transfer none): The root node
3320 AnjutaProjectNode
*get_root
();
3323 * ianjuta_project_get_node_info:
3325 * @err: Error propagation and reporting
3327 * Return a list of possible node;
3329 * Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): A list
3330 * containing information on all node supported by the project.
3332 const List
<AnjutaProjectNodeInfo
*> get_node_info
();
3335 * ianjuta_project_is_loaded:
3337 * @err: Error propagation and reporting
3339 * Return TRUE if the project is loaded;
3341 * Return value: TRUE if the project is completely loaded.
3343 gboolean is_loaded
();
3347 * SECTION:ianjuta-project-backend
3348 * @title: IAnjutaProjectBackend
3349 * @short_description: Interface for creating new project
3351 * @stability: Unstable
3352 * @include: libanjuta/interfaces/ianjuta-project-backend.h
3355 interface IAnjutaProjectBackend
3357 #include
"ianjuta-project.h"
3360 * ianjuta_project_backend_new_project:
3362 * @file: (transfer none): Project file or directory
3363 * @err: Error propagation and reporting
3365 * Create a new Anjuta project.
3367 * Return value: (transfer full): An object implementing the
3368 * #IAnjutaProject interface.
3370 IAnjutaProject
* new_project
(GFile
*file
);
3374 * ianjuta_project_backend_probe:
3376 * @file: (transfer none): Project file or directory
3377 * @err: Error propagation and reporting
3379 * Check if the directory contains a project supported by this
3382 * Return value: 0 if the project is invalid and > 0 if the project is
3385 gint probe
(GFile
*directory
);
3389 * SECTION:ianjuta-project-manager
3390 * @title: IAnjutaProjectManager
3391 * @short_description: Interface for project managers
3393 * @stability: Unstable
3394 * @include: libanjuta/interfaces/ianjuta-project-manager.h
3397 interface IAnjutaProjectManager
3400 #include
<libanjuta
/anjuta
-project.h
>
3401 #include
<libanjuta
/interfaces
/ianjuta
-project.h
>
3404 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI
3406 * Anjuta shell value set by project manager to the project root uri.
3408 #define PROJECT_ROOT_URI
"project_root_uri"
3411 * IANJUTA_PROJECT_MANAGER_CURRENT_PROJECT
3413 * Anjuta shell value set by project manager to the current project object
3414 * which implement #IAnjutaProject interface.
3416 #define CURRENT_PROJECT
"project_manager_current_project"
3419 * IANJUTA_PROJECT_MANAGER_CURRENT_URI
3421 * Anjuta shell value set by project manager to the current uri.
3423 #define CURRENT_URI
"project_manager_current_uri"
3428 * IAnjutaProjectManager::project_loaded:
3430 * @err: Error propagation and reporting.
3432 * Emitted when the project is fully loaded. It can takes a quite long
3433 * time if the project is big. The project is loaded in several parts
3434 * in a thread. All functions are available before having the project
3437 void ::project_loaded
(GError
*error
);
3440 * IAnjutaProjectManager::element_added:
3442 * @element: A #GFile corrresponding to added element
3443 * @err: Error propagation and reporting.
3445 * Emitted when a new element is added to the project. It can be
3446 * a source, a target or a group. It does not always correspond
3447 * to an existing file. This signal can be emitted several time for
3450 void ::element_added
(GFile
*element
);
3453 * IAnjutaProjectManager::element_removed:
3455 * @element: A #GFile corresponding to removed element
3456 * @err: Error propagation and reporting.
3458 * Emitted when an element is removed from a project. It can be
3459 * a source, a target or a group.
3461 void ::element_removed
(GFile
*element
);
3464 * IAnjutaProjectManager::element_selected:
3466 * @element_uri: A #GFile corresponding to selected element
3467 * @err: Error propagation and reporting.
3469 * Emitted when an element is selected in the project view. It
3470 * can be a source, a target or a group.
3472 void ::element_selected
(GFile
*element
);
3477 * ianjuta_project_manager_get_elements:
3479 * @element_type: Select one element type: source, group or target
3480 * @err: Error propagation and reporting.
3482 * Get a list of all elements of this type in the project.
3484 * Returns: (element-type GFile) (transfer full): Get list of #GFile corresponding to
3485 * all valid elements or %NULL if there are no elements of this type. Free the returned
3486 * list with g_list_free() and the files with g_object_unref().
3488 List
<GFile
*> get_elements
(AnjutaProjectNodeType element_type
);
3491 * ianjuta_project_manager_get_target_type:
3493 * @target: A #GFile corresponding to a target
3494 * @err: Error propagation and reporting.
3496 * Get the type of the corresponding target: program, library...
3498 * Returns: Return the type of the target.
3500 AnjutaProjectNodeType get_target_type
(GFile
*target
);
3503 * ianjuta_project_manager_get_targets:
3505 * @target_type: type of the target
3506 * @err: Error propagation and reporting.
3508 * Get a list of targets in the project with the corresponding type.
3510 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to
3511 * each target of the requested type or %NULL if none exists. Free the returned list
3512 * with g_list_free() and the files with g_object_unref().
3514 List
<GFile
*> get_targets
(AnjutaProjectNodeType target_type
);
3517 * ianjuta_project_manager_get_parent:
3519 * @element: A #GFile corresponding to one child.
3520 * @err: Error propagation and reporting.
3522 * Gets the parent of the corresponding child.
3524 * Returns: The parent of the child, or %NULL if the element is the root.
3526 GFile
* get_parent
(GFile
*element
);
3529 * ianjuta_project_manager_get_children:
3531 * @element: A #GFile corresponding to a parent.
3532 * @err: Error propagation and reporting.
3534 * Gets the list of all children of the corresponding parent.
3536 * Returns: (element-type GFile) (transfer full): The list of #GFile corresponding to
3537 * each child of the element or %NULL if the element has no child. Free the returned
3538 * list with g_list_free() and the files with g_object_unref().
3540 List
<GFile
*> get_children
(GFile
*element
);
3543 * ianjuta_project_manager_get_selected:
3545 * @err: Error propagation and reporting.
3547 * Gets the currently selected element in the project manager view.
3549 * Returns: (transfer full): A #GFile corresponding to the selected element in the project
3550 * view. You own the returned file; use g_object_unref() to release it.
3552 GFile
* get_selected
();
3555 * ianjuta_project_manager_get_capabilities:
3557 * @err: Error propagation and reporting.
3559 * Gets the capabilites of project whether it can add group, target
3562 * Returns: Supported capabilites.
3564 guint get_capabilities
();
3567 * ianjuta_project_manager_add_source:
3569 * @name: Source name or URI.
3570 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3571 * %NULL if you don't care.
3572 * @err: Error propagation and reporting.
3574 * Prompts the user to add a file to the project. If the user selects
3575 * multiple files only the first source file is returned.
3577 * You can add non existing file. In this case the element_added
3578 * signal will be emitted with a non existing file. So it is
3579 * up to the caller to reemit this signal later when the file
3582 * Returns: (transfer full): A #GFile corresponding to the new source file in the
3583 * project view. You own the returned file; use g_object_unref() to release it.
3585 GFile
* add_source
(const gchar
*name
, GFile
*default_target
);
3588 * ianjuta_project_manager_add_source_quiet:
3590 * @name: Source name or URI.
3591 * @target: A #GFile corresponding to the parent target or group.
3592 * @err: Error propagation and reporting.
3594 * Adds a file to the project without prompting the user.
3596 * You can add non existing file. In this case the element_added
3597 * signal will be emitted with a non existing file. So it is
3598 * up to the caller to reemit this signal later when the file
3601 * Returns: (transfer full): A #GFile corresponding to the new source file in the project
3602 * view. You own the returned file; use g_object_unref() to release it.
3604 GFile
* add_source_quiet
(const gchar
*name
, GFile
*target
);
3607 * ianjuta_project_manager_add_sources:
3609 * @names: (element-type utf8): Sources name or URI to add.
3610 * @default_target: (allow-none): A #GFile corresponding to the default target or group or
3611 * %NULL if don't care.
3612 * @err: Error propagation and reporting.
3614 * Prompts the user to add several files to the project. Depending on the
3615 * project backend, it can be possible that the source files must
3616 * be located in a particular directory.
3618 * You can add non existing file. In this case the element_added
3619 * signal will be emitted with a non existing file. So it is
3620 * up to the caller to reemit this signal later when the file
3623 * Returns: (element-type GFile) (transfer full): A list of #GFile corresponding to all
3624 * new source files added in the project. You own the list with the the returned files;
3625 * use g_list_free() and g_object_unref() on each file to release them.
3627 List
<GFile
*> add_sources
(List
<const gchar
*> names
, GFile
*default_target
);
3630 * ianjuta_project_manager_add_target:
3632 * @name: Target name or URI.
3633 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3634 * %NULL if don't care.
3635 * @err: Error propagation and reporting.
3637 * Prompts the user to add a new target to the project. The user can select
3638 * a parent group different from the one set as default.
3640 * Returns: (transfer full): A #GFile corresponding to the new target added in the project.
3641 * You own the returned file; use g_object_unref() to release it.
3643 GFile
* add_target
(const gchar
*name
, GFile
*default_group
);
3646 * ianjuta_project_manager_add_group:
3648 * @name: Group name or URI.
3649 * @default_group: (allow-none): A #GFile corresponding to the default parent group or
3650 * %NULL if don't care.
3651 * @err: Error propagation and reporting.
3653 * Prompts the user to add a new group to the project. The user can select
3654 * a parent group different from the one set as default.
3656 * Returns: (transfer full): A #GFile corresponding to the new group added in the project.
3657 * You own the returned file; use g_object_unref() to release it.
3659 GFile
* add_group
(const gchar
*name
, GFile
*default_group
);
3662 * ianjuta_project_manager_is_open:
3664 * @err: Error propagation and reporting.
3666 * Gets whether a project is currently opened.
3668 * Returns: %TRUE if a project is opened.
3670 gboolean is_open
();
3673 * ianjuta_project_manager_get_packages:
3675 * @err: Error propagation and reporting.
3677 * Returns: (element-type utf8) (transfer container): the list of pkg-config packages that the current project
3678 * requires in it's configure.ac. Can be NULL if there is no project
3679 * opened currently or no package is required.
3681 List
<gchar
*> get_packages
();
3684 * ianjuta_project_manager_get_current_project:
3686 * @err: Error propagation and reporting.
3688 * Gets the current project.
3690 * Return value: (transfer none): the currently active project. NULL if none is there.
3692 IAnjutaProject
* get_current_project
();
3696 * SECTION:ianjuta-project-chooser
3697 * @title: IAnjutaProjectChooser
3698 * @short_description: Interface for selecting project node
3700 * @stability: Unstable
3701 * @include: libanjuta/interfaces/ianjuta-project-chooser.h
3704 interface IAnjutaProjectChooser
3707 #include
<libanjuta
/anjuta
-project.h
>
3708 #include
<libanjuta
/interfaces
/ianjuta
-project
-manager.h
>
3713 * IAnjutaProjectChooser::changed:
3716 * Emitted when the selected node is changed.
3723 * ianjuta_project_chooser_set_project_model:
3725 * @manager: A project manager
3726 * @child_type: Select one element type: source, group or target
3727 * @err: Error propagation and reporting.
3729 * Initialize a project chooser button allowing to select a parent node
3730 * where you can add the nodes of type child_type.
3731 * As special cases with
3734 * <term>ANJUTA_PROJECT_ROOT</term>
3735 * <listitem><para>all nodes are included</para></listitem>
3738 * <term>ANJUTA_PROJECT_MODULE</term>
3739 * <listitem><para>only modules are included, this can be used
3740 * to add a new package. While ANJUTA_PROJECT_PACKAGE allows you
3741 * to select a target using a package.</para></listitem>
3745 * Returns: TRUE if sucessful, other FALSE.
3747 gboolean set_project_model
(IAnjutaProjectManager
*manager
, AnjutaProjectNodeType child_type
);
3751 * ianjuta_project_chooser_get_selected:
3753 * @err: Error propagation and reporting.
3755 * Gets the currently selected element in the project chooser.
3757 * Returns: (transfer none): A #GFile corresponding to the selected
3758 * element in the project view or %NULL if no valid node is selected.
3759 * The file is owned by the widget If you want to keep a pointer to
3760 * the file you must add a refcount using g_object_ref().
3762 GFile
* get_selected
();
3767 * SECTION:ianjuta-todo
3768 * @title: IAnjutaTodo
3769 * @short_description: Task manager interface
3771 * @stability: Unstable
3772 * @include: libanjuta/interfaces/ianjuta-todo.h
3775 interface IAnjutaTodo
3777 #include
<gio
/gio.h
>
3779 * ianjuta_to_do_load:
3782 * @err: Error propagation and reporting.
3786 void load
(GFile
*file
);
3790 * SECTION:ianjuta-wizard
3791 * @title: IAnjutaWizard
3792 * @short_description: Interface for wizards that can create new stuffs
3794 * @stability: Unstable
3795 * @include: libanjuta/interfaces/ianjuta-wizard.h
3798 interface IAnjutaWizard
3802 * ianjuta_wizard_activate:
3804 * @err: Error propagation and reporting.
3806 * Called when the wizard should start after some user action
3812 * SECTION:ianjuta-debugger
3813 * @title: IAnjutaDebugger
3814 * @short_description: Debugger interface
3815 * @see_also: #IAnjutaDebugManager
3816 * @stability: Unstable
3817 * @include: libanjuta/interfaces/ianjuta-debugger.h
3819 * This interface is implemented by debugger backends, by example the gdb
3820 * backend. It is used by the debug manager plugin which provides the
3821 * graphical interface and a simple wrapper: #IAnjutaDebugManager.
3823 * The debugger is in one on these 5 states and emit a signal to the debug
3824 * manager when it changes. Here is figure showing all transitions and
3825 * the signal emitted.
3826 * <figure id="debugger-states">
3829 * <imagedata fileref="debugger-states.png" format="PNG"/>
3835 interface IAnjutaDebugger
3837 #include
"ianjuta-message-view.h"
3838 #include
<sys
/types.h
>
3839 #include
<gio
/gio.h
>
3843 * IAnjutaDebuggerError:
3844 * @IANJUTA_DEBUGGER_OK: No error
3845 * @IANJUTA_DEBUGGER_NOT_READY: Debugger is not ready to execute the command
3846 * @IANJUTA_DEBUGGER_NOT_RUNNING: Debugger is not is running state
3847 * @IANJUTA_DEBUGGER_NOT_STOPPED: Debugger is not is stopped state
3848 * @IANJUTA_DEBUGGER_NOT_LOADED: Debugger is not is loaded state
3849 * @IANJUTA_DEBUGGER_NOT_STARTED: Debugger is not in started state
3850 * @IANJUTA_DEBUGGER_NOT_CONNECTED: Debugger is not connected:
3851 * @IANJUTA_DEBUGGER_NOT_IMPLEMENTED: Corresponding function is not implemented
3852 * @IANJUTA_DEBUGGER_CANCEL: Operation has been cancelled
3853 * @IANJUTA_DEBUGGER_UNABLE_TO_CREATE_VARIABLE: Debugger cannot create variable
3854 * @IANJUTA_DEBUGGER_UNABLE_TO_ACCESS_MEMORY: Debugger cannot access memory
3855 * @IANJUTA_DEBUGGER_UNABLE_TO_OPEN_FILE: Debugger cannot open file
3856 * @IANJUTA_DEBUGGER_UNSUPPORTED_FILE_TYPE: Debugger cannot debug such file
3857 * @IANJUTA_DEBUGGER_UNSUPPORTED_VERSION: Debugger is too old
3858 * @IANJUTA_DEBUGGER_UNABLE_TO_FIND_DEBUGGER: Debugger cannot be found
3859 * @IANJUTA_DEBUGGER_ALREADY_DONE: Command has already been executed
3860 * @IANJUTA_DEBUGGER_PROGRAM_NOT_FOUND: Program cannot be found
3861 * @IANJUTA_DEBUGGER_UNABLE_TO_CONNECT: Unable to connect to debugger
3862 * @IANJUTA_DEBUGGER_UNKNOWN_ERROR: Unknown error
3863 * @IANJUTA_DEBUGGER_OTHER_ERROR: other error
3865 * This enumeration is used to defined the error returned by the debugger
3879 UNABLE_TO_CREATE_VARIABLE
,
3880 UNABLE_TO_ACCESS_MEMORY
,
3881 UNABLE_TO_OPEN_FILE
,
3882 UNSUPPORTED_FILE_TYPE
,
3883 UNSUPPORTED_VERSION
,
3884 UNABLE_TO_FIND_DEBUGGER
,
3893 * IAnjutaDebuggerOutputType:
3894 * @IANJUTA_DEBUGGER_OUTPUT: Output from debugger
3895 * @IANJUTA_DEBUGGER_WARNING_OUTPUT: Warning from debugger
3896 * @IANJUTA_DEBUGGER_ERROR_OUTPUT: Error from debugger
3897 * @IANJUTA_DEBUGGER_INFO_OUTPUT: Additional message from debugger
3899 * This enumeration is used to defined the kind of output in
3900 * #IAnjutaDebuggerOutputCallback
3911 * IAnjutaDebuggerState:
3912 * @IANJUTA_DEBUGGER_BUSY: Debugger is executing a command, it can enter in another
3913 * at the end of the command.
3914 * @IANJUTA_DEBUGGER_STOPPED: Debugger is stopped.
3915 * @IANJUTA_DEBUGGER_STARTED: Debugger is started but no program is loaded.
3916 * @IANJUTA_DEBUGGER_PROGRAM_LOADED: Debugger is started and has a program loaded.
3917 * @IANJUTA_DEBUGGER_PROGRAM_STOPPED: Debugger is started and has a program stopped.
3918 * @IANJUTA_DEBUGGER_PROGRAM_RUNNING: Debugger is started and has a program running.
3920 * This enumeration is used to defined the different state of the debugger.
3933 * IAnjutaDebuggerFrame:
3934 * @thread: Thread identifier.
3935 * @level: Level of the frame, 0 is the topmost one.
3936 * @args: List of argument of the caller.
3937 * @file: Source file name where is the program counter.
3938 * @line: Line number in the file above.
3939 * @function: Function name where is the program counter.
3940 * @library: Library name where is the program counter.
3941 * @address: Address of the program counter.
3943 * This structure keeps all information about a stack frame.
3958 * IAnjutaDebuggerCallback:
3960 * @user_data: user data passed to the function
3963 * This callback function is used only by #ianjuta_debugger_callback with a
3966 typedef void (*Callback) (const gpointer data
, gpointer user_data
, GError
* err
);
3969 * IAnjutaDebuggerGListCallback:
3970 * @list: (element-type any): list of data
3971 * @user_data: user data passed to the function
3974 * This callback function is used by several debugger functions. Depending on
3975 * the function, the kind of elements in the list is different. It is a string
3976 * for #ianjuta_debugger_list_local or a #IAnjutaDebuggerFrame for
3977 * #ianjuta_debugger_list_frame.
3979 typedef void (*GListCallback
) (const GList
* list
, gpointer user_data
, GError
* err
);
3982 * IAnjutaDebuggerGCharCallback:
3984 * @user_data: user data
3987 * This callback function is used by several debugger functions. The data is
3990 typedef void (*GCharCallback
) (const gchar
*value
, gpointer user_data
, GError
* err
);
3993 * IAnjutaDebuggerOutputCallback:
3995 * @user_data: user data
3998 * This callback function is used only by #ianjuta_debugger_callback with a
4001 typedef void (*OutputCallback
) (OutputType type
, const gchar
*output
, gpointer user_data
);
4006 * IAnjutaDebugger::debugger_started:
4009 * This signal is emitted when the debugger is started.
4011 void ::debugger_started
();
4014 * IAnjutaDebugger::debugger_stopped:
4016 * @err: Error propagation and reporting.
4018 * This signal is emitted when the debugger is stopped. The error
4019 * parameters allow to check it has run correctly.
4021 void ::debugger_stopped
(GError
*err
);
4024 * IAnjutaDebugger::program_loaded:
4027 * This signal is emitted when a program is loaded.
4029 void ::program_loaded
();
4032 * IAnjutaDebugger::program_running:
4035 * This signal is emitted when the program is running.
4037 void ::program_running
();
4040 * IAnjutaDebugger::program_stopped:
4043 * This signal is emitted when the program is interrupted.
4045 void ::program_stopped
();
4048 * IAnjutaDebugger::program_exited:
4051 * This signal is emitted when the program exits.
4053 void ::program_exited
();
4056 * IAnjutaDebugger::sharedlib_event:
4059 * This signal is emitted when the program load a new shared
4062 void ::sharedlib_event
();
4065 * IAnjutaDebugger::program_moved:
4067 * @pid: process id, 0 when unknown
4068 * @tid: thread id, 0 when unknown
4069 * @address: program counter address, 0 when unknown
4070 * @file: source file where is the program counter, NULL when unknown
4071 * @line: line number if file name above is not NULL
4073 * This signal is emitted when the debugger know the current program
4074 * location. Most of the time, after the program has stopped but it
4075 * could happen even if it is still running.
4077 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
4080 * IAnjutaDebugger::frame_changed:
4082 * @frame: frame number
4083 * @thread: thread number
4085 * This signal is emitted when the current frame changes.
4087 void ::frame_changed
(guint frame
, gint thread
);
4090 * IAnjutaDebugger::signal_received:
4092 * @name: Signal name
4093 * @description: Signal description
4095 * This signal is emitted when the program received a unix signal.
4097 void ::signal_received
(const gchar
* name
, const gchar
* description
);
4100 * IAnjutaDebugger::debugger_ready:
4102 * @state: debugger status
4104 * This signal is emitted when the debugger is ready to execute
4107 void ::debugger_ready
(State state
);
4111 * ianjuta_debugger_get_state:
4113 * @err: Error propagation and reporting.
4115 * Get the current state of the debugger
4117 * Returns: The current debugger state.
4125 * ianjuta_debugger_load:
4128 * @mime_type: mime type of the file
4129 * @source_search_directories: (element-type utf8): List of directories to search for
4131 * @err: Error propagation and reporting.
4133 * Load a program in the debugger.
4135 * Returns: TRUE if sucessful, other FALSE.
4137 gboolean load
(const gchar
*file
, const gchar
*mime_type
, const List
<const gchar
*> source_search_directories
);
4140 * ianjuta_debugger_attach:
4142 * @pid: pid of the process to debug
4143 * @source_search_directories: (element-type utf8): List of directories to search for
4145 * @err: Error propagation and reporting.
4147 * Attach to an already running process.
4149 * Returns: TRUE if sucessful, other FALSE.
4151 gboolean attach
(pid_t pid
, const List
<const gchar
*> source_search_directories
);
4154 * ianjuta_debugger_set_working_directory:
4156 * @dir: working program directory
4157 * @err: Error propagation and reporting.
4159 * Set program working directory.
4161 * Returns: TRUE if sucessful, other FALSE.
4163 gboolean set_working_directory
(const gchar
*dir
);
4166 * ianjuta_debugger_set_environment:
4168 * @env: List environment variable
4169 * @err: Error propagation and reporting
4171 * Set environment variable
4173 * Returns: TRUE if sucessfull, other FALSE.
4175 gboolean set_environment
(gchar
**env
);
4178 * ianjuta_debugger_start:
4180 * @args: command line argument of the program
4181 * @terminal: TRUE if the program need a terminal
4182 * @stop: TRUE if program is stopped at the beginning
4183 * @err: Error propagation and reporting.
4185 * Start a loaded program under debugger control.
4187 * Returns: TRUE if sucessful, other FALSE.
4189 gboolean start
(const gchar
*args
, gboolean terminal
, gboolean stop
);
4192 * ianjuta_debugger_connect:
4194 * @server: remote server
4195 * @args: command line argument of the program
4196 * @terminal: TRUE if the program need a terminal
4197 * @stop: TRUE if program is stopped at the beginning
4198 * @err: Error propagation and reporting
4200 * Connect to a remote debugger and run program
4202 * Returns: TRUE if sucessfull, otherwise FALSE.
4204 gboolean connect
(const gchar
*server
, const gchar
*args
, gboolean terminal
, gboolean stop
);
4207 * ianjuta_debugger_unload:
4209 * @err: Error propagation and reporting.
4213 * Returns: TRUE if sucessfull, otherwise FALSE.
4218 * ianjuta_debugger_quit:
4220 * @err: Error propagation and reporting.
4222 * Quit the debugger, can wait until the debugger is ready.
4224 * Returns: TRUE if sucessful, other FALSE.
4229 * ianjuta_debugger_abort:
4231 * @err: Error propagation and reporting.
4233 * Quit the debugger as fast as possible.
4235 * Returns: TRUE if sucessful, otherwise FALSE.
4240 * ianjuta_debugger_run:
4242 * @err: Error propagation and reporting.
4244 * Run the program currently loaded.
4246 * Returns: TRUE if sucessful, otherwise FALSE.
4251 * ianjuta_debugger_step_in:
4253 * @err: Error propagation and reporting.
4255 * Execute a single C instruction of the program currently loaded.
4257 * Returns: TRUE if sucessful, otherwise FALSE.
4259 gboolean step_in
();
4262 * ianjuta_debugger_step_over:
4264 * @err: Error propagation and reporting.
4266 * Execute one C instruction, without entering in procedure, of
4267 * the program currently loaded.
4269 * Returns: TRUE if sucessful, otherwise FALSE.
4271 gboolean step_over
();
4274 * ianjuta_debugger_step_out:
4276 * @err: Error propagation and reporting.
4278 * Execute the currently loaded program until it goes out of the
4279 * current procedure.
4281 * Returns: TRUE if sucessful, otherwise FALSE.
4283 gboolean step_out
();
4286 * ianjuta_debugger_run_to:
4288 * @file: target file name
4289 * @line: target line in file
4290 * @err: Error propagation and reporting.
4292 * Execute the currently loaded program until it reachs the target
4295 * Returns: TRUE if sucessful, otherwise FALSE.
4297 gboolean run_to
(const gchar
* file
, gint line
);
4300 * ianjuta_debugger_run_from:
4302 * @file: target file name
4303 * @line: target line in file
4304 * @err: Error propagation and reporting.
4306 * Execute the program from a new position.
4307 * This function is optional.
4309 * Returns: TRUE if sucessful, otherwise FALSE.
4311 gboolean run_from
(const gchar
*file
, gint line
);
4314 * ianjuta_debugger_exit:
4316 * @err: Error propagation and reporting.
4318 * Exit from the currently loaded program.
4320 * Returns: TRUE if sucessful, otherwise FALSE.
4325 * ianjuta_debugger_interrupt:
4327 * @err: Error propagation and reporting.
4329 * Interrupt the program currently running.
4331 * Returns: TRUE if sucessful, otherwise FALSE.
4333 gboolean interrupt
();
4338 * ianjuta_debugger_inspect:
4340 * @name: variable name
4341 * @callback: Callback to call with variable value
4342 * @user_data: User data that is passed back to the callback
4343 * @err: Error propagation and reporting.
4345 * Get back the value of the named variable.
4347 * Returns: TRUE if sucessful, otherwise FALSE.
4349 gboolean inspect
(const gchar
* name
, GCharCallback
callback, gpointer user_data
);
4352 * ianjuta_debugger_evaluate:
4354 * @name: variable name
4355 * @value: new variable value
4356 * @callback: Callback to call when the variable has been modified
4357 * @user_data: User data that is passed back to the callback
4358 * @err: Error propagation and reporting.
4360 * Change the value of a variable in the current program.
4362 * Returns: TRUE if sucessful, otherwise FALSE.
4364 gboolean evaluate
(const gchar
* name
, const gchar
* value
, GCharCallback
callback, gpointer user_data
);
4367 * ianjuta_debugger_print:
4369 * @name: variable name
4370 * @callback: Callback to call with variable value
4371 * @user_data: User data that is passed back to the callback
4372 * @err: Error propagation and reporting.
4374 * Display value of a variable, like inspect.
4376 * Returns: TRUE if sucessful, otherwise FALSE.
4378 gboolean print
(const gchar
*variable
, GCharCallback
callback, gpointer user_data
);
4381 * ianjuta_debugger_list_local:
4383 * @callback: Callback to call with list of local variable
4384 * @user_data: User data that is passed back to the callback
4385 * @err: Error propagation and reporting.
4387 * Get the list of local variables
4389 * Returns: TRUE if sucessful, otherwise FALSE.
4391 gboolean list_local
(GListCallback
callback, gpointer user_data
);
4394 * ianjuta_debugger_list_argument:
4396 * @callback: Callback to call with list of arguments
4397 * @user_data: User data that is passed back to the callback
4398 * @err: Error propagation and reporting.
4400 * Get the list of arguments
4402 * Returns: TRUE if sucessful, otherwise FALSE.
4404 gboolean list_argument
(GListCallback
callback, gpointer user_data
);
4407 * ianjuta_debugger_info_signal:
4409 * @callback: Callback to call with list of arguments
4410 * @user_data: User data that is passed back to the callback
4411 * @err: Error propagation and reporting.
4413 * Get some informatin about a signal
4415 * Returns: TRUE if sucessful, otherwise FALSE.
4417 gboolean info_signal
(GListCallback
callback, gpointer user_data
);
4420 * ianjuta_debugger_info_sharedlib:
4422 * @callback: Callback to call with list of arguments
4423 * @user_data: User data that is passed back to the callback
4424 * @err: Error propagation and reporting.
4426 * Get information about shared libraries.
4428 * Returns: TRUE if sucessful, otherwise FALSE.
4430 gboolean info_sharedlib
(GListCallback
callback, gpointer user_data
);
4433 * ianjuta_debugger_handle_signal:
4435 * @name: signal name
4436 * @stop: TRUE if we need to stop signal
4437 * @print: TRUE if we display a message when the signal is emitted
4438 * @ignore: TRUE if we ignore the signal
4439 * @err: Error propagation and reporting.
4441 * It defines how to handle signal received by the program.
4443 * Returns: TRUE if sucessful, otherwise FALSE.
4445 gboolean handle_signal
(const gchar
*name
, gboolean stop
, gboolean print
, gboolean
ignore);
4448 * ianjuta_debugger_info_frame:
4450 * @frame: frame number, the top frame has the number 0
4451 * @callback: Callback to call getting a list of strings with all information
4452 * @user_data: User data that is passed back to the callback
4453 * @err: Error propagation and reporting.
4455 * Get some information about the one stack frame.
4456 * This function has been deprecated and is not used anymore in the
4459 * Returns: TRUE if sucessful, otherwise FALSE.
4461 gboolean info_frame
(guint frame
, GListCallback
callback, gpointer user_data
);
4464 * ianjuta_debugger_info_args:
4466 * @callback: Callback to call getting a list of strings with all information
4467 * @user_data: User data that is passed back to the callback
4468 * @err: Error propagation and reporting.
4470 * Get some informatin about a current functin arguments.
4471 * This function has been deprecated and is not used anymore in the
4474 * Returns: TRUE if sucessful, otherwise FALSE.
4476 gboolean info_args
(GListCallback
callback, gpointer user_data
);
4479 * ianjuta_debugger_info_target:
4481 * @callback: Callback to call getting a list of strings with all information
4482 * @user_data: User data that is passed back to the callback
4483 * @err: Error propagation and reporting.
4485 * Get back some information about the target
4486 * This function has been deprecated and is not used anymore in the
4489 * Returns: TRUE if sucessful, otherwise FALSE.
4491 gboolean info_target
(GListCallback
callback, gpointer user_data
);
4494 * ianjuta_debugger_info_program:
4496 * @callback: Callback to call getting a list of strings with all information
4497 * @user_data: User data that is passed back to the callback
4498 * @err: Error propagation and reporting.
4500 * Get some informatin about a current program.
4501 * This function has been deprecated and is not used anymore in the
4504 * Returns: TRUE if sucessful, otherwise FALSE.
4506 gboolean info_program
(GListCallback
callback, gpointer user_data
);
4509 * ianjuta_debugger_info_udot:
4511 * @callback: Callback to call getting a list of strings with all information
4512 * @user_data: User data that is passed back to the callback
4513 * @err: Error propagation and reporting.
4515 * Get some informatin about OS structures.
4516 * This function has been deprecated and is not used anymore in the
4519 * Returns: TRUE if sucessful, otherwise FALSE.
4521 gboolean info_udot
(GListCallback
callback, gpointer user_data
);
4525 * ianjuta_debugger_info_variables:
4527 * @callback: Callback to call getting a list of strings with all information
4528 * @user_data: User data that is passed back to the callback
4529 * @err: Error propagation and reporting.
4531 * Get some informatin about variables.
4532 * This function has been deprecated and is not used anymore in the
4535 * Returns: TRUE if sucessful, otherwise FALSE.
4537 gboolean info_variables
(GListCallback
callback, gpointer user_data
);
4540 * ianjuta_debugger_list_frame:
4542 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame
4543 * @user_data: User data that is passed back to the callback
4544 * @err: Error propagation and reporting.
4546 * Get the list of frames.
4548 * Returns: TRUE if sucessful, otherwise FALSE.
4550 gboolean list_frame
(GListCallback
callback, gpointer user_data
);
4553 * ianjuta_debugger_set_frame:
4555 * @frame: frame number
4556 * @err: Error propagation and reporting.
4558 * Set the current frame.
4560 * Returns: TRUE if sucessful, otherwise FALSE.
4562 gboolean set_frame
(guint frame
);
4565 * ianjuta_debugger_list_thread:
4567 * @callback: Callback to call getting a list of #IAnjutaDebuggerFrame for each thread
4568 * @user_data: User data that is passed back to the callback
4569 * @err: Error propagation and reporting.
4571 * Get the list of threads.
4573 * Returns: TRUE if sucessful, otherwise FALSE.
4575 gboolean list_thread
(GListCallback
callback, gpointer user_data
);
4578 * ianjuta_debugger_set_thread:
4580 * @thread: thread number
4581 * @err: Error propagation and reporting.
4583 * Set the current thread.
4585 * Returns: TRUE if sucessful, otherwise FALSE.
4587 gboolean set_thread
(gint thread
);
4590 * ianjuta_debugger_info_thread:
4592 * @thread: thread number
4593 * @callback: Callback to call getting a list of strings with all information
4594 * @user_data: User data that is passed back to the callback
4595 * @err: Error propagation and reporting.
4597 * Get some information about current threads.
4599 * Returns: TRUE if sucessful, otherwise FALSE.
4601 gboolean info_thread
(gint thread
, GListCallback
callback, gpointer user_data
);
4604 * ianjuta_debugger_send_command:
4607 * @err: Error propagation and reporting.
4609 * Send a command directly to the debugger. Warning, changing the
4610 * debugger states, by sending a run command by example, will
4611 * probably gives some troubles in the debug manager.
4613 * Returns: TRUE if sucessful, otherwise FALSE.
4615 gboolean send_command
(const gchar
*command
);
4618 * ianjuta_debugger_callback:
4620 * @callback: Callback to call. the data argument is NULL.
4621 * @user_data: User data that is passed back to the callback
4622 * @err: Error propagation and reporting.
4624 * All commands are executed asynchronously and give back information
4625 * with callbacks. It is difficult to know when a command is really
4626 * executed. But as all commands are executed in order, you can use
4627 * this command to get a call back when all previous commands have
4630 * Returns: TRUE if sucessful, otherwise FALSE.
4632 gboolean
callback (Callback callback, gpointer user_data
);
4635 * ianjuta_debugger_enable_log:
4637 * @log: MessageView used by log
4638 * @err: Error propagation and reporting.
4640 * Log all debuggers commands, mainly useful for debugging.
4642 void enable_log
(IAnjutaMessageView
*log
);
4645 * ianjuta_debugger_disable_log:
4647 * @err: Error propagation and reporting.
4649 * Disable debugger log.
4651 void disable_log
();
4654 * ianjuta_debugger_dump_stack_trace:
4656 * @callback: Callback to call getting a list of strings
4657 * @user_data: User data that is passed back to the callback
4658 * @err: Error propagation and reporting.
4660 * Return a stack trace valid for a bug reports.
4661 * This function is optional.
4663 * Returns: TRUE if sucessful, otherwise FALSE.
4665 gboolean dump_stack_trace
(GListCallback
callback, gpointer user_data
);
4668 * SECTION:ianjuta-debugger-breakpoint
4669 * @title: IAnjutaDebuggerBreakpoint
4670 * @short_description: Breakpoint Debugger interface
4672 * @stability: Unstable
4673 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
4676 interface IAnjutaDebuggerBreakpoint
4680 * IAnjutaDebuggerBreakpointType:
4681 * @IANJUTA_DEBUGGER_BREAKPOINT_REMOVED: Set for removed breakpoint
4682 * @IANJUTA_DEBUGGER_BREAKPOINT_UPDATED: Set for changed breakpoint
4683 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_LINE: Set on source line
4684 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_ADDRESS: Set on an addresse
4685 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_FUNCTION: Set on a function name
4686 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_READ: Set on read access
4687 * @IANJUTA_DEBUGGER_BREAKPOINT_ON_WRITE: Set on write access
4688 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_ENABLE: Has enable information
4689 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_IGNORE: Has ignore information,
4690 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TIME: Has counter information
4691 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_CONDITION: Has a condition
4692 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_TEMPORARY: Temporary breakpoint, automatically removed when triggered
4693 * @IANJUTA_DEBUGGER_BREAKPOINT_WITH_PENDING: Pending breakpoint
4695 * This enumeration defined various characteristics of the breakpoint.
4702 ON_ADDRESS
= 1 << 2,
4703 ON_FUNCTION
= 1 << 3,
4706 WITH_ENABLE
= 1 << 16,
4707 WITH_IGNORE
= 1 << 15,
4708 WITH_TIME
= 1 << 11,
4709 WITH_CONDITION
= 1 << 12,
4710 WITH_TEMPORARY
= 1 << 13,
4711 WITH_PENDING
= 1 << 14,
4715 * IAnjutaDebuggerBreakpointItem:
4716 * @type: type see #IAnjutaBreakpointType enumeration
4717 * @id: unique identifier
4718 * @file: source file where is the breakpoint
4719 * @line: corresponding source file line number
4720 * @function: corresponding function name
4721 * @address: corresponding address
4722 * @enable: TRUE if the breakpoint is enabled
4723 * @ignore: TRUE if the breakpoint is ignored
4724 * @times: Count how many time the breakpoint is triggered
4725 * @condition: Additional condition for triggering the breakpoint
4726 * @temporary: TRUE if the breakpoint is temporary
4727 * @pending: TRUE if the breakpoint is pending
4729 * This structure keeps all information about a breakpoint.
4748 * IAnjutaDebuggerBreakpointMethod:
4749 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_ADDRESS: Allow to set breakpoint on address
4750 * @IANJUTA_DEBUGGER_BREAKPOINT_SET_AT_FUNCTION: Allow to set breakpoint on function name
4751 * @IANJUTA_DEBUGGER_BREAKPOINT_ENABLE: Allow to disable breakpoint
4752 * @IANJUTA_DEBUGGER_BREAKPOINT_IGNORE: Allow to ignore breakpoint
4753 * @IANJUTA_DEBUGGER_BREAKPOINT_CONDITION: Allow to add a condition on breakpoint
4755 * Defines which breakpoint characteristics are supported by the debugger
4760 SET_AT_ADDRESS
= 1 << 0,
4761 SET_AT_FUNCTION
= 1 << 1,
4768 * IAnjutaDebuggerBreakpointCallback:
4769 * @data: a #IAnjutaBreakpointItem object
4770 * @user_data: user data passed to the function
4773 * This callback function is used to return a #IAnjutaBreakpointItem.
4775 typedef void (*Callback) (const Item
*data
, gpointer user_data
, GError
* err
);
4778 * ianjuta_debugger_breakpoint_implement_breakpoint:
4780 * @err: Error propagation and reporting.
4782 * Return all implemented methods.
4784 * Returns: A OR of #IAnjutaDebuggerBreakpointMethod
4785 * corresponding to all implemented optional methods.
4787 gint implement_breakpoint
();
4790 * ianjuta_debugger_breakpoint_set_breakpoint_at_line:
4792 * @file: File containing the breakpoint
4793 * @line: Line number where is the breakpoint
4794 * @callback: Callback to call when the breakpoint has been set
4795 * @user_data: User data that is passed back to the callback
4796 * @err: Error propagation and reporting.
4798 * Set a breakpoint at the specified line in the file.
4800 * Returns: TRUE if the request succeed and the callback is called. If
4801 * FALSE, the callback will not be called.
4803 gboolean set_breakpoint_at_line
(const gchar
* file
, guint line
, Callback callback, gpointer user_data
);
4807 * ianjuta_debugger_breakpoint_set_breakpoint_at_address:
4809 * @address: Address of the breakpoint
4810 * @callback: Callback to call when the breakpoint has been set
4811 * @user_data: User data that is passed back to the callback
4812 * @err: Error propagation and reporting.
4814 * Set a breakpoint at the specified address.
4815 * This function is optional.
4817 * Returns: TRUE if the request succeed and the callback is called. If
4818 * FALSE, the callback will not be called.
4820 gboolean set_breakpoint_at_address
(gulong address
, Callback callback, gpointer user_data
);
4823 * ianjuta_debugger_breakpoint_set_breakpoint_at_function:
4825 * @file: File containing the breakpoint
4826 * @function: Function name where the breakpoint is put
4827 * @callback: Callback to call when the breakpoint has been set
4828 * @user_data: User data that is passed back to the callback
4829 * @err: Error propagation and reporting.
4831 * Set a breakpoint at the beginning of the specified function.
4832 * This function is optional.
4834 * Returns: TRUE if the request succeed and the callback is called. If
4835 * FALSE, the callback will not be called.
4837 gboolean set_breakpoint_at_function
(const gchar
* file
, const gchar
* function
, Callback callback, gpointer user_data
);
4840 * ianjuta_debugger_breakpoint_clear_breakpoint:
4842 * @id: Breakpoint identification number
4843 * @callback: Callback to call when the breakpoint has been cleared
4844 * @user_data: User data that is passed back to the callback
4845 * @err: Error propagation and reporting.
4847 * Clear a breakpoint put by any set functions. The Id of the breakpoint
4848 * is given in the callback of the set functions.
4850 * Returns: TRUE if the request succeed and the callback is called. If
4851 * FALSE, the callback will not be called.
4853 gboolean clear_breakpoint
(guint
id, Callback callback, gpointer user_data
);
4856 * ianjuta_debugger_breakpoint_list_breakpoint:
4858 * @callback: Callback to call with the list of #IAnjutaDebuggreBreakpointItem
4859 * @user_data: User data that is passed back to the callback
4860 * @err: Error propagation and reporting.
4862 * List all breakpoints set in the debugger. It is useful to
4863 * know how many time a breakpoint has been hit.
4865 * Returns: TRUE if the request succeed and the callback is called. If
4866 * FALSE, the callback will not be called.
4868 gboolean list_breakpoint
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
4871 * ianjuta_debugger_breakpoint_enable_breakpoint:
4873 * @id: Breakpoint identification number
4874 * @enable: TRUE to enable the breakpoint, FALSE to disable it
4875 * @callback: Callback to call when the breakpoint has been changed
4876 * @user_data: User data that is passed back to the callback
4877 * @err: Error propagation and reporting.
4879 * Enable of disable a breakpoint. This function is optional.
4881 * Returns: TRUE if the request succeed and the callback is called. If
4882 * FALSE, the callback will not be called.
4884 gboolean enable_breakpoint
(guint
id, gboolean enable
, Callback callback, gpointer user_data
);
4887 * ianjuta_debugger_breakpoint_ignore_breakpoint:
4889 * @id: Breakpoint identification number
4890 * @ignore: Number of time a breakpoint must be ignored
4891 * @callback: Callback to call when the breakpoint has been changed
4892 * @user_data: User data that is passed back to the callback
4893 * @err: Error propagation and reporting.
4895 * This allow to ignore the breakpoint a number of time before stopping.
4896 * This function is optional.
4898 * Returns: TRUE if the request succeed and the callback is called. If
4899 * FALSE, the callback will not be called.
4901 gboolean ignore_breakpoint
(guint
id, guint
ignore, Callback callback, gpointer user_data
);
4904 * ianjuta_debugger_breakpoint_condition_breakpoint:
4906 * @id: Breakpoint identification number
4907 * @condition: expression that has to be true
4908 * @callback: Callback to call when the breakpoint has been changed
4909 * @user_data: User data that is passed back to the callback
4910 * @err: Error propagation and reporting.
4912 * Add a condition, evaluate in the program context, on the breakpoint,
4913 * the program will stop when it reachs the breakpoint only if the
4914 * condition is true. This function is optional.
4916 * Returns: TRUE if the request succeed and the callback is called. If
4917 * FALSE, the callback will not be called.
4919 gboolean condition_breakpoint
(guint
id, const gchar
* condition
, Callback callback, gpointer user_data
);
4923 * SECTION:ianjuta-debugger-variable
4924 * @title: IAnjutaDebuggerVariable
4925 * @short_description: Variables interface for debuggers
4927 * @stability: Unstable
4928 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
4930 * This interface is used to examine and change values of expression.
4931 * It is based on the MI2 variable object interface of gdb. A
4932 * variable needs to be created before being able to get or set its
4933 * value and list its children.
4935 interface IAnjutaDebuggerVariable
4938 * IAnjutaDebuggerVariableObject:
4939 * @name: unique variable object name created by backend
4940 * @expression: corresponding variable name or expression
4941 * @type: variable type
4942 * @value: variable value
4943 * @changed: TRUE if the variable has changed
4944 * @exited: TRUE if the variable is outside current scope
4945 * @deleted: TRUE if the variable has been removed
4946 * @children: Number of variable children, -1 if unknown
4947 * @has_more: TRUE if the children value is wrong
4949 * Defines a variable object.
4965 * IAnjutaDebuggerVariableCallback:
4966 * @data: a #IAnjutaDebuggerVariableObject object
4967 * @user_data: user data passed to the function
4970 * This callback function is used to return a #IAnjutaDebuggerVariableObject.
4972 typedef void (*Callback) (const Object *data
, gpointer user_data
, GError
* err
);
4975 * ianjuta_debugger_variable_create:
4977 * @expression: Variable expression
4978 * @callback: Callback to call when the variable has been created
4979 * @user_data: User data that is passed back to the callback
4980 * @err: Error propagation and reporting.
4982 * Create a new variable object in the current thread and frame.
4984 * Returns: TRUE if the request succeed and the callback is
4985 * called. If FALSE, the callback will not be called.
4987 gboolean create
(const gchar
*expression
, Callback callback, gpointer user_data
);
4990 * ianjuta_debugger_variable_list_children:
4992 * @name: Variable name
4993 * @from: Starting from this children (zero-based)
4994 * @callback: Callback to call when the children have been
4995 * created with a list of variable objects
4996 * @user_data: User data that is passed back to the callback
4997 * @err: Error propagation and reporting.
4999 * List and create objects for variable object's children.
5000 * The backend can returns only a part of the children, in
5001 * this case a last variable with a NULL name is added to
5002 * the list given to the callback function.
5003 * If the remaining children are wanted, this
5004 * function must be called again with a from argument
5005 * corresponding to the first missing children.
5007 * Returns: TRUE if the request succeed and the callback is
5008 * called. If FALSE, the callback will not be called.
5010 gboolean list_children
(const gchar
*name
, guint from
, IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5013 * ianjuta_debugger_variable_evaluate:
5015 * @name: Variable name
5016 * @callback: Callback to call with the variable value
5017 * @user_data: User data that is passed back to the callback
5018 * @err: Error propagation and reporting.
5020 * Get the value of one variable or child object.
5022 * Returns: TRUE if the request succeed and the callback is
5023 * called. If FALSE, the callback will not be called.
5025 gboolean evaluate
(const gchar
*name
, IAnjutaDebuggerGCharCallback
callback, gpointer user_data
);
5028 * ianjuta_debugger_variable_assign:
5030 * @name: Variable name
5031 * @value: Variable value
5032 * @err: Error propagation and reporting.
5034 * Set the value of one variable or child object.
5036 * Returns: TRUE if the request succeed and the callback is
5037 * called. If FALSE, the callback will not be called.
5039 gboolean assign
(const gchar
*name
, const gchar
*value
);
5042 * ianjuta_debugger_variable_update:
5044 * @callback: Callback to call with the list of all changed
5046 * @user_data: User data that is passed back to the callback
5047 * @err: Error propagation and reporting.
5049 * List all changed variable objects since the last call.
5051 * Returns: TRUE if the request succeed and the callback is
5052 * called. If FALSE, the callback will not be called.
5054 gboolean update
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5057 * ianjuta_debugger_variable_destroy:
5059 * @name: Variable name
5060 * @err: Error propagation and reporting.
5062 * Delete a previously created variable or child object
5063 * including its own children.
5065 * Returns: TRUE if the request succeed and the callback is
5066 * called. If FALSE, the callback will not be called.
5068 gboolean destroy
(const gchar
*name
);
5072 * SECTION:ianjuta-debugger-register
5073 * @title: IAnjutaDebuggerRegister
5074 * @short_description: Register interface for debuggers
5076 * @stability: Unstable
5077 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
5079 * This interface is used to examine and change values of CPU registers.
5081 interface IAnjutaDebuggerRegister
5085 * IAnjutaDebuggerRegisterData:
5086 * @num: register identifier
5087 * @name: register name
5088 * @value: register value
5090 * Defines a register data.
5100 * ianjuta_debugger_register_list_register:
5102 * @callback: Callback to call with the #IAnjutaDebuggerRegisterData list
5103 * @user_data: User data that is passed back to the callback
5104 * @err: Error propagation and reporting.
5106 * List all registers of the target. This function can be called without
5107 * a program loaded, the value field of register structure is not filled.
5109 * Returns: TRUE if the request succeed and the callback is
5110 * called. If FALSE, the callback will not be called.
5112 gboolean list_register
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5115 * ianjuta_debugger_register_update_register:
5117 * @callback: Callback call with the list of all modified #IAnjutaDebuggerRegisterData
5118 * @user_data: User data that is passed back to the callback
5119 * @err: Error propagation and reporting.
5121 * Return all modified registers since the last call. Only the num and
5122 * value field are used.
5124 * Returns: TRUE if the request succeed and the callback is
5125 * called. If FALSE, the callback will not be called.
5127 gboolean update_register
(IAnjutaDebuggerGListCallback
callback, gpointer user_data
);
5130 * ianjuta_debugger_register_write_register:
5132 * @value: Modified register with a new value
5133 * @err: Error propagation and reporting.
5135 * Change the value of one register. Only the num and value field are used.
5137 * Returns: TRUE if the request succeed.
5139 gboolean write_register
(Data
*value
);
5143 * SECTION:ianjuta-debugger-memory
5144 * @title: IAnjutaDebuggerMemory
5145 * @short_description: Memory interface for debuggers
5147 * @stability: Unstable
5148 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
5150 * This interface is used to examine the target memory.
5152 interface IAnjutaDebuggerMemory
5155 * IAnjutaDebuggerRegisterMemoryBlock:
5156 * @address: start address of memory block
5157 * @length: size of memory block
5158 * @data: memory block data
5160 * Represent a block of memory.
5170 * IAnjutaDebuggerMemoryCallback:
5171 * @data: a #IAnjutaDebuggerMemoryBlock object
5172 * @user_data: user data passed to the function
5175 * This callback function is used to return a #IAnjutaDebuggerMemoryBlock.
5177 typedef void (*Callback) (const Block
*data
, gpointer user_data
, GError
* err
);
5180 * ianjuta_debugger_memory_inspect:
5182 * @address: Start address of the memory block
5183 * @length: Length of memory block
5184 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
5185 * @user_data: User data that is passed back to the callback
5186 * @err: Error propagation and reporting.
5188 * Read a block of the target memory.
5190 * Returns: TRUE if the request succeed and the callback is
5191 * called. If FALSE, the callback will not be called.
5193 gboolean inspect
(gulong address
, guint length
, Callback callback, gpointer user_data
);
5197 * SECTION:ianjuta-debugger-instruction
5198 * @title: IAnjutaDebuggerInstruction
5199 * @short_description: Debugger interface for machine instruction
5201 * @stability: Unstable
5202 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
5204 * This interface is used to debuger as machine instruction level.
5206 interface IAnjutaDebuggerInstruction
5210 * IAnjutaDebuggerInstructionALine:
5211 * @address: Address of the line
5212 * @label: Optional label
5213 * @text: Diassembled instruction on the line
5215 * Defines a disassembled line
5225 * IAnjutaDebuggerInstructionDisassembly:
5226 * @size: Number of line
5227 * @data: Array of all lines
5229 * Represents a block of diassembled instructions
5238 * IAnjutaDebuggerInstructionCallback:
5239 * @data: a #IAnjutaDebuggerInstructionDisassembly object
5240 * @user_data: user data passed to the function
5243 * This callback function is used to return a #IAnjutaDebuggerInstructionDisassembly.
5245 typedef void (*Callback) (const Disassembly
*data
, gpointer user_data
, GError
* err
);
5248 * ianjuta_debugger_instruction_disassemble:
5250 * @address: Start address of the memory block
5251 * @length: Length of memory block
5252 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
5253 * @user_data: User data that is passed back to the callback
5254 * @err: Error propagation and reporting.
5256 * Disassemble a part of the memory
5258 * Returns: TRUE if the request succeed and the callback is
5259 * called. If FALSE, the callback will not be called.
5261 gboolean disassemble
(gulong address
, guint length
, Callback callback, gpointer user_data
);
5264 * ianjuta_debugger_instruction_step_in_instruction:
5266 * @err: Error propagation and reporting.
5268 * Execute one assembler instruction in the program.
5270 * Returns: TRUE if the request succeed and the callback is called. If
5271 * FALSE, the callback will not be called.
5273 gboolean step_in_instruction
();
5276 * ianjuta_debugger_instruction_step_over_instruction:
5278 * @err: Error propagation and reporting.
5280 * Execute one assembler instruction in the program, if the instruction
5281 * is a function call, continues until the function returns.
5283 * Returns: TRUE if the request succeed and the callback is called. If
5284 * FALSE, the callback will not be called.
5286 gboolean step_over_instruction
();
5289 * ianjuta_debugger_instruction_run_to_address:
5291 * @address: Run to this addresss
5292 * @err: Error propagation and reporting.
5294 * Start the program until it reachs the address address
5296 * Returns: TRUE if the request succeed and the callback is called. If
5297 * FALSE, the callback will not be called.
5299 gboolean run_to_address
(gulong address
);
5302 * ianjuta_debugger_instruction_run_from_address:
5304 * @address: Run from this addresss
5305 * @err: Error propagation and reporting.
5307 * Restart the program starting from address address
5309 * Returns: TRUE if the request succeed and the callback is called. If
5310 * FALSE, the callback will not be called.
5312 gboolean run_from_address
(gulong address
);
5318 * SECTION:ianjuta-debug-manager
5319 * @title: IAnjutaDebugManager
5320 * @short_description: Common graphical interface to all debugger
5322 * @stability: Unstable
5323 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
5325 * This interface wrap the real debugger plugin and provide a
5326 * common graphical user interface.
5329 interface IAnjutaDebugManager
5331 #include
"ianjuta-debugger.h"
5332 #include
"ianjuta-debugger-breakpoint.h"
5333 #include
<gio
/gio.h
>
5338 * IAnjutaDebugManager::debugger_started:
5341 * This signal is emitted when the debugger is started.
5343 void ::debugger_started
();
5346 * IAnjutaDebugManager::debugger_stopped:
5348 * @err: Error propagation and reporting.
5350 * This signal is emitted when the debugger is stopped.
5352 void ::debugger_stopped
(GError
*err
);
5355 * IAnjutaDebugManager::program_loaded:
5358 * This signal is emitted when a program is loaded most of the
5359 * time just before the first program_stopped signal.
5361 void ::program_loaded
();
5364 * IAnjutaDebugManager::program_unloaded:
5367 * This signal is emitted when a program is unloaded. If the
5368 * debugger is stopped while a program is loaded, this signal
5369 * is emitted before the debugger_stopped signal.
5371 void ::program_unloaded
();
5374 * IAnjutaDebugManager::program_started:
5377 * This signal is emitted when the program is started. If the
5378 * program starts and is stopped by the debugger, a program-stopped
5379 * signal will be emitted too. If the program starts is not stopped
5380 * by the debugger a program-running signal will be emitted.
5382 void ::program_started
();
5385 * IAnjutaDebugManager::program_exited:
5388 * This signal is emitted when the program is unloaded. If the
5389 * debugger is stopped while a program is running or stopped, this
5390 * signal is emitted before the program_unloaded signal.
5392 void ::program_exited
();
5395 * IAnjutaDebugManager::program_stopped:
5398 * This signal is emitted when the program is stopped.
5400 void ::program_stopped
();
5403 * IAnjutaDebugManager::program_running:
5406 * This signal is emitted when the program is running.
5408 void ::program_running
();
5412 * IAnjutaDebugManager::sharedlib_event:
5415 * This signal is emitted when a new shared library is loaded. It
5416 * is useful to try to set pending breakpoints those could be in
5417 * the newly loaded library.
5419 void ::sharedlib_event
();
5422 * IAnjutaDebugManager::program_moved:
5424 * @pid: process id, 0 when unknown
5425 * @tid: thread id, 0 when unknown
5426 * @address: program counter address, 0 when unknown
5427 * @file: source file where is the program counter, NULL when unknown
5428 * @line: line number if file name above is not NULL
5430 * This signal is emitted when the debugger know the current program
5431 * location. Most of the time, after the program has stopped but it
5432 * could happen even if it is still running.
5434 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
5437 * IAnjutaDebugManager::frame_changed:
5442 * This signal is emitted when the current frame is changed. It is
5443 * equal to the top frame in the interrupted thread when the
5444 * program stops but can be changed afterward by the user.
5445 * Several commands use this current frame, by example the register
5446 * window display the register values for the current thread only.
5448 void ::frame_changed
(guint frame
, gint thread
);
5451 * IAnjutaDebugManager::location_changed:
5453 * @address: program counter address, 0 when unknown
5454 * @uri: source file where is the program counter, NULL when unknown
5455 * @line: line number if file name above is not NULL
5457 * This signal is emitted when the current location is changed. It is
5458 * equal to the program location when the program stops but can be
5459 * changed afterward by the user.
5461 void ::location_changed
(gulong address
, const gchar
* uri
, guint line
);
5464 * IAnjutaDebugManager::signal_received:
5466 * @name: Signal name
5467 * @description: Signal description
5469 * This signal is emitted when the debugged program receives a
5472 void ::signal_received
(const gchar
* name
, const gchar
* description
);
5475 * IAnjutaDebugManager::breakpoint_changed:
5477 * @breakpoint: Breakpoint
5478 * @err: Error propagation and reporting.
5480 * This signal is emitted when a breakpoint is changed. It includes
5481 * new breakpoint and deleted breakpoint.
5483 void ::breakpoint_changed
(IAnjutaDebuggerBreakpointItem
*breakpoint
);
5486 * ianjuta_debug_manager_start:
5488 * @uri: uri of the target
5489 * @err: Error propagation and reporting.
5491 * Start the debugger of the given uri
5493 * Returns: TRUE if sucessful, other FALSE.
5495 gboolean start
(const gchar
*uri
);
5498 * ianjuta_debug_manager_start_remote:
5500 * @server: server (IP address:port)
5501 * @uri: uri of the local target
5502 * @err: Error propagation and reporting.
5504 * Start the debugger of the given uri
5506 * Returns: TRUE if sucessful, other FALSE.
5508 gboolean start_remote
(const gchar
*server
, const gchar
*uri
);
5511 * ianjuta_debug_manager_quit:
5513 * @err: Error propagation and reporting.
5515 * Quit the debugger, can wait until the debugger is ready.
5517 * Returns: TRUE if sucessful, other FALSE.
5523 * SECTION:ianjuta-vcs
5524 * @title: IAnjutaVcs
5525 * @short_description: Version control system interface
5527 * @stability: Unstable
5528 * @include: libanjuta/interfaces/ianjuta-vcs.h
5531 interface IAnjutaVcs
5533 #include
<gio
/gio.h
>
5534 #include
<libanjuta
/anjuta
-vcs
-status.h
>
5535 #include
<libanjuta
/anjuta
-async
-notify.h
>
5539 * @IANJUTA_VCS_UNKNOWN_ERROR: Unkown error
5541 * These enumeration is used to specify errors.
5552 * 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
5553 * fold- unfold the tree.
5555 void ::status_changed
();
5560 * @files: (element-type GFile): List of List of files, represented as #Gfile objects, to add
5561 * @notify: #AnjutaAsyncNotify object for finish notification and error
5564 * Add files to the VCS repository.
5566 void add
(List
<GFile
*> files
, AnjutaAsyncNotify
*notify
);
5569 * ianjuta_vcs_remove:
5571 * @files: (element-type GFile): List of files, represented as #Gfile objects, to remove
5572 * @notify: #AnjutaAsyncNotify object for finish notification and error
5575 * Remove files from the VCS repository.
5577 void remove
(List
<GFile
*> files
, AnjutaAsyncNotify
*notify
);
5580 * ianjuta_vcs_checkout:
5582 * @repository_location: Location of repository to check out
5583 * @dest: Destination of checked out copy
5584 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5585 * @notify: #AnjutaAsyncNotify object for finish notification and error
5588 * Check out a copy of a code repository.
5590 void checkout
(const gchar
*repository_location
, GFile
*dest
, GCancellable
*cancel
, AnjutaAsyncNotify
*notify
);
5593 * ianjuta_vcs_query_status:
5595 * @file: File/directory to query
5596 * @callback: callback to call when data for a particular file is available
5597 * @user_data: User data passed to callback
5598 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5599 * @notify: #AnjutaAsyncNotify object for finish notification and error
5602 * Querys the status of files in the repository.
5604 void query_status
(GFile
* file
, StatusCallback
callback, gpointer user_data
, GCancellable
* cancel
, AnjutaAsyncNotify
*notify
);
5607 * IAnjutaVcsStatusCallback:
5608 * @file: File representing the file for which status is given
5609 * @status: #AnjutaVcsStatus for the file represented by @file.
5610 * @user_data: User data
5612 * Callback called for each status record returned by
5613 * ianjuta_vcs_query_status.
5615 typedef void (*StatusCallback
) (GFile
* file
, AnjutaVcsStatus status
, gpointer user_data
);
5620 * @file: File to diff
5621 * @callback: Callback to call when diff data becomes available
5622 * @user_data: User data passed to @callback
5623 * @cancel: An optional #GCancellable object to cancel the operation, or NULL
5624 * @notify: #AnjutaAsyncNotify object for finish notification and error
5627 * Generates a unified diff of the file represented by @file.
5629 void diff
(GFile
* file
, DiffCallback
callback, gpointer user_data
, GCancellable
* cancel
, AnjutaAsyncNotify
*notify
);
5632 * IAnjutaVcsDiffCallback:
5633 * @file: File being diffed
5635 * @user_data: User data
5637 * Called when diff data comes from ianjuta_vcs_diff.
5639 typedef void (*DiffCallback
) (GFile
* file
, const gchar
* diff
, gpointer user_data
);
5643 * SECTION:ianjuta-snippets-manager
5644 * @title: IAnjutaSnippetsManager
5645 * @short_description: Snippets Manager interface
5647 * @stability: Unstable
5648 * @include: libanjuta/interfaces/ianjuta-macro.h
5651 interface IAnjutaSnippetsManager
5654 * ianjuta_snippets_manager_insert:
5655 * @key: Trigger-key of the snippet
5656 * @editing_session: If after inserting the snippet there should be an editing
5657 * session. Mark as FALSE if not interested in the dynamic capabilities of the
5660 * @err: Error propagation and reporting
5662 * Insert snippet in the current editor.
5664 gboolean insert
(const gchar
* key
, gboolean editing_session
);
5668 * SECTION:ianjuta-symbol
5669 * @title: IAnjutaSymbol
5670 * @short_description: Source code symbol interface
5671 * @see_also: #IAnjutaSymbolQuery, #IAnjutaSymbolManager
5672 * @stability: Unstable
5673 * @include: libanjuta/interfaces/ianjuta-symbol.h
5675 * This interface is used to define a symbol, normally got from symbol
5676 * queries. A symbol has various fields that can be retrieved by using
5677 * their get methods. A symbol will have only those fields which have
5678 * been selected to be included in their respective queries, so make sure
5679 * the needed fields are correctly specified during query creation.
5681 interface IAnjutaSymbol
5683 #include
<gdk
/gdk.h
>
5684 #include
<gio
/gio.h
>
5687 * IAnjutaSymbolType:
5688 * @IANJUTA_SYMBOL_TYPE_NONE: None spedified.
5689 * @IANJUTA_SYMBOL_TYPE_UNDEF: Unknown type.
5690 * @IANJUTA_SYMBOL_TYPE_CLASS: Class declaration
5691 * @IANJUTA_SYMBOL_TYPE_ENUM: Enum declaration
5692 * @IANJUTA_SYMBOL_TYPE_ENUMERATOR: Enumerator value
5693 * @IANJUTA_SYMBOL_TYPE_FIELD: Field (Java only)
5694 * @IANJUTA_SYMBOL_TYPE_FUNCTION: Function definition
5695 * @IANJUTA_SYMBOL_TYPE_INTERFACE: Interface (Java only)
5696 * @IANJUTA_SYMBOL_TYPE_MEMBER: Member variable of class/struct
5697 * @IANJUTA_SYMBOL_TYPE_METHOD: Class method (Java only)
5698 * @IANJUTA_SYMBOL_TYPE_NAMESPACE: Namespace declaration
5699 * @IANJUTA_SYMBOL_TYPE_PACKAGE: Package (Java only)
5700 * @IANJUTA_SYMBOL_TYPE_PROTOTYPE: Function prototype
5701 * @IANJUTA_SYMBOL_TYPE_STRUCT: Struct declaration
5702 * @IANJUTA_SYMBOL_TYPE_TYPEDEF: Typedef
5703 * @IANJUTA_SYMBOL_TYPE_UNION: Union
5704 * @IANJUTA_SYMBOL_TYPE_VARIABLE: Variable
5705 * @IANJUTA_SYMBOL_TYPE_EXTERNVAR: Extern or forward declaration
5706 * @IANJUTA_SYMBOL_TYPE_MACRO: Macro (without arguments)
5707 * @IANJUTA_SYMBOL_TYPE_MACRO_WITH_ARG: Parameterized macro
5708 * @IANJUTA_SYMBOL_TYPE_FILE: File (Pseudo tag)
5709 * @IANJUTA_SYMBOL_TYPE_OTHER: Other (non C/C++/Java tag)
5710 * @IANJUTA_SYMBOL_TYPE_SCOPE_CONTAINER: types which are subjected to create a scope.
5711 * @IANJUTA_SYMBOL_TYPE_MAX: Maximum value, used as end marker.
5719 TYPE_ENUMERATOR
= 8,
5722 TYPE_INTERFACE
= 64,
5725 TYPE_NAMESPACE
= 512,
5726 TYPE_PACKAGE
= 1024,
5727 TYPE_PROTOTYPE
= 2048,
5729 TYPE_TYPEDEF
= 8192,
5731 TYPE_VARIABLE
= 32768,
5732 TYPE_EXTERNVAR
= 65536,
5733 TYPE_MACRO
= 131072,
5734 TYPE_MACRO_WITH_ARG
= 262144,
5736 TYPE_OTHER
= 1048576,
5737 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
,
5742 * IAnjutaSymbolField:
5743 * @IANJUTA_SYMBOL_FIELD_ID: Integer. A unique ID of the symbol
5744 * @IANJUTA_SYMBOL_FIELD_NAME: String. Name of the symbol
5745 * @IANJUTA_SYMBOL_FIELD_FILE_POS: Integer. The file line number where the symbol is found.
5746 * @IANJUTA_SYMBOL_FIELD_SCOPE_DEF_ID: Integer. A unique ID to define scope created by this symbol.
5747 * @IANJUTA_SYMBOL_FIELD_FILE_SCOPE: Boolean: TRUE if symbol is within file scope,
5749 * @IANJUTA_SYMBOL_FIELD_SIGNATURE: String. Signature of a method, if symbol is a funtion.
5750 * Namely, the arguments list of the funtion.
5751 * @IANJUTA_SYMBOL_FIELD_RETURNTYPE: String. Return type of a method, if symbol is a function.
5752 * @IANJUTA_SYMBOL_FIELD_FILE_PATH: String. The relative path to the file where the symbol is found.
5753 * @IANJUTA_SYMBOL_FIELD_PROJECT_NAME: String. The project name to which the symbol belongs to.
5754 * @IANJUTA_SYMBOL_FIELD_PROJECT_VERSION: String. The project version to which the symbol belongs to.
5755 * @IANJUTA_SYMBOL_FIELD_IMPLEMENTATION: String. Implementation attribute of a symbol. It may be
5756 * "pure virtual", "virtual", etc.
5757 * @IANJUTA_SYMBOL_FIELD_ACCESS: String. Access attribute of a symbol.
5758 * It may be "public", "private" etc.
5759 * @IANJUTA_SYMBOL_FIELD_KIND: Kind attribute of a symbol, such as
5760 * "enumerator", "namespace", "class" etc.
5761 * @IANJUTA_SYMBOL_FIELD_TYPE: Both string and Integer. Type attribute of a symbol.
5762 * In string form, it is name of the type in string form.
5763 * In integer form, it is IAnjutaSymbolType enumerator value.
5764 * @IANJUTA_SYMBOL_FIELD_TYPE_NAME: type_name attribute of a symbol.
5765 * If a type could be "class" then its type_name may be "MyFooClass" etc.
5766 * @IANJUTA_SYMBOL_FIELD_IS_CONTAINER: Boolean. TRUE if symbol is
5767 * a scope container, such as namespace, class, struct etc., otherwise
5769 * @IANJUTA_SYMBOL_FIELD_END: The end marker.
5771 * Symbol Fields. Used to define and retrieve results from query. Each of
5772 * these fields are either integer or string. Use the right method to
5773 * retrieve them. That is, for integer use ianjuta_symbol_get_int(),
5774 * for string use ianjuta_symbol_get_string(), and for boolean use
5775 * ianjuta_symbol_get_boolean(). Some fields can be in both forms,
5776 * e.g. #IANJUTA_SYMBOL_FIELD_TYPE.
5791 FIELD_PROJECT_VERSION
,
5792 FIELD_IMPLEMENTATION
,
5800 * ianjuta_symbol_get_boolean:
5802 * @field: The field to retrieve.
5803 * @err: Error propagation and reporting.
5805 * Retreives the boolean value of a boolean @field.
5807 * Returns: The boolean
5809 gboolean get_boolean
(Field field
);
5812 * ianjuta_symbol_get_int:
5814 * @field: The field to retrieve.
5815 * @err: Error propagation and reporting.
5817 * Retreives the integer value of an integer @field.
5819 * Returns: The integer
5821 gint get_int
(Field field
);
5824 * ianjuta_symbol_get_string:
5826 * @field: The field to retrieve.
5827 * @err: Error propagation and reporting.
5829 * Retreives the string value of a string @field.
5831 * Returns: The string
5833 const gchar
* get_string
(Field field
);
5836 * ianjuta_symbol_get_file:
5838 * @err: Error propagation and reporting.
5840 * A convenience method to get GFile object for
5841 * #IANJUTA_SYMBOL_FIELD_FILE_PATH field. The file where the
5842 * symbol is declared. It contains the absolute path of the file
5843 * unlike raw value of field #IANJUTA_SYMBOL_FIELD_FILE_PATH.
5845 * Returns: A GFile object. It must be unrefed after use.
5850 * ianjuta_symbol_get_sym_type:
5852 * @err: Error propagation and reporting.
5854 * A convenience method to get value of #IANJUTA_SYMBOL_FIELD_TYPE
5855 * field typecasted to IAnjutaSymbolType. Numerical value is unchanged.
5857 * Returns: a #IAnjutaSymbolType
5859 Type get_sym_type
();
5862 * ianjuta_symbol_get_icon:
5864 * @err: Error propagation and reporting.
5866 * A convenience method to get a small icon (16x16) representing the symbol
5867 * kind. You *need* a query with fields #IANJUTA_SYMBOL_FIELD_ACCESS and
5868 * #IANJUTA_SYMBOL_FIELD_KIND selected.
5870 * Returns: a Pixbuf icon representing the symbol. Ref the icon if you
5873 const GdkPixbuf
*get_icon
();
5877 * SECTION:ianjuta-symbol-query
5878 * @title: IAnjutaSymbolQuery
5879 * @short_description: Source code symbol query interface
5880 * @see_also: #IAnjutaSymbolManager, #IAnjutaSymbol
5881 * @stability: Unstable
5882 * @include: libanjuta/interfaces/ianjuta-symbol-query.h
5884 * A query object will have this interface that allows to tweak various
5885 * query parameters. Except for the #IAnjutaSymbolQueryName and
5886 * #IAnjutaSymbolQueryDb parameters, everything else is changable
5889 * Note that chaning a query parameter, except for limit and offset will
5890 * result in re-preparing the query the next time it is executed, so it is
5891 * not advisable to change it each time the query is executed. For such
5892 * cases, create different queries with different parameters.
5894 * A query is signified by a name enumeration (#IAnjutaSymbolQueryName) which
5895 * practically determines the query type and its execution condition. Each
5896 * query name is assigned to pre-defined query statement and can only be
5897 * set during creation time. Then only its specific ianjuta_symbol_query_search_*()
5898 * can be used to execute the query. These specific execution methods are
5899 * provided to make it convenient to pass query parameters easily and to
5900 * ensure all the needed parameters are given.
5902 * A query can run in different modes, defined by #IAnjutaSymbolQueryMode, by
5903 * default it is executed in synchrounous mode #IANJUTA_SYMBOL_QUERY_MODE_SYNC
5904 * and can be changed using ianjuta_symbol_query_set_mode().
5905 * #IANJUTA_SYMBOL_QUERY_MODE_ASYNC runs it in asynchronous mode in a separate
5906 * thread and can be canceled with ianjuta_symbol_query_cancel().
5908 * A query runs on a database, defined by #IAnjutaSymbolQueryDb, and can be
5909 * only selected at creatation time.
5911 * In addition, there are many other filters that can be set to the query
5912 * to refine the query results. For example, ianjuta_symbol_query_set_fields()
5913 * is used to set the needed symbol fields to retrieve, ianjuta_symbol_query_set_filters()
5914 * is used to filter the results with symbol types, ianjuta_symbol_query_set_file_scope()
5915 * limits the results to either public or private scope within the source file,
5916 * ianjuta_symbol_query_set_group_by() is used to group the results on a given
5917 * field, ianjuta_symbol_query_set_order_by is used to order the results on a
5920 * ianjuta_symbol_query_set_limit() and ianjuta_symbol_query_set_offset() are
5921 * used to change limit and offset of the resultset. Note again that these
5922 * parameters do not require re-preparation of query, so can be safely used
5923 * any time without performance hit.
5925 interface IAnjutaSymbolQuery
5927 #include
"ianjuta-iterable.h"
5928 #include
"ianjuta-symbol.h"
5931 * IAnjutaSymbolQueryMode:
5932 * @IANJUTA_SYMBOL_QUERY_MODE_SYNC: Syncronous query. The result is immediately
5933 * available as retrun value of search call.
5934 * @IANJUTA_SYMBOL_QUERY_MODE_ASYNC: Asynchronous query. The search call
5935 * return immediately and result delievered as a signal later. The actual
5936 * query is done in a separate thread.
5937 * @IANJUTA_SYMBOL_QUERY_MODE_QUEUED: If the database is busy
5938 * scanning, then the query is performed later when database is ready.
5939 * It returns NULL and result is delivered through async-result signal.
5940 * Only query can stay queued, so calling search multiple times would
5941 * result in only the last one being active.
5943 * This parameter determines the mode of query execution. By default,
5944 * IANJUTA_SYMBOL_QUERY_MODE_SYNC is selected.
5954 * IAnjutaSymbolQueryDb:
5955 * @IANJUTA_SYMBOL_QUERY_DB_PROJECT: Select project database.
5956 * @IANJUTA_SYMBOL_QUERY_DB_SYSTEM: Select system database.
5958 * Sets the database to use for the query. System database is where
5959 * all system library symbols are found. While project database is where
5960 * currently open project's symbols are found.
5969 * IAnjutaSymbolQueryName:
5970 * @IANJUTA_SYMBOL_QUERY_SEARCH: Query to perform basic substring search.
5971 * @IANJUTA_SYMBOL_QUERY_SEARCH_ALL: Query to get all symbols
5972 * @IANJUTA_SYMBOL_QUERY_SEARCH_FILE: Query to perform substring search in a file.
5973 * @IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE: Query to perform substring search in a scope.
5974 * @IANJUTA_SYMBOL_QUERY_SEARCH_ID: Query to find the symbol of given ID.
5975 * @IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS: Query to find members of a scope (eg. class).
5976 * @IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS: Query to get parents of a class.
5977 * @IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE: Query to find scope name of a file position.
5978 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE: Query to get the parent scope of a symbol.
5979 * @IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE: Query to get the parent scope of a symbol in the file.
5981 * Names of query that defined what kind of query it is.
5991 SEARCH_CLASS_PARENTS
,
5993 SEARCH_PARENT_SCOPE
,
5994 SEARCH_PARENT_SCOPE_FILE
5998 * IAnjutaSymbolQueryFileScope:
5999 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_IGNORE: Ignore file scope
6000 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PUBLIC: Only public symbols visible to rest of project.
6001 * @IANJUTA_SYMBOL_QUERY_SEARCH_FS_PRIVATE: Only private symbols visible inside a file.
6003 * Defines file scope of symbols to query.
6013 * IAnjutaSymbolQuery::async_result:
6014 * @ianjutasymbolquery: Self
6015 * @arg1: Query result (IAnjutaIterable, IAnjutaSymbol) of an async
6016 * or queued search. NULL if no result is found or some error happened.
6018 * This signal is emitted for every search of the Query involved in async
6019 * mode, unless cancled by ianjuta_symbol_query_cancel(). For single queued
6020 * query, only result of the last search is emitted (if it wasn't database
6021 * was busy when search was invoked). Unlike in sync counterpart,
6022 * do not unref @result after use.
6024 void ::async_result
(GObject
* result
);
6027 * ianjuta_symbol_query_set_mode:
6029 * @mode: The mode of query.
6030 * @err: Error propagation and reporting.
6032 * Sets the mode of Query.
6034 void set_mode
(IAnjutaSymbolQueryMode mode
);
6037 * ianjuta_symbol_query_set_fields:
6039 * @n_fields: Then number of fields to retrieve.
6040 * @fields: The fields to retrieve in the query. The array length must
6042 * @err: Error propagation and reporting.
6044 * Sets the fields of Query.
6046 void set_fields
(gint n_fields
, IAnjutaSymbolField
*fields
);
6049 * ianjuta_symbol_query_set_filters:
6051 * @filters: The mode of query.
6052 * @include_types: TRUE if filter is positive, FALSE if reversed.
6053 * @err: Error propagation and reporting.
6055 * Sets the bit mask of symbol type filters. if @include_types is TRUE,
6056 * symbols satisfying the given symbol types are selected, otherwise
6057 * they are excluded.
6059 void set_filters
(IAnjutaSymbolType filters
, gboolean includes_types
);
6062 * ianjuta_symbol_query_set_file_scope:
6064 * @filescope_search: The filescope to search.
6065 * @err: Error propagation and reporting.
6067 * Sets the filescope search of Query.
6069 void set_file_scope
(IAnjutaSymbolQueryFileScope filescope_search
);
6072 * ianjuta_symbol_query_set_offset:
6074 * @offset: Offset of the resultset.
6075 * @err: Error propagation and reporting.
6077 * Sets the offset index of Query results.
6079 void set_offset
(gint offset
);
6082 * ianjuta_symbol_query_set_limit:
6084 * @limit: The limit of query.
6085 * @err: Error propagation and reporting.
6087 * Sets the limit of Query results. No more than @limit results are
6090 void set_limit
(gint limit
);
6093 * ianjuta_symbol_query_set_group_by:
6095 * @field: The field to group results.
6096 * @err: Error propagation and reporting.
6098 * Sets the field with which result of query is grouped. As a result
6099 * there will be no duplicates of with this field.
6101 void set_group_by
(IAnjutaSymbolField field
);
6104 * ianjuta_symbol_query_set_order_by:
6106 * @field: The field to order the result.
6107 * @err: Error propagation and reporting.
6109 * Sets the field with which result of query is ordered.
6111 void set_order_by
(IAnjutaSymbolField field
);
6114 * ianjuta_symbol_query_set_cancel:
6116 * @err: Error propagation and reporting.
6118 * Cancels any pending non-sync searches. After calling this, it is
6119 * guaranteed that "async-result" will not be called any more for any
6120 * past searches. New searches will have their results signaled as
6126 * ianjuta_symbol_query_search:
6128 * @pattern: Search pattern in compliance with SQL LIKE syntax
6129 * @err: Error propagation and reporting.
6131 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH query.
6133 IAnjutaIterable
* search
(const gchar
*pattern
);
6136 * ianjuta_symbol_query_search_all:
6138 * @err: Error propagation and reporting.
6140 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ALL query.
6142 IAnjutaIterable
* search_all
();
6145 * ianjuta_symbol_query_search_file:
6147 * @pattern: Search pattern in compliance with SQL LIKE syntax
6148 * @file: The file whose symbols are searched.
6149 * @err: Error propagation and reporting.
6151 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_FILE query.
6153 IAnjutaIterable
* search_file
(const gchar
*pattern
, const GFile
*file
);
6156 * ianjuta_symbol_query_search_in_scope:
6158 * @pattern: Search pattern in compliance with SQL LIKE syntax
6159 * @scope: The scope inside which symbols are searched.
6160 * @err: Error propagation and reporting.
6162 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_IN_SCOPE query.
6164 IAnjutaIterable
* search_in_scope
(const gchar
*pattern
, IAnjutaSymbol
*scope
);
6167 * ianjuta_symbol_query_search_members:
6169 * @symbol: The symbol whose members to get.
6170 * @err: Error propagation and reporting.
6172 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_MEMBERS query.
6174 IAnjutaIterable
* search_members
(IAnjutaSymbol
*symbol
);
6177 * ianjuta_symbol_query_search_class_parents:
6179 * @symbol: The class symbol whose parents to get.
6180 * @err: Error propagation and reporting.
6182 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_CLASS_PARENTS query.
6184 IAnjutaIterable
* search_class_parents
(IAnjutaSymbol
*symbol
);
6187 * ianjuta_symbol_query_search_id:
6189 * @symbol: The symbol id whose details to get.
6190 * @err: Error propagation and reporting.
6192 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_ID query.
6194 IAnjutaIterable
* search_id
(gint symbol_id
);
6197 * ianjuta_symbol_query_search_scope:
6199 * @file_path: The file where the scope is.
6200 * @line: The line where the scope is.
6201 * @err: Error propagation and reporting.
6203 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_SCOPE query.
6205 IAnjutaIterable
* search_scope
(const gchar
*file_path
, gint line
);
6208 * ianjuta_symbol_query_search_parent_scope:
6210 * @symbol: The symbol whose parent scope is to be found.
6211 * @err: Error propagation and reporting.
6213 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE query.
6215 IAnjutaIterable
* search_parent_scope
(IAnjutaSymbol
*symbol
);
6218 * ianjuta_symbol_query_search_parent_scope_file:
6219 * @symbol: The symbol whose parent scope is to be found.
6221 * @file_path: The file where the parent scope is to be found.
6222 * @err: Error propagation and reporting.
6224 * Executes #IANJUTA_SYMBOL_QUERY_SEARCH_PARENT_SCOPE_FILE query.
6226 IAnjutaIterable
* search_parent_scope_file
(IAnjutaSymbol
*symbol
, const gchar
*file_path
);
6230 * SECTION:ianjuta-symbol-manager
6231 * @title: IAnjutaSymbolManager
6232 * @short_description: Source code symbols manager inteface
6233 * @see_also: #IAnjutaSymbol
6234 * @stability: Unstable
6235 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
6238 interface IAnjutaSymbolManager
6240 #include
<libanjuta
/anjuta
-async
-notify.h
>
6241 #include
"ianjuta-iterable.h"
6242 #include
"ianjuta-symbol.h"
6243 #include
"ianjuta-symbol-query.h"
6246 * IAnjutaSymbolManager::prj_scan_end:
6249 * This signal is emitted when a scanning of one or more files on project db
6252 void ::prj_scan_end
(gint process_id
);
6255 * IAnjutaSymbolManager::sys_scan_end:
6258 * This signal is emitted when a scanning of one or more packages on system db
6259 * ends. This signal doesn't mean that all the scan process for the packages
6260 * is ended, but that just one (or more) is (are).
6262 void ::sys_scan_end
(gint process_id
);
6265 * ianjuta_symbol_manager_create_query:
6267 * @name: Name of the query. It decides what query type it is.
6268 * @db: The database to use.
6269 * @err: Error propagation and reporting.
6271 * Create a query object. By default only #IANJUTA_SYMBOL_FIELD_ID and
6272 * and #IANJUTA_SYMBOL_FIELD_NAME are selected, limit is set to infinity,
6273 * offset is set to 0, no filters are set and mode is set to
6274 * #IANJUTA_SYMBOL_QUERY_MODE_SYNC.
6276 * Returns: A #IAnjutaSymbolQuery object
6278 IAnjutaSymbolQuery
* create_query
(IAnjutaSymbolQueryName name
, IAnjutaSymbolQueryDb db
);
6281 * ianjuta_symbol_manager_add_package:
6283 * @pkg_name: Name of the package to scan. Should be the name given by
6284 * pkg-config. The colon char must be avoided.
6285 * @pkg_version: Version of the package. The colon char must be avoided.
6286 * or by the language implementation (Python, Javascript, etc.)
6287 * @files: A list of GFile's to scan for this package
6289 * Reads the package files into the database asynchronously.
6291 * Returns: TRUE if the package will be loaded into the db, FALSE if the package
6294 gboolean add_package
(const gchar
* pkg_name
, const gchar
* pkg_version
, GList
* files
);
6297 * ianjuta_symbol_manager_activate_package:
6299 * @pkg_name: Name of the package to activate. The colon char must be avoided.
6300 * @pkg_version: Version of the package. The colon char must be avoided.
6302 * Activates the package for searches in the global symbol database.
6304 * Returns: TRUE if the package was loaded (or will be loaded once scanned).
6305 * FALSE if the version given was newer than the version in the database or the
6306 * package was not found. In this case, add_package() should be called.
6308 gboolean activate_package
(const gchar
*pkg_name
, const gchar
* pkg_version
);
6311 * ianjuta_symbol_manager_deactivate_package:
6313 * @pkg_name: name of the package. The colon char must be avoided.
6314 * @pkg_version: Version of the package. The colon char must be avoided.
6316 * Deactivates the package if it was found. If package is NULL, deactivate all
6320 void deactivate_package
(const gchar
* pkg_name
, const gchar
* pkg_version
);
6323 * ianjuta_symbol_manager_deactivate_all:
6326 * Deactivates all activate packages
6329 void deactivate_all
();
6333 * SECTION:ianjuta-print
6334 * @title: IAnjutaPrint
6335 * @short_description: Print interface
6337 * @stability: Unstable
6338 * @include: libanjuta/interfaces/ianjuta-print.h
6341 interface IAnjutaPrint
6344 * ianjuta_print_print:
6346 * @err: Error propagation and reporting.
6348 * Print the plugin (the file in case of the editor). In most cases this will show
6354 * ianjuta_print_print:
6356 * @err: Error propagation and reporting.
6358 * Show print preview dialog
6361 void print_preview
();
6365 * SECTION:ianjuta-preferences
6366 * @title: IAnjutaPreferences
6367 * @short_description: Preferences interface
6369 * @stability: Unstable
6370 * @include: libanjuta/interfaces/ianjuta-preferences
6373 interface IAnjutaPreferences
6375 #include
<libanjuta
/anjuta
-preferences.h
>
6377 * ianjuta_preferences_merge:
6379 * @prefs: AnjutaPreferences to install to
6380 * @err: Error propagation and reporting.
6382 * When called, the plugin should install it's preferences
6384 void merge
(AnjutaPreferences
* prefs
);
6387 * ianjuta_preferences_unmerge:
6389 * @prefs: AnjutaPreferences to install to
6390 * @err: Error propagation and reporting.
6392 * When called, the plugin should uninstall it's preferences
6394 void unmerge
(AnjutaPreferences
* prefs
);
6398 * SECTION:ianjuta-plugin-factory
6399 * @title: IAnjutaPluginFactory
6400 * @short_description: Create Anjuta plugin objects
6402 * @stability: Unstable
6403 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
6405 * This interface is used to create all Anjuta plugin objects. It is
6406 * already implemented inside Anjuta by an object able to load plugins written
6407 * in C. In order to load plugins in other languages (or in a different way),
6408 * a loader plugin implementing this interface must be written first, probably
6412 interface IAnjutaPluginFactory
6414 #include
<libanjuta
/anjuta
-plugin.h
>
6415 #include
<libanjuta
/anjuta
-shell.h
>
6416 #include
<libanjuta
/anjuta
-plugin
-handle.h
>
6419 * IAnjutaPluginFactoryError:
6420 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
6421 * missing in .plugin file
6422 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
6423 * double colon following location) is missing in .plugin file
6424 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
6425 * plugin module is probably not installed
6426 * @IANJUTA_PLUGIN_FACTORY_INVALID_MODULE: Module file cannot be
6427 * loaded, not a shared library perhaps
6428 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
6429 * registration function, library is not an anjuta plugin or
6430 * is not for the right version
6431 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
6432 * plugin type, library is not an anjuta plugin or not for
6434 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
6436 * These enumeration is used to specify errors.
6451 * ianjuta_plugin_factory_new_plugin:
6453 * @handle: Plugin information
6454 * @shell: Anjuta shell
6455 * @err: Error propagation and reporting.
6457 * Create a new AnjutaPlugin object from the plugin information handle,
6458 * give it the AnjutaShell object as argument.
6460 * Return value: a new plugin object
6462 AnjutaPlugin
* new_plugin
(AnjutaPluginHandle
* handle, AnjutaShell
*shell
);
6466 * SECTION:ianjuta-language
6467 * @title: IAnjutaLanguage
6468 * @short_description: Interface to manage multiple programming languages
6470 * @stability: Unstable
6471 * @include: libanjuta/interfaces/ianjuta-language.h
6475 interface IAnjutaLanguage
6477 #include
<libanjuta
/interfaces
/ianjuta
-editor
-language.h
>
6481 * ianjuta_language_from_mime_type:
6483 * @mime_type: A mime type to get the language for
6485 * Returns: A language Id or 0 in case no language was found
6487 Id get_from_mime_type
(const gchar
* mime_type
);
6490 * ianjuta_language_from_string:
6492 * @string: A string representation of the language. Note that multiple
6493 * strings may describe the language like C++ and Cpp
6495 * Returns: A language Id or 0 in case no language was found
6497 Id get_from_string
(const gchar
* string);
6500 * ianjuta_language_get_name:
6502 * @id: A valid language id
6504 * Returns: The main name of the language. When you call ianjuta_language_from_string()
6505 * before that method the string you get here might be different to the one you passed
6506 * because the language might have multiple string representations
6508 const gchar
* get_name
(Id id);
6511 * ianjuta_language_get_make_target:
6513 * @id: A valid language id
6515 * Returns: The suffix for the file thats needs to be passed to
6516 * make to compile the file, e.g. ".o" for C
6518 const gchar
* get_make_target
(Id id);
6521 * ianjuta_language_get_strings:
6523 * @id: A valid language id
6525 * Returns: (element-type utf8): A list of strings that represent this language that language
6527 List
<const gchar
*> get_strings
(Id id);
6530 * ianjuta_language_get_from_editor:
6532 * @editor: An object implementing IAnjutaEditorLanguage
6533 * @err: Error propagation
6535 * Conviniece method to get the id directly from the editor
6537 * Returns: A valid language id or 0
6540 IAnjutaLanguageId get_from_editor
(IAnjutaEditorLanguage
* editor
);
6543 * ianjuta_language_get_name_from_editor:
6545 * @editor: An object implementing IAnjutaEditorLanguage
6546 * @err: Error propagation
6548 * Conviniece method to get the name directly from the editor
6550 * Returns: A language name or NULL
6553 const gchar
* get_name_from_editor
(IAnjutaEditorLanguage
* editor
);
6556 * ianjuta_language_get_languages:
6558 * @err: Error propagation
6560 * Returns: (element-type int) (transfer container): a list of ids of the available
6561 * languages. Use GPOINTER_TO_INT() to receive them. The list but not the
6562 * values should be free'd with g_list_free()
6564 GList
* get_languages
();
6568 * SECTION:ianjuta-indenter
6569 * @title: IAnjutaIndenter
6570 * @short_description: Interface for automatic indentation
6572 * @stability: Unstable
6573 * @include: libanjuta/interfaces/ianjuta-indenter.h
6577 interface IAnjutaIndenter
6579 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
6582 * ianjuta_indenter_indent
6584 * @start: Start of the area to indent
6585 * @end: End of the area to indent
6586 * @error: Error propagation
6588 * Indent the area between @start and @end according to the indentation rules
6589 * of the programming language. Usually implemented by language support plugins.
6590 * Only one indenter can be loaded at a time.
6591 * Note: Indenters always affect full lines, so start and end will be moved
6592 * according to the next line start/end.
6594 void indent
(IAnjutaIterable
* start
, IAnjutaIterable
* end
);