1 // -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
3 // libanjuta interfaces. Generate stubs with anjuta-idl-compiler.pl
5 // Copyright (C) 2004 Naba Kumar <naba@gnome.org>
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
>
24 * SECTION:ianjuta-file
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.
41 * @err: Error propagation and reporting
43 * The implementor opens the given URI.
45 void open
(const gchar
*uri
);
48 * ianjuta_file_get_uri:
50 * @err: Error propagation and reporting
52 * Returns the URI that was opened with ianjuta_file_open().
54 * Return value: The last URI opened.
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
72 * IAnjutaFileSavable::save_point:
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
);
84 * IAnjutaFileSavable::saved:
86 * @uri: URI where the content is saved.
88 * This signal is emitted when the content is saved.
90 void ::saved
(const gchar
*uri
);
93 * ianjuta_file_savable_save:
95 * @err: Error propagation and reporting
97 * Saves the content to the original URI from which it was loaded.
102 * ianjuta_file_savable_save_as:
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:
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:
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
141 * @stability: Unstable
142 * @include: libanjuta/interfaces/ianjuta-stream.h
145 interface IAnjutaStream
150 * ianjuta_stream_open:
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
164 * @stability: Unstable
165 * @include: libanjuta/interfaces/ianjuta-stream-savable.h
168 interface IAnjutaStreamSavable
171 * ianjuta_stream_save:
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
187 * @stability: Unstable
188 * @include: libanjuta/interfaces/ianjuta-markable.h
191 interface IAnjutaMarkable
207 void ::marker_clicked
(gboolean double_click
, gint location
);
210 * ianjuta_markable_mark:
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:
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
237 * Return value: Current location where the marker was set.
239 gint location_from_handle
(gint
handle);
242 * ianjuta_markable_unmark:
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:
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:
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
281 * @stability: Unstable
282 * @include: libanjuta/interfaces/ianjuta-indicable.h
285 interface IAnjutaIndicable
295 void set
(gint begin_location
, gint end_location
, Indicator indicator
);
300 * SECTION:ianjuta-iterable
301 * @title: IAnjutaIterable
302 * @short_description: Implemented by objects that can iterate
304 * @stability: Unstable
305 * @include: libanjuta/interfaces/ianjuta-iterable.h
308 interface IAnjutaIterable
311 * ianjuta_iterable_first:
313 * @err: Error propagation and reporting
315 * Set iter to first element position. Returns FALSE if
316 * there is no element in the iterable (hence does not have first).
318 * Returns: TRUE if sucessful, other FALSE.
323 * ianjuta_iterable_next:
325 * @err: Error propagation and reporting
327 * Set the iter position to next element position. Returns FALSE if there
328 * is no next element and the iter remains pointed to the last element.
330 * Returns: TRUE if sucessful, other FALSE..
335 * ianjuta_iterable_previous:
337 * @err: Error propagation and reporting
339 * Set the iter position to previous element position. Returns FALSE if
340 * there is no previous element and the iter remains pointed to the first
343 * Returns: TRUE if sucessful, other FALSE.
345 gboolean previous
();
348 * ianjuta_iterable_last:
350 * @err: Error propagation and reporting
352 * Set iter position to last element position. Returns FALSE if
353 * there is no element in the iterable (hence does not have last).
355 * Returns: TRUE if sucessful, other FALSE.
360 * ianjuta_iterable_foreach:
362 * @callback: Callback to call for each element.
363 * @user_data: user data that is passed back to the callback.
364 * @err: Error propagation and reporting
366 * Call callback for each element in the list. Call back is passed the
367 * same iter, but with different position set (from first to last). This
368 * method does not affect current position. i.e. current position is
369 * restored at the end of this method.
371 void foreach
(GFunc
callback, gpointer user_data
);
374 * ianjuta_iterable_set_position:
376 * @position: New position for the iter.
377 * @err: Error propagation and reporting
379 * Sets the current position of the iter to @position. The given @position
380 * must be from 0 to length - 1 (ianjuta_iter_get_length()), otherwise
381 * FLASE will be returned. If invalid iter @position is given, the current
382 * iter position is not altered.
384 * Returns: TRUE if successfully set (i.e. @position is within the range).
385 * otherwise returns FALSE (i.e. @position is out of data range).
387 gboolean set_position
(gint position
);
390 * ianjuta_iterable_get_position:
392 * @err: Error propagation and reporting
394 * Index of the current iter in the iterable. It will be
395 * from 0 to length - 1 (ianjuta_iter_get_length())
397 * Returns: integer index.
399 gint get_position
();
402 * ianjuta_iterable_get_length:
404 * @err: Error propagation and reporting
406 * Length of the iterable
408 * Returns: total length of the list.
413 * ianjuta_iterable_clone:
415 * @err: Error propagation and reporting
417 * Clones the iterable. The returned iterable object must be unrefed
420 * Returns: A new instance of this iterable pointing at the same location.
422 IAnjutaIterable
*clone
();
425 * ianjuta_iterable_assign:
427 * @src_iter: Source iter from which to copy the assignment.
428 * @err: Error propagation and reporting
430 * Assigns the iter position from @src_iter.
433 void assign
(IAnjutaIterable
*src_iter
);
436 * SECTION:ianjuta-iterable-tree
437 * @title: IAnjutaIterableTree
438 * @short_description: Implemented by tree objects that can iterate
440 * @stability: Unstable
441 * @include: libanjuta/interfaces/ianjuta-iterable-tree.h
444 interface IAnjutaIterableTree
448 * ianjuta_iterable_tree_parent:
450 * @err: Error propagation and reporting
452 * Set iter position to parent of curernt iter. If there is no parent,
453 * returns FALSE (current iter position is not changed)
455 * Returns: TRUE if sucessful, otherwise FALSE.
460 * ianjuta_iterable_tree_children:
462 * @err: Error propagation and reporting
464 * Iter position set to first child of current iter. If there is no
465 * children, return NULL (iter position is not changed).
467 * Returns: TRUE if sucessful, otherwise FALSE.
469 gboolean children
();
472 * ianjuta_iterable_tree_has_children:
474 * @err: Error propagation and reporting
476 * Returns true if current iter has children
478 * Returns: TRUE if there are children, otherwise FALSE.
480 gboolean has_children
();
483 * ianjuta_iterable_tree_foreach_post:
485 * @callback: Callback to call for each element.
486 * @user_data: User data to pass back to callback.
487 * @err: Error propagation and reporting
489 * Call callback for each element in post order.
491 void foreach_post
(GFunc
callback, gpointer user_data
);
494 * ianjuta_iterable_tree_foreach_pre:
496 * @callback: Callback to call for each element.
497 * @user_data: User data to pass back to callback.
498 * @err: Error propagation and reporting
500 * Call callback for each element in pre order.
502 void foreach_pre
(GFunc
callback, gpointer user_data
);
507 * SECTION:ianjuta-buildable
508 * @title: IAnjutaBuildable
509 * @short_description: Implemented by plugins that can build
511 * @stability: Unstable
512 * @include: libanjuta/interfaces/ianjuta-buildable.h
515 interface IAnjutaBuildable
521 COMMAND_BUILD_TARBALL
,
531 * ianjuta_buildable_set_command:
533 * @command_id: Command to override.
534 * @command: Build command to override.
535 * @err: Error propagation and reporting.
537 * Overrides the default command for the given command.
539 void set_command
(Command command_id
, const gchar
*command
);
542 * ianjuta_buildable_get_command:
544 * @command_id: Command to get override.
545 * @err: Error propagation and reporting.
547 * Retrieves the currently set command override.
549 * Returns: The overridden command. NULL if no override set.
551 const gchar
* get_command
(Command command_id
);
554 * ianjuta_buildable_reset_commands:
556 * @err: Error propagation and reporting.
558 * Resets the command overrides to defaults.
560 void reset_commands
();
563 * ianjuta_buildable_build:
566 * @err: Error propagation and reporting.
570 void build
(const gchar
*uri
);
573 * ianjuta_buildable_clean:
576 * @err: Error propagation and reporting.
580 void clean
(const gchar
*uri
);
583 * ianjuta_buildable_install:
586 * @err: Error propagation and reporting.
590 void install
(const gchar
*uri
);
593 * ianjuta_buildable_configure:
596 * @err: Error propagation and reporting.
600 void configure
(const gchar
*uri
);
603 * ianjuta_buildable_generate:
606 * @err: Error propagation and reporting.
610 void generate
(const gchar
*uri
);
613 * ianjuta_buildable_execute:
616 * @err: Error propagation and reporting.
620 void execute
(const gchar
*uri
);
624 * SECTION:ianjuta-help
625 * @title: IAnjutaHelp
626 * @short_description: Implemented by plugins that can provide help support
628 * @stability: Unstable
629 * @include: libanjuta/interfaces/ianjuta-help.h
632 interface IAnjutaHelp
636 * ianjuta_help_search:
639 * @err: Error propagation and reporting
643 void search
(const gchar
*query
);
647 * SECTION:ianjuta-loader
648 * @title: IAnjutaLoader
649 * @short_description: Interface to load file or stream
651 * @stability: Unstable
652 * @include: libanjuta/interfaces/ianjuta-loader.h
654 * Loaders can deterime correct plugin to open a file or stream. They
655 * themselves can not load it, but will correctly redirect the request to
656 * an implementor of IAnjutaFile, IAnjutaFileSavable, IAnjutaStream or
657 * IAnjutaStreamSavable, depending on the mime-type, meta-type or any other
660 interface IAnjutaLoader
662 #include
<libanjuta
/anjuta
-plugin.h
>
664 * ianjuta_loader_find_plugins:
666 * @err: Error propagation and reporting.
668 * Returns all plugins supporting loader interface.
670 List
<AnjutaPlugin
*> find_plugins
();
673 * SECTION:ianjuta-file-loader
674 * @title: IAnjutaFileLoader
675 * @short_description: Loader to load files
677 * @stability: Unstable
678 * @include: libanjuta/interfaces/ianjuta-file-loader.h
680 * Loaders can deterime correct plugin to open a file.
682 interface IAnjutaFileLoader
685 * ianjuta_file_loader_load:
688 * @readonly: Open in readonly mode.
689 * @err: Error propagation and reporting
691 * Determines a plugin which can open the given file, activates it
692 * opening the file and returns the interface of the plugin activated.
694 * Return value: Plugin interface used to load the file.
696 GObject
* load
(const gchar
*uri
, gboolean
readonly);
699 * ianjuta_loader_peek_interface:
701 * @uri: Meta file to peek
702 * @err: Error propagation and reporting
704 * Peeks the file and determines the interface which can load
707 * Return value: Plugin interface name that can load the file.
709 gchar
* peek_interface
(const gchar
*uri
);
713 * SECTION:ianjuta-stream-loader
714 * @title: IAnjutaStreamLoader
715 * @short_description: Loader to load streams
717 * @stability: Unstable
718 * @include: libanjuta/interfaces/ianjuta-stream-loader.h
720 * StreamLoaders can deterime correct plugin to open a stream.
722 interface IAnjutaStreamLoader
727 * ianjuta_stream_loader_load:
729 * @stream: Stream to load
730 * @readonly: Open in readonly mode.
731 * @err: Error propagation and reporting
733 * Determines a plugin which can open the given stream, activates it
734 * opening the stream and returns the interface of the plugin activated.
736 * Return value: Plugin interface used to load the stream.
738 GObject
* load
(FILE
*stream
, gboolean
readonly);
741 * ianjuta_stream_loader_peek_interface:
743 * @stream: Stream to load
744 * @err: Error propagation and reporting
746 * Peeks the stream and determines the interface which can load
749 * Return value: Plugin interface name that can load the stream.
751 gchar
* peek_interface
(FILE
*stream
);
756 * SECTION:ianjuta-document
757 * @title: IAnjutaDocument
758 * @short_description: Interface for all kind of editable resources that
759 * will be managed by IAnjutaDocumentManager
761 * @stability: Unstable
762 * @include: libanjuta/interfaces/ianjuta-document.h
765 interface IAnjutaDocument
768 * IAnjutaDocument::update_ui:
771 * This signal is emitted when the document assumes the UI must be updated
772 * because some internal state of the document has changed. For example, if
773 * current line position is changed, it needs to be reflected to the UI.
778 * ianjuta_document_get_filename:
780 * @err: Error propagation and reporting
782 * Allows obtaining of the filename the editor was loaded from.
784 * Return value: The name of the file. Not to be freed by caller.
786 const gchar
* get_filename
();
789 * ianjuta_document_can_undo:
791 * @err: Error propagation and reporting
793 * Can the editor undo the last operation?
795 * Returns true if editor can undo, else FALSE
800 * ianjuta_document_can_redo:
802 * @err: Error propagation and reporting
804 * Can the editor redo the last operation?
806 * Returns true if editor can redo, else FALSE
808 gboolean can_redo
();
811 * ianjuta_document_undo:
813 * @err: Error propagation and reporting
815 * Undo last operation
820 * ianjuta_document_redo:
822 * @err: Error propagation and reporting
824 * Redo last undo operation
829 * ianjuta_document_begin_undo_action:
831 * @err: Error propagation and reporting
833 * Begins the mark of undoable action. Calls to this are stacked and
834 * each must be ended with ianjuta_document_end_action().
836 void begin_undo_action
();
839 * ianjuta_document_end_undo_action:
841 * @err: Error propagation and reporting
843 * Ends the mark of undoable action.
845 void end_undo_action
();
848 * ianjuta_document_grab_focus:
850 * @err: Error propagation and reporting
857 * ianjuta_document_cut:
859 * @err: Error propagation and reporting
861 * Cut selection to clipboard.
866 * ianjuta_document_copy:
868 * @err: Error propagation and reporting
870 * Copy selection to clipboard.
875 * ianjuta_document_paste:
877 * @err: Error propagation and reporting
879 * Paste clipboard at current position.
884 * ianjuta_document_clear:
886 * @err: Error propagation and reporting
894 * SECTION:ianjuta-editor
895 * @title: IAnjutaEditor
896 * @short_description: Text editor interface
898 * @stability: Unstable
899 * @include: libanjuta/interfaces/ianjuta-editor.h
902 interface IAnjutaEditor
904 #include
<gtk
/gtkwidget.h
>
905 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
921 * IAnjutaEditor::char_added:
922 * @position: The position where @ch is added.
923 * @ch: The character that has been added.
926 * This signal is emitted when any character is added inside the editor.
927 * The newly added character is @ch which has been inserted at @position.
929 void ::char_added
(gint position
, gchar ch
);
932 * IAnjutaEditor::changed:
933 * @position: The position where change happend.
934 * @added: TRUE if added, FALSE if deleted.
935 * @length: Length of the text changed.
936 * @lines: Number of lines added or removed.
937 * @text: The text added or removed.
940 * This signal is emitted when any text change happens in editor.
941 * The changes begin at @position. @text is not garanteed to be NULL
942 * terminated. Use @length to read the text. @lines represent the
943 * number of line breaks in the added or removed text.
945 void ::changed
(gint position
, gboolean added
, gint length
, gint lines
, const gchar
*text
);
948 * ianjuta_editor_get_tabsize:
950 * @err: Error propagation and reporting
952 * Returns the tabsize (in spaces) currently used by the editor.
954 * Returns: tabsize in number of spaces
959 * ianjuta_editor_set_tabsize:
961 * @tabsize: Tabsize in spaces
962 * @err: Error propagation and reporting
964 * Sets the tabsize of the editor.
966 void set_tabsize
(gint tabsize
);
969 * ianjuta_editor_get_use_spaces:
971 * @err: Error propagation and reporting
973 * Returns if the editor uses spaces for filling up tab characters.
975 * Returns: TRUE if yes, FALSE if no.
977 gboolean get_use_spaces
();
980 * ianjuta_editor_set_use_space:
982 * @use_spaces: TRUE to use spaces, FALSE to use tab char directly.
983 * @err: Error propagation and reporting
985 * Sets if the editor should use spaces for filling up tab characters.
987 void set_use_spaces
(gboolean use_spaces
);
990 * ianjuta_editor_set_auto_indent:
992 * @auto_indent: TRUE to enable auto-indent, FALSE to disable
994 * Sets whether the editor should auto-indent itself. A plugin that does
995 * custom auto-indent can set this to false and override the preferences
998 void set_auto_indent
(gboolean auto_indent
);
1001 * ianjuta_editor_erase:
1003 * @position: Start position of chars to erase. Must be 0 or more.
1004 * @length: number of chars to erase. -1 means till the end of document.
1005 * @err: Error propagation and reporting
1007 * Erases the @length number of chars starting from @position. If length
1008 * is 0, nothing happens.
1010 void erase
(gint position
, gint length
);
1013 * ianjuta_editor_erase_all:
1015 * @err: Error propagation and reporting
1017 * Empties the whole editor buffer. There will be zero characters.
1022 * ianjuta_editor_insert:
1024 * @position: Character position in editor where insert will take place.
1025 * @text: Text to append.
1026 * @length: Length of @text to use.
1027 * @err: Error propagation and reporting
1029 * Inserts @length characters from @text buffer at given @position of
1030 * editor buffer. If @length is -1, the whole @text is used.
1032 void insert
(int position
, const gchar
*text
, gint length
);
1035 * ianjuta_editor_append:
1037 * @text: Text to append.
1038 * @length: Length of @text to use.
1039 * @err: Error propagation and reporting
1041 * Appends @length characters from @text buffer at the end of editor
1042 * buffer. If @length is -1, the whole @text is used.
1044 void append
(const gchar
*text
, gint length
);
1047 * ianjuta_editor_goto_line:
1049 * @lineno: line number where carat will be moved.
1050 * @err: Error propagation and reporting
1052 * Carat is moved to the given @lineno line and text view is scrolled to
1053 * bring it in viewable area of the editor.
1055 void goto_line
(gint lineno
);
1058 * ianjuta_editor_goto_position:
1060 * @position: Character position where carat will be moved.
1061 * @err: Error propagation and reporting
1063 * Carat is moved to the given @position and text view is scrolled to
1064 * bring @position in viewable area of the editor.
1066 void goto_position
(gint position
);
1069 * ianjuta_editor_get_text:
1071 * @position: Begining position. Must be greater than or equal to 0.
1072 * @length: length of the text. -1 means till the end of document.
1073 * @err: Error propagation and reporting
1075 * Gets @length text characters beginning from @position
1076 * (including char pointed by @position). If @length is less then
1077 * 0 or exceeds document length, text till the end of the document is
1078 * returned. @start must be 0 or greater then 0. If @start is beyond
1079 * document length, NULL is returned. If @length is 0, NULL is returned.
1080 * The characters returned are utf-8 encoded.
1082 * Returns: A buffer of utf-8 characters.
1083 * The returned buffer must be freed when no longer required.
1085 gchar
* get_text
(gint position
, gint length
);
1088 * ianjuta_editor_get_text_iter:
1090 * @begin: Begining iterator
1091 * @end: End iterator
1092 * @err: Error propagation and reporting
1094 * Gets text characters beginning from @begin
1095 * (including char pointed by @begin) and ending with @end
1096 * The characters returned are utf-8 encoded.
1098 * Returns: A buffer of utf-8 characters.
1099 * The returned buffer must be freed when no longer required.
1101 gchar
* get_text_iter
(IAnjutaIterable
* begin
, IAnjutaIterable
* end
);
1104 * ianjuta_editor_get_position:
1106 * @err: Error propagation and reporting
1108 * Get current caret position
1110 * Returns: Current character position since the begining of file.
1112 gint get_position
();
1115 * ianjuta_editor_get_position_iter:
1117 * @err: Error propagation and reporting
1119 * Get current caret position
1121 * Returns: Iterator that points to the current position
1123 IAnjutaIterable
* get_position_iter
();
1126 * ianjuta_editor_line_from_position:
1128 * @position: Position you want to know the line from
1129 * @err: Error propagation and reporting
1131 * Get the line number in which @position locates.
1132 * Returns: Line which corresponds to @position
1135 int get_line_from_position
(int position
);
1138 * ianjuta_editor_get_lineno:
1140 * @err: Error propagation and reporting
1142 * Obtains current line number on which carat is.
1144 * Return value: Line number.
1149 * ianjuta_editor_get_length:
1151 * @err: Error propagation and reporting
1153 * Get length of complete text in editor. This will be the total
1154 * number of characters in the file or buffer.
1156 * Return value: Text length.
1161 * ianjuta_editor_get_current_word:
1163 * @err: Error propagation and reporting
1165 * Obtains the word on which carat is currently on.
1167 * Return value: Current word.
1169 gchar
* get_current_word
();
1172 * ianjuta_editor_get_current_column:
1174 * @err: Error propagation and reporting
1176 * Obtains number of the current column in the editor.
1178 * Return value: Current column.
1183 * ianjuta_editor_get_line_begin_position:
1186 * @err: Error propagation and reporting.
1192 gint get_line_begin_position
(gint line
);
1195 * ianjuta_editor_get_line_end_position:
1198 * @err: Error propagation and reporting.
1204 gint get_line_end_position
(gint line
);
1207 * ianjuta_editor_get_overwrite:
1209 * @err: Error propagation and reporting
1211 * Obtains editor overwirte mode: TRUE = Override, FALSE = Insert.
1213 * Return value: editor mode.
1215 gboolean get_overwrite
();
1219 * ianjuta_editor_set_popup_menu:
1222 * @err: Error propagation and reporting
1224 * Set Editor popup menu. This is the menu shown in the editor when one
1225 * right-clicks on it.
1228 void set_popup_menu
(GtkWidget
*menu
);
1231 * ianjuta_editor_get_cell_iter:
1233 * @position: Byte position where the iter will be set
1234 * @err: Error propagation and reporting
1236 * Creates and returns an iter for editor cells. The iter is
1237 * placed at the unicode character position where the given byte
1238 * @position happens to fall (means given @position does not necessarily
1239 * is the current position of the iter). The returned iter
1240 * is cell (character) iter and not byte iter, so all iter operations
1241 * on it are character (not byte) iteration, including all position
1242 * and index references in the iter. However, the @position paramter
1243 * passed to this function is byte position (because all editor
1244 * Aoperations are based on byte positions). @position could happen
1245 * to be in the middle of a unicode character and that is a vaild
1249 * unreferrenced by the caller when done. The iter navigates
1250 * (next/previous) in step of unicode characters (one unicode
1251 * character == one cell).
1253 * Retruns: a newly created iter of IAnjutaEditorCell placed at the
1256 IAnjutaIterable
* get_cell_iter
(gint position
);
1259 * SECTION:ianjuta-editor-selection
1260 * @title: IAnjutaEditorSelection
1261 * @short_description: Text editor selection interface
1263 * @stability: Unstable
1264 * @include: libanjuta/interfaces/ianjuta-editor-selection.h
1267 interface IAnjutaEditorSelection
1269 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1271 * ianjuta_editor_selection_has_selection:
1273 * @err: Error propagation and reporting
1275 * Returns TRUE if editor has any text selected. The selection
1276 * positions can be retrieved with ianjuta_editor_selection_get_start()
1277 * and ianjuta_editor_selection_get_end().
1279 * Returns: TRUE if there is text selected else FALSE.
1281 gboolean has_selection
();
1284 * ianjuta_editor_selection_get:
1286 * @err: Error propagation and reporting
1288 * Gets curerntly selected text in editor.
1290 * Returns: A newly allocated buffer of currently selected characters.
1291 * NULL if there is no selection. The returned buffer must be freed after
1297 * ianjuta_editor_selection_set:
1299 * @start: Begin of selection
1300 * @end: End of selection
1301 * @err: Error propagation and reporting
1303 * Select characters between start and end. Start and end don't have to
1306 void set
(IAnjutaIterable
* start
, IAnjutaIterable
* end
);
1309 * ianjuta_editor_selection_get_start:
1311 * @err: Error propagation and reporting
1313 * Gets start position of selection text. If there is no selection,
1316 * Return: Start of selection or NULL if there is no selection.
1318 IAnjutaIterable
* get_start
();
1321 * ianjuta_editor_selection_get_end:
1323 * @err: Error propagation and reporting
1325 * Get end position of selection. If there is no selection, returns
1328 * Return: End of selection or NULL if there is no selection.
1330 IAnjutaIterable
* get_end
();
1333 * ianjuta_editor_selection_select_block:
1335 * @err: Error propagation and reporting
1337 * Selects current block of code. The definition of block of code
1338 * depends on highlight mode used (programming language). Some
1339 * highlight mode does not have block concept, in that case this
1340 * method does not do anything.
1342 void select_block
();
1345 * ianjuta_editor_selection_select_function:
1347 * @err: Error propagation and reporting
1349 * Select current function block. The definition of function block
1350 * depends on highlight mode used (programming language). Some
1351 * highlight mode does not have function concept, in that case this
1352 * method does not do anything.
1354 void select_function
();
1357 * ianjuta_editor_selection_select_to_brace:
1359 * @err: Error propagation and reporting
1361 * Select to brace. Some highlight mode does not have braces concept,
1362 * in that case, this method does not do anything.
1364 void select_to_brace
();
1367 * ianjuta_editor_edit_select_all:
1369 * @err: Error propagation and reporting
1371 * Select whole buffer.
1376 * ianjuta_editor_selection_replace:
1378 * @text: Replacement text.
1379 * @length: Length of the text to used in @text.
1380 * @err: Error propagation and reporting
1382 * Replaces currently selected text with the @text. Only @length amount
1383 * of characters are used from @text buffer to replace.
1385 void replace
(const gchar
*text
, gint length
);
1389 * SECTION:ianjuta-editor-search
1390 * @title: IAnjutaEditorSearch
1391 * @short_description: Text editor search interface
1393 * @stability: Unstable
1394 * @include: libanjuta/interfaces/ianjuta-editor-search.h
1397 interface IAnjutaEditorSearch
1399 #include
<libanjuta
/interfaces
/ianjuta
-editor
-cell.h
>
1402 * ianjuta_editor_search_forward:
1404 * @search: String to search for
1405 * @start: Where to search from
1406 * @end: Where to stop searching
1407 * @result_start: Will be set to the start of the search_result (or NULL)
1408 * @result_end: Will be set to the end of the search_result (or NULL)
1409 * @err: Error propagation and reporting
1411 * Search forward from start to end
1414 gboolean forward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1417 * ianjuta_editor_search_backward:
1419 * @search: String to search for
1420 * @start: Where to search from
1421 * @end: Where to stop searching
1422 * @result_start: Will be set to the start of the search_result (or NULL)
1423 * @result_end: Will be set to the end of the search_result (or NULL)
1424 * @err: Error propagation and reporting
1426 * Search backward from end to start
1430 gboolean backward
(const gchar
* search
, gboolean case_sensitive
, IAnjutaEditorCell
* start
, IAnjutaEditorCell
* end
, IAnjutaEditorCell
** result_start
, IAnjutaEditorCell
** result_end
);
1435 * SECTION:ianjuta-editor-convert
1436 * @title: IAnjutaEditorConvert
1437 * @short_description: Text editor convert interface
1439 * @stability: Unstable
1440 * @include: libanjuta/interfaces/ianjuta-editor-convert.h
1443 interface IAnjutaEditorConvert
1446 * ianjuta_editor_convert_to_upper:
1448 * @start_position: Start position.
1449 * @end_position: End position.
1450 * @err: Error propagation and reporting
1452 * change characters from start position to end position to uppercase.
1455 void to_upper
(gint start_position
, gint end_position
);
1458 * ianjuta_editor_convert_to_lower:
1460 * @start_position: Start position.
1461 * @end_position: End position.
1462 * @err: Error propagation and reporting
1464 * change characters from start position to end position to lowercase
1467 void to_lower
(gint start_position
, gint end_position
);
1471 * SECTION:ianjuta-editor-line-mode
1472 * @title: IAnjutaEditorLineMode
1473 * @short_description: Text editor line mode
1475 * @stability: Unstable
1476 * @include: libanjuta/interfaces/ianjuta-editor-line-mode.h
1479 interface IAnjutaEditorLineMode
1489 * ianjuta_editor_line_mode_get:
1491 * @err: Error propagation and reporting
1493 * Get current line ending mode. It is auto-detected from the
1499 * ianjuta_editor_line_mode_set:
1501 * @mode: Line mode to set.
1502 * @err: Error propagation and reporting
1504 * Set the line ending mode to the given @mode. Existing line end
1505 * characters in the buffer are not touched. Only the newly added
1506 * texts will have @mode line end characters.
1508 void set
(Type mode
);
1511 * ianjuta_editor_line_mode_convert:
1513 * @mode: Line mode to convert.
1514 * @err: Error propagation and reporting
1516 * Set the line ending mode to the given @mode and convert all line end
1517 * characters in the buffer to @mode line end characters.
1519 void convert
(Type mode
);
1522 * ianjuta_editor_line_mode_fix:
1524 * @err: Error propagation and reporting
1526 * Convert EOL characters to majority of line mode. This is helpful
1527 * when the buffer contains mixed line modes and we want to fix it.
1533 * SECTION:ianjuta-editor-assist
1534 * @title: IAnjutaEditorAssist
1535 * @short_description: Editor assistance framework
1537 * @stability: Unstable
1538 * @include: libanjuta/interfaces/ianjuta-editor-assist.h
1541 interface IAnjutaEditorAssist
1543 /* IAnjutaEdiotrAssist::assist_chosen:
1546 * User's selection from the choices. It is the index of the choice
1547 * presented with ianjuta_editor_assist_suggest().
1549 void ::assist_chosen
(gint selection
);
1552 * ianjuta_editor_assist_suggest:
1554 * @choices: list of choices.
1555 * @char_alignment: Character alignment.
1556 * @err: Error propagation and reporting
1558 * Suggest a list of choices to the user. The suggestions are viewed
1559 * at char_alignment which should be the beginning of the completed word.
1560 * If choices is NULL, and assist_end signal
1564 void suggest
(List
<const gchar
*> choices
, int position
, int char_alignment
);
1566 /** ianjuta_editor_assist_hide_suggestions
1568 * @err: Error propagation and reporting
1570 * Hide current suggestions but do not emit assist_end signal.
1571 * This is useful when temporary waiting for more context
1573 void hide_suggestions
();
1576 * ianjuta_editor_assist_tip:
1578 * @tips: list of alternative tips.
1579 * @char_alignment: Character alignment.
1580 * @err: Error propagation and reporting
1582 * Show tips showing more information on current context. No user feedback
1583 * is required when tips are shown. @char_alignment indicates
1584 * the position before which is the known context and after which are
1585 * the suggestions. Usually the editor would use this to
1586 * align the choices displayed such that the carat is just at this
1587 * position when the choices are displayed.
1590 void show_tips
(List
<const gchar
*> tips
, gint position
, gint char_alignment
);
1593 * ianjuta_editor_assist_cancel_tip:
1595 * @err: Error propagation and reporting
1597 * Cancels the last shown tooltip
1599 void cancel_tips
();
1602 * ianjuta_editor_assist_get_suggestions:
1604 * @context: The context for the suggestions.
1605 * @err: Error propagation and reporting
1607 * Usually the editor might have some suggestions to make
1608 * for a context. For example in a simple word completion context.
1609 * If the editor has no suggestions to make, it returns NULL.
1611 * Returns: A list of suggestions for the given context or NULL
1612 * if there is nothing to suggest.
1614 * Returns: A list of dynamically allocated strings. The whole
1615 * list, including the the strings should be freed when done.
1617 List
<const gchar
*> get_suggestions
(const gchar
*context
);
1621 * SECTION:ianjuta-editor-hover
1622 * @title: IAnjutaEditorHover
1623 * @short_description: Text editor hover interface
1625 * @stability: Unstable
1626 * @include: libanjuta/interfaces/ianjuta-editor-hover
1629 interface IAnjutaEditorHover
1631 #include
<libanjuta
/interfaces
/ianjuta
-iterable.h
>
1633 void ::hover_over
(GObject
* position
);
1634 void ::hover_leave
(GObject
* position
);
1636 void display
(IAnjutaIterable
* position
, const gchar
*info
);
1640 * SECTION:ianjuta-editor-language
1641 * @title: IAnjutaEditorLanguage
1642 * @short_description: Text editor language interface
1644 * @stability: Unstable
1645 * @include: libanjuta/interfaces/ianjuta-editor-language.h
1648 interface IAnjutaEditorLanguage
1650 void ::language_changed
(const gchar
*language
);
1653 * ianjuta_editor_language_get_supported_languages:
1655 * @err: Error propagation and reporting
1657 * Return a list of languages supported by the editor
1658 * Note: These list contains the names in the form
1659 * the editor implementation knows them
1663 const List
<const gchar
*> get_supported_languages
();
1666 * ianjuta_editor_language_name:
1668 * @err: Error propagation and reporting
1674 const gchar
*get_language_name
(const gchar
* language
);
1677 * ianjuta_editor_language_get_language:
1679 * @err: Error propagation and reporting
1681 * Return the name of the currently used language
1685 const gchar
*get_language
();
1688 * ianjuta_editor_language_set_language:
1690 * @err: Error propagation and reporting
1693 * Force the editor to use a given language
1697 void set_language
(const gchar
* language
);
1701 * SECTION:ianjuta-editor-folds
1702 * @title: IAnjutaEditorFolds
1703 * @short_description: Text editor folds inteface
1705 * @stability: Unstable
1706 * @include: libanjuta/interfaces/ianjuta-editor-folds.h
1709 interface IAnjutaEditorFolds
1712 * ianjuta_editor_view_open_folds:
1714 * @err: Error propagation and reporting
1722 * ianjuta_editor_view_close_folds:
1724 * @err: Error propagation and reporting
1732 * ianjuta_editor_view_toggle_fold:
1734 * @err: Error propagation and reporting
1736 * Open/Close current fold
1739 void toggle_current
();
1743 * SECTION:ianjuta-editor-view
1744 * @title: IAnjutaEditorView
1745 * @short_description: Text editor view interface
1747 * @stability: Unstable
1748 * @include: libanjuta/interfaces/ianjuta-editor-view.h
1750 * An editor view is a visual representation of the editor. An editor
1751 * can have multiple views. All views of an editor show the same editor
1752 * content (buffer). Consequently, any change done in one view is
1753 * updated in all other views.
1755 interface IAnjutaEditorView
1758 * ianjuta_editor_view_create:
1760 * @err: Error propagation and reporting
1762 * Creates a new view for the editor. The newly created view gets
1763 * the user focus and scrolls to the same location as last view.
1768 * ianjuta_editor_view_remove_current:
1770 * @err: Error propagation and reporting
1772 * Removes currently focused editor view. It does not remove the
1773 * last view of the editor. That is, if currently there is only
1774 * one view of the editor, this function does nothing.
1776 void remove_current
();
1779 * ianjuta_editor_view_get_count:
1781 * @err: Error propagation and reporting
1783 * Total number of views currently present. It will never be less
1784 * than 1. Invalid return values are considered error condition.
1790 * SECTION:ianjuta-editor-comment
1791 * @title: IAnjutaEditorComment
1792 * @short_description: Text editor comment interface
1794 * @stability: Unstable
1795 * @include: libanjuta/interfaces/ianjuta-editor-comment.h
1798 interface IAnjutaEditorComment
1801 * ianjuta_editor_comment_block:
1803 * @err: Error propagation and reporting
1805 * Comment/Uncomment out selected block
1810 * ianjuta_editor_comment_box:
1812 * @err: Error propagation and reporting
1814 * Comment/Uncomment out selected block
1819 * ianjuta_editor_comment_stream:
1821 * @err: Error propagation and reporting
1823 * Comment/Uncomment out selected block
1829 * SECTION:ianjuta-editor-zoom
1830 * @title: IAnjutaEditorZoom
1831 * @short_description: Text editor zoom interface
1833 * @stability: Unstable
1834 * @include: libanjuta/interfaces/ianjuta-editor-zoom.h
1837 interface IAnjutaEditorZoom
1840 * ianjuta_editor_zoom_in:
1842 * @err: Error propagation and reporting
1849 * ianjuta_editor_zoom_out:
1851 * @err: Error propagation and reporting
1859 * SECTION:ianjuta-editor-goto
1860 * @title: IAnjutaEditorGoto
1861 * @short_description: Text editor navigation interface
1863 * @stability: Unstable
1864 * @include: libanjuta/interfaces/ianjuta-editor-goto.h
1867 interface IAnjutaEditorGoto
1870 * ianjuta_editor_goto_start_block()
1872 * @err: Error propagation and reporting
1874 * Moves cursor to the start of the current block
1879 * ianjuta_editor_goto_end_block()
1881 * @err: Error propagation and reporting
1883 * Moves cursor to the end of the current block
1888 * ianjuta_editor_goto_matching_brace()
1890 * @err: Error propagation and reporting
1892 * Moves cursor to matching brace
1894 void matching_brace
();
1900 * SECTION:ianjuta-editor-cell
1901 * @title: IAnjutaEditorCell
1902 * @short_description: Text editor character cell
1904 * @stability: Unstable
1905 * @include: libanjuta/interfaces/ianjuta-editor-cell.h
1907 * Represents a cell in editor. A cell corresponds to a unicode
1908 * character along with all associated styles (such as colors and font).
1909 * A cell may or may not have style. If style is supported in the
1910 * editor, it is assumed all cells will have styles and hence every
1911 * IAnjutaEditorCell interface instance will have additionally
1912 * IAnjutaEditorCellStyle implemented.
1914 interface IAnjutaEditorCell
1916 #include
<libanjuta
/interfaces
/ianjuta
-editor.h
>
1919 * ianjuta_editor_cell_get_character:
1921 * @err: Error propagation and reporting
1923 * Returns the unicode character in this cell. A NULL terminated
1924 * string is returned that is the multibyte unicode character.
1925 * NULL is returned if the cell does not have any character.
1927 * Retruns: a newly created string representing the cell's unicode
1930 gchar
*get_character
();
1933 * ianjuta_editor_cell_get_length:
1935 * @err: Error propagation and reporting.
1937 * Gets the length of the cell in bytes. That is, length of the
1938 * unicode character.
1940 * Returns: Length of the unicode character.
1945 * ianjuta_editor_cell_get_line:
1947 * @err: Error propagation and reporting.
1949 * Get the line of the cell
1951 * Returns: Line of the cell
1956 * ianjuta_editor_cell_get_char:
1958 * @err: Error propagation and reporting
1960 * Returns the byte of the unicode character in this cell at given
1961 * index @char_index. @char_index can vary from 0 to length of the
1962 * unicode string minus 1. Out of range index is not allowed
1963 * (asserted) and return is undefined.
1965 * Since there is dynamic allocation of unicode character string
1966 * involved in ianjuta_editor_cell_get_character(), this function
1967 * is mainly useful for fast iteration (such as copying data).
1969 * Retruns: a byte character.
1971 gchar get_char
(gint char_index
);
1973 IAnjutaEditorAttribute get_attribute
();
1976 * SECTION:ianjuta-editor-cell-style
1977 * @title: IAnjutaEditorCellStyle
1978 * @short_description: Text editor cell style interface
1980 * @stability: Unstable
1981 * @include: libanjuta/interfaces/ianjuta-editor-cell-style.h
1984 interface IAnjutaEditorCellStyle
1986 gchar
* get_font_description
();
1988 gchar
* get_background_color
();
1993 * SECTION:ianjuta-bookmark
1994 * @title: IAnjutaBookmark
1995 * @short_description: Bookmark interface
1997 * @stability: Unstable
1998 * @include: libanjuta/interfaces/ianjuta-bookmark.h
2001 interface IAnjutaBookmark
2004 * ianjuta_bookmark_toggle:
2006 * @location: The location where bookmark is toggled.
2007 * @ensure_visible: If the location must be made visible.
2008 * @err: Error propagation and reporting
2010 * Toggle bookmark at given @location
2013 void toggle
(gint location
, gboolean ensure_visible
);
2016 * ianjuta_bookmark_first:
2018 * @err: Error propagation and reporting
2020 * Goto first bookmark
2026 * ianjuta_bookmark_last:
2028 * @err: Error propagation and reporting
2030 * Goto last bookmark
2036 * ianjuta_bookmark_next:
2038 * @err: Error propagation and reporting
2040 * Goto next bookmark
2046 * ianjuta_bookmark_previous:
2048 * @err: Error propagation and reporting
2050 * Goto previous bookmark
2056 * ianjuta_bookmark_clear_all:
2058 * @err: Error propagation and reporting
2060 * Clear all bookmarks
2067 * SECTION:ianjuta-editor-factory
2068 * @title: IAnjutaEditorFactory
2069 * @short_description: Text editor factory that creates IAnjutaEditor objects
2071 * @stability: Unstable
2072 * @include: libanjuta/interfaces/ianjuta-editor-factory.h
2075 interface IAnjutaEditorFactory
2077 #include
"ianjuta-editor.h"
2080 * ianjuta_editor_factory_new_editor:
2083 * @filename: filename to open
2084 * @err: Error propagation and reporting
2086 * Get a new GtkWidget* which implements IAnjutaEditor
2088 * Return value: An object implementing IAnjutaEditor
2090 IAnjutaEditor
* new_editor
(const gchar
* uri
, const gchar
* filename
);
2094 * SECTION:ianjuta-document-manager
2095 * @title: IAnjutaDocumentManager
2096 * @short_description: Interface for plugin that manages all the editors
2098 * @stability: Unstable
2099 * @include: libanjuta/interfaces/ianjuta-document-manager.h
2102 interface IAnjutaDocumentManager
2104 #include
"ianjuta-document.h"
2105 #include
"ianjuta-editor.h"
2113 * ianjuta_document_manager_get_full_filename:
2115 * @file: short filename
2116 * @err: Error propagation and reporting.
2118 * Given the short filename, finds the full path of the file, if the
2119 * editor that has it loaded is found. If there is no editor that has
2120 * this file opened, returns NULL.
2122 * Return value: the full path of the file, if an editor is found for it.
2124 gchar
* get_full_filename
(const gchar
*file
);
2127 * ianjuta_document_manager_find_document_with_path:
2129 * @file_path: the file path.
2130 * @err: Error propagation and reporting.
2132 * Finds the document that has the file with path @file_path loaded. Only
2133 * the editor that matches the file path will be searched.
2135 * Return value: the document that corresponds to given file path. NULL if
2136 * there is no editor loaded with this file path.
2138 IAnjutaDocument
* find_document_with_path
(const gchar
*file_path
);
2141 * ianjuta_document_manager_goto_file_line:
2143 * @file: the file to go to.
2144 * @lineno: the line number in the file to go to.
2145 * @err: Error propagation and reporting.
2147 * Loads the given file if not loaded yet, set its editor as current editor
2148 * and moves cursor to the given line in the editor.
2150 * Return value: the editor where the mark has been put. NULL if none.
2152 IAnjutaEditor
* goto_file_line
(const gchar
*file
, gint lineno
);
2155 * ianjuta_document_manager_goto_file_line_mark:
2157 * @file: the file to go to.
2158 * @lineno: the line number in the file to go to.
2159 * @mark: TRUE if the line should be marked with a marker.
2160 * @err: Error propagation and reporting
2162 * Loads the given file if not loaded yet, set its editor as current editor
2163 * and moves cursor to the given line in the editor. Optionally also marks
2164 * the line with line marker if @mark is given TRUE.
2166 * Return value: the editor where the mark has been put. NULL if none.
2168 IAnjutaEditor
* goto_file_line_mark
(const gchar
*file
, gint lineno
, gboolean mark
);
2171 * ianjuta_document_manager_get_current_document:
2173 * @err: Error propagation and reporting.
2175 * Gets the current document.
2177 * Return value: the currently active document. NULL if none is there.
2179 IAnjutaDocument
* get_current_document
();
2182 * ianjuta_document_manager_set_current_document:
2184 * @document: the document to set as current.
2185 * @err: Error propagation and reporting.
2187 * Sets the given document as current document.
2189 void set_current_document
(IAnjutaDocument
*document
);
2192 * ianjuta_document_manager_get_doc_widgets:
2194 * @err: Error propagation and reporting.
2196 * Gets a list of widgets for open documents. Each widget is
2197 * a GTK_WIDGET(InjutaDocument*)
2199 * Return value: a list of widgets for all open documents
2200 * The returned list (but not the data in the list) must be
2203 List
<GtkWidget
*> get_doc_widgets
();
2206 * ianjuta_document_manager_add_buffer:
2208 * @name: Name of the editor buffer.
2209 * @content: Initial content of the buffer.
2210 * @err: Error propagation and reporting.
2212 * Creates a new editor buffer of the given name and sets the given
2213 * content as its initial content.
2215 * Return value: the IAnjutaEditor instance that has been added.
2217 IAnjutaEditor
* add_buffer
(const gchar
*name
, const gchar
* content
);
2220 * ianjuta_document_manager_remove_document:
2222 * @document: Document to close.
2223 * @save_before: If true, saves the document before closing.
2224 * @err: Error propagation and reporting.
2226 * Closes and removes the given document. If @save_before is TRUE, also
2227 * saves the document before closing.
2229 * Return value: TRUE if the document was removed, else FALSE.
2231 gboolean remove_document
(IAnjutaDocument
*document
, gboolean save_before
);
2234 * ianjuta_document_manager_add_document:
2236 * @document: the document to add
2237 * @err: Error propagation and reporting.
2239 * Adds a document to the document manager. This will open a new
2240 * Notebook tab and show the document there
2243 void add_document
(IAnjutaDocument
* document
);
2248 * SECTION:ianjuta-message-view
2249 * @title: IAnjutaMessageView
2250 * @short_description: A view where messages of different kind can be shown
2252 * @stability: Unstable
2253 * @include: libanjuta/interfaces/ianjuta-message-view.h
2256 interface IAnjutaMessageView
2267 * IAnjutaMessageView::message_clicked:
2270 * @err: Error propagation and reporting.
2274 void ::message_clicked
(const gchar
*message);
2277 * IAnjutaMessageView::buffer_flushed:
2280 * @err: Error propagation and reporting.
2284 void ::buffer_flushed
(const gchar
*line
);
2287 * ianjuta_message_view_buffer_append:
2290 * @err: Error propagation and reporting.
2294 void buffer_append
(const gchar
*text
);
2297 * ianjuta_message_view_append:
2302 * @err: Error propagation and reporting.
2306 void append
(Type type
, const gchar
*summary
, const gchar
*details
);
2309 * ianjuta_message_view_clear:
2311 * @err: Error propagation and reporting.
2318 * ianjuta_message_view_select_next:
2320 * @err: Error propagation and reporting.
2324 void select_next
();
2327 * ianjuta_message_view_select_previous:
2329 * @err: Error propagation and reporting.
2333 void select_previous
();
2336 * ianjuta_message_view_get_current_message:
2338 * @err: Error propagation and reporting.
2342 const gchar
* get_current_message
();
2345 * ianjuta_message_view_get_all_messages:
2347 * @err: Error propagation and reporting.
2351 List
<const gchar
*> get_all_messages
();
2355 * SECTION:ianjuta-message-manager
2356 * @title: IAnjutaMessageManager
2357 * @short_description: The plugin that managers all message views
2359 * @stability: Unstable
2360 * @include: libanjuta/interfaces/ianjuta-message-manager.h
2363 interface IAnjutaMessageManager
2365 #include
"ianjuta-message-view.h"
2372 * ianjuta_message_manager_add_view:
2374 * @name: Name/Title of the new view
2375 * @icon: Path to an icon or ""
2376 * @err: Error propagation and reporting
2378 * Adds a new view to the message-manager
2380 * Return value: The new message-view
2382 IAnjutaMessageView
* add_view
(const gchar
*name
, const gchar
*icon
);
2385 * ianjuta_message_manager_remove_view:
2387 * @view: The view to remove
2388 * @err: Error propagation and reporting
2390 * Remove view from the message-manager. The view
2391 * will become invalid.
2393 void remove_view
(IAnjutaMessageView
*view
);
2396 * ianjuta_message_manager_get_current_view:
2398 * @err: Error propagation and reporting
2400 * Get the view with is currently on top of
2401 * the notebook or NULL if the message-manager is empty.
2403 * Return value: Current view; #IAnjutaMessageView object.
2404 * NULL, if there is no views.
2406 IAnjutaMessageView
* get_current_view
();
2409 * ianjuta_message_manager_get_view_by_name:
2411 * @name: Name/Title of the view
2412 * @err: Error propagation and reporting
2414 * Get the view with the given name or NULL if
2415 * it does not exist.
2417 * Return value: The message-view or NULL
2419 IAnjutaMessageView
* get_view_by_name
(const gchar
*name
);
2422 * ianjuta_message_manager_get_all_views:
2424 * @err: Error propagation and reporting
2426 * Get all message-views
2428 * Return value: A GList* of all views. You must not
2429 * manipulate the list.
2431 List
<IAnjutaMessageView
*> get_all_views
();
2434 * ianjuta_message_manager_set_current_view:
2436 * @view: A message view
2437 * @err: Error propagation and reporting
2439 * Set view to be on top of the notebook.
2442 void set_current_view
(IAnjutaMessageView
*view
);
2445 * ianjuta_message_manager_set_view_title:
2447 * @view: A message view
2448 * @title: Sets the title of view.
2449 * @err: Error propagation and reporting
2451 * Sets the title of view.
2454 void set_view_title
(IAnjutaMessageView
*view
, const gchar
*title
);
2458 * SECTION:ianjuta-file-manager
2459 * @title: IAnjutaFileManager
2460 * @short_description: File manager plugin
2462 * @stability: Unstable
2463 * @include: libanjuta/interfaces/ianjuta-file-manager.h
2466 interface IAnjutaFileManager
2470 * IAnjutaFileManager::section_changed:
2472 * @err: Error propagation and reporting.
2476 void ::section_changed
(const gchar
*uri
);
2479 * ianjuta_file_manager_set_root:
2482 * @err: Error propagation and reporting.
2486 void set_root
(const gchar
*root_uri
);
2489 * ianjuta_file_manager_get_selected:
2491 * @err: Error propagation and reporting.
2495 gchar
* get_selected
();
2498 * ianjuta_file_manager_set_selected:
2501 * @err: Error propagation and reporting.
2505 void set_selected
(const gchar
*uri
);
2509 * SECTION:ianjuta-terminal
2510 * @title: IAnjutaTerminal
2511 * @short_description: Interface for command line terminals
2513 * @stability: Unstable
2514 * @include: libanjuta/interfaces/ianjuta-terminal.h
2517 interface IAnjutaTerminal
2519 #include
<sys
/types.h
>
2522 * ianjuta_terminal_execute_command:
2526 * @err: Error propagation and reporting.
2532 pid_t execute_command
(const gchar
* directory
, const gchar
*command
);
2536 * SECTION:ianjuta-project-manager
2537 * @title: IAnjutaProjectManager
2538 * @short_description: Interface for project managers
2540 * @stability: Unstable
2541 * @include: libanjuta/interfaces/ianjuta-project-manager.h
2544 interface IAnjutaProjectManager
2565 CAN_ADD_GROUP
= 1 << 0,
2566 CAN_ADD_TARGET
= 1 << 1,
2567 CAN_ADD_SOURCE
= 1 << 2
2573 * IAnjutaProjectManager::element_added:
2575 * @element_uri: fixme
2576 * @err: Error propagation and reporting.
2580 void ::element_added
(const gchar
*element_uri
);
2583 * IAnjutaProjectManager::element_removed:
2585 * @element_uri: fixme
2586 * @err: Error propagation and reporting.
2590 void ::element_removed
(const gchar
*element_uri
);
2593 * IAnjutaProjectManager::element_selected:
2595 * @element_uri: fixme
2596 * @err: Error propagation and reporting.
2600 void ::element_selected
(const gchar
*element_uri
);
2605 * ianjuta_project_manager_get_element_type:
2607 * @element_uri: fixme
2608 * @err: Error propagation and reporting.
2614 ElementType get_element_type
(const gchar
*element_uri
);
2617 * ianjuta_project_manager_get_elements:
2619 * @element_type: fixme
2620 * @err: Error propagation and reporting.
2626 List
<const gchar
*> get_elements
(ElementType element_type
);
2629 * ianjuta_project_manager_get_target_type:
2631 * @target_uri: fixme
2632 * @err: Error propagation and reporting.
2638 TargetType get_target_type
(const gchar
*target_uri
);
2641 * ianjuta_project_manager_get_targets:
2643 * @target_type: fixme
2644 * @err: Error propagation and reporting.
2650 List
<const gchar
*> get_targets
(TargetType target_type
);
2653 * ianjuta_project_manager_get_parent:
2655 * @element_uri: fixme
2656 * @err: Error propagation and reporting.
2662 gchar
* get_parent
(const gchar
*element_uri
);
2665 * ianjuta_project_manager_get_children:
2667 * @element_uri: fixme
2668 * @err: Error propagation and reporting.
2674 List
<const gchar
*> get_children
(const gchar
*element_uri
);
2677 * ianjuta_project_manager_get_selected:
2679 * @err: Error propagation and reporting.
2683 gchar
* get_selected
();
2686 * ianjuta_project_manager_get_capabilities:
2688 * @err: Error propagation and reporting.
2690 * Returns the capabilites of project whether it can add group, target
2693 * Returns: Supported capabilites.
2695 Capabilities get_capabilities
();
2698 * ianjuta_project_manager_add_source:
2700 * @source_uri_to_add: fixme
2701 * @default_location_uri: fixme
2702 * @err: Error propagation and reporting.
2704 * Prompt the user to add a file to the project. If the user selects
2705 * multiple files only the first uri is returned.
2707 * Returns: element URIs. Must be freed when no longer required.
2709 gchar
* add_source
(const gchar
*source_uri_to_add
, const gchar
*default_location_uri
);
2712 * ianjuta_project_manager_add_sources:
2714 * @source_uris_to_add: fixme
2715 * @default_location_uri: fixme
2716 * @err: Error propagation and reporting.
2718 * Prompt the user to add a file to the project. If the user selects
2719 * multiple files only the first uri is returned.
2721 * Returns: element URIs. Must be freed when no longer required.
2723 List
<const gchar
*> add_sources
(List
<const gchar
*> source_uri_to_add
, const gchar
*default_location_uri
);
2726 * ianjuta_project_manager_add_target:
2728 * @target_name_to_add: fixme
2729 * @default_location_uri: fixme
2730 * @err: Error propagation and reporting.
2736 gchar
* add_target
(const gchar
*target_name_to_add
, const gchar
*default_location_uri
);
2739 * ianjuta_project_manager_add_group:
2741 * @group_name_to_add: fixme
2742 * @default_location_uri: fixme
2743 * @err: Error propagation and reporting.
2749 gchar
* add_group
(const gchar
*group_name_to_add
, const gchar
*default_location_uri
);
2752 * ianjuta_project_manager_is_open:
2754 * @err: Error propagation and reporting.
2758 gboolean is_open
();
2762 * SECTION:ianjuta-todo
2763 * @title: IAnjutaTodo
2764 * @short_description: Task manager interface
2766 * @stability: Unstable
2767 * @include: libanjuta/interfaces/ianjuta-todo.h
2770 interface IAnjutaTodo
2774 * ianjuta_to_do_load:
2777 * @err: Error propagation and reporting.
2781 void load
(const gchar
*uri
);
2785 * SECTION:ianjuta-wizard
2786 * @title: IAnjutaWizard
2787 * @short_description: Interface for wizards that can create new stuffs
2789 * @stability: Unstable
2790 * @include: libanjuta/interfaces/ianjuta-wizard.h
2793 interface IAnjutaWizard
2797 * ianjuta_wizard_activate:
2799 * @err: Error propagation and reporting.
2807 * SECTION:ianjuta-debugger
2808 * @title: IAnjutaDebugger
2809 * @short_description: Debugger interface
2811 * @stability: Unstable
2812 * @include: libanjuta/interfaces/ianjuta-debugger.h
2815 interface IAnjutaDebugger
2817 #include
"ianjuta-message-view.h"
2818 #include
<libanjuta
/anjuta
-error.h
>
2819 #include
<sys
/types.h
>
2833 UNABLE_TO_CREATE_VARIABLE
,
2834 UNABLE_TO_ACCESS_MEMORY
,
2835 UNABLE_TO_OPEN_FILE
,
2836 UNSUPPORTED_FILE_TYPE
,
2837 UNSUPPORTED_VERSION
,
2838 UNABLE_TO_FIND_DEBUGGER
,
2882 /* Call back functions */
2883 typedef void (*Callback) (const gpointer data
, gpointer user_data
, GError
* err
);
2884 typedef void (*GListCallback
) (const GList
* list
, gpointer user_data
, GError
* err
);
2885 typedef void (*GCharCallback
) (const gchar
*value
, gpointer user_data
, GError
* err
);
2886 typedef void (*OutputCallback
) (OutputType type
, const gchar
*output
, gpointer user_data
);
2887 typedef void (*MemoryCallback
) (gulong address
, guint length
, const gchar
*data
, gpointer user_data
, GError
*err
);
2892 * IAnjutaDebugger::debugger_started:
2897 void ::debugger_started
();
2900 * IAnjutaDebugger::debugger_stopped:
2902 * @err: Error propagation and reporting.
2906 void ::debugger_stopped
(GError
*err
);
2909 * IAnjutaDebugger::program_loaded:
2914 void ::program_loaded
();
2917 * IAnjutaDebugger::program_running:
2922 void ::program_running
();
2925 * IAnjutaDebugger::program_stopped:
2930 void ::program_stopped
();
2933 * IAnjutaDebugger::program_exited:
2938 void ::program_exited
();
2941 * IAnjutaDebugger::sharedlib_event:
2946 void ::sharedlib_event
();
2949 * IAnjutaDebugger::program_moved:
2951 * @pid: process id, 0 when unknown
2952 * @tid: thread id, 0 when unknown
2953 * @address: program counter address, 0 when unknown
2954 * @file: source file where is the program counter, NULL when unknown
2955 * @line: line number if file name above is not NULL
2957 * This signal is emitted when the debugger know the current program
2958 * location. Most of the time, after the program has stopped but it
2959 * could happen even if it is still running.
2961 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
2964 * IAnjutaDebugger::frame_changed:
2971 void ::frame_changed
(guint frame
, gint thread
);
2974 * IAnjutaDebugger::signal_received:
2976 * @name: Signal name
2977 * @description: Signal description
2981 void ::signal_received
(const gchar
* name
, const gchar
* description
);
2984 * IAnjutaDebugger::debugger_ready:
2990 void ::debugger_ready
(State state
);
2994 * ianjuta_debugger_get_state:
2996 * @err: Error propagation and reporting.
3008 * ianjuta_debugger_load:
3012 * @source_search_directories: fixme
3014 * @err: Error propagation and reporting.
3018 * Returns: TRUE if sucessful, other FALSE.
3020 gboolean load
(const gchar
*file
, const gchar
*mime_type
, const List
<const gchar
*> source_search_directories
);
3023 * ianjuta_debugger_attach:
3026 * @source_search_directories: fixme
3027 * @err: Error propagation and reporting.
3031 * Returns: TRUE if sucessful, other FALSE.
3033 gboolean attach
(pid_t pid
, const List
<const gchar
*> source_search_directories
);
3036 * ianjuta_debugger_start:
3038 * @args: command line argument of the program
3039 * @terminal: TRUE if the program need a terminal
3040 * @stop: TRUE if program is stopped at the beginning
3041 * @err: Error propagation and reporting.
3043 * Start a loaded program under debugger control.
3045 * Returns: TRUE if sucessful, other FALSE.
3047 gboolean start
(const gchar
*args
, gboolean terminal
, gboolean stop
);
3050 * ianjuta_debugger_unload:
3052 * @err: Error propagation and reporting.
3061 * ianjuta_debugger_quit:
3063 * @err: Error propagation and reporting.
3065 * Quit the debugger, can wait until the debugger is ready.
3067 * Returns: TRUE if sucessful, other FALSE.
3072 * ianjuta_debugger_abort:
3074 * @err: Error propagation and reporting.
3076 * Quit the debugger as fast as possible.
3078 * Returns: TRUE if sucessful, other FALSE.
3083 * ianjuta_debugger_run:
3085 * @err: Error propagation and reporting.
3094 * ianjuta_debugger_step_in:
3096 * @err: Error propagation and reporting.
3102 gboolean step_in
();
3105 * ianjuta_debugger_step_over:
3107 * @err: Error propagation and reporting.
3113 gboolean step_over
();
3116 * ianjuta_debugger_step_out:
3118 * @err: Error propagation and reporting.
3124 gboolean step_out
();
3127 * ianjuta_debugger_run_to:
3131 * @err: Error propagation and reporting.
3137 gboolean run_to
(const gchar
*uri
, gint line
);
3140 * ianjuta_debugger_exit:
3142 * @err: Error propagation and reporting.
3151 * ianjuta_debugger_interrupt:
3153 * @err: Error propagation and reporting.
3159 gboolean interrupt
();
3164 * ianjuta_debugger_inspect:
3169 * @err: Error propagation and reporting.
3175 gboolean inspect
(const gchar
* name
, Callback callback, gpointer user_data
);
3178 * ianjuta_debugger_evaluate:
3184 * @err: Error propagation and reporting.
3190 gboolean evaluate
(const gchar
* name
, const gchar
* value
, Callback callback, gpointer user_data
);
3193 * ianjuta_debugger_print:
3198 * @err: Error propagation and reporting.
3204 gboolean print
(const gchar
*variable
, Callback callback, gpointer user_data
);
3207 * ianjuta_debugger_list_local:
3211 * @err: Error propagation and reporting.
3217 gboolean list_local
(Callback callback, gpointer user_data
);
3220 * ianjuta_debugger_list_argument:
3224 * @err: Error propagation and reporting.
3230 gboolean list_argument
(Callback callback, gpointer user_data
);
3233 * ianjuta_debugger_info_signal:
3237 * @err: Error propagation and reporting.
3243 gboolean info_signal
(Callback callback, gpointer user_data
);
3246 * ianjuta_debugger_info_sharedlib:
3250 * @err: Error propagation and reporting.
3256 gboolean info_sharedlib
(Callback callback, gpointer user_data
);
3259 * ianjuta_debugger_handle_signal:
3265 * @err: Error propagation and reporting.
3271 gboolean handle_signal
(const gchar
*name
, gboolean stop
, gboolean print
, gboolean
ignore);
3274 * ianjuta_debugger_info_frame:
3279 * @err: Error propagation and reporting.
3285 gboolean info_frame
(guint frame
, Callback callback, gpointer user_data
);
3288 * ianjuta_debugger_info_args:
3292 * @err: Error propagation and reporting.
3298 gboolean info_args
(Callback callback, gpointer user_data
);
3301 * ianjuta_debugger_info_target:
3305 * @err: Error propagation and reporting.
3311 gboolean info_target
(Callback callback, gpointer user_data
);
3314 * ianjuta_debugger_info_program:
3318 * @err: Error propagation and reporting.
3324 gboolean info_program
(Callback callback, gpointer user_data
);
3327 * ianjuta_debugger_info_udot:
3331 * @err: Error propagation and reporting.
3337 gboolean info_udot
(Callback callback, gpointer user_data
);
3341 * ianjuta_debugger_info_variables:
3345 * @err: Error propagation and reporting.
3351 gboolean info_variables
(Callback callback, gpointer user_data
);
3354 * ianjuta_debugger_list_frame:
3358 * @err: Error propagation and reporting.
3364 gboolean list_frame
(Callback callback, gpointer user_data
);
3367 * ianjuta_debugger_set_frame:
3370 * @err: Error propagation and reporting.
3376 gboolean set_frame
(guint frame
);
3379 * ianjuta_debugger_list_thread:
3383 * @err: Error propagation and reporting.
3389 gboolean list_thread
(Callback callback, gpointer user_data
);
3392 * ianjuta_debugger_set_thread:
3395 * @err: Error propagation and reporting.
3401 gboolean set_thread
(gint thread
);
3404 * ianjuta_debugger_info_threads:
3409 * @err: Error propagation and reporting.
3415 gboolean info_thread
(gint thread
, Callback callback, gpointer user_data
);
3418 * ianjuta_debugger_list_register:
3422 * @err: Error propagation and reporting.
3428 gboolean list_register
(Callback callback, gpointer user_data
);
3431 * ianjuta_debugger_send_command:
3434 * @err: Error propagation and reporting.
3440 gboolean send_command
(const gchar
*command
);
3443 * ianjuta_debugger_callback:
3447 * @err: Error propagation and reporting.
3453 gboolean
callback (Callback callback, gpointer user_data
);
3456 * ianjuta_debugger_enable_log:
3459 * @err: Error propagation and reporting.
3465 void enable_log
(IAnjutaMessageView
*log
);
3468 * ianjuta_debugger_disable_log:
3470 * @err: Error propagation and reporting.
3476 void disable_log
();
3479 * SECTION:ianjuta-debugger-breakpoint
3480 * @title: IAnjutaDebuggerBreakpoint
3481 * @short_description: Breakpoint Debugger interface
3483 * @stability: Unstable
3484 * @include: libanjuta/interfaces/ianjuta-debugger-breakpoint.h
3487 interface IAnjutaDebuggerBreakpoint
3495 ON_ADDRESS
= 1 << 2,
3496 ON_FUNCTION
= 1 << 3,
3499 WITH_ENABLE
= 1 << 16,
3500 WITH_IGNORE
= 1 << 15,
3501 WITH_TIME
= 1 << 11,
3502 WITH_CONDITION
= 1 << 12,
3503 WITH_TEMPORARY
= 1 << 13
3523 SET_AT_ADDRESS
= 1 << 0,
3524 SET_AT_FUNCTION
= 1 << 1,
3531 * ianjuta_debugger_breakpoint_implement:
3533 * @err: Error propagation and reporting.
3535 * Return all implemented methods.
3537 * Returns: A OR of IAnjutaDebuggerBreakpointMethod
3538 * corresponding to all implemented optional methods.
3543 * ianjuta_debugger_breakpoint_set_at_line:
3545 * @file: File containing the breakpoint
3546 * @line: Line number where is the breakpoint
3547 * @callback: Callback to call when the breakpoint has been set
3548 * @user_data: User data that is passed back to the callback
3549 * @err: Error propagation and reporting.
3551 * Set a breakpoint at the specified line in the file.
3553 * Returns: TRUE if the request succeed and the callback is called. If
3554 * FALSE, the callback will not be called.
3556 gboolean set_at_line
(const gchar
* file
, guint line
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3560 * ianjuta_debugger_breakpoint_set_at_address:
3562 * @address: Address of the breakpoint
3563 * @callback: Callback to call when the breakpoint has been set
3564 * @user_date: User data that is passed back to the callback
3565 * @err: Error propagation and reporting.
3567 * Set a breakpoint at the specified address.
3568 * This function is optional.
3570 * Returns: TRUE if the request succeed and the callback is called. If
3571 * FALSE, the callback will not be called.
3573 gboolean set_at_address
(gulong address
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3576 * ianjuta_debugger_breakpoint_set_at_function:
3578 * @file: File containing the breakpoint
3579 * @function: Function name where the breakpoint is put
3580 * @callback: Callback to call when the breakpoint has been set
3581 * @user_data: User data that is passed back to the callback
3582 * @err: Error propagation and reporting.
3584 * Set a breakpoint at the beginning of the specified function.
3585 * This function is optional.
3587 * Returns: TRUE if the request succeed and the callback is called. If
3588 * FALSE, the callback will not be called.
3590 gboolean set_at_function
(const gchar
* file
, const gchar
* function
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3593 * ianjuta_debugger_breakpoint_clear:
3595 * @id: Breakpoint identification number
3596 * @callback: Callback to call when the breakpoint has been cleared
3597 * @user_data: User data that is passed back to the callback
3598 * @err: Error propagation and reporting.
3600 * Clear a breakpoint put by any set functions. The Id of the breakpoint
3601 * is given in the callback of the set functions.
3603 * Returns: TRUE if the request succeed and the callback is called. If
3604 * FALSE, the callback will not be called.
3606 gboolean clear
(guint
id, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3609 * ianjuta_debugger_breakpoint_list:
3611 * @callback: Callback to call with the list of breakpoints
3612 * @user_data: User data that is passed back to the callback
3613 * @err: Error propagation and reporting.
3615 * List all breakpoints set in the debugger. It is useful to
3616 * know how many time a breakpoint has been hit.
3618 * Returns: TRUE if the request succeed and the callback is called. If
3619 * FALSE, the callback will not be called.
3621 gboolean list
(IAnjutaDebuggerCallback
callback, gpointer user_data
);
3624 * ianjuta_debugger_breakpoint_enable:
3626 * @id: Breakpoint identification number
3627 * @enable: TRUE to enable the breakpoint, FALSE to disable it
3628 * @callback: Callback to call when the breakpoint has been changed
3629 * @user_data: User data that is passed back to the callback
3630 * @err: Error propagation and reporting.
3632 * Enable of disable a breakpoint. This function is optional.
3634 * Returns: TRUE if the request succeed and the callback is called. If
3635 * FALSE, the callback will not be called.
3637 gboolean enable
(guint
id, gboolean enable
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3640 * ianjuta_debugger_breakpoint_ignore:
3642 * @id: Breakpoint identification number
3643 * @ignore: Number of time a breakpoint must be ignored
3644 * @callback: Callback to call when the breakpoint has been changed
3645 * @user_data: User data that is passed back to the callback
3646 * @err: Error propagation and reporting.
3648 * This allow to ignore the breakpoint a number of time before stopping.
3649 * This function is optional.
3651 * Returns: TRUE if the request succeed and the callback is called. If
3652 * FALSE, the callback will not be called.
3654 gboolean
ignore (guint
id, guint
ignore, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3657 * ianjuta_debugger_breakpoint_condition:
3659 * @id: Breakpoint identification number
3661 * @callback: Callback to call when the breakpoint has been changed
3662 * @user_data: User data that is passed back to the callback
3663 * @err: Error propagation and reporting.
3665 * Add a condition, evaluate in the program context, on the breakpoint,
3666 * the program will stop when it reachs the breakpoint only if the
3667 * condition is true. This function is optional.
3669 * Returns: TRUE if the request succeed and the callback is called. If
3670 * FALSE, the callback will not be called.
3672 gboolean condition
(guint
id, const gchar
* condition
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3676 * SECTION:ianjuta-debugger-variable
3677 * @title: IAnjutaDebuggerVariable
3678 * @short_description: Variables interface for debuggers
3680 * @stability: Unstable
3681 * @include: libanjuta/interfaces/ianjuta-debugger-variable.h
3683 * This interface is used to examine and change values of expression.
3684 * It is based on the MI2 variable object interface of gdb. A
3685 * variable needs to be created before being able to get or set its
3686 * value and list its children.
3688 interface IAnjutaDebuggerVariable
3701 * ianjuta_debugger_variable_create:
3703 * @expression: Variable expression
3704 * @callback: Callback to call when the variable has been created
3705 * @user_data: User data that is passed back to the callback
3706 * @err: Error propagation and reporting.
3708 * Create a new variable object in the current thread and frame.
3710 * Returns: TRUE if the request succeed and the callback is
3711 * called. If FALSE, the callback will not be called.
3713 gboolean create
(const gchar
*expression
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3716 * ianjuta_debugger_variable_list_children:
3718 * @name: Variable name
3719 * @callback: Callback to call when the children have been
3721 * @user_data: User data that is passed back to the callback
3722 * @err: Error propagation and reporting.
3724 * List and create objects for all children of a
3727 * Returns: TRUE if the request succeed and the callback is
3728 * called. If FALSE, the callback will not be called.
3730 gboolean list_children
(const gchar
*name
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3733 * ianjuta_debugger_variable_evaluate:
3735 * @name: Variable name
3736 * @callback: Callback to call with the variable value
3737 * @user_data: User data that is passed back to the callback
3738 * @err: Error propagation and reporting.
3740 * Get the value of one variable or child object.
3742 * Returns: TRUE if the request succeed and the callback is
3743 * called. If FALSE, the callback will not be called.
3745 gboolean evaluate
(const gchar
*name
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3748 * ianjuta_debugger_variable_assign:
3750 * @name: Variable name
3751 * @value: Variable value
3752 * @err: Error propagation and reporting.
3754 * Set the value of one variable or child object.
3756 * Returns: TRUE if the request succeed and the callback is
3757 * called. If FALSE, the callback will not be called.
3759 gboolean assign
(const gchar
*name
, const gchar
*value
);
3762 * ianjuta_debugger_variable_update:
3764 * @callback: Callback to call with the list of all changed
3766 * @user_data: User data that is passed back to the callback
3767 * @err: Error propagation and reporting.
3769 * List all changed variable objects since the last call.
3771 * Returns: TRUE if the request succeed and the callback is
3772 * called. If FALSE, the callback will not be called.
3774 gboolean update
(IAnjutaDebuggerCallback
callback, gpointer user_data
);
3777 * ianjuta_debugger_variable_destroy:
3779 * @name: Variable name
3780 * @err: Error propagation and reporting.
3782 * Delete a previously created variable or child object
3783 * including its own children.
3785 * Returns: TRUE if the request succeed and the callback is
3786 * called. If FALSE, the callback will not be called.
3788 gboolean destroy
(const gchar
*name
);
3792 * SECTION:ianjuta-debugger-register
3793 * @title: IAnjutaDebuggerRegister
3794 * @short_description: Register interface for debuggers
3796 * @stability: Unstable
3797 * @include: libanjuta/interfaces/ianjuta-debugger-register.h
3799 * This interface is used to examine and change values of CPU registers.
3801 interface IAnjutaDebuggerRegister
3812 * ianjuta_debugger_register_list:
3814 * @callback: Callback to call with the register list
3815 * @user_data: User data that is passed back to the callback
3816 * @err: Error propagation and reporting.
3818 * List all registers of the target. This function can be called without
3819 * a program loaded, the value field of register structure is not filled.
3821 * Returns: TRUE if the request succeed and the callback is
3822 * called. If FALSE, the callback will not be called.
3824 gboolean list
(IAnjutaDebuggerCallback
callback, gpointer user_data
);
3827 * ianjuta_debugger_register_update:
3829 * @callback: Callback call with the list of all modified registers
3830 * @user_data: User data that is passed back to the callback
3831 * @err: Error propagation and reporting.
3833 * Return all modified registers since the last call. Only the num and
3834 * value field are used.
3836 * Returns: TRUE if the request succeed and the callback is
3837 * called. If FALSE, the callback will not be called.
3839 gboolean update
(IAnjutaDebuggerCallback
callback, gpointer user_data
);
3842 * ianjuta_debugger_register_write:
3844 * @value: Modified register with a new value
3845 * @err: Error propagation and reporting.
3847 * Change the value of one register. Only the num and value field are used.
3849 * Returns: TRUE if the request succeed.
3851 gboolean write
(Data
*value
);
3855 * SECTION:ianjuta-debugger-memory
3856 * @title: IAnjutaDebuggerMemory
3857 * @short_description: Memory interface for debuggers
3859 * @stability: Unstable
3860 * @include: libanjuta/interfaces/ianjuta-debugger-memory.h
3862 * This interface is used to examine the target memory.
3864 interface IAnjutaDebuggerMemory
3874 * ianjuta_debugger_memory_inspect:
3876 * @address: Start address of the memory block
3877 * @length: Length of memory block
3878 * @callback: Call back with a IAnjutaDebuggerMemoryBlock as argument
3879 * @user_data: User data that is passed back to the callback
3880 * @err: Error propagation and reporting.
3882 * Read a block of the target memory.
3884 * Returns: TRUE if the request succeed and the callback is
3885 * called. If FALSE, the callback will not be called.
3887 gboolean inspect
(gulong address
, guint length
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3891 * SECTION:ianjuta-debugger-instruction
3892 * @title: IAnjutaDebuggerInstruction
3893 * @short_description: Debugger interface for machine instruction
3895 * @stability: Unstable
3896 * @include: libanjuta/interfaces/ianjuta-debugger-instruction.h
3898 * This interface is used to debuger as machine instruction level.
3900 interface IAnjutaDebuggerInstruction
3917 * ianjuta_debugger_instruction_disassemble:
3919 * @address: Start address of the memory block
3920 * @length: Length of memory block
3921 * @callback: Call back with a IAnjutaDebuggerInstructionDisassembly as argument
3922 * @user_data: User data that is passed back to the callback
3923 * @err: Error propagation and reporting.
3925 * Disassemble a part of the memory
3927 * Returns: TRUE if the request succeed and the callback is
3928 * called. If FALSE, the callback will not be called.
3930 gboolean disassemble
(gulong address
, guint length
, IAnjutaDebuggerCallback
callback, gpointer user_data
);
3933 * ianjuta_debugger_instruction_step_in:
3935 * @err: Error propagation and reporting.
3937 * Execute one assembler instruction in the program.
3939 * Returns: TRUE if the request succeed and the callback is called. If
3940 * FALSE, the callback will not be called.
3942 gboolean step_in
();
3945 * ianjuta_debugger_instruction_step_over:
3947 * @err: Error propagation and reporting.
3949 * Execute one assembler instruction in the program, if the instruction
3950 * is a function call, continues until the function returns.
3952 * Returns: TRUE if the request succeed and the callback is called. If
3953 * FALSE, the callback will not be called.
3955 gboolean step_over
();
3958 * ianjuta_debugger_instruction_run_to_address:
3960 * @address: Run to this addresss
3961 * @err: Error propagation and reporting.
3963 * Start the program until it reachs the address address
3965 * Returns: TRUE if the request succeed and the callback is called. If
3966 * FALSE, the callback will not be called.
3968 gboolean run_to_address
(gulong address
);
3973 interface IAnjutaDebugManager
3975 #include
"ianjuta-debugger.h"
3976 #include
"ianjuta-debugger-breakpoint.h"
3981 * IAnjutaDebugManager::debugger_started:
3984 * This signal is emitted when the debugger is started.
3986 void ::debugger_started
();
3989 * IAnjutaDebugManager::debugger_stopped:
3991 * @err: Error propagation and reporting.
3993 * This signal is emitted when the debugger is stopped.
3995 void ::debugger_stopped
(GError
*err
);
3998 * IAnjutaDebugManager::program_loaded:
4001 * This signal is emitted when a program is loaded most of the
4002 * time just before the first program_stopped signal.
4004 void ::program_loaded
();
4007 * IAnjutaDebugManager::program_unloaded:
4010 * This signal is emitted when a program is unloaded. If the
4011 * debugger is stopped while a program is loaded, this signal
4012 * is emitted before the debugger_stopped signal.
4014 void ::program_unloaded
();
4017 * IAnjutaDebugManager::program_started:
4020 * This signal is emitted when the program is started. If the
4021 * program starts and is stopped by the debugger, a program-stopped
4022 * signal will be emitted too. If the program starts is not stopped
4023 * by the debugger a program-running signal will be emitted.
4025 void ::program_started
();
4028 * IAnjutaDebugManager::program_exited:
4031 * This signal is emitted when the program is unloaded. If the
4032 * debugger is stopped while a program is running or stopped, this
4033 * signal is emitted before the program_unloaded signal.
4035 void ::program_exited
();
4038 * IAnjutaDebugManager::program_stopped:
4041 * This signal is emitted when the program is stopped.
4043 void ::program_stopped
();
4046 * IAnjutaDebugManager::program_running:
4049 * This signal is emitted when the program is running.
4051 void ::program_running
();
4055 * IAnjutaDebugManager::sharedlib_event:
4058 * This signal is emitted when a new shared library is loaded. It
4059 * is useful to try to set pending breakpoints those could be in
4060 * the newly loaded library.
4062 void ::sharedlib_event
();
4065 * IAnjutaDebugManager::program_moved:
4067 * @pid: process id, 0 when unknown
4068 * @tid: thread id, 0 when unknown
4069 * @address: program counter address, 0 when unknown
4070 * @file: source file where is the program counter, NULL when unknown
4071 * @line: line number if file name above is not NULL
4073 * This signal is emitted when the debugger know the current program
4074 * location. Most of the time, after the program has stopped but it
4075 * could happen even if it is still running.
4077 void ::program_moved
(gint pid
, gint tid
, gulong address
, const gchar
* file
, guint line
);
4080 * IAnjutaDebugManager::frame_changed:
4085 * This signal is emitted when the current frame is changed. It is
4086 * equal to the top frame in the interrupted thread when the
4087 * program stops but can be changed afterward by the user.
4088 * Several commands use this current frame, by example the register
4089 * window display the register values for the current thread only.
4091 void ::frame_changed
(guint frame
, gint thread
);
4094 * IAnjutaDebugManager::location_changed:
4096 * @address: program counter address, 0 when unknown
4097 * @uri: source file where is the program counter, NULL when unknown
4098 * @line: line number if file name above is not NULL
4100 * This signal is emitted when the current location is changed. It is
4101 * equal to the program location when the program stops but can be
4102 * changed afterward by the user.
4104 void ::location_changed
(gulong address
, const gchar
* uri
, guint line
);
4107 * IAnjutaDebugManager::signal_received:
4109 * @name: Signal name
4110 * @description: Signal description
4112 * This signal is emitted when the debugged program receives a
4115 void ::signal_received
(const gchar
* name
, const gchar
* description
);
4118 * IAnjutaDebugManager::breakpoint_changed:
4120 * @breakpoint: Breakpoint
4121 * @err: Error propagation and reporting.
4123 * This signal is emitted when a breakpoint is changed. It includes
4124 * new breakpoint and deleted breakpoint.
4126 void ::breakpoint_changed
(IAnjutaDebuggerBreakpointItem
*breakpoint
);
4130 * SECTION:ianjuta-vcs
4131 * @title: IAnjutaVcs
4132 * @short_description: Version control system interface
4134 * @stability: Unstable
4135 * @include: libanjuta/interfaces/ianjuta-vcs.h
4138 interface IAnjutaVcs
4142 * @filename: String with the filename
4144 * @err: Error propagation and reporting
4146 * Add filename to the cvs repositry.
4148 void add
(const gchar
* filename
);
4151 * ianjuta_cvs_remove:
4152 * @filename: String with the filename
4154 * @err: Error propagation and reporting
4156 * Remove filename to the cvs repositry. Note that the file
4157 * is not removed physicly. This function will fail if the file
4158 * still exists on disc.
4160 void remove
(const gchar
* filename
);
4163 * ianjuta_vcs_update:
4164 * @filename: String with the filename
4165 * @recurse: TRUE to recurse into subdirectories
4167 * @err: Error propagation and reporting
4169 * Update filename with the cvs repositry.
4171 void update
(const gchar
* filename
, gboolean recurse
);
4174 * ianjuta_vcs_commit:
4175 * @filename: String with the filename
4176 * @log: The log message for the commit or ""
4177 * @recurse: TRUE to recurse into subdirectories
4179 * @err: Error propagation and reporting
4181 * Commit changes in filename to the cvs repositry.
4183 void commit
(const gchar
* filename
, const gchar
* log
, gboolean recurse
);
4187 * SECTION:ianjuta-macro
4188 * @title: IAnjutaMacro
4189 * @short_description: Macro processor interface
4191 * @stability: Unstable
4192 * @include: libanjuta/interfaces/ianjuta-macro.h
4195 interface IAnjutaMacro
4198 * ianjuta_macro_insert:
4199 * @key: Key of the macro
4201 * @err: Error propagation and reporting
4203 * Insert Macro to editor
4205 void insert
(const gchar
* key
);
4209 * SECTION:ianjuta-symbol
4210 * @title: IAnjutaSymbol
4211 * @short_description: Source code symbol interface
4212 * @see_also: #IAnjutaSymbolManager
4213 * @stability: Unstable
4214 * @include: libanjuta/interfaces/ianjuta-symbol.h
4217 interface IAnjutaSymbol
4219 #include
<gdk
/gdkpixbuf.h
>
4223 TYPE_UNDEF
= 0, // Unknown type
4224 TYPE_CLASS
= 1, // Class declaration
4225 TYPE_ENUM
= 2, // Enum declaration
4226 TYPE_ENUMERATOR
= 4, // Enumerator value
4227 TYPE_FIELD
= 8, // Field (Java only)
4228 TYPE_FUNCTION
= 16, // Function definition
4229 TYPE_INTERFACE
= 32, // Interface (Java only)
4230 TYPE_MEMBER
= 64, // Member variable of class/struct
4231 TYPE_METHOD
= 128, // Class method (Java only)
4232 TYPE_NAMESPACE
= 256, // Namespace declaration
4233 TYPE_PACKAGE
= 512, // Package (Java only)
4234 TYPE_PROTOTYPE
= 1024, // Function prototype
4235 TYPE_STRUCT
= 2048, // Struct declaration
4236 TYPE_TYPEDEF
= 4096, // Typedef
4237 TYPE_UNION
= 8192, // Union
4238 TYPE_VARIABLE
= 16384, // Variable
4239 TYPE_EXTERNVAR
= 32768, // Extern or forward declaration
4240 TYPE_MACRO
= 65536, // Macro (without arguments)
4241 TYPE_MACRO_WITH_ARG
= 131072, // Parameterized macro
4242 TYPE_FILE
= 262144, // File (Pseudo tag)
4243 TYPE_OTHER
= 524288, // Other (non C/C++/Java tag)
4244 TYPE_MAX
= 1048575 // Maximum value
4247 // Field masks -- used mainly for search
4250 FIELD_NONE
= 0, // Undefined
4251 FIELD_NAME
= 1, // Name field
4252 FIELD_TYPE
= 2, // Type field
4253 FIELD_FILE
= 4, // File field
4254 FIELD_LINE
= 8, // Line number field
4255 FIELD_POSITION
= 16, // Byte pos of symbol (Obsolete)
4256 FIELD_SCOPE
= 32, // Scope of the symbol field
4257 FIELD_INHERITANCE
= 64, // Parent classes
4258 FIELD_ARGUMENTS
= 128, // Argument list
4259 FIELD_LOCAL
= 256, // If it has local scope
4260 FIELD_TIME
= 512, // Modification time (File symbol only)
4261 FIELD_VARTYPE
= 1024, // Variable Type
4262 FIELD_ACCESS
= 2048, // Access type
4263 FIELD_IMPLEMENTATION
= 4096, // Implementation (e.g. virtual)
4264 FIELD_LANGUAGE
= 8192, // Language (File symbols only)
4265 FIELD_INACTIVE
= 16384, // Inactive file (File symbols only)
4266 FIELD_POINTER
= 32768, // Inactive file (File symbols only)
4267 FIELD_MAX
= 65535 // Maximum value
4271 Type type
(); // Symbol type [int value]
4272 const gchar
*type_str
(); // Symbol type [const char* value]
4273 const gchar
*type_name
(); // Symbol type name. e.g. a member which name is
4275 const gchar
*name
(); // Symbol name
4276 const gchar
*args
(); // Args list (functions/prototypes/macros)
4277 const gchar
*scope
(); // Scope of symbol
4278 const gchar
*inheritance
(); // Parent classes
4279 const gchar
*var_type
(); // Variable type (maps to struct for typedefs)
4280 const gchar
*access
(); // Access type (public/protected/private/etc.)
4281 const gchar
*impl
(); // Implementation (e.g. virtual)
4282 const gchar
*file
(); // File in which the symbol occurs
4283 gulong line
(); // Line number of the symbol
4284 gboolean is_local
(); // Is the symbol of local scope
4286 const GdkPixbuf
*icon
(); // Pixbuf icon representing the symbol
4290 * SECTION:ianjuta-symbol-manager
4291 * @title: IAnjutaSymbolManager
4292 * @short_description: Source code symbols manager inteface
4293 * @see_also: #IAnjutaSymbol
4294 * @stability: Unstable
4295 * @include: libanjuta/interfaces/ianjuta-symbol-manager.h
4298 interface IAnjutaSymbolManager
4300 #include
"ianjuta-iterable.h"
4301 #include
"ianjuta-symbol.h"
4304 * ianjuta_symbol_manager_search:
4306 * @match_types: fixme
4307 * @match_name: fixme
4308 * @partial_name_match: fixme
4309 * @global_search: fixme
4310 * @err: Error propagation and reporting.
4312 * Database query. Returned iterable must be unrefed after use.
4316 IAnjutaIterable
* search
(IAnjutaSymbolType match_types
, const gchar
*match_name
, gboolean partial_name_match
, gboolean global_search
);
4319 * ianjuta_symbol_manager_get_members:
4321 * @symbol_name: fixme
4322 * @global_search: fixme
4323 * @err: Error propagation and reporting.
4325 * Database query. Returned iterable must be unrefed after use.
4329 IAnjutaIterable
* get_members
(const gchar
*symbol_name
, gboolean global_search
);
4332 * ianjuta_symbol_manager_get_parents:
4334 * @symbol_name: fixme
4335 * @err: Error propagation and reporting.
4341 IAnjutaIterable
* get_parents
(const gchar
*symbol_name
);
4344 * ianjuta_symbol_manager_get_completions_at_position:
4346 * @symbol_name: fixme
4347 * @err: Error propagation and reporting.
4353 IAnjutaIterable
* get_completions_at_position
(const gchar
* file_uri
, const gchar
*text_buffer
, const gint text_length
, const gint text_pos
);
4357 * SECTION:ianjuta-print
4358 * @title: IAnjutaPrint
4359 * @short_description: Print interface
4361 * @stability: Unstable
4362 * @include: libanjuta/interfaces/ianjuta-print.h
4365 interface IAnjutaPrint
4368 * ianjuta_print_print:
4370 * @err: Error propagation and reporting.
4372 * Print the plugin (the file in case of the editor). In most cases this will show
4378 * ianjuta_print_print:
4380 * @err: Error propagation and reporting.
4382 * Show print preview dialog
4385 void print_preview
();
4389 * SECTION:ianjuta-language-support
4390 * @title: IAnjutaLanguageSupport
4391 * @short_description: Programming language specific supports from plugins
4393 * @stability: Unstable
4394 * @include: libanjuta/interfaces/ianjuta-language-support.h
4397 interface IAnjutaLanguageSupport
4399 List
<const gchar
*> get_supported_languages
();
4400 gboolean supports
(const gchar
*language
);
4404 * SECTION:ianjuta-preferences
4405 * @title: IAnjutaPreferences
4406 * @short_description: Preferences interface
4408 * @stability: Unstable
4409 * @include: libanjuta/interfaces/ianjuta-preferences
4412 interface IAnjutaPreferences
4414 #include
<libanjuta
/anjuta
-preferences.h
>
4416 * ianjuta_preferences_merge:
4418 * @prefs: AnjutaPreferences to install to
4419 * @err: Error propagation and reporting.
4421 * When called, the plugin should install it's preferences
4423 void merge
(AnjutaPreferences
* prefs
);
4426 * ianjuta_preferences_unmerge:
4428 * @prefs: AnjutaPreferences to install to
4429 * @err: Error propagation and reporting.
4431 * When called, the plugin should uninstall it's preferences
4433 void unmerge
(AnjutaPreferences
* prefs
);
4437 * SECTION:ianjuta-plugin-factory
4438 * @title: IAnjutaPluginFactory
4439 * @short_description: Create Anjuta plugin objects
4441 * @stability: Unstable
4442 * @include: libanjuta/interfaces/ianjuta-plugin-factory.h
4444 * This interface is used to create all Anjuta plugin objects. It is
4445 * already implemented inside Anjuta by an object able to load plugins written
4446 * in C. In order to load plugins in other languages (or in a different way),
4447 * a loader plugin implementing this interface must be written first, probably
4451 interface IAnjutaPluginFactory
4453 #include
<libanjuta
/anjuta
-plugin.h
>
4454 #include
<libanjuta
/anjuta
-shell.h
>
4455 #include
<libanjuta
/anjuta
-plugin
-handle.h
>
4458 * IAnjutaPluginFactoryError:
4459 * @IANJUTA_PLUGIN_FACTORY_MISSING_LOCATION: Module file location is
4460 * missing in .plugin file
4461 * @IANJUTA_PLUGIN_FACTORY_MISSING_TYPE: Plugin type (just after
4462 * double colon following location) is missing in .plugin file
4463 * @IANJUTA_PLUGIN_FACTORY_MISSING_MODULE: Module file name not found,
4464 * plugin module is probably not installed
4465 * @IANJUTA_PLUGIN_FACTORY_UNLOADABLE_MODULE: Module file cannot be
4466 * loaded, not a shared library perhaps
4467 * @IANJUTA_PLUGIN_FACTORY_MISSING_FUNCTION: Module does not contain
4468 * registration function, library is not an anjuta plugin or
4469 * is not for the right version
4470 * @IANJUTA_PLUGIN_FACTORY_INVALID_TYPE: Module has not registered
4471 * plugin type, library is not an anjuta plugin or not for
4473 * @IANJUTA_PLUGIN_FACTORY_UNKNOWN_ERROR: Another error
4475 * These enumeration is used to specify errors.
4490 * ianjuta_plugin_factory_new_plugin:
4492 * @handle: Plugin information
4493 * @shell: Anjuta shell
4494 * @err: Error propagation and reporting.
4496 * Create a new AnjutaPlugin object from the plugin information handle,
4497 * give it the AnjutaShell object as argument.
4499 * Return value: a new plugin object
4501 AnjutaPlugin
* new_plugin
(AnjutaPluginHandle
* handle, AnjutaShell
*shell
);
4505 * SECTION:ianjuta-language
4506 * @title: IAnjutaLanguage
4507 * @short_description: Interface to manager multiple programming languages
4509 * @stability: Unstable
4510 * @include: libanjuta/interfaces/ianjuta-language.h
4514 interface IAnjutaLanguage
4516 #include
<libanjuta
/interfaces
/ianjuta
-editor
-language.h
>
4520 * ianjuta_language_from_mime_type:
4522 * @mime_type: A mime type to get the language for
4524 * Returns: A language Id or 0 in case no language was found
4526 Id get_from_mime_type
(const gchar
* mime_type
);
4529 * ianjuta_language_from_string:
4531 * @string: A string representation of the language. Note that multiple
4532 * strings may describe the language like C++ and Cpp
4534 * Returns: A language Id or 0 in case no language was found
4536 Id get_from_string
(const gchar
* string);
4539 * ianjuta_language_get_name:
4541 * @id: A valid language id
4543 * Returns: The main name of the language. When you call ianjuta_language_from_string()
4544 * before that method the string you get here might be different to the one you passed
4545 * because the language might have multiple string representations
4547 const gchar
* get_name
(Id id);
4550 * ianjuta_language_get_strings
4552 * @id: A valid language id
4554 * Returns: A list of strings that represent this language that language
4556 List
<const gchar
*> get_strings
(Id id);
4559 * ianjuta_language_get_from_editor:
4561 * @editor: An object implementing IAnjutaEditorLanguage
4562 * @err: Error propagation
4564 * Conviniece method to get the id directly from the editor
4566 * Returns: A valid language id or 0
4569 IAnjutaLanguageId get_from_editor
(IAnjutaEditorLanguage
* editor
);
4572 * ianjuta_language_get_name_from_editor:
4574 * @editor: An object implementing IAnjutaEditorLanguage
4575 * @err: Error propagation
4577 * Conviniece method to get the name directly from the editor
4579 * Returns: A language name or NULL
4582 const gchar
* get_name_from_editor
(IAnjutaEditorLanguage
* editor
);