Reverted changes from Revision 3989
[anjuta-git-plugin.git] / libanjuta / interfaces / libanjuta.idl
blob6cd62805e74c2006df942d60e646b91803ffa302
1 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 //
3 // libanjuta interfaces. Generate stubs with anjuta-idl-compiler.pl
4 //
5 // Copyright (C) 2004 Naba Kumar <naba@gnome.org>
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Library General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include <glib-object.h>
23 /**
24 * SECTION:ianjuta-file
25 * @title: IAnjutaFile
26 * @short_description: Implemented by plugins that can open files.
27 * @see_also: #IAnjutaFileSavable
28 * @stability: Unstable
29 * @include: libanjuta/interfaces/ianjuta-file.h
31 * Any plugin that can open files should implemented this interface. Along
32 * with the 'File Loader::SupportedMimeTypes' property of the plugin in
33 * .plugin file, it will be used by the loader to open files of that type.
35 interface IAnjutaFile
37 /**
38 * ianjuta_file_open:
39 * @obj: Self
40 * @uri: URI to open.
41 * @err: Error propagation and reporting
43 * The implementor opens the given URI.
45 void open (const gchar *uri);
47 /**
48 * ianjuta_file_get_uri:
49 * @obj: Self
50 * @err: Error propagation and reporting
52 * Returns the URI that was opened with ianjuta_file_open().
54 * Return value: The last URI opened.
56 gchar* get_uri ();
58 /**
59 * SECTION:ianjuta-file-savable
60 * @title: IAnjutaFileSavable
61 * @short_description: Implemented by plugins that can save files.
62 * @see_also: #IAnjutaFile
63 * @stability: Unstable
64 * @include: libanjuta/interfaces/ianjuta-file-savable.h
66 * Plugins implementing #IAnjutaFile inteface that can also save files
67 * should also implement this interface.
69 interface IAnjutaFileSavable
71 /**
72 * IAnjutaFileSavable::save_point:
73 * @obj: Self
74 * @entered: TRUE if save point is entered, FALSE otherwise.
76 * This signal is emitted when the editor enters or leave the save
77 * point. Save point is the point where the contents were saved to
78 * non-volatile memory (e.g. disk). For example, performing undo/redo
79 * will enter or leave the save point in an editor.
81 void ::save_point (gboolean entered);
83 /**
84 * IAnjutaFileSavable::saved:
85 * @obj: Self
86 * @uri: URI where the content is saved.
88 * This signal is emitted when the content is saved.
90 void ::saved (const gchar *uri);
92 /**
93 * ianjuta_file_savable_save:
94 * @obj: Self
95 * @err: Error propagation and reporting
97 * Saves the content to the original URI from which it was loaded.
99 void save ();
102 * ianjuta_file_savable_save_as:
103 * @obj: Self
104 * @uri: URI to save the content.
105 * @err: Error propagation and reporting
107 * Saves the content to a different URI.
109 void save_as (const gchar *uri);
112 * ianjuta_file_savable_set_dirty:
113 * @obj: Self
114 * @dirty:
115 * @err: Error propagation and reporting
117 * if @dirty is TRUE, sets dirty for the content. Save point will be
118 * left and the content will be considered not saved. Otherwise,
119 * content will considered saved and save-point will be entered.
121 void set_dirty (gboolean dirty);
124 * ianjuta_file_savable_is_dirty:
125 * @obj: Self
126 * @err: Error propagation and reporting
128 * Returns the dirty status of the content.
130 * Return value: TRUE if dirty, FALSE otherwise.
132 gboolean is_dirty ();
137 * SECTION:ianjuta-stream
138 * @title: IAnjutaStream
139 * @short_description: Implemented by plugins that can open file streams
140 * @see_also:
141 * @stability: Unstable
142 * @include: libanjuta/interfaces/ianjuta-stream.h
145 interface IAnjutaStream
147 #include <stdio.h>
150 * ianjuta_stream_open:
151 * @obj: Self
152 * @stream: Stream to open from.
153 * @err: Error propagation and reporting
155 * The implementor opens the given stream.
157 void open (FILE* stream);
160 * SECTION:ianjuta-stream-savable
161 * @title: IAnjutaStreamSavable
162 * @short_description: Implemented by plugins that can save file streams
163 * @see_also:
164 * @stability: Unstable
165 * @include: libanjuta/interfaces/ianjuta-stream-savable.h
168 interface IAnjutaStreamSavable
171 * ianjuta_stream_save:
172 * @obj: Self
173 * @stream: Stream to save to.
174 * @err: Error propagation and reporting
176 * The implementor saves the content to the given stream.
178 void save (FILE* stream);
183 * SECTION:ianjuta-markable
184 * @title: IAnjutaMarkable
185 * @short_description: Implemented by editors (or views) with markers support
186 * @see_also:
187 * @stability: Unstable
188 * @include: libanjuta/interfaces/ianjuta-markable.h
191 interface IAnjutaMarkable
193 enum Error
195 INVALID_LOCATION
198 enum Marker
200 LINEMARKER,
201 BOOKMARK,
202 BREAKPOINT_DISABLED,
203 BREAKPOINT_ENABLED,
204 PROGRAM_COUNTER
207 void ::marker_clicked (gboolean double_click, gint location);
210 * ianjuta_markable_mark:
211 * @obj: Self
212 * @location: Location at which the marker to set.
213 * @marker: Type of marker to be used
214 * @err: Error propagation and reporting
216 * Marks the specified location with the given marker type. Location is
217 * implementation depenedent. For example, for an editor location means
218 * lines where markers are set.
220 * Return value: Handle of the location marked. Can be used later to obtain
221 * new location, if it has been moved due to addetions/deletions in the
222 * implementor object.
224 gint mark (gint location, Marker marker);
227 * ianjuta_markable_location_from_handle:
228 * @obj: Self
229 * @handle: Handle of location.
230 * @err: Error propagation and reporting
232 * Location where a marker is set could have moved by some operation in
233 * the implementation. To retrieve the correct location where the marker
234 * has moved, pass the handle retured by ianjuta_markable_mark() to this
235 * method.
237 * Return value: Current location where the marker was set.
239 gint location_from_handle (gint handle);
242 * ianjuta_markable_unmark:
243 * @obj: Self
244 * @location: Location where the marker is set.
245 * @marker: The marker to unset.
246 * @err: Error propagation and reporting
248 * Clears the @marker at given @location.
250 void unmark (gint location, Marker marker);
253 * ianjuta_markable_is_marker_set:
254 * @obj: Self
255 * @location: Location to check.
256 * @marker: Marker to check.
257 * @err: Error propagation and reporting
259 * Check if the @marker is set at the given @location.
261 * Returns: TRUE if the marker is set at the location, other false.
263 gboolean is_marker_set (gint location, Marker marker);
266 * ianjuta_markable_delete_all_markers:
267 * @obj: Self
268 * @marker: Marker to delete.
269 * @err: Error propagation and reporting
271 * Delete the @marker from all locations.
273 void delete_all_markers (Marker marker);
277 * SECTION:ianjuta-indicable
278 * @title: IAnjutaIndicable
279 * @short_description: Implemented by indicate that indicate a range
280 * @see_also:
281 * @stability: Unstable
282 * @include: libanjuta/interfaces/ianjuta-indicable.h
285 interface IAnjutaIndicable
287 #include <libanjuta/interfaces/ianjuta-iterable.h>
288 enum Indicator
290 NONE,
291 IMPORTANT,
292 WARNING,
293 CRITICAL
296 void set (IAnjutaIterable *begin_location, IAnjutaIterable *end_location, Indicator indicator);
297 void clear ();
301 * SECTION:ianjuta-iterable
302 * @title: IAnjutaIterable
303 * @short_description: Implemented by objects that can iterate
304 * @see_also:
305 * @stability: Unstable
306 * @include: libanjuta/interfaces/ianjuta-iterable.h
309 interface IAnjutaIterable
312 * ianjuta_iterable_first:
313 * @obj: Self
314 * @err: Error propagation and reporting
316 * Set iter to first element position. Returns FALSE if
317 * there is no element in the iterable (hence does not have first).
318 * The iter points to the first valid item.
320 * Returns: TRUE if sucessful, other FALSE.
322 gboolean first ();
325 * ianjuta_iterable_next:
326 * @obj: Self
327 * @err: Error propagation and reporting
329 * Set the iter position to next element position. Iter can go until one
330 * item past the last item and lands in end-iter. end-iter does not point
331 * to any valid item and signifies end of the list. Returns FALSE if iter
332 * was already at end-iter (iter can not go past it) and remains pointed
333 * to the end-iter.
335 * Returns: TRUE if sucessful, otherwise FALSE if already at end-iter.
337 gboolean next ();
340 * ianjuta_iterable_previous:
341 * @obj: Self
342 * @err: Error propagation and reporting
344 * Set the iter position to previous element position. Returns FALSE if
345 * there is no previous element and the iter remains pointed to the first
346 * element.
348 * Returns: TRUE if sucessful, other FALSE.
350 gboolean previous ();
353 * ianjuta_iterable_last:
354 * @obj: Self
355 * @err: Error propagation and reporting
357 * Set iter position to end-iter (one past last element) position.
358 * Returns FALSE if there is no element in the iterable (already
359 * at end-iter).
361 * Returns: TRUE if sucessful, other FALSE.
363 gboolean last ();
366 * ianjuta_iterable_foreach:
367 * @obj: Self
368 * @callback: Callback to call for each element.
369 * @user_data: user data that is passed back to the callback.
370 * @err: Error propagation and reporting
372 * Call callback for each element in the list. Call back is passed the
373 * same iter, but with different position set (from first to last). This
374 * method does not affect current position. i.e. current position is
375 * restored at the end of this method.
377 void foreach (GFunc callback, gpointer user_data);
380 * ianjuta_iterable_set_position:
381 * @obj: Self
382 * @position: New position for the iter.
383 * @err: Error propagation and reporting
385 * Sets the current position of the iter to @position. The given @position
386 * must be from 0 to length - 1 (#ianjuta_iter_get_length()) to point to
387 * a valid element. Passing @position < 0 will set it to end-iter. It
388 * returns TRUE for the above cases. FLASE will be returned, if
389 * out-of-range @position is passed (@position > length - 1) and iter is
390 * set to end-iter.
392 * Returns: TRUE if successfully set (i.e. @position is within the range or
393 * end-iter). otherwise returns FALSE (i.e. @position is out of data range).
395 gboolean set_position (gint position);
398 * ianjuta_iterable_get_position:
399 * @obj: Self
400 * @err: Error propagation and reporting
402 * Index of the current iter in the iterable. It will be
403 * from 0 to length - 1 (ianjuta_iter_get_length()) if iter is pointed
404 * at valid element. It will return -1 if iter is pointed at end-iter.
406 * Returns: integer index, or -1 for end-iter.
408 gint get_position ();
411 * ianjuta_iterable_get_length:
412 * @obj: Self
413 * @err: Error propagation and reporting
415 * Length of the iterable (number of elements indexable by it).
417 * Returns: total length of the list.
419 gint get_length ();
422 * ianjuta_iterable_clone:
423 * @obj: Self
424 * @err: Error propagation and reporting
426 * Clones the iterable. The returned iterable object must be unrefed
427 * when done.
429 * Returns: A new instance of this iterable pointing at the same location.
431 IAnjutaIterable *clone ();
434 * ianjuta_iterable_assign:
435 * @obj: Self
436 * @src_iter: Source iter from which to copy the assignment.
437 * @err: Error propagation and reporting
439 * Assigns the iter position from @src_iter.
442 void assign (IAnjutaIterable *src_iter);
445 * ianjuta_iterable_compare:
446 * @obj: Self
447 * @iter2: Second iter to compare.
448 * @err: Error propagation and reporting
450 * Compares the position of @iter2 with this @obj. Returns -1
451 * value if this @obj is smaller than @iter2. Returns +1 value
452 * if this @obj is larger than @iter2. And returns 0 if both are equal.
453 * If you want difference of the iter positions, use
454 * #ianjuta_iterable_diff(). This method is meant for fast comparision.
456 * Returns: 0 if equal, -1 if @obj is smaller than @iter2
457 * or +1 if @obj is larger than @iter2.
460 gint compare (IAnjutaIterable *iter2);
463 * ianjuta_iterable_diff:
464 * @obj: Self
465 * @iter2: Second iter to differenciate.
466 * @err: Error propagation and reporting
468 * Compares the position of @iter2 with this @obj and returns difference
469 * in position of the two (@obj - @iter2).
471 * Returns: The position difference of @obj - @iter2
474 gint diff (IAnjutaIterable *iter2);
477 * SECTION:ianjuta-iterable-tree
478 * @title: IAnjutaIterableTree
479 * @short_description: Implemented by tree objects that can iterate
480 * @see_also:
481 * @stability: Unstable
482 * @include: libanjuta/interfaces/ianjuta-iterable-tree.h
485 interface IAnjutaIterableTree
488 /**
489 * ianjuta_iterable_tree_parent:
490 * @obj: Self
491 * @err: Error propagation and reporting
493 * Set iter position to parent of curernt iter. If there is no parent,
494 * returns FALSE (current iter position is not changed)
496 * Returns: TRUE if sucessful, otherwise FALSE.
498 gboolean parent ();
501 * ianjuta_iterable_tree_children:
502 * @obj: Self
503 * @err: Error propagation and reporting
505 * Iter position set to first child of current iter. If there is no
506 * children, return NULL (iter position is not changed).
508 * Returns: TRUE if sucessful, otherwise FALSE.
510 gboolean children ();
513 * ianjuta_iterable_tree_has_children:
514 * @obj: Self
515 * @err: Error propagation and reporting
517 * Returns true if current iter has children
519 * Returns: TRUE if there are children, otherwise FALSE.
521 gboolean has_children ();
524 * ianjuta_iterable_tree_foreach_post:
525 * @obj: Self
526 * @callback: Callback to call for each element.
527 * @user_data: User data to pass back to callback.
528 * @err: Error propagation and reporting
530 * Call callback for each element in post order.
532 void foreach_post (GFunc callback, gpointer user_data);
535 * ianjuta_iterable_tree_foreach_pre:
536 * @obj: Self
537 * @callback: Callback to call for each element.
538 * @user_data: User data to pass back to callback.
539 * @err: Error propagation and reporting
541 * Call callback for each element in pre order.
543 void foreach_pre (GFunc callback, gpointer user_data);
548 * SECTION:ianjuta-builder
549 * @title: IAnjutaBuilder
550 * @short_description: Implemented by plugins that can build
551 * @see_also:
552 * @stability: Unstable
553 * @include: libanjuta/interfaces/ianjuta-builder.h
556 interface IAnjutaBuilder
558 #include <libanjuta/anjuta-error.h>
560 /* Types */
561 enum Error
563 SUCCEED = 0,
564 FAILED,
565 CANCELED = 256,
566 ABORTED,
567 INTERRUPTED,
568 TERMINATED,
569 UNKNOWN_TARGET,
570 UNKNOWN_ERROR,
571 OTHER_ERROR
574 typedef gpointer Handle;
576 typedef void (*Callback) (GObject *sender, GError* err, gpointer user_data);
578 /**
579 * ianjuta_builder_is_built:
580 * @obj: Self
581 * @uri: target uri
582 * @callback: callback called when command is finished
583 * @user_data: data passed to the callback
584 * @err: Error propagation and reporting.
586 * Check if the corresponding target is up to date or not. This
587 * command doesn't display anything. If this command cannot be
588 * implemented, it is possible to return always TRUE.
589 * When the command if finished, the callback function is called
590 * if defined.
592 * Returns: non null command handle if succeed
594 Handle is_built (const gchar *uri, Callback callback, gpointer user_data);
596 /**
597 * ianjuta_builder_build:
598 * @obj: Self
599 * @uri: target uri
600 * @callback: callback called when command is finished
601 * @user_data: data passed to the callback
602 * @err: Error propagation and reporting.
604 * Build the specified target.
605 * When the command if finished, the callback function is called
606 * if defined.
608 * Returns: non null command handle if succeed
610 Handle build (const gchar *uri, Callback callback, gpointer user_data);
613 * ianjuta_builder_cancel:
614 * @obj: Self
615 * @handle: handle of the command to cancel
616 * @err: Error propagation and reporting.
618 * Cancel specified command. The callback function will not
619 * be called.
622 void cancel (Handle handle);
626 * SECTION:ianjuta-buildable
627 * @title: IAnjutaBuildable
628 * @short_description: Implemented by plugins that can build
629 * @see_also:
630 * @stability: Unstable
631 * @include: libanjuta/interfaces/ianjuta-buildable.h
634 interface IAnjutaBuildable
636 enum Command
638 COMMAND_COMPILE,
639 COMMAND_BUILD,
640 COMMAND_BUILD_TARBALL,
641 COMMAND_INSTALL,
642 COMMAND_CONFIGURE,
643 COMMAND_GENERATE,
644 COMMAND_CLEAN,
645 COMMAND_EXECUTE,
646 COMMAND_IS_BUILT,
647 N_COMMANDS
650 /**
651 * ianjuta_buildable_set_command:
652 * @obj: Self
653 * @command_id: Command to override.
654 * @command: Build command to override.
655 * @err: Error propagation and reporting.
657 * Overrides the default command for the given command.
659 void set_command (Command command_id, const gchar *command);
661 /**
662 * ianjuta_buildable_get_command:
663 * @obj: Self
664 * @command_id: Command to get override.
665 * @err: Error propagation and reporting.
667 * Retrieves the currently set command override.
669 * Returns: The overridden command. NULL if no override set.
671 const gchar* get_command (Command command_id);
673 /**
674 * ianjuta_buildable_reset_commands:
675 * @obj: Self
676 * @err: Error propagation and reporting.
678 * Resets the command overrides to defaults.
680 void reset_commands ();
682 /**
683 * ianjuta_buildable_build:
684 * @obj: Self
685 * @uri: fixme
686 * @err: Error propagation and reporting.
688 * fixme
690 void build (const gchar *uri);
693 * ianjuta_buildable_clean:
694 * @obj: Self
695 * @uri: fixme
696 * @err: Error propagation and reporting.
698 * fixme
700 void clean (const gchar *uri);
703 * ianjuta_buildable_install:
704 * @obj: Self
705 * @uri: fixme
706 * @err: Error propagation and reporting.
708 * fixme
710 void install (const gchar *uri);
713 * ianjuta_buildable_configure:
714 * @obj: Self
715 * @uri: fixme
716 * @err: Error propagation and reporting.
718 * fixme
720 void configure (const gchar *uri);
723 * ianjuta_buildable_generate:
724 * @obj: Self
725 * @uri: fixme
726 * @err: Error propagation and reporting.
728 * fixme
730 void generate (const gchar *uri);
733 * ianjuta_buildable_execute:
734 * @obj: Self
735 * @uri: fixme
736 * @err: Error propagation and reporting.
738 * fixme
740 void execute (const gchar *uri);
744 * SECTION:ianjuta-help
745 * @title: IAnjutaHelp
746 * @short_description: Implemented by plugins that can provide help support
747 * @see_also:
748 * @stability: Unstable
749 * @include: libanjuta/interfaces/ianjuta-help.h
752 interface IAnjutaHelp
756 * ianjuta_help_search:
757 * @obj: Self
758 * @query: fixme
759 * @err: Error propagation and reporting
761 * fixme
763 void search (const gchar *query);
767 * SECTION:ianjuta-loader
768 * @title: IAnjutaLoader
769 * @short_description: Interface to load file or stream
770 * @see_also:
771 * @stability: Unstable
772 * @include: libanjuta/interfaces/ianjuta-loader.h
774 * Loaders can deterime correct plugin to open a file or stream. They
775 * themselves can not load it, but will correctly redirect the request to
776 * an implementor of IAnjutaFile, IAnjutaFileSavable, IAnjutaStream or
777 * IAnjutaStreamSavable, depending on the mime-type, meta-type or any other
778 * requirements.
780 interface IAnjutaLoader
782 #include <libanjuta/anjuta-plugin.h>
784 * ianjuta_loader_find_plugins:
785 * @obj: Self
786 * @err: Error propagation and reporting.
788 * Returns all plugins supporting loader interface.
790 List<AnjutaPlugin*> find_plugins ();
793 * SECTION:ianjuta-file-loader
794 * @title: IAnjutaFileLoader
795 * @short_description: Loader to load files
796 * @see_also:
797 * @stability: Unstable
798 * @include: libanjuta/interfaces/ianjuta-file-loader.h
800 * Loaders can deterime correct plugin to open a file.
802 interface IAnjutaFileLoader
805 * ianjuta_file_loader_load:
806 * @obj: Self
807 * @uri: URI to load
808 * @readonly: Open in readonly mode.
809 * @err: Error propagation and reporting
811 * Determines a plugin which can open the given file, activates it
812 * opening the file and returns the interface of the plugin activated.
814 * Return value: Plugin interface used to load the file.
816 GObject* load (const gchar *uri, gboolean readonly);
819 * ianjuta_loader_peek_interface:
820 * @obj: Self
821 * @uri: Meta file to peek
822 * @err: Error propagation and reporting
824 * Peeks the file and determines the interface which can load
825 * this file.
827 * Return value: Plugin interface name that can load the file.
829 gchar* peek_interface (const gchar *uri);
833 * SECTION:ianjuta-stream-loader
834 * @title: IAnjutaStreamLoader
835 * @short_description: Loader to load streams
836 * @see_also:
837 * @stability: Unstable
838 * @include: libanjuta/interfaces/ianjuta-stream-loader.h
840 * StreamLoaders can deterime correct plugin to open a stream.
842 interface IAnjutaStreamLoader
844 #include <stdio.h>
847 * ianjuta_stream_loader_load:
848 * @obj: Self
849 * @stream: Stream to load
850 * @readonly: Open in readonly mode.
851 * @err: Error propagation and reporting
853 * Determines a plugin which can open the given stream, activates it
854 * opening the stream and returns the interface of the plugin activated.
856 * Return value: Plugin interface used to load the stream.
858 GObject* load (FILE *stream, gboolean readonly);
861 * ianjuta_stream_loader_peek_interface:
862 * @obj: Self
863 * @stream: Stream to load
864 * @err: Error propagation and reporting
866 * Peeks the stream and determines the interface which can load
867 * this stream.
869 * Return value: Plugin interface name that can load the stream.
871 gchar* peek_interface (FILE *stream);
876 * SECTION:ianjuta-document
877 * @title: IAnjutaDocument
878 * @short_description: Interface for all kind of editable resources that
879 * will be managed by IAnjutaDocumentManager
880 * @see_also:
881 * @stability: Unstable
882 * @include: libanjuta/interfaces/ianjuta-document.h
885 interface IAnjutaDocument
888 * IAnjutaDocument::update_ui:
889 * @obj: Self
891 * This signal is emitted when the document assumes the UI must be updated
892 * because some internal state of the document has changed. For example, if
893 * current line position is changed, it needs to be reflected to the UI.
895 void ::update_ui ();
898 * ianjuta_document_get_filename:
899 * @obj: Self
900 * @err: Error propagation and reporting
902 * Allows obtaining of the filename the editor was loaded from.
904 * Return value: The name of the file. Not to be freed by caller.
906 const gchar* get_filename ();
909 * ianjuta_document_can_undo:
910 * @obj: Self
911 * @err: Error propagation and reporting
913 * Can the editor undo the last operation?
915 * Returns true if editor can undo, else FALSE
917 gboolean can_undo();
920 * ianjuta_document_can_redo:
921 * @obj: Self
922 * @err: Error propagation and reporting
924 * Can the editor redo the last operation?
926 * Returns true if editor can redo, else FALSE
928 gboolean can_redo ();
931 * ianjuta_document_undo:
932 * @obj: Self
933 * @err: Error propagation and reporting
935 * Undo last operation
937 void undo ();
940 * ianjuta_document_redo:
941 * @obj: Self
942 * @err: Error propagation and reporting
944 * Redo last undo operation
946 void redo ();
949 * ianjuta_document_begin_undo_action:
950 * @obj: Self
951 * @err: Error propagation and reporting
953 * Begins the mark of undoable action. Calls to this are stacked and
954 * each must be ended with ianjuta_document_end_action().
956 void begin_undo_action ();
959 * ianjuta_document_end_undo_action:
960 * @obj: Self
961 * @err: Error propagation and reporting
963 * Ends the mark of undoable action.
965 void end_undo_action ();
968 * ianjuta_document_grab_focus:
969 * @obj: Self
970 * @err: Error propagation and reporting
972 * Grabs the focus.
974 void grab_focus ();
977 * ianjuta_document_cut:
978 * @obj: Self
979 * @err: Error propagation and reporting
981 * Cut selection to clipboard.
983 void cut ();
986 * ianjuta_document_copy:
987 * @obj: Self
988 * @err: Error propagation and reporting
990 * Copy selection to clipboard.
992 void copy ();
995 * ianjuta_document_paste:
996 * @obj: Self
997 * @err: Error propagation and reporting
999 * Paste clipboard at current position.
1001 void paste ();
1004 * ianjuta_document_clear:
1005 * @obj: Self
1006 * @err: Error propagation and reporting
1008 * Clear selection
1010 void clear ();
1014 * SECTION:ianjuta-editor
1015 * @title: IAnjutaEditor
1016 * @short_description: Text editor interface
1017 * @see_also:
1018 * @stability: Unstable
1019 * @include: libanjuta/interfaces/ianjuta-editor.h
1022 interface IAnjutaEditor
1024 #include <gtk/gtkwidget.h>
1025 #include <libanjuta/interfaces/ianjuta-iterable.h>
1027 enum Error
1029 DOESNT_EXIST
1032 enum Attribute
1034 TEXT,
1035 KEYWORD,
1036 COMMENT,
1037 STRING
1041 * IAnjutaEditor::char_added:
1042 * @position: The iter position where @ch is added.
1043 * @ch: The character that has been added.
1044 * @obj: Self
1046 * This signal is emitted when any character is added inside the editor.
1047 * The newly added character is @ch which has been inserted at @position.
1049 void ::char_added (GObject *position, gchar ch);
1052 * IAnjutaEditor::changed:
1053 * @position: The iter position where change happend.
1054 * @added: TRUE if added, FALSE if deleted.
1055 * @length: Length of the text changed.
1056 * @lines: Number of lines added or removed.
1057 * @text: The text added or removed.
1058 * @obj: Self
1060 * This signal is emitted when any text change happens in editor.
1061 * The changes begin at @position. @text is not garanteed to be NULL
1062 * terminated. Use @length to read the text. @lines represent the
1063 * number of line breaks in the added or removed text.
1065 void ::changed (GObject *position, gboolean added, gint length, gint lines, const gchar *text);
1068 * ianjuta_editor_get_tabsize:
1069 * @obj: Self
1070 * @err: Error propagation and reporting
1072 * Returns the tabsize (in spaces) currently used by the editor.
1074 * Returns: tabsize in number of spaces
1076 gint get_tabsize ();
1079 * ianjuta_editor_set_tabsize:
1080 * @obj: Self
1081 * @tabsize: Tabsize in spaces
1082 * @err: Error propagation and reporting
1084 * Sets the tabsize of the editor.
1086 void set_tabsize (gint tabsize);
1089 * ianjuta_editor_get_use_spaces:
1090 * @obj: Self
1091 * @err: Error propagation and reporting
1093 * Returns if the editor uses spaces for filling up tab characters.
1095 * Returns: TRUE if yes, FALSE if no.
1097 gboolean get_use_spaces ();
1100 * ianjuta_editor_set_use_space:
1101 * @obj: Self
1102 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
1103 * @err: Error propagation and reporting
1105 * Sets if the editor should use spaces for filling up tab characters.
1107 void set_use_spaces (gboolean use_spaces);
1110 * ianjuta_editor_set_auto_indent:
1111 * @obj: Self
1112 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
1114 * Sets whether the editor should auto-indent itself. A plugin that does
1115 * custom auto-indent can set this to false and override the preferences
1116 * setting
1118 void set_auto_indent (gboolean auto_indent);
1121 * ianjuta_editor_erase_range:
1122 * @obj: Self
1123 * @position_start: Start position of chars to erase.
1124 * @position_end: End position of chars to erase.
1125 * @err: Error propagation and reporting
1127 * Erases the chars between positions pointed by @position_start and
1128 * @position_end. The character pointed by @position_start is included,
1129 * while pointed by @position_end is not include in the range. After
1130 * the erase operation, all active iters, except these two, are no
1131 * longer guranteed to be valid. At the end the operation, these two
1132 * iters point to the same position which is the position where erase
1133 * happend (usually the original @position_start position).
1135 void erase (IAnjutaIterable *position_start, IAnjutaIterable *position_end);
1138 * ianjuta_editor_erase_all:
1139 * @obj: Self
1140 * @err: Error propagation and reporting
1142 * Empties the whole editor buffer. There will be zero characters.
1143 * After the erase operation, none of the active iters are guranteed
1144 * to be valid.
1146 void erase_all ();
1149 * ianjuta_editor_insert:
1150 * @obj: Self
1151 * @position: Character position in editor where insert will take place.
1152 * @text: Text to append.
1153 * @length: Length of @text to use.
1154 * @err: Error propagation and reporting
1156 * Inserts @length characters from @text buffer at given @position of
1157 * editor buffer. If @length is -1, the whole @text is used.
1159 void insert (IAnjutaIterable *position, const gchar *text, gint length);
1162 * ianjuta_editor_append:
1163 * @obj: Self
1164 * @text: Text to append.
1165 * @length: Length of @text to use.
1166 * @err: Error propagation and reporting
1168 * Appends @length characters from @text buffer at the end of editor
1169 * buffer. If @length is -1, the whole @text is used. @length is in bytes.
1171 void append (const gchar *text, gint length);
1174 * ianjuta_editor_goto_line:
1175 * @obj: Self
1176 * @lineno: line number where carat will be moved.
1177 * @err: Error propagation and reporting
1179 * Carat is moved to the given @lineno line and text view is scrolled to
1180 * bring it in viewable area of the editor.
1182 void goto_line (gint lineno);
1185 * ianjuta_editor_goto_start:
1186 * @obj: Self
1187 * @err: Error propagation and reporting
1189 * Carat is moved to the begining of editor and text view is scrolled to
1190 * bring it in viewable area of the editor.
1192 void goto_start ();
1195 * ianjuta_editor_goto_end:
1196 * @obj: Self
1197 * @err: Error propagation and reporting
1199 * Carat is moved to the end of editor and text view is scrolled to
1200 * bring it in viewable area of the editor.
1202 void goto_end ();
1205 * ianjuta_editor_goto_position:
1206 * @obj: Self
1207 * @position: Character position where carat will be moved.
1208 * @err: Error propagation and reporting
1210 * Carat is moved to the given @position and text view is scrolled to
1211 * bring @position in viewable area of the editor.
1213 void goto_position (IAnjutaIterable *position);
1216 * ianjuta_editor_get_text:
1217 * @obj: Self
1218 * @begin: Begining iterator
1219 * @end: End iterator
1220 * @err: Error propagation and reporting
1222 * Gets text characters beginning from @begin (including char
1223 * pointed by @begin) and ending with @end (excluding character
1224 * pointed by @end). The characters returned are utf-8 encoded.
1225 * The iterators @begin and @end could be in either order. The returned
1226 * text, however, is in right order. If both @begin and @end points
1227 * to the same position, NULL is returned.
1229 * Returns: A buffer of utf-8 characters.
1230 * The returned buffer must be freed when no longer required.
1232 gchar* get_text (IAnjutaIterable *begin, IAnjutaIterable *end);
1235 * ianjuta_editor_get_text_all:
1236 * @obj: Self
1237 * @err: Error propagation and reporting
1239 * Gets all text characters in the editor.
1240 * The characters returned are utf-8 encoded.
1242 * Returns: A buffer of utf-8 characters containing all text from editor.
1243 * The returned buffer must be freed when no longer required.
1245 gchar* get_text_all ();
1248 * ianjuta_editor_line_from_position:
1249 * @obj: Self
1250 * @position: Position you want to know the line from
1251 * @err: Error propagation and reporting
1253 * Get the line number in which @position locates.
1254 * Returns: Line which corresponds to @position
1257 int get_line_from_position (IAnjutaIterable *position);
1260 * ianjuta_editor_get_lineno:
1261 * @obj: Self
1262 * @err: Error propagation and reporting
1264 * Obtains current line number on which carat is.
1266 * Return value: Line number.
1268 gint get_lineno ();
1271 * ianjuta_editor_get_length:
1272 * @obj: Self
1273 * @err: Error propagation and reporting
1275 * Get length of complete text in editor. This will be the total
1276 * number of characters in the file or buffer.
1278 * Return value: Text length.
1280 gint get_length ();
1283 * ianjuta_editor_get_current_word:
1284 * @obj: Self
1285 * @err: Error propagation and reporting
1287 * Obtains the word on which carat is currently on.
1289 * Return value: Current word.
1291 gchar* get_current_word ();
1294 * ianjuta_editor_get_current_column:
1295 * @obj: Self
1296 * @err: Error propagation and reporting
1298 * Obtains number of the current column in the editor.
1300 * Return value: Current column.
1302 gint get_column ();
1305 * ianjuta_editor_get_line_begin_position:
1306 * @obj: Self
1307 * @line: fixme
1308 * @err: Error propagation and reporting.
1310 * fixme
1312 * Returns: fixme
1314 IAnjutaIterable* get_line_begin_position (gint line);
1317 * ianjuta_editor_get_line_end_position:
1318 * @obj: Self
1319 * @line: fixme
1320 * @err: Error propagation and reporting.
1322 * fixme
1324 * Returns: fixme
1326 IAnjutaIterable *get_line_end_position (gint line);
1329 * ianjuta_editor_get_overwrite:
1330 * @obj: Self
1331 * @err: Error propagation and reporting
1333 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1335 * Return value: editor mode.
1337 gboolean get_overwrite ();
1341 * ianjuta_editor_set_popup_menu:
1342 * @obj: Self
1343 * @menu: Popupmenu
1344 * @err: Error propagation and reporting
1346 * Set Editor popup menu. This is the menu shown in the editor when one
1347 * right-clicks on it.
1350 void set_popup_menu (GtkWidget *menu);
1353 * ianjuta_editor_get_offset:
1354 * @obj: Self
1355 * @err: Error propagation and reporting
1357 * Get current caret position in integer character offset. Deprecated.
1358 * Use ianjuta_editor_get_position() instead.
1360 * Returns: Current character position since the begining of file.
1362 gint get_offset ();
1365 * ianjuta_editor_get_position:
1366 * @obj: Self
1367 * @err: Error propagation and reporting
1369 * Get current caret position.
1371 * Returns: Iterator that points to the current position.
1373 IAnjutaIterable* get_position ();
1376 * ianjuta_editor_get_position_from_offset:
1377 * @obj: Self
1378 * @offset: Character offset position where the iter will be set
1379 * @err: Error propagation and reporting
1381 * Creates and returns an iter for editor cells. The iter is
1382 * placed at the unicode character position where the given offset
1383 * @offset happens to fall. The returned iter is cell (character)
1384 * iter and not byte iter, so all iter operations
1385 * on it are character (not byte) iteration, including all position
1386 * and index references in the iter.
1388 * The iter must be unreferrenced by the caller when done.
1389 * The iter navigates (next/previous) in step of unicode
1390 * characters (one unicode character == one cell).
1392 * Retrun value: a newly created iter of IAnjutaEditorCell placed at the
1393 * given @offset position.
1395 IAnjutaIterable* get_position_from_offset (gint offset);
1398 * ianjuta_editor_get_start_position:
1399 * @obj: Self
1400 * @err: Error propagation and reporting
1402 * Gets the iter positioned at the start of the editor buffer.
1404 * Retrun value: Cell iter set to the begining of the editor.
1406 IAnjutaIterable* get_start_position ();
1409 * ianjuta_editor_get_end_position:
1410 * @obj: Self
1411 * @err: Error propagation and reporting
1413 * Gets the iter positioned at the end of the editor buffer. The
1414 * returned iter is the end-iter which does not point to any valid
1415 * character in the buffer (it is pointed one step beyond the last
1416 * valid character).
1418 * Retrun value: Cell iter set to the end of the editor (end-iter).
1420 IAnjutaIterable* get_end_position ();
1423 * SECTION:ianjuta-editor-selection
1424 * @title: IAnjutaEditorSelection
1425 * @short_description: Text editor selection interface
1426 * @see_also:
1427 * @stability: Unstable
1428 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1431 interface IAnjutaEditorSelection
1433 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1435 * ianjuta_editor_selection_has_selection:
1436 * @obj: Self
1437 * @err: Error propagation and reporting
1439 * Returns TRUE if editor has any text selected. The selection
1440 * positions can be retrieved with ianjuta_editor_selection_get_start()
1441 * and ianjuta_editor_selection_get_end().
1443 * Returns: TRUE if there is text selected else FALSE.
1445 gboolean has_selection ();
1448 * ianjuta_editor_selection_get:
1449 * @obj: Self
1450 * @err: Error propagation and reporting
1452 * Gets curerntly selected text in editor.
1454 * Returns: A newly allocated buffer of currently selected characters.
1455 * NULL if there is no selection. The returned buffer must be freed after
1456 * use.
1458 gchar* get ();
1461 * ianjuta_editor_selection_set:
1462 * @obj: Self
1463 * @start: Begin of selection
1464 * @end: End of selection
1465 * @err: Error propagation and reporting
1467 * Select characters between start and end. Start and end don't have to
1468 * be ordered.
1470 void set (IAnjutaIterable* start, IAnjutaIterable* end);
1473 * ianjuta_editor_selection_get_start:
1474 * @obj: Self
1475 * @err: Error propagation and reporting
1477 * Gets start position of selection text. If there is no selection,
1478 * returns -1.
1480 * Return: Start of selection or NULL if there is no selection.
1482 IAnjutaIterable* get_start ();
1485 * ianjuta_editor_selection_get_end:
1486 * @obj: Self
1487 * @err: Error propagation and reporting
1489 * Get end position of selection. If there is no selection, returns
1490 * NULL.
1492 * Return: End of selection or NULL if there is no selection.
1494 IAnjutaIterable* get_end ();
1497 * ianjuta_editor_selection_select_block:
1498 * @obj: Self
1499 * @err: Error propagation and reporting
1501 * Selects current block of code. The definition of block of code
1502 * depends on highlight mode used (programming language). Some
1503 * highlight mode does not have block concept, in that case this
1504 * method does not do anything.
1506 void select_block ();
1509 * ianjuta_editor_selection_select_function:
1510 * @obj: Self
1511 * @err: Error propagation and reporting
1513 * Select current function block. The definition of function block
1514 * depends on highlight mode used (programming language). Some
1515 * highlight mode does not have function concept, in that case this
1516 * method does not do anything.
1518 void select_function ();
1521 * ianjuta_editor_selection_select_to_brace:
1522 * @obj: Self
1523 * @err: Error propagation and reporting
1525 * Select to brace. Some highlight mode does not have braces concept,
1526 * in that case, this method does not do anything.
1528 void select_to_brace ();
1531 * ianjuta_editor_edit_select_all:
1532 * @obj: Self
1533 * @err: Error propagation and reporting
1535 * Select whole buffer.
1537 void select_all ();
1540 * ianjuta_editor_selection_replace:
1541 * @obj: Self
1542 * @text: Replacement text.
1543 * @length: Length of the text to used in @text.
1544 * @err: Error propagation and reporting
1546 * Replaces currently selected text with the @text. Only @length amount
1547 * of characters are used from @text buffer to replace.
1549 void replace (const gchar *text, gint length);
1553 * SECTION:ianjuta-editor-search
1554 * @title: IAnjutaEditorSearch
1555 * @short_description: Text editor search interface
1556 * @see_also:
1557 * @stability: Unstable
1558 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1561 interface IAnjutaEditorSearch
1563 #include <libanjuta/interfaces/ianjuta-editor-cell.h>
1566 * ianjuta_editor_search_forward:
1567 * @obj: Self
1568 * @search: String to search for
1569 * @start: Where to search from
1570 * @end: Where to stop searching
1571 * @result_start: Will be set to the start of the search_result (or NULL)
1572 * @result_end: Will be set to the end of the search_result (or NULL)
1573 * @err: Error propagation and reporting
1575 * Search forward from start to end
1578 gboolean forward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1581 * ianjuta_editor_search_backward:
1582 * @obj: Self
1583 * @search: String to search for
1584 * @start: Where to search from
1585 * @end: Where to stop searching
1586 * @result_start: Will be set to the start of the search_result (or NULL)
1587 * @result_end: Will be set to the end of the search_result (or NULL)
1588 * @err: Error propagation and reporting
1590 * Search backward from end to start
1594 gboolean backward (const gchar* search, gboolean case_sensitive, IAnjutaEditorCell* start, IAnjutaEditorCell* end, IAnjutaEditorCell** result_start, IAnjutaEditorCell** result_end);
1599 * SECTION:ianjuta-editor-convert
1600 * @title: IAnjutaEditorConvert
1601 * @short_description: Text editor convert interface
1602 * @see_also:
1603 * @stability: Unstable
1604 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1607 interface IAnjutaEditorConvert
1610 * ianjuta_editor_convert_to_upper:
1611 * @obj: Self
1612 * @start_position: Start position.
1613 * @end_position: End position.
1614 * @err: Error propagation and reporting
1616 * change characters from start position to end position to uppercase.
1619 void to_upper (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1622 * ianjuta_editor_convert_to_lower:
1623 * @obj: Self
1624 * @start_position: Start position.
1625 * @end_position: End position.
1626 * @err: Error propagation and reporting
1628 * change characters from start position to end position to lowercase
1631 void to_lower (IAnjutaIterable *start_position, IAnjutaIterable *end_position);
1635 * SECTION:ianjuta-editor-line-mode
1636 * @title: IAnjutaEditorLineMode
1637 * @short_description: Text editor line mode
1638 * @see_also:
1639 * @stability: Unstable
1640 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1643 interface IAnjutaEditorLineMode
1645 enum Type
1649 CRLF
1653 * ianjuta_editor_line_mode_get:
1654 * @obj: Self
1655 * @err: Error propagation and reporting
1657 * Get current line ending mode. It is auto-detected from the
1658 * buffer contents.
1660 Type get ();
1663 * ianjuta_editor_line_mode_set:
1664 * @obj: Self
1665 * @mode: Line mode to set.
1666 * @err: Error propagation and reporting
1668 * Set the line ending mode to the given @mode. Existing line end
1669 * characters in the buffer are not touched. Only the newly added
1670 * texts will have @mode line end characters.
1672 void set (Type mode);
1675 * ianjuta_editor_line_mode_convert:
1676 * @obj: Self
1677 * @mode: Line mode to convert.
1678 * @err: Error propagation and reporting
1680 * Set the line ending mode to the given @mode and convert all line end
1681 * characters in the buffer to @mode line end characters.
1683 void convert (Type mode);
1686 * ianjuta_editor_line_mode_fix:
1687 * @obj: Self
1688 * @err: Error propagation and reporting
1690 * Convert EOL characters to majority of line mode. This is helpful
1691 * when the buffer contains mixed line modes and we want to fix it.
1693 void fix ();
1697 * SECTION:ianjuta-editor-assist
1698 * @title: IAnjutaEditorAssist
1699 * @short_description: Editor assistance framework
1700 * @see_also:
1701 * @stability: Unstable
1702 * @include: libanjuta/interfaces/ianjuta-editor-assist.h
1705 interface IAnjutaEditorAssist
1707 /* IAnjutaEdiotrAssist::assist_chosen:
1708 * @obj: self
1709 * @selection: The selection index
1711 * User's selection from the choices. It is the index of the choice
1712 * presented with ianjuta_editor_assist_suggest().
1714 void ::assist_chosen (gint selection);
1717 * ianjuta_editor_assist_suggest:
1718 * @obj: Self
1719 * @choices: list of choices.
1720 * @char_alignment: Character alignment.
1721 * @err: Error propagation and reporting
1723 * Suggest a list of choices to the user. The suggestions are viewed
1724 * at char_alignment which should be the beginning of the completed word.
1725 * If choices is NULL, and assist_end signal
1726 * will occur
1729 void suggest (List<const gchar*> choices, IAnjutaIterable *position, int char_alignment);
1731 /** ianjuta_editor_assist_hide_suggestions
1732 * @obj: Self
1733 * @err: Error propagation and reporting
1735 * Hide current suggestions but do not emit assist_end signal.
1736 * This is useful when temporary waiting for more context
1738 void hide_suggestions ();
1741 * ianjuta_editor_assist_tip:
1742 * @obj: Self
1743 * @tips: list of alternative tips.
1744 * @char_alignment: Character alignment.
1745 * @err: Error propagation and reporting
1747 * Show tips showing more information on current context. No user feedback
1748 * is required when tips are shown. @char_alignment indicates
1749 * the position before which is the known context and after which are
1750 * the suggestions. Usually the editor would use this to
1751 * align the choices displayed such that the carat is just at this
1752 * position when the choices are displayed.
1755 void show_tips (List<const gchar*> tips, IAnjutaIterable *position, gint char_alignment);
1758 * ianjuta_editor_assist_cancel_tip:
1759 * @obj: Self
1760 * @err: Error propagation and reporting
1762 * Cancels the last shown tooltip
1764 void cancel_tips ();
1767 * ianjuta_editor_assist_get_suggestions:
1768 * @obj: Self
1769 * @context: The context for the suggestions.
1770 * @err: Error propagation and reporting
1772 * Usually the editor might have some suggestions to make
1773 * for a context. For example in a simple word completion context.
1774 * If the editor has no suggestions to make, it returns NULL.
1776 * Returns: A list of suggestions for the given context or NULL
1777 * if there is nothing to suggest.
1779 * Returns: A list of dynamically allocated strings. The whole
1780 * list, including the the strings should be freed when done.
1782 List<const gchar*> get_suggestions (const gchar *context);
1786 * SECTION:ianjuta-editor-hover
1787 * @title: IAnjutaEditorHover
1788 * @short_description: Text editor hover interface
1789 * @see_also:
1790 * @stability: Unstable
1791 * @include: libanjuta/interfaces/ianjuta-editor-hover
1794 interface IAnjutaEditorHover
1796 #include <libanjuta/interfaces/ianjuta-iterable.h>
1798 void ::hover_over (GObject* position);
1799 void ::hover_leave (GObject* position);
1801 void display (IAnjutaIterable* position, const gchar *info);
1805 * SECTION:ianjuta-editor-language
1806 * @title: IAnjutaEditorLanguage
1807 * @short_description: Text editor language interface
1808 * @see_also:
1809 * @stability: Unstable
1810 * @include: libanjuta/interfaces/ianjuta-editor-language.h
1813 interface IAnjutaEditorLanguage
1815 void ::language_changed (const gchar *language);
1818 * ianjuta_editor_language_get_supported_languages:
1819 * @obj: Self
1820 * @err: Error propagation and reporting
1822 * Return a list of languages supported by the editor
1823 * Note: These list contains the names in the form
1824 * the editor implementation knows them
1828 const List<const gchar*> get_supported_languages ();
1831 * ianjuta_editor_language_name:
1832 * @obj: Self
1833 * @err: Error propagation and reporting
1835 * FIXME
1839 const gchar *get_language_name (const gchar* language);
1842 * ianjuta_editor_language_get_language:
1843 * @obj: Self
1844 * @err: Error propagation and reporting
1846 * Return the name of the currently used language
1850 const gchar *get_language ();
1853 * ianjuta_editor_language_set_language:
1854 * @obj: Self
1855 * @err: Error propagation and reporting
1856 * @lang: Language
1858 * Force the editor to use a given language
1862 void set_language (const gchar* language);
1866 * SECTION:ianjuta-editor-folds
1867 * @title: IAnjutaEditorFolds
1868 * @short_description: Text editor folds inteface
1869 * @see_also:
1870 * @stability: Unstable
1871 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
1874 interface IAnjutaEditorFolds
1877 * ianjuta_editor_view_open_folds:
1878 * @obj: Self
1879 * @err: Error propagation and reporting
1881 * Open all folds
1884 void open_all ();
1887 * ianjuta_editor_view_close_folds:
1888 * @obj: Self
1889 * @err: Error propagation and reporting
1891 * Close all folds
1894 void close_all ();
1897 * ianjuta_editor_view_toggle_fold:
1898 * @obj: Self
1899 * @err: Error propagation and reporting
1901 * Open/Close current fold
1904 void toggle_current ();
1908 * SECTION:ianjuta-editor-view
1909 * @title: IAnjutaEditorView
1910 * @short_description: Text editor view interface
1911 * @see_also:
1912 * @stability: Unstable
1913 * @include: libanjuta/interfaces/ianjuta-editor-view.h
1915 * An editor view is a visual representation of the editor. An editor
1916 * can have multiple views. All views of an editor show the same editor
1917 * content (buffer). Consequently, any change done in one view is
1918 * updated in all other views.
1920 interface IAnjutaEditorView
1923 * ianjuta_editor_view_create:
1924 * @obj: Self
1925 * @err: Error propagation and reporting
1927 * Creates a new view for the editor. The newly created view gets
1928 * the user focus and scrolls to the same location as last view.
1930 void create ();
1933 * ianjuta_editor_view_remove_current:
1934 * @obj: Self
1935 * @err: Error propagation and reporting
1937 * Removes currently focused editor view. It does not remove the
1938 * last view of the editor. That is, if currently there is only
1939 * one view of the editor, this function does nothing.
1941 void remove_current ();
1944 * ianjuta_editor_view_get_count:
1945 * @obj: Self
1946 * @err: Error propagation and reporting
1948 * Total number of views currently present. It will never be less
1949 * than 1. Invalid return values are considered error condition.
1951 gint get_count ();
1955 * SECTION:ianjuta-editor-comment
1956 * @title: IAnjutaEditorComment
1957 * @short_description: Text editor comment interface
1958 * @see_also:
1959 * @stability: Unstable
1960 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
1963 interface IAnjutaEditorComment
1966 * ianjuta_editor_comment_block:
1967 * @obj: Self
1968 * @err: Error propagation and reporting
1970 * Comment/Uncomment out selected block
1972 void block();
1975 * ianjuta_editor_comment_box:
1976 * @obj: Self
1977 * @err: Error propagation and reporting
1979 * Comment/Uncomment out selected block
1981 void box();
1984 * ianjuta_editor_comment_stream:
1985 * @obj: Self
1986 * @err: Error propagation and reporting
1988 * Comment/Uncomment out selected block
1990 void stream();
1994 * SECTION:ianjuta-editor-zoom
1995 * @title: IAnjutaEditorZoom
1996 * @short_description: Text editor zoom interface
1997 * @see_also:
1998 * @stability: Unstable
1999 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
2002 interface IAnjutaEditorZoom
2005 * ianjuta_editor_zoom_in:
2006 * @obj: Self
2007 * @err: Error propagation and reporting
2009 * Zoom in
2011 void in ();
2014 * ianjuta_editor_zoom_out:
2015 * @obj: Self
2016 * @err: Error propagation and reporting
2018 * Zoom out
2020 void out ();
2024 * SECTION:ianjuta-editor-goto
2025 * @title: IAnjutaEditorGoto
2026 * @short_description: Text editor navigation interface
2027 * @see_also:
2028 * @stability: Unstable
2029 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
2032 interface IAnjutaEditorGoto
2035 * ianjuta_editor_goto_start_block()
2036 * @obj: Self
2037 * @err: Error propagation and reporting
2039 * Moves cursor to the start of the current block
2041 void start_block();
2044 * ianjuta_editor_goto_end_block()
2045 * @obj: Self
2046 * @err: Error propagation and reporting
2048 * Moves cursor to the end of the current block
2050 void end_block();
2053 * ianjuta_editor_goto_matching_brace()
2054 * @obj: Self
2055 * @err: Error propagation and reporting
2057 * Moves cursor to matching brace
2059 void matching_brace();
2065 * SECTION:ianjuta-editor-cell
2066 * @title: IAnjutaEditorCell
2067 * @short_description: Text editor character cell
2068 * @see_also:
2069 * @stability: Unstable
2070 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
2072 * Represents a cell in editor. A cell corresponds to a unicode
2073 * character along with all associated styles (such as colors and font).
2074 * A cell may or may not have style. If style is supported in the
2075 * editor, it is assumed all cells will have styles and hence every
2076 * IAnjutaEditorCell interface instance will have additionally
2077 * IAnjutaEditorCellStyle implemented.
2079 interface IAnjutaEditorCell
2081 #include <libanjuta/interfaces/ianjuta-editor.h>
2084 * ianjuta_editor_cell_get_character:
2085 * @obj: Self
2086 * @err: Error propagation and reporting
2088 * Returns the unicode character in this cell. A NULL terminated
2089 * string is returned that is the multibyte unicode character.
2090 * NULL is returned if the cell does not have any character.
2092 * Retruns: a newly created string representing the cell's unicode
2093 * character.
2095 gchar *get_character ();
2098 * ianjuta_editor_cell_get_length:
2099 * @obj: self
2100 * @err: Error propagation and reporting.
2102 * Gets the length of the cell in bytes. That is, length of the
2103 * unicode character.
2105 * Returns: Length of the unicode character.
2107 gint get_length ();
2110 * ianjuta_editor_cell_get_char:
2111 * @obj: Self
2112 * @err: Error propagation and reporting
2114 * Returns the byte of the unicode character in this cell at given
2115 * index @char_index. @char_index can vary from 0 to length of the
2116 * unicode string minus 1. Out of range index is not allowed
2117 * (asserted) and return is undefined.
2119 * Since there is dynamic allocation of unicode character string
2120 * involved in ianjuta_editor_cell_get_character(), this function
2121 * is mainly useful for fast iteration (such as copying data).
2123 * Retruns: a byte character.
2125 gchar get_char (gint char_index);
2127 IAnjutaEditorAttribute get_attribute ();
2130 * SECTION:ianjuta-editor-cell-style
2131 * @title: IAnjutaEditorCellStyle
2132 * @short_description: Text editor cell style interface
2133 * @see_also:
2134 * @stability: Unstable
2135 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
2138 interface IAnjutaEditorCellStyle
2140 gchar* get_font_description ();
2141 gchar* get_color();
2142 gchar* get_background_color();
2147 * SECTION:ianjuta-bookmark
2148 * @title: IAnjutaBookmark
2149 * @short_description: Bookmark interface
2150 * @see_also:
2151 * @stability: Unstable
2152 * @include: libanjuta/interfaces/ianjuta-bookmark.h
2155 interface IAnjutaBookmark
2158 * ianjuta_bookmark_toggle:
2159 * @obj: Self
2160 * @location: The location where bookmark is toggled.
2161 * @ensure_visible: If the location must be made visible.
2162 * @err: Error propagation and reporting
2164 * Toggle bookmark at given @location
2167 void toggle (gint location, gboolean ensure_visible);
2170 * ianjuta_bookmark_first:
2171 * @obj: Self
2172 * @err: Error propagation and reporting
2174 * Goto first bookmark
2177 void first ();
2180 * ianjuta_bookmark_last:
2181 * @obj: Self
2182 * @err: Error propagation and reporting
2184 * Goto last bookmark
2187 void last ();
2190 * ianjuta_bookmark_next:
2191 * @obj: Self
2192 * @err: Error propagation and reporting
2194 * Goto next bookmark
2197 void next ();
2200 * ianjuta_bookmark_previous:
2201 * @obj: Self
2202 * @err: Error propagation and reporting
2204 * Goto previous bookmark
2207 void previous ();
2210 * ianjuta_bookmark_clear_all:
2211 * @obj: Self
2212 * @err: Error propagation and reporting
2214 * Clear all bookmarks
2217 void clear_all ();
2221 * SECTION:ianjuta-editor-factory
2222 * @title: IAnjutaEditorFactory
2223 * @short_description: Text editor factory that creates IAnjutaEditor objects
2224 * @see_also:
2225 * @stability: Unstable
2226 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2229 interface IAnjutaEditorFactory
2231 #include "ianjuta-editor.h"
2234 * ianjuta_editor_factory_new_editor:
2235 * @obj: Self
2236 * @uri: Uri to open
2237 * @filename: filename to open
2238 * @err: Error propagation and reporting
2240 * Get a new GtkWidget* which implements IAnjutaEditor
2242 * Return value: An object implementing IAnjutaEditor
2244 IAnjutaEditor* new_editor (const gchar* uri, const gchar* filename);
2248 * SECTION:ianjuta-document-manager
2249 * @title: IAnjutaDocumentManager
2250 * @short_description: Interface for plugin that manages all the editors
2251 * @see_also:
2252 * @stability: Unstable
2253 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2256 interface IAnjutaDocumentManager
2258 #include "ianjuta-document.h"
2259 #include "ianjuta-editor.h"
2261 enum Error
2263 DOESNT_EXIST
2267 * ianjuta_document_manager_get_uri:
2268 * @obj: Self
2269 * @file: short filename
2270 * @err: Error propagation and reporting.
2272 * Given the short filename, finds the URI of the file, if the
2273 * editor that has it loaded is found. If there is no editor that has
2274 * this file opened, returns NULL.
2276 * Return value: the URI of the file, if an editor is found for it.
2278 gchar* get_uri (const gchar *file);
2281 * ianjuta_document_manager_find_document_with_uri:
2282 * @obj: Self
2283 * @uri: the file uri.
2284 * @err: Error propagation and reporting.
2286 * Finds the document that has the file with URI @uri loaded. Only
2287 * the editor that matches the URI will be searched.
2289 * Return value: the document that corresponds to given URI. NULL if
2290 * there is no editor loaded with this URI.
2292 IAnjutaDocument* find_document_with_uri (const gchar *uri);
2295 * ianjuta_document_manager_goto_uri_line:
2296 * @obj: Self
2297 * @uri: URI of the file to go to.
2298 * @lineno: the line number in the file to go to.
2299 * @err: Error propagation and reporting.
2301 * Loads the given file if not loaded yet, set its editor as current editor
2302 * and moves cursor to the given line in the editor.
2304 * Return value: the editor where the mark has been put. NULL if none.
2306 IAnjutaEditor* goto_uri_line (const gchar *uri, gint lineno);
2308 /**
2309 * ianjuta_document_manager_goto_uri_line_mark:
2310 * @obj: Self
2311 * @uri: URI of the file to go to.
2312 * @lineno: the line number in the file to go to.
2313 * @mark: TRUE if the line should be marked with a marker.
2314 * @err: Error propagation and reporting
2316 * Loads the given file if not loaded yet, set its editor as current editor
2317 * and moves cursor to the given line in the editor. Optionally also marks
2318 * the line with line marker if @mark is given TRUE.
2320 * Return value: the editor where the mark has been put. NULL if none.
2322 IAnjutaEditor* goto_uri_line_mark (const gchar *uri, gint lineno, gboolean mark);
2325 * ianjuta_document_manager_get_current_document:
2326 * @obj: Self
2327 * @err: Error propagation and reporting.
2329 * Gets the current document.
2331 * Return value: the currently active document. NULL if none is there.
2333 IAnjutaDocument* get_current_document ();
2335 /**
2336 * ianjuta_document_manager_set_current_document:
2337 * @obj: Self
2338 * @document: the document to set as current.
2339 * @err: Error propagation and reporting.
2341 * Sets the given document as current document.
2343 void set_current_document (IAnjutaDocument *document);
2346 * ianjuta_document_manager_get_doc_widgets:
2347 * @obj: Self
2348 * @err: Error propagation and reporting.
2350 * Gets a list of widgets for open documents. Each widget is
2351 * a GTK_WIDGET(InjutaDocument*)
2353 * Return value: a list of widgets for all open documents
2354 * The returned list (but not the data in the list) must be
2355 * freed after use.
2357 List<GtkWidget*> get_doc_widgets ();
2360 * ianjuta_document_manager_add_buffer:
2361 * @obj: Self
2362 * @name: Name of the editor buffer.
2363 * @content: Initial content of the buffer.
2364 * @err: Error propagation and reporting.
2366 * Creates a new editor buffer of the given name and sets the given
2367 * content as its initial content.
2369 * Return value: the IAnjutaEditor instance that has been added.
2371 IAnjutaEditor* add_buffer (const gchar *name, const gchar* content);
2374 * ianjuta_document_manager_remove_document:
2375 * @obj: Self
2376 * @document: Document to close.
2377 * @save_before: If true, saves the document before closing.
2378 * @err: Error propagation and reporting.
2380 * Closes and removes the given document. If @save_before is TRUE, also
2381 * saves the document before closing.
2383 * Return value: TRUE if the document was removed, else FALSE.
2385 gboolean remove_document (IAnjutaDocument *document, gboolean save_before);
2388 * ianjuta_document_manager_add_document:
2389 * @obj: Self
2390 * @document: the document to add
2391 * @err: Error propagation and reporting.
2393 * Adds a document to the document manager. This will open a new
2394 * Notebook tab and show the document there
2397 void add_document (IAnjutaDocument* document);
2402 * SECTION:ianjuta-message-view
2403 * @title: IAnjutaMessageView
2404 * @short_description: A view where messages of different kind can be shown
2405 * @see_also:
2406 * @stability: Unstable
2407 * @include: libanjuta/interfaces/ianjuta-message-view.h
2410 interface IAnjutaMessageView
2412 enum Type
2414 TYPE_NORMAL,
2415 TYPE_INFO,
2416 TYPE_WARNING,
2417 TYPE_ERROR
2421 * IAnjutaMessageView::message_clicked:
2422 * @obj: Self
2423 * @message: fixme
2424 * @err: Error propagation and reporting.
2426 * fixme
2428 void ::message_clicked (const gchar *message);
2430 /**
2431 * IAnjutaMessageView::buffer_flushed:
2432 * @obj: Self
2433 * @line: fixme
2434 * @err: Error propagation and reporting.
2436 * fixme
2438 void ::buffer_flushed (const gchar *line);
2441 * ianjuta_message_view_buffer_append:
2442 * @obj: Self
2443 * @text: fixme
2444 * @err: Error propagation and reporting.
2446 * fixme
2448 void buffer_append (const gchar *text);
2451 * ianjuta_message_view_append:
2452 * @obj: Self
2453 * @type: fixme
2454 * @summary: fixme
2455 * @details: fixme
2456 * @err: Error propagation and reporting.
2458 * fixme
2460 void append (Type type, const gchar *summary, const gchar *details);
2463 * ianjuta_message_view_clear:
2464 * @obj: Self
2465 * @err: Error propagation and reporting.
2467 * fixme
2469 void clear ();
2472 * ianjuta_message_view_select_next:
2473 * @obj: Self
2474 * @err: Error propagation and reporting.
2476 * fixme
2478 void select_next ();
2481 * ianjuta_message_view_select_previous:
2482 * @obj: Self
2483 * @err: Error propagation and reporting.
2485 * fixme
2487 void select_previous ();
2490 * ianjuta_message_view_get_current_message:
2491 * @obj: Self
2492 * @err: Error propagation and reporting.
2494 * fixme
2496 const gchar* get_current_message ();
2499 * ianjuta_message_view_get_all_messages:
2500 * @obj: Self
2501 * @err: Error propagation and reporting.
2503 * fixme
2505 List<const gchar*> get_all_messages ();
2509 * SECTION:ianjuta-message-manager
2510 * @title: IAnjutaMessageManager
2511 * @short_description: The plugin that managers all message views
2512 * @see_also:
2513 * @stability: Unstable
2514 * @include: libanjuta/interfaces/ianjuta-message-manager.h
2517 interface IAnjutaMessageManager
2519 #include "ianjuta-message-view.h"
2521 enum Error
2523 DOESNT_EXIST
2526 * ianjuta_message_manager_add_view:
2527 * @obj: Self
2528 * @name: Name/Title of the new view
2529 * @icon: Path to an icon or ""
2530 * @err: Error propagation and reporting
2532 * Adds a new view to the message-manager
2534 * Return value: The new message-view
2536 IAnjutaMessageView* add_view (const gchar *name, const gchar *icon);
2539 * ianjuta_message_manager_remove_view:
2540 * @obj: Self
2541 * @view: The view to remove
2542 * @err: Error propagation and reporting
2544 * Remove view from the message-manager. The view
2545 * will become invalid.
2547 void remove_view (IAnjutaMessageView *view);
2550 * ianjuta_message_manager_get_current_view:
2551 * @obj: Self
2552 * @err: Error propagation and reporting
2554 * Get the view with is currently on top of
2555 * the notebook or NULL if the message-manager is empty.
2557 * Return value: Current view; #IAnjutaMessageView object.
2558 * NULL, if there is no views.
2560 IAnjutaMessageView* get_current_view ();
2563 * ianjuta_message_manager_get_view_by_name:
2564 * @obj: Self
2565 * @name: Name/Title of the view
2566 * @err: Error propagation and reporting
2568 * Get the view with the given name or NULL if
2569 * it does not exist.
2571 * Return value: The message-view or NULL
2573 IAnjutaMessageView* get_view_by_name (const gchar *name);
2576 * ianjuta_message_manager_get_all_views:
2577 * @obj: Self
2578 * @err: Error propagation and reporting
2580 * Get all message-views
2582 * Return value: A GList* of all views. You must not
2583 * manipulate the list.
2585 List<IAnjutaMessageView*> get_all_views ();
2588 * ianjuta_message_manager_set_current_view:
2589 * @obj: Self
2590 * @view: A message view
2591 * @err: Error propagation and reporting
2593 * Set view to be on top of the notebook.
2596 void set_current_view (IAnjutaMessageView *view);
2599 * ianjuta_message_manager_set_view_title:
2600 * @obj: Self
2601 * @view: A message view
2602 * @title: Sets the title of view.
2603 * @err: Error propagation and reporting
2605 * Sets the title of view.
2608 void set_view_title (IAnjutaMessageView *view, const gchar *title);
2612 * SECTION:ianjuta-file-manager
2613 * @title: IAnjutaFileManager
2614 * @short_description: File manager plugin
2615 * @see_also:
2616 * @stability: Unstable
2617 * @include: libanjuta/interfaces/ianjuta-file-manager.h
2620 interface IAnjutaFileManager
2624 * IAnjutaFileManager::section_changed:
2625 * @obj: Self
2626 * @err: Error propagation and reporting.
2628 * fixme
2630 void ::section_changed (const gchar *uri);
2633 * ianjuta_file_manager_set_root:
2634 * @obj: Self
2635 * @root_uri: fixme
2636 * @err: Error propagation and reporting.
2638 * fixme
2640 void set_root (const gchar *root_uri);
2643 * ianjuta_file_manager_get_selected:
2644 * @obj: Self
2645 * @err: Error propagation and reporting.
2647 * fixme
2649 gchar* get_selected ();
2652 * ianjuta_file_manager_set_selected:
2653 * @obj: Self
2654 * @uri: fixme
2655 * @err: Error propagation and reporting.
2657 * fixme.
2659 void set_selected (const gchar *uri);
2663 * SECTION:ianjuta-terminal
2664 * @title: IAnjutaTerminal
2665 * @short_description: Interface for command line terminals
2666 * @see_also:
2667 * @stability: Unstable
2668 * @include: libanjuta/interfaces/ianjuta-terminal.h
2671 interface IAnjutaTerminal
2673 #include <sys/types.h>
2676 * IAnjutaDebugManager::child_exited:
2677 * @obj: Self
2678 * @pid: pid of terminated child
2679 * @status: status of terminated child as returned by waitpid
2681 * This signal is emitted when a child exit.
2683 void ::child_exited (gint pid, gint status);
2687 * ianjuta_terminal_execute_command:
2688 * @obj: Self
2689 * @directory: Working directory
2690 * @command: Command executed followed by arguments
2691 * @environment: List of additional environment variables
2692 * @err: Error propagation and reporting.
2694 * Run the command in a terminal, setting the working directory
2695 * and environment variables.
2697 * Returns: Process ID
2699 pid_t execute_command (const gchar* directory, const gchar *command, gchar **environment);
2703 * SECTION:ianjuta-project-manager
2704 * @title: IAnjutaProjectManager
2705 * @short_description: Interface for project managers
2706 * @see_also:
2707 * @stability: Unstable
2708 * @include: libanjuta/interfaces/ianjuta-project-manager.h
2711 interface IAnjutaProjectManager
2714 * IANJUTA_PROJECT_MANAGER_PROJECT_ROOT_URI
2716 * Anjuta shell value set by project manager to the project root uri.
2718 #define PROJECT_ROOT_URI "project_root_uri"
2721 * IANJUTA_PROJECT_MANAGER_CURRENT_URI
2723 * Anjuta shell value set by project manager to the current uri.
2725 #define CURRENT_URI "project_manager_current_uri"
2727 enum ElementType
2729 UNKNOWN,
2730 SOURCE,
2731 TARGET,
2732 GROUP
2735 enum TargetType
2737 TARGET_UNKNOWN,
2738 TARGET_SHAREDLIB,
2739 TARGET_STATICLIB,
2740 TARGET_EXECUTABLE
2743 enum Capabilities
2745 CAN_ADD_NONE = 0,
2746 CAN_ADD_GROUP = 1 << 0,
2747 CAN_ADD_TARGET = 1 << 1,
2748 CAN_ADD_SOURCE = 1 << 2
2751 // Signals
2754 * IAnjutaProjectManager::element_added:
2755 * @obj: Self
2756 * @element_uri: fixme
2757 * @err: Error propagation and reporting.
2759 * fixme
2761 void ::element_added (const gchar *element_uri);
2763 /**
2764 * IAnjutaProjectManager::element_removed:
2765 * @obj: Self
2766 * @element_uri: fixme
2767 * @err: Error propagation and reporting.
2769 * fixme
2771 void ::element_removed (const gchar *element_uri);
2774 * IAnjutaProjectManager::element_selected:
2775 * @obj: Self
2776 * @element_uri: fixme
2777 * @err: Error propagation and reporting.
2779 * fixme
2781 void ::element_selected (const gchar *element_uri);
2783 // Methods
2786 * ianjuta_project_manager_get_element_type:
2787 * @obj: Self
2788 * @element_uri: fixme
2789 * @err: Error propagation and reporting.
2791 * fixme
2793 * Returns: fixme
2795 ElementType get_element_type (const gchar *element_uri);
2798 * ianjuta_project_manager_get_elements:
2799 * @obj: Self
2800 * @element_type: fixme
2801 * @err: Error propagation and reporting.
2803 * fixme
2805 * Returns: fixme
2807 List<const gchar*> get_elements (ElementType element_type);
2810 * ianjuta_project_manager_get_target_type:
2811 * @obj: Self
2812 * @target_uri: fixme
2813 * @err: Error propagation and reporting.
2815 * fixme
2817 * Returns: fixme
2819 TargetType get_target_type (const gchar *target_uri);
2822 * ianjuta_project_manager_get_targets:
2823 * @obj: Self
2824 * @target_type: fixme
2825 * @err: Error propagation and reporting.
2827 * fixme
2829 * Returns: fixme
2831 List<const gchar*> get_targets (TargetType target_type);
2834 * ianjuta_project_manager_get_parent:
2835 * @obj: Self
2836 * @element_uri: fixme
2837 * @err: Error propagation and reporting.
2839 * fixme
2841 * Returns: fixme
2843 gchar* get_parent (const gchar *element_uri);
2846 * ianjuta_project_manager_get_children:
2847 * @obj: Self
2848 * @element_uri: fixme
2849 * @err: Error propagation and reporting.
2851 * fixme
2853 * Returns: fixme
2855 List<const gchar*> get_children (const gchar *element_uri);
2858 * ianjuta_project_manager_get_selected:
2859 * @obj: Self
2860 * @err: Error propagation and reporting.
2862 * fixme
2864 gchar* get_selected ();
2867 * ianjuta_project_manager_get_capabilities:
2868 * @obj: Self
2869 * @err: Error propagation and reporting.
2871 * Returns the capabilites of project whether it can add group, target
2872 * sources etc.
2874 * Returns: Supported capabilites.
2876 Capabilities get_capabilities ();
2879 * ianjuta_project_manager_add_source:
2880 * @obj: Self
2881 * @source_uri_to_add: fixme
2882 * @default_location_uri: fixme
2883 * @err: Error propagation and reporting.
2885 * Prompt the user to add a file to the project. If the user selects
2886 * multiple files only the first uri is returned.
2888 * Returns: element URIs. Must be freed when no longer required.
2890 gchar* add_source (const gchar *source_uri_to_add, const gchar *default_location_uri);
2893 * ianjuta_project_manager_add_sources:
2894 * @obj: Self
2895 * @source_uris_to_add: fixme
2896 * @default_location_uri: fixme
2897 * @err: Error propagation and reporting.
2899 * Prompt the user to add a file to the project. If the user selects
2900 * multiple files only the first uri is returned.
2902 * Returns: element URIs. Must be freed when no longer required.
2904 List<const gchar*> add_sources (List<const gchar*> source_uri_to_add, const gchar *default_location_uri);
2907 * ianjuta_project_manager_add_target:
2908 * @obj: Self
2909 * @target_name_to_add: fixme
2910 * @default_location_uri: fixme
2911 * @err: Error propagation and reporting.
2913 * fixme
2915 * Returns:
2917 gchar* add_target (const gchar *target_name_to_add, const gchar *default_location_uri);
2920 * ianjuta_project_manager_add_group:
2921 * @obj: Self
2922 * @group_name_to_add: fixme
2923 * @default_location_uri: fixme
2924 * @err: Error propagation and reporting.
2926 * fixme
2928 * Returns: fixme
2930 gchar* add_group (const gchar *group_name_to_add, const gchar *default_location_uri);
2933 * ianjuta_project_manager_is_open:
2934 * @obj: Self
2935 * @err: Error propagation and reporting.
2937 * fixme
2939 gboolean is_open ();
2942 * ianjuta_project_manager_get_packages
2943 * @obj: Self
2944 * @err: Error propagation and reporting.
2946 * Returns: the list of pkg-config packages that this projects
2947 * requires in it's configure.ac or NULL
2949 List<gchar*> get_packages();
2953 * SECTION:ianjuta-todo
2954 * @title: IAnjutaTodo
2955 * @short_description: Task manager interface
2956 * @see_also:
2957 * @stability: Unstable
2958 * @include: libanjuta/interfaces/ianjuta-todo.h
2961 interface IAnjutaTodo
2965 * ianjuta_to_do_load:
2966 * @obj: Self
2967 * @uri: fixme
2968 * @err: Error propagation and reporting.
2970 * fixme
2972 void load(const gchar *uri);
2976 * SECTION:ianjuta-wizard
2977 * @title: IAnjutaWizard
2978 * @short_description: Interface for wizards that can create new stuffs
2979 * @see_also:
2980 * @stability: Unstable
2981 * @include: libanjuta/interfaces/ianjuta-wizard.h
2984 interface IAnjutaWizard
2988 * ianjuta_wizard_activate:
2989 * @obj: Self
2990 * @err: Error propagation and reporting.
2992 * fixme
2994 void activate();
2998 * SECTION:ianjuta-debugger
2999 * @title: IAnjutaDebugger
3000 * @short_description: Debugger interface
3001 * @see_also:
3002 * @stability: Unstable
3003 * @include: libanjuta/interfaces/ianjuta-debugger.h
3006 interface IAnjutaDebugger
3008 #include "ianjuta-message-view.h"
3009 #include <libanjuta/anjuta-error.h>
3010 #include <sys/types.h>
3012 /* Types */
3013 enum Error
3015 OK = 0,
3016 NOT_READY,
3017 NOT_RUNNING,
3018 NOT_STOPPED,
3019 NOT_LOADED,
3020 NOT_STARTED,
3021 NOT_CONNECTED,
3022 NOT_IMPLEMENTED,
3023 CANCEL,
3024 UNABLE_TO_CREATE_VARIABLE,
3025 UNABLE_TO_ACCESS_MEMORY,
3026 UNABLE_TO_OPEN_FILE,
3027 UNSUPPORTED_FILE_TYPE,
3028 UNSUPPORTED_VERSION,
3029 UNABLE_TO_FIND_DEBUGGER,
3030 ALREADY_DONE,
3031 PROGRAM_NOT_FOUND,
3032 UNKNOWN_ERROR,
3033 OTHER_ERROR
3036 enum Data
3038 INFORMATION,
3039 BREAKPOINT,
3040 FRAME,
3041 VARIABLE,
3042 REGISTER
3045 enum OutputType
3047 OUTPUT,
3048 WARNING_OUTPUT,
3049 ERROR_OUTPUT,
3050 INFO_OUTPUT
3053 enum State
3055 BUSY,
3056 STOPPED,
3057 STARTED,
3058 PROGRAM_LOADED,
3059 PROGRAM_STOPPED,
3060 PROGRAM_RUNNING
3063 struct Frame
3065 gint thread;
3066 guint level;
3067 gchar *args;
3068 gchar *file;
3069 guint line;
3070 gchar *function;
3071 gchar *library;
3072 gulong address;
3075 /* Call back functions */
3076 typedef void (*Callback) (const gpointer data, gpointer user_data, GError* err);
3077 typedef void (*GListCallback) (const GList* list, gpointer user_data, GError* err);
3078 typedef void (*GCharCallback) (const gchar *value, gpointer user_data, GError* err);
3079 typedef void (*OutputCallback) (OutputType type, const gchar *output, gpointer user_data);
3080 typedef void (*MemoryCallback) (gulong address, guint length, const gchar *data, gpointer user_data, GError *err);
3082 /* Signals */
3085 * IAnjutaDebugger::debugger_started:
3086 * @obj: Self
3088 * fixme
3090 void ::debugger_started ();
3093 * IAnjutaDebugger::debugger_stopped:
3094 * @obj: Self
3095 * @err: Error propagation and reporting.
3097 * fixme
3099 void ::debugger_stopped (GError *err);
3102 * IAnjutaDebugger::program_loaded:
3103 * @obj: Self
3105 * fixme
3107 void ::program_loaded ();
3110 * IAnjutaDebugger::program_running:
3111 * @obj: Self
3113 * fixme
3115 void ::program_running ();
3118 * IAnjutaDebugger::program_stopped:
3119 * @obj: Self
3121 * fixme
3123 void ::program_stopped ();
3126 * IAnjutaDebugger::program_exited:
3127 * @obj: Self
3129 * fixme
3131 void ::program_exited ();
3134 * IAnjutaDebugger::sharedlib_event:
3135 * @obj: Self
3137 * fixme
3139 void ::sharedlib_event ();
3142 * IAnjutaDebugger::program_moved:
3143 * @obj: Self
3144 * @pid: process id, 0 when unknown
3145 * @tid: thread id, 0 when unknown
3146 * @address: program counter address, 0 when unknown
3147 * @file: source file where is the program counter, NULL when unknown
3148 * @line: line number if file name above is not NULL
3150 * This signal is emitted when the debugger know the current program
3151 * location. Most of the time, after the program has stopped but it
3152 * could happen even if it is still running.
3154 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
3157 * IAnjutaDebugger::frame_changed:
3158 * @obj: Self
3159 * @frame: fixme
3160 * @thread: thread
3162 * fixme
3164 void ::frame_changed (guint frame, gint thread);
3167 * IAnjutaDebugger::signal_received:
3168 * @obj: Self
3169 * @name: Signal name
3170 * @description: Signal description
3172 * fixme
3174 void ::signal_received (const gchar* name, const gchar* description);
3177 * IAnjutaDebugger::debugger_ready:
3178 * @obj: Self
3179 * @status: fixme
3181 * fixme
3183 void ::debugger_ready (State state);
3187 * ianjuta_debugger_get_state:
3188 * @obj: Self
3189 * @err: Error propagation and reporting.
3191 * fixme
3193 * Returns: fixme
3195 State get_state ();
3201 * ianjuta_debugger_load:
3202 * @obj: Self
3203 * @file: fixme
3204 * @mime_type: fixme
3205 * @source_search_directories: fixme
3206 * @terminal: fixme
3207 * @err: Error propagation and reporting.
3209 * fixme
3211 * Returns: TRUE if sucessful, other FALSE.
3213 gboolean load (const gchar *file, const gchar *mime_type, const List<const gchar*> source_search_directories);
3216 * ianjuta_debugger_attach:
3217 * @obj: Self
3218 * @pid: fixme
3219 * @source_search_directories: fixme
3220 * @err: Error propagation and reporting.
3222 * fixme
3224 * Returns: TRUE if sucessful, other FALSE.
3226 gboolean attach (pid_t pid, const List<const gchar*> source_search_directories);
3229 * ianjuta_debugger_set_working_directory:
3230 * @obj: Self
3231 * @dir: working program directory
3232 * @err: Error propagation and reporting.
3234 * Set program working directory.
3236 * Returns: TRUE if sucessful, other FALSE.
3238 gboolean set_working_directory (const gchar *dir);
3241 * ianjuta_debugger_set_environment:
3242 * @obj: Self
3243 * @env: List environment variable
3244 * @err: Error propagation and reporting
3246 * Set environment variable
3248 * Returns: TRUE if sucessfull, other FALSE.
3250 gboolean set_environment (gchar **env);
3253 * ianjuta_debugger_start:
3254 * @obj: Self
3255 * @args: command line argument of the program
3256 * @terminal: TRUE if the program need a terminal
3257 * @stop: TRUE if program is stopped at the beginning
3258 * @err: Error propagation and reporting.
3260 * Start a loaded program under debugger control.
3262 * Returns: TRUE if sucessful, other FALSE.
3264 gboolean start (const gchar *args, gboolean terminal, gboolean stop);
3267 * ianjuta_debugger_unload:
3268 * @obj: Self
3269 * @err: Error propagation and reporting.
3271 * fixme
3273 * Returns: fixme
3275 gboolean unload ();
3278 * ianjuta_debugger_quit:
3279 * @obj: Self
3280 * @err: Error propagation and reporting.
3282 * Quit the debugger, can wait until the debugger is ready.
3284 * Returns: TRUE if sucessful, other FALSE.
3286 gboolean quit ();
3289 * ianjuta_debugger_abort:
3290 * @obj: Self
3291 * @err: Error propagation and reporting.
3293 * Quit the debugger as fast as possible.
3295 * Returns: TRUE if sucessful, other FALSE.
3297 gboolean abort ();
3300 * ianjuta_debugger_run:
3301 * @obj: Self
3302 * @err: Error propagation and reporting.
3304 * fixme
3306 * Returns: fixme
3308 gboolean run ();
3311 * ianjuta_debugger_step_in:
3312 * @obj: Self
3313 * @err: Error propagation and reporting.
3315 * fixme
3317 * Returns: fixme
3319 gboolean step_in ();
3322 * ianjuta_debugger_step_over:
3323 * @obj: Self
3324 * @err: Error propagation and reporting.
3326 * fixme
3328 * Returns: fixme
3330 gboolean step_over ();
3333 * ianjuta_debugger_step_out:
3334 * @obj: Self
3335 * @err: Error propagation and reporting.
3337 * fixme
3339 * Returns: fixme
3341 gboolean step_out ();
3344 * ianjuta_debugger_run_to:
3345 * @obj: Self
3346 * @uri: fixme
3347 * @line: fixme
3348 * @err: Error propagation and reporting.
3350 * fixme
3352 * Returns: fixme
3354 gboolean run_to (const gchar *uri, gint line);
3357 * ianjuta_debugger_exit:
3358 * @obj: Self
3359 * @err: Error propagation and reporting.
3361 * fixme
3363 * Returns: fixme
3365 gboolean exit ();
3368 * ianjuta_debugger_interrupt:
3369 * @obj: Self
3370 * @err: Error propagation and reporting.
3372 * fixme
3374 * Returns: fixme
3376 gboolean interrupt ();
3381 * ianjuta_debugger_inspect:
3382 * @obj: Self
3383 * @name: fixme
3384 * @callback: fixme
3385 * @user_data: fixme
3386 * @err: Error propagation and reporting.
3388 * fixme
3390 * Returns: fixme
3392 gboolean inspect (const gchar* name, Callback callback, gpointer user_data);
3395 * ianjuta_debugger_evaluate:
3396 * @obj: Self
3397 * @name: fixme
3398 * @value: fixme
3399 * @callback: fixme
3400 * @user_data: fixme
3401 * @err: Error propagation and reporting.
3403 * fixme
3405 * Returns: fixme
3407 gboolean evaluate (const gchar* name, const gchar* value, Callback callback, gpointer user_data);
3410 * ianjuta_debugger_print:
3411 * @obj: Self
3412 * @variable: fixme
3413 * @callback: fixme
3414 * @user_data: fixme
3415 * @err: Error propagation and reporting.
3417 * fixme
3419 * Returns: fixme
3421 gboolean print (const gchar *variable, Callback callback, gpointer user_data);
3424 * ianjuta_debugger_list_local:
3425 * @obj: Self
3426 * @callback: fixme
3427 * @user_data: fixme
3428 * @err: Error propagation and reporting.
3430 * fixme
3432 * Returns: fixme
3434 gboolean list_local (Callback callback, gpointer user_data);
3437 * ianjuta_debugger_list_argument:
3438 * @obj: Self
3439 * @callback: fixme
3440 * @user_data: fixme
3441 * @err: Error propagation and reporting.
3443 * fixme
3445 * Returns: fixme
3447 gboolean list_argument (Callback callback, gpointer user_data);
3450 * ianjuta_debugger_info_signal:
3451 * @obj: Self
3452 * @callback: fixme
3453 * @user_data: fixme
3454 * @err: Error propagation and reporting.
3456 * fixme
3458 * Returns: fixme
3460 gboolean info_signal (Callback callback, gpointer user_data);
3463 * ianjuta_debugger_info_sharedlib:
3464 * @obj: Self
3465 * @callback: fixme
3466 * @user_data: fixme
3467 * @err: Error propagation and reporting.
3469 * fixme
3471 * Returns: fixme
3473 gboolean info_sharedlib (Callback callback, gpointer user_data);
3476 * ianjuta_debugger_handle_signal:
3477 * @obj: Self
3478 * @name: fixme
3479 * @stop: fixme
3480 * @print: fixme
3481 * @ignore: fixme
3482 * @err: Error propagation and reporting.
3484 * fixme
3486 * Returns: fixme
3488 gboolean handle_signal (const gchar *name, gboolean stop, gboolean print, gboolean ignore);
3491 * ianjuta_debugger_info_frame:
3492 * @obj: Self
3493 * @frame: fixme
3494 * @callback: fixme
3495 * @user_data: fixme
3496 * @err: Error propagation and reporting.
3498 * fixme
3500 * Returns: fixme
3502 gboolean info_frame (guint frame, Callback callback, gpointer user_data);
3505 * ianjuta_debugger_info_args:
3506 * @obj: Self
3507 * @callback: fixme
3508 * @user_data: fixme
3509 * @err: Error propagation and reporting.
3511 * fixme
3513 * Returns: fixme
3515 gboolean info_args (Callback callback, gpointer user_data);
3518 * ianjuta_debugger_info_target:
3519 * @obj: Self
3520 * @funx: fixme
3521 * @user_data: fixme
3522 * @err: Error propagation and reporting.
3524 * fixme
3526 * Returns: fixme
3528 gboolean info_target (Callback callback, gpointer user_data);
3531 * ianjuta_debugger_info_program:
3532 * @obj: Self
3533 * @callback: fixme
3534 * @user_data: fixme
3535 * @err: Error propagation and reporting.
3537 * fixme
3539 * Returns: fixme
3541 gboolean info_program (Callback callback, gpointer user_data);
3544 * ianjuta_debugger_info_udot:
3545 * @obj: Self
3546 * @callback: fixme
3547 * @user_data: fixme
3548 * @err: Error propagation and reporting.
3550 * fixme
3552 * Returns: fixme
3554 gboolean info_udot (Callback callback, gpointer user_data);
3558 * ianjuta_debugger_info_variables:
3559 * @obj: Self
3560 * @callback: fixme
3561 * @user_data: fixme
3562 * @err: Error propagation and reporting.
3564 * fixme
3566 * Returns: fixme
3568 gboolean info_variables (Callback callback, gpointer user_data);
3571 * ianjuta_debugger_list_frame:
3572 * @obj: Self
3573 * @callback: fixme
3574 * @user_data: fixme
3575 * @err: Error propagation and reporting.
3577 * fixme
3579 * Returns: fixme
3581 gboolean list_frame (Callback callback, gpointer user_data);
3584 * ianjuta_debugger_set_frame:
3585 * @obj: Self
3586 * @frame: fixme
3587 * @err: Error propagation and reporting.
3589 * fixme
3591 * Returns: fixme
3593 gboolean set_frame (guint frame);
3596 * ianjuta_debugger_list_thread:
3597 * @obj: Self
3598 * @callback: fixme
3599 * @user_data: fixme
3600 * @err: Error propagation and reporting.
3602 * fixme
3604 * Returns: fixme
3606 gboolean list_thread (Callback callback, gpointer user_data);
3609 * ianjuta_debugger_set_thread:
3610 * @obj: Self
3611 * @frame: fixme
3612 * @err: Error propagation and reporting.
3614 * fixme
3616 * Returns: fixme
3618 gboolean set_thread (gint thread);
3621 * ianjuta_debugger_info_threads:
3622 * @obj: Self
3623 * @thread: fixme
3624 * @callback: fixme
3625 * @user_data: fixme
3626 * @err: Error propagation and reporting.
3628 * fixme
3630 * Returns: fixme
3632 gboolean info_thread (gint thread, Callback callback, gpointer user_data);
3635 * ianjuta_debugger_list_register:
3636 * @obj: Self
3637 * @callback: fixme
3638 * @user_data: fixme
3639 * @err: Error propagation and reporting.
3641 * fixme
3643 * Returns: fixme
3645 gboolean list_register (Callback callback, gpointer user_data);
3648 * ianjuta_debugger_send_command:
3649 * @obj: Self
3650 * @command: fixme
3651 * @err: Error propagation and reporting.
3653 * fixme
3655 * Returns: fixme
3657 gboolean send_command (const gchar *command);
3660 * ianjuta_debugger_callback:
3661 * @obj: Self
3662 * @callback: fixme
3663 * @user_data: fixme
3664 * @err: Error propagation and reporting.
3666 * fixme
3668 * Returns: fixme
3670 gboolean callback (Callback callback, gpointer user_data);
3673 * ianjuta_debugger_enable_log:
3674 * @obj: Self
3675 * @log: fixme
3676 * @err: Error propagation and reporting.
3678 * fixme
3680 * Returns: fixme
3682 void enable_log (IAnjutaMessageView *log);
3685 * ianjuta_debugger_disable_log:
3686 * @obj: Self
3687 * @err: Error propagation and reporting.
3689 * fixme
3691 * Returns: fixme
3693 void disable_log ();
3696 * SECTION:ianjuta-debugger-breakpoint
3697 * @title: IAnjutaDebuggerBreakpoint
3698 * @short_description: Breakpoint Debugger interface
3699 * @see_also:
3700 * @stability: Unstable
3701 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
3704 interface IAnjutaDebuggerBreakpoint
3707 enum Type
3709 REMOVED = 1 << 0,
3710 UPDATED = 1 << 17,
3711 ON_LINE = 1 << 1,
3712 ON_ADDRESS = 1 << 2,
3713 ON_FUNCTION = 1 << 3,
3714 ON_READ = 1 << 4,
3715 ON_WRITE = 1 << 5,
3716 WITH_ENABLE = 1 << 16,
3717 WITH_IGNORE = 1 << 15,
3718 WITH_TIME = 1 << 11,
3719 WITH_CONDITION = 1 << 12,
3720 WITH_TEMPORARY = 1 << 13
3723 struct Item
3725 gint type;
3726 guint id;
3727 gchar *file;
3728 guint line;
3729 gchar *function;
3730 gulong address;
3731 gboolean enable;
3732 guint ignore;
3733 guint times;
3734 gchar *condition;
3735 gboolean temporary;
3738 enum Method
3740 SET_AT_ADDRESS = 1 << 0,
3741 SET_AT_FUNCTION = 1 << 1,
3742 ENABLE = 1 << 2,
3743 IGNORE = 1 << 3,
3744 CONDITION = 1 << 4
3748 * ianjuta_debugger_breakpoint_implement:
3749 * @obj: Self
3750 * @err: Error propagation and reporting.
3752 * Return all implemented methods.
3754 * Returns: A OR of IAnjutaDebuggerBreakpointMethod
3755 * corresponding to all implemented optional methods.
3757 gint implement ();
3760 * ianjuta_debugger_breakpoint_set_at_line:
3761 * @obj: Self
3762 * @file: File containing the breakpoint
3763 * @line: Line number where is the breakpoint
3764 * @callback: Callback to call when the breakpoint has been set
3765 * @user_data: User data that is passed back to the callback
3766 * @err: Error propagation and reporting.
3768 * Set a breakpoint at the specified line in the file.
3770 * Returns: TRUE if the request succeed and the callback is called. If
3771 * FALSE, the callback will not be called.
3773 gboolean set_at_line (const gchar* file, guint line, IAnjutaDebuggerCallback callback, gpointer user_data);
3777 * ianjuta_debugger_breakpoint_set_at_address:
3778 * @obj: Self
3779 * @address: Address of the breakpoint
3780 * @callback: Callback to call when the breakpoint has been set
3781 * @user_date: User data that is passed back to the callback
3782 * @err: Error propagation and reporting.
3784 * Set a breakpoint at the specified address.
3785 * This function is optional.
3787 * Returns: TRUE if the request succeed and the callback is called. If
3788 * FALSE, the callback will not be called.
3790 gboolean set_at_address (gulong address, IAnjutaDebuggerCallback callback, gpointer user_data);
3793 * ianjuta_debugger_breakpoint_set_at_function:
3794 * @obj: Self
3795 * @file: File containing the breakpoint
3796 * @function: Function name where the breakpoint is put
3797 * @callback: Callback to call when the breakpoint has been set
3798 * @user_data: User data that is passed back to the callback
3799 * @err: Error propagation and reporting.
3801 * Set a breakpoint at the beginning of the specified function.
3802 * This function is optional.
3804 * Returns: TRUE if the request succeed and the callback is called. If
3805 * FALSE, the callback will not be called.
3807 gboolean set_at_function (const gchar* file, const gchar* function, IAnjutaDebuggerCallback callback, gpointer user_data);
3810 * ianjuta_debugger_breakpoint_clear:
3811 * @obj: Self
3812 * @id: Breakpoint identification number
3813 * @callback: Callback to call when the breakpoint has been cleared
3814 * @user_data: User data that is passed back to the callback
3815 * @err: Error propagation and reporting.
3817 * Clear a breakpoint put by any set functions. The Id of the breakpoint
3818 * is given in the callback of the set functions.
3820 * Returns: TRUE if the request succeed and the callback is called. If
3821 * FALSE, the callback will not be called.
3823 gboolean clear (guint id, IAnjutaDebuggerCallback callback, gpointer user_data);
3826 * ianjuta_debugger_breakpoint_list:
3827 * @obj: Self
3828 * @callback: Callback to call with the list of breakpoints
3829 * @user_data: User data that is passed back to the callback
3830 * @err: Error propagation and reporting.
3832 * List all breakpoints set in the debugger. It is useful to
3833 * know how many time a breakpoint has been hit.
3835 * Returns: TRUE if the request succeed and the callback is called. If
3836 * FALSE, the callback will not be called.
3838 gboolean list (IAnjutaDebuggerCallback callback, gpointer user_data);
3841 * ianjuta_debugger_breakpoint_enable:
3842 * @obj: Self
3843 * @id: Breakpoint identification number
3844 * @enable: TRUE to enable the breakpoint, FALSE to disable it
3845 * @callback: Callback to call when the breakpoint has been changed
3846 * @user_data: User data that is passed back to the callback
3847 * @err: Error propagation and reporting.
3849 * Enable of disable a breakpoint. This function is optional.
3851 * Returns: TRUE if the request succeed and the callback is called. If
3852 * FALSE, the callback will not be called.
3854 gboolean enable (guint id, gboolean enable, IAnjutaDebuggerCallback callback, gpointer user_data);
3857 * ianjuta_debugger_breakpoint_ignore:
3858 * @obj: Self
3859 * @id: Breakpoint identification number
3860 * @ignore: Number of time a breakpoint must be ignored
3861 * @callback: Callback to call when the breakpoint has been changed
3862 * @user_data: User data that is passed back to the callback
3863 * @err: Error propagation and reporting.
3865 * This allow to ignore the breakpoint a number of time before stopping.
3866 * This function is optional.
3868 * Returns: TRUE if the request succeed and the callback is called. If
3869 * FALSE, the callback will not be called.
3871 gboolean ignore (guint id, guint ignore, IAnjutaDebuggerCallback callback, gpointer user_data);
3874 * ianjuta_debugger_breakpoint_condition:
3875 * @obj: Self
3876 * @id: Breakpoint identification number
3877 * @condition: fixme
3878 * @callback: Callback to call when the breakpoint has been changed
3879 * @user_data: User data that is passed back to the callback
3880 * @err: Error propagation and reporting.
3882 * Add a condition, evaluate in the program context, on the breakpoint,
3883 * the program will stop when it reachs the breakpoint only if the
3884 * condition is true. This function is optional.
3886 * Returns: TRUE if the request succeed and the callback is called. If
3887 * FALSE, the callback will not be called.
3889 gboolean condition (guint id, const gchar* condition, IAnjutaDebuggerCallback callback, gpointer user_data);
3893 * SECTION:ianjuta-debugger-variable
3894 * @title: IAnjutaDebuggerVariable
3895 * @short_description: Variables interface for debuggers
3896 * @see_also:
3897 * @stability: Unstable
3898 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
3900 * This interface is used to examine and change values of expression.
3901 * It is based on the MI2 variable object interface of gdb. A
3902 * variable needs to be created before being able to get or set its
3903 * value and list its children.
3905 interface IAnjutaDebuggerVariable
3907 struct Object
3909 gchar *name;
3910 gchar *expression;
3911 gchar *type;
3912 gchar *value;
3913 gboolean changed;
3914 gboolean exited;
3915 gboolean deleted;
3916 gint children;
3920 * ianjuta_debugger_variable_create:
3921 * @obj: Self
3922 * @expression: Variable expression
3923 * @callback: Callback to call when the variable has been created
3924 * @user_data: User data that is passed back to the callback
3925 * @err: Error propagation and reporting.
3927 * Create a new variable object in the current thread and frame.
3929 * Returns: TRUE if the request succeed and the callback is
3930 * called. If FALSE, the callback will not be called.
3932 gboolean create (const gchar *expression, IAnjutaDebuggerCallback callback, gpointer user_data);
3935 * ianjuta_debugger_variable_list_children:
3936 * @obj: Self
3937 * @name: Variable name
3938 * @callback: Callback to call when the children have been
3939 * created
3940 * @user_data: User data that is passed back to the callback
3941 * @err: Error propagation and reporting.
3943 * List and create objects for all children of a
3944 * variable object.
3946 * Returns: TRUE if the request succeed and the callback is
3947 * called. If FALSE, the callback will not be called.
3949 gboolean list_children (const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
3952 * ianjuta_debugger_variable_evaluate:
3953 * @obj: Self
3954 * @name: Variable name
3955 * @callback: Callback to call with the variable value
3956 * @user_data: User data that is passed back to the callback
3957 * @err: Error propagation and reporting.
3959 * Get the value of one variable or child object.
3961 * Returns: TRUE if the request succeed and the callback is
3962 * called. If FALSE, the callback will not be called.
3964 gboolean evaluate (const gchar *name, IAnjutaDebuggerCallback callback, gpointer user_data);
3967 * ianjuta_debugger_variable_assign:
3968 * @obj: Self
3969 * @name: Variable name
3970 * @value: Variable value
3971 * @err: Error propagation and reporting.
3973 * Set the value of one variable or child object.
3975 * Returns: TRUE if the request succeed and the callback is
3976 * called. If FALSE, the callback will not be called.
3978 gboolean assign (const gchar *name, const gchar *value);
3981 * ianjuta_debugger_variable_update:
3982 * @obj: Self
3983 * @callback: Callback to call with the list of all changed
3984 * variables
3985 * @user_data: User data that is passed back to the callback
3986 * @err: Error propagation and reporting.
3988 * List all changed variable objects since the last call.
3990 * Returns: TRUE if the request succeed and the callback is
3991 * called. If FALSE, the callback will not be called.
3993 gboolean update (IAnjutaDebuggerCallback callback, gpointer user_data);
3996 * ianjuta_debugger_variable_destroy:
3997 * @obj: Self
3998 * @name: Variable name
3999 * @err: Error propagation and reporting.
4001 * Delete a previously created variable or child object
4002 * including its own children.
4004 * Returns: TRUE if the request succeed and the callback is
4005 * called. If FALSE, the callback will not be called.
4007 gboolean destroy (const gchar *name);
4011 * SECTION:ianjuta-debugger-register
4012 * @title: IAnjutaDebuggerRegister
4013 * @short_description: Register interface for debuggers
4014 * @see_also:
4015 * @stability: Unstable
4016 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
4018 * This interface is used to examine and change values of CPU registers.
4020 interface IAnjutaDebuggerRegister
4023 struct Data
4025 guint num;
4026 gchar *name;
4027 gchar *value;
4031 * ianjuta_debugger_register_list:
4032 * @obj: Self
4033 * @callback: Callback to call with the register list
4034 * @user_data: User data that is passed back to the callback
4035 * @err: Error propagation and reporting.
4037 * List all registers of the target. This function can be called without
4038 * a program loaded, the value field of register structure is not filled.
4040 * Returns: TRUE if the request succeed and the callback is
4041 * called. If FALSE, the callback will not be called.
4043 gboolean list (IAnjutaDebuggerCallback callback, gpointer user_data);
4046 * ianjuta_debugger_register_update:
4047 * @obj: Self
4048 * @callback: Callback call with the list of all modified registers
4049 * @user_data: User data that is passed back to the callback
4050 * @err: Error propagation and reporting.
4052 * Return all modified registers since the last call. Only the num and
4053 * value field are used.
4055 * Returns: TRUE if the request succeed and the callback is
4056 * called. If FALSE, the callback will not be called.
4058 gboolean update (IAnjutaDebuggerCallback callback, gpointer user_data);
4061 * ianjuta_debugger_register_write:
4062 * @obj: Self
4063 * @value: Modified register with a new value
4064 * @err: Error propagation and reporting.
4066 * Change the value of one register. Only the num and value field are used.
4068 * Returns: TRUE if the request succeed.
4070 gboolean write (Data *value);
4074 * SECTION:ianjuta-debugger-memory
4075 * @title: IAnjutaDebuggerMemory
4076 * @short_description: Memory interface for debuggers
4077 * @see_also:
4078 * @stability: Unstable
4079 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
4081 * This interface is used to examine the target memory.
4083 interface IAnjutaDebuggerMemory
4085 struct Block
4087 gulong address;
4088 guint length;
4089 gchar *data;
4093 * ianjuta_debugger_memory_inspect:
4094 * @obj: Self
4095 * @address: Start address of the memory block
4096 * @length: Length of memory block
4097 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
4098 * @user_data: User data that is passed back to the callback
4099 * @err: Error propagation and reporting.
4101 * Read a block of the target memory.
4103 * Returns: TRUE if the request succeed and the callback is
4104 * called. If FALSE, the callback will not be called.
4106 gboolean inspect (gulong address, guint length, IAnjutaDebuggerCallback callback, gpointer user_data);
4110 * SECTION:ianjuta-debugger-instruction
4111 * @title: IAnjutaDebuggerInstruction
4112 * @short_description: Debugger interface for machine instruction
4113 * @see_also:
4114 * @stability: Unstable
4115 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
4117 * This interface is used to debuger as machine instruction level.
4119 interface IAnjutaDebuggerInstruction
4122 struct ALine
4124 gulong address;
4125 const gchar *label;
4126 const gchar *text;
4129 struct Disassembly
4131 guint size;
4132 ALine data[];
4136 * ianjuta_debugger_instruction_disassemble:
4137 * @obj: Self
4138 * @address: Start address of the memory block
4139 * @length: Length of memory block
4140 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
4141 * @user_data: User data that is passed back to the callback
4142 * @err: Error propagation and reporting.
4144 * Disassemble a part of the memory
4146 * Returns: TRUE if the request succeed and the callback is
4147 * called. If FALSE, the callback will not be called.
4149 gboolean disassemble (gulong address, guint length, IAnjutaDebuggerCallback callback, gpointer user_data);
4152 * ianjuta_debugger_instruction_step_in:
4153 * @obj: Self
4154 * @err: Error propagation and reporting.
4156 * Execute one assembler instruction in the program.
4158 * Returns: TRUE if the request succeed and the callback is called. If
4159 * FALSE, the callback will not be called.
4161 gboolean step_in ();
4164 * ianjuta_debugger_instruction_step_over:
4165 * @obj: Self
4166 * @err: Error propagation and reporting.
4168 * Execute one assembler instruction in the program, if the instruction
4169 * is a function call, continues until the function returns.
4171 * Returns: TRUE if the request succeed and the callback is called. If
4172 * FALSE, the callback will not be called.
4174 gboolean step_over ();
4177 * ianjuta_debugger_instruction_run_to_address:
4178 * @obj: Self
4179 * @address: Run to this addresss
4180 * @err: Error propagation and reporting.
4182 * Start the program until it reachs the address address
4184 * Returns: TRUE if the request succeed and the callback is called. If
4185 * FALSE, the callback will not be called.
4187 gboolean run_to_address (gulong address);
4193 * SECTION:ianjuta-debug-manager
4194 * @title: IAnjutaDebugManager
4195 * @short_description: Common graphical interface to all debugger
4196 * @see_also:
4197 * @stability: Unstable
4198 * @include: libanjuta/interfaces/ianjuta-debug-manager.h
4200 * This interface wrap the real debugger plugin and provide a
4201 * common graphical user interface.
4204 interface IAnjutaDebugManager
4206 #include "ianjuta-debugger.h"
4207 #include "ianjuta-debugger-breakpoint.h"
4209 /* Signals */
4212 * IAnjutaDebugManager::debugger_started:
4213 * @obj: Self
4215 * This signal is emitted when the debugger is started.
4217 void ::debugger_started ();
4220 * IAnjutaDebugManager::debugger_stopped:
4221 * @obj: Self
4222 * @err: Error propagation and reporting.
4224 * This signal is emitted when the debugger is stopped.
4226 void ::debugger_stopped (GError *err);
4229 * IAnjutaDebugManager::program_loaded:
4230 * @obj: Self
4232 * This signal is emitted when a program is loaded most of the
4233 * time just before the first program_stopped signal.
4235 void ::program_loaded ();
4238 * IAnjutaDebugManager::program_unloaded:
4239 * @obj: Self
4241 * This signal is emitted when a program is unloaded. If the
4242 * debugger is stopped while a program is loaded, this signal
4243 * is emitted before the debugger_stopped signal.
4245 void ::program_unloaded ();
4248 * IAnjutaDebugManager::program_started:
4249 * @obj: Self
4251 * This signal is emitted when the program is started. If the
4252 * program starts and is stopped by the debugger, a program-stopped
4253 * signal will be emitted too. If the program starts is not stopped
4254 * by the debugger a program-running signal will be emitted.
4256 void ::program_started ();
4259 * IAnjutaDebugManager::program_exited:
4260 * @obj: Self
4262 * This signal is emitted when the program is unloaded. If the
4263 * debugger is stopped while a program is running or stopped, this
4264 * signal is emitted before the program_unloaded signal.
4266 void ::program_exited ();
4269 * IAnjutaDebugManager::program_stopped:
4270 * @obj: Self
4272 * This signal is emitted when the program is stopped.
4274 void ::program_stopped ();
4277 * IAnjutaDebugManager::program_running:
4278 * @obj: Self
4280 * This signal is emitted when the program is running.
4282 void ::program_running ();
4286 * IAnjutaDebugManager::sharedlib_event:
4287 * @obj: Self
4289 * This signal is emitted when a new shared library is loaded. It
4290 * is useful to try to set pending breakpoints those could be in
4291 * the newly loaded library.
4293 void ::sharedlib_event ();
4296 * IAnjutaDebugManager::program_moved:
4297 * @obj: Self
4298 * @pid: process id, 0 when unknown
4299 * @tid: thread id, 0 when unknown
4300 * @address: program counter address, 0 when unknown
4301 * @file: source file where is the program counter, NULL when unknown
4302 * @line: line number if file name above is not NULL
4304 * This signal is emitted when the debugger know the current program
4305 * location. Most of the time, after the program has stopped but it
4306 * could happen even if it is still running.
4308 void ::program_moved (gint pid, gint tid, gulong address, const gchar* file, guint line);
4311 * IAnjutaDebugManager::frame_changed:
4312 * @obj: Self
4313 * @frame: frame
4314 * @thread: thread
4316 * This signal is emitted when the current frame is changed. It is
4317 * equal to the top frame in the interrupted thread when the
4318 * program stops but can be changed afterward by the user.
4319 * Several commands use this current frame, by example the register
4320 * window display the register values for the current thread only.
4322 void ::frame_changed (guint frame, gint thread);
4325 * IAnjutaDebugManager::location_changed:
4326 * @obj: Self
4327 * @address: program counter address, 0 when unknown
4328 * @uri: source file where is the program counter, NULL when unknown
4329 * @line: line number if file name above is not NULL
4331 * This signal is emitted when the current location is changed. It is
4332 * equal to the program location when the program stops but can be
4333 * changed afterward by the user.
4335 void ::location_changed (gulong address, const gchar* uri, guint line);
4338 * IAnjutaDebugManager::signal_received:
4339 * @obj: Self
4340 * @name: Signal name
4341 * @description: Signal description
4343 * This signal is emitted when the debugged program receives a
4344 * unix signal.
4346 void ::signal_received (const gchar* name, const gchar* description);
4349 * IAnjutaDebugManager::breakpoint_changed:
4350 * @obj: Self
4351 * @breakpoint: Breakpoint
4352 * @err: Error propagation and reporting.
4354 * This signal is emitted when a breakpoint is changed. It includes
4355 * new breakpoint and deleted breakpoint.
4357 void ::breakpoint_changed (IAnjutaDebuggerBreakpointItem *breakpoint);
4361 * SECTION:ianjuta-vcs
4362 * @title: IAnjutaVcs
4363 * @short_description: Version control system interface
4364 * @see_also:
4365 * @stability: Unstable
4366 * @include: libanjuta/interfaces/ianjuta-vcs.h
4369 interface IAnjutaVcs
4372 * ianjuta_vcs_add:
4373 * @filename: String with the filename
4374 * @obj: Self
4375 * @err: Error propagation and reporting
4377 * Add filename to the cvs repositry.
4379 void add(const gchar* filename);
4382 * ianjuta_cvs_remove:
4383 * @filename: String with the filename
4384 * @obj: Self
4385 * @err: Error propagation and reporting
4387 * Remove filename to the cvs repositry. Note that the file
4388 * is not removed physicly. This function will fail if the file
4389 * still exists on disc.
4391 void remove(const gchar* filename);
4394 * ianjuta_vcs_update:
4395 * @filename: String with the filename
4396 * @recurse: TRUE to recurse into subdirectories
4397 * @obj: Self
4398 * @err: Error propagation and reporting
4400 * Update filename with the cvs repositry.
4402 void update(const gchar* filename, gboolean recurse);
4405 * ianjuta_vcs_commit:
4406 * @filename: String with the filename
4407 * @log: The log message for the commit or ""
4408 * @recurse: TRUE to recurse into subdirectories
4409 * @obj: Self
4410 * @err: Error propagation and reporting
4412 * Commit changes in filename to the cvs repositry.
4414 void commit(const gchar* filename, const gchar* log, gboolean recurse);
4418 * SECTION:ianjuta-macro
4419 * @title: IAnjutaMacro
4420 * @short_description: Macro processor interface
4421 * @see_also:
4422 * @stability: Unstable
4423 * @include: libanjuta/interfaces/ianjuta-macro.h
4426 interface IAnjutaMacro
4429 * ianjuta_macro_insert:
4430 * @key: Key of the macro
4431 * @obj: Self
4432 * @err: Error propagation and reporting
4434 * Insert Macro to editor
4436 void insert(const gchar* key);
4440 * SECTION:ianjuta-symbol
4441 * @title: IAnjutaSymbol
4442 * @short_description: Source code symbol interface
4443 * @see_also: #IAnjutaSymbolManager
4444 * @stability: Unstable
4445 * @include: libanjuta/interfaces/ianjuta-symbol.h
4448 interface IAnjutaSymbol
4450 #include <gdk/gdkpixbuf.h>
4452 enum Type
4454 TYPE_UNDEF = 0, // Unknown type
4455 TYPE_CLASS = 1, // Class declaration
4456 TYPE_ENUM = 2, // Enum declaration
4457 TYPE_ENUMERATOR = 4, // Enumerator value
4458 TYPE_FIELD = 8, // Field (Java only)
4459 TYPE_FUNCTION = 16, // Function definition
4460 TYPE_INTERFACE = 32, // Interface (Java only)
4461 TYPE_MEMBER = 64, // Member variable of class/struct
4462 TYPE_METHOD = 128, // Class method (Java only)
4463 TYPE_NAMESPACE = 256, // Namespace declaration
4464 TYPE_PACKAGE = 512, // Package (Java only)
4465 TYPE_PROTOTYPE = 1024, // Function prototype
4466 TYPE_STRUCT = 2048, // Struct declaration
4467 TYPE_TYPEDEF = 4096, // Typedef
4468 TYPE_UNION = 8192, // Union
4469 TYPE_VARIABLE = 16384, // Variable
4470 TYPE_EXTERNVAR = 32768, // Extern or forward declaration
4471 TYPE_MACRO = 65536, // Macro (without arguments)
4472 TYPE_MACRO_WITH_ARG = 131072, // Parameterized macro
4473 TYPE_FILE = 262144, // File (Pseudo tag)
4474 TYPE_OTHER = 524288, // Other (non C/C++/Java tag)
4475 TYPE_MAX = 1048575 // Maximum value
4478 /* Field masks -- used mainly to retrieve fields of a symbol */
4479 enum Field
4482 FIELD_SIMPLE = 0, // With this field you will have name, line of declaration,
4483 // is_file_scope and signature of the symbol
4484 FIELD_FILE_PATH = 1,
4485 FIELD_IMPLEMENTATION = 2,
4486 FIELD_ACCESS = 4,
4487 FIELD_KIND = 8,
4488 FIELD_TYPE = 16,
4489 FIELD_TYPE_NAME = 32,
4490 FIELD_LANGUAGE = 64,
4491 FIELD_FILE_IGNORE = 128,
4492 FIELD_FILE_INCLUDE = 256,
4493 FIELD_PROJECT_NAME = 512,
4494 FIELD_WORKSPACE_NAME = 1024
4498 * ianjuta_symbol_get_name:
4499 * The name of the symbol
4501 const gchar *get_name ();
4504 * ianjuta_symbol_get_uri:
4505 * The uri of the symbol
4507 const gchar *get_uri();
4510 * ianjuta_symbol_get_line:
4511 * Line of the file in which the symbol is declared.
4513 gulong get_line ();
4516 * ianjuta_symbol_is_local:
4517 * Is the symbol a static (private) one?
4519 gboolean is_local ();
4522 * ianjuta_symbol_get_args:
4523 * If symbol is a function then this will return a string with the args.
4525 const gchar *get_args ();
4528 * ianjuta_symbol_get_sym_type:
4529 * You can obtain an IAnjutaSymbolType of the symbol.
4530 * To have a string representation see ianjuta_symbol_get_extra_info_string ().
4531 * You *need* a symbol with FIELD_TYPE enabled attribute. e.g. use ianjuta_symbol_manager_search
4532 * passing FIELD_TYPE as info_fields.
4534 Type get_sym_type ();
4536 /**
4537 * ianjuta_symbol_get_extra_info_string:
4538 * @sym_info: Just one FIELD_* per time. It is NOT possible to pass something like
4539 * FIELD_1 | FIELD_2 | ...
4541 const gchar *get_extra_info_string (Field sym_info);
4543 /**
4544 * Pixbuf icon representing the symbol.
4545 * You *need* a symbol with FIELD_ACCESS | FIELD_KIND enabled attribute. e.g. use
4546 * ianjuta_symbol_manager_search passing FIELD_ACCESS | FIELD_KIND as info_fields.
4548 const GdkPixbuf *get_icon ();
4553 * SECTION:ianjuta-symbol-manager
4554 * @title: IAnjutaSymbolManager
4555 * @short_description: Source code symbols manager inteface
4556 * @see_also: #IAnjutaSymbol
4557 * @stability: Unstable
4558 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
4561 interface IAnjutaSymbolManager
4563 #include "ianjuta-iterable.h"
4564 #include "ianjuta-symbol.h"
4567 * ianjuta_symbol_manager_search:
4568 * @obj: Self
4569 * @match_types: If passed IANJUTA_TYPE_UNDEF the function will not perfom any filter.
4570 * @include_types: Should the result contain or exclude the match_types? TRUE to include them,
4571 * FALSE to exclude. For example use may want all symbols but classes.
4572 * @match_name: fixme
4573 * @partial_name_match: if TRUE it will search for %match_name%, it FALSE for the exact
4574 * string match_name.
4575 * @global_symbols_search: if TRUE it will search only for public/extern functions.
4576 * If FALSE it will search also for static/private functions.
4577 * @global_tags_search: If TRUE it'll search only for system tags, using pkg-config to retrieve installed packages
4578 * infos. If FALSE only current project's symbols will be searched.
4579 * @results_limit: Limit results to an upper bound. -1 If you don't want to use this par.
4580 * @results_offset: Skip results_offset results. -1 If you don't want to use this par.
4581 * @results_limit Limit results to an upper bound. -1 If you don't want to use this par.
4582 * @results_offset Skip results_offset results. -1 If you don't want to use this par.
4583 * @err: Error propagation and reporting.
4585 * Database query. Returned iterable must be unrefed after use.
4587 * Returns: fixme
4589 IAnjutaIterable* search (IAnjutaSymbolType match_types, gboolean include_types, IAnjutaSymbolField info_fields, const gchar *match_name, gboolean partial_name_match, gboolean global_symbols_search, gboolean global_tags_search, gint results_limit, gint results_offset);
4592 * ianjuta_symbol_manager_get_members:
4593 * @obj: Self
4594 * @symbol_name: fixme
4595 * @global_search: fixme
4596 * @err: Error propagation and reporting.
4598 * Database query. Returned iterable must be unrefed after use.
4600 * Returns: fixme
4602 IAnjutaIterable* get_members (IAnjutaSymbol *symbol, IAnjutaSymbolField info_fields, gboolean global_search);
4605 * ianjuta_symbol_manager_get_parents:
4606 * @obj: Self
4607 * @symbol_name: fixme
4608 * @err: Error propagation and reporting.
4610 * fixme
4612 * Returns: fixme
4614 IAnjutaIterable* get_class_parents (IAnjutaSymbol *symbol, IAnjutaSymbolField info_fields);
4618 * SECTION:ianjuta-print
4619 * @title: IAnjutaPrint
4620 * @short_description: Print interface
4621 * @see_also:
4622 * @stability: Unstable
4623 * @include: libanjuta/interfaces/ianjuta-print.h
4626 interface IAnjutaPrint
4629 * ianjuta_print_print:
4630 * @obj: Self
4631 * @err: Error propagation and reporting.
4633 * Print the plugin (the file in case of the editor). In most cases this will show
4634 * a print dialog
4636 void print();
4639 * ianjuta_print_print:
4640 * @obj: Self
4641 * @err: Error propagation and reporting.
4643 * Show print preview dialog
4646 void print_preview();
4650 * SECTION:ianjuta-language-support
4651 * @title: IAnjutaLanguageSupport
4652 * @short_description: Programming language specific supports from plugins
4653 * @see_also:
4654 * @stability: Unstable
4655 * @include: libanjuta/interfaces/ianjuta-language-support.h
4658 interface IAnjutaLanguageSupport
4660 List<const gchar*> get_supported_languages ();
4661 gboolean supports(const gchar *language);
4665 * SECTION:ianjuta-preferences
4666 * @title: IAnjutaPreferences
4667 * @short_description: Preferences interface
4668 * @see_also:
4669 * @stability: Unstable
4670 * @include: libanjuta/interfaces/ianjuta-preferences
4673 interface IAnjutaPreferences
4675 #include <libanjuta/anjuta-preferences.h>
4677 * ianjuta_preferences_merge:
4678 * @obj: Self
4679 * @prefs: AnjutaPreferences to install to
4680 * @err: Error propagation and reporting.
4682 * When called, the plugin should install it's preferences
4684 void merge(AnjutaPreferences* prefs);
4687 * ianjuta_preferences_unmerge:
4688 * @obj: Self
4689 * @prefs: AnjutaPreferences to install to
4690 * @err: Error propagation and reporting.
4692 * When called, the plugin should uninstall it's preferences
4694 void unmerge(AnjutaPreferences* prefs);
4698 * SECTION:ianjuta-plugin-factory
4699 * @title: IAnjutaPluginFactory
4700 * @short_description: Create Anjuta plugin objects
4701 * @see_also:
4702 * @stability: Unstable
4703 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
4705 * This interface is used to create all Anjuta plugin objects. It is
4706 * already implemented inside Anjuta by an object able to load plugins written
4707 * in C. In order to load plugins in other languages (or in a different way),
4708 * a loader plugin implementing this interface must be written first, probably
4709 * in C.
4712 interface IAnjutaPluginFactory
4714 #include <libanjuta/anjuta-plugin.h>
4715 #include <libanjuta/anjuta-shell.h>
4716 #include <libanjuta/anjuta-plugin-handle.h>
4719 * IAnjutaPluginFactoryError:
4720 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
4721 * missing in .plugin file
4722 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
4723 * double colon following location) is missing in .plugin file
4724 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
4725 * plugin module is probably not installed
4726 * @IANJUTA_PLUGIN_FACTORY_UNLOADABLE_MODULE: Module file cannot be
4727 * loaded, not a shared library perhaps
4728 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
4729 * registration function, library is not an anjuta plugin or
4730 * is not for the right version
4731 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
4732 * plugin type, library is not an anjuta plugin or not for
4733 * the right version
4734 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
4736 * These enumeration is used to specify errors.
4738 enum Error
4740 OK = 0,
4741 MISSING_LOCATION,
4742 MISSING_TYPE,
4743 MISSING_MODULE,
4744 INVALID_MODULE,
4745 MISSING_FUNCTION,
4746 INVALID_TYPE,
4747 UNKNOWN_ERROR,
4751 * ianjuta_plugin_factory_new_plugin:
4752 * @obj: Self
4753 * @handle: Plugin information
4754 * @shell: Anjuta shell
4755 * @err: Error propagation and reporting.
4757 * Create a new AnjutaPlugin object from the plugin information handle,
4758 * give it the AnjutaShell object as argument.
4760 * Return value: a new plugin object
4762 AnjutaPlugin* new_plugin (AnjutaPluginHandle* handle, AnjutaShell *shell);
4766 * SECTION:ianjuta-language
4767 * @title: IAnjutaLanguage
4768 * @short_description: Interface to manager multiple programming languages
4769 * @see_also:
4770 * @stability: Unstable
4771 * @include: libanjuta/interfaces/ianjuta-language.h
4775 interface IAnjutaLanguage
4777 #include <libanjuta/interfaces/ianjuta-editor-language.h>
4778 typedef gint Id;
4781 * ianjuta_language_from_mime_type:
4782 * @obj: Self
4783 * @mime_type: A mime type to get the language for
4785 * Returns: A language Id or 0 in case no language was found
4787 Id get_from_mime_type (const gchar* mime_type);
4790 * ianjuta_language_from_string:
4791 * @obj: Self
4792 * @string: A string representation of the language. Note that multiple
4793 * strings may describe the language like C++ and Cpp
4795 * Returns: A language Id or 0 in case no language was found
4797 Id get_from_string (const gchar* string);
4800 * ianjuta_language_get_name:
4801 * @obj: Self
4802 * @id: A valid language id
4804 * Returns: The main name of the language. When you call ianjuta_language_from_string()
4805 * before that method the string you get here might be different to the one you passed
4806 * because the language might have multiple string representations
4808 const gchar* get_name(Id id);
4811 * ianjuta_language_get_strings
4812 * @obj: Self
4813 * @id: A valid language id
4815 * Returns: A list of strings that represent this language that language
4817 List<const gchar*> get_strings(Id id);
4820 * ianjuta_language_get_from_editor:
4821 * @obj: Self
4822 * @editor: An object implementing IAnjutaEditorLanguage
4823 * @err: Error propagation
4825 * Conviniece method to get the id directly from the editor
4827 * Returns: A valid language id or 0
4830 IAnjutaLanguageId get_from_editor (IAnjutaEditorLanguage* editor);
4833 * ianjuta_language_get_name_from_editor:
4834 * @obj: Self
4835 * @editor: An object implementing IAnjutaEditorLanguage
4836 * @err: Error propagation
4838 * Conviniece method to get the name directly from the editor
4840 * Returns: A language name or NULL
4843 const gchar* get_name_from_editor (IAnjutaEditorLanguage* editor);