Revision: 4869 http://geany.svn.sourceforge.net/geany/?rev=4869&view=rev Author: ntrel Date: 2010-05-03 14:46:32 +0000 (Mon, 03 May 2010)
Log Message: ----------- Add sci_set_line_indentation(), sci_get_line_indentation() to API (patch by Colomban Wendling, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/plugins/geanyfunctions.h trunk/src/plugindata.h trunk/src/plugins.c trunk/src/sciwrappers.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-05-03 14:38:25 UTC (rev 4868) +++ trunk/ChangeLog 2010-05-03 14:46:32 UTC (rev 4869) @@ -2,7 +2,11 @@
* src/keybindings.c: Fix setting wrong accelerator for 2 Edit->Commands items (patch by - Anonymous, #2995593). + Anonymous, thanks; #2995593). + * src/sciwrappers.c, src/plugindata.h, src/plugins.c, + plugins/geanyfunctions.h: + Add sci_set_line_indentation(), sci_get_line_indentation() to API + (patch by Colomban Wendling, thanks).
2010-04-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/geanyfunctions.h =================================================================== --- trunk/plugins/geanyfunctions.h 2010-05-03 14:38:25 UTC (rev 4868) +++ trunk/plugins/geanyfunctions.h 2010-05-03 14:46:32 UTC (rev 4869) @@ -190,6 +190,10 @@ geany_functions->p_sci->sci_goto_line #define sci_find_text \ geany_functions->p_sci->sci_find_text +#define sci_set_line_indentation \ + geany_functions->p_sci->sci_set_line_indentation +#define sci_get_line_indentation \ + geany_functions->p_sci->sci_get_line_indentation #define templates_get_template_fileheader \ geany_functions->p_templates->templates_get_template_fileheader #define utils_str_equal \
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2010-05-03 14:38:25 UTC (rev 4868) +++ trunk/src/plugindata.h 2010-05-03 14:46:32 UTC (rev 4869) @@ -50,7 +50,7 @@ enum { /** The Application Programming Interface (API) version, incremented * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 183, + GEANY_API_VERSION = 184,
/** The Application Binary Interface (ABI) version, incremented whenever * existing fields in the plugin data types have to be changed or reordered. */ @@ -349,6 +349,8 @@ gboolean (*sci_is_marker_set_at_line) (struct _ScintillaObject *sci, gint line, gint marker); void (*sci_goto_line) (struct _ScintillaObject *sci, gint line, gboolean unfold); gint (*sci_find_text) (struct _ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf); + void (*sci_set_line_indentation) (struct _ScintillaObject *sci, gint line, gint indent); + gint (*sci_get_line_indentation) (struct _ScintillaObject *sci, gint line); } SciFuncs;
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2010-05-03 14:38:25 UTC (rev 4868) +++ trunk/src/plugins.c 2010-05-03 14:46:32 UTC (rev 4869) @@ -182,7 +182,9 @@ &sci_delete_marker_at_line, &sci_is_marker_set_at_line, &sci_goto_line, - &sci_find_text + &sci_find_text, + &sci_set_line_indentation, + &sci_get_line_indentation };
static TemplateFuncs template_funcs = {
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2010-05-03 14:38:25 UTC (rev 4868) +++ trunk/src/sciwrappers.c 2010-05-03 14:46:32 UTC (rev 4869) @@ -1141,12 +1141,26 @@ }
+/** Sets the indentation of a line. + * @param sci Scintilla widget. + * @param line Line to indent. + * @param indent Indentation width. + * + * @since 0.19 + */ void sci_set_line_indentation(ScintillaObject *sci, gint line, gint indent) { SSM(sci, SCI_SETLINEINDENTATION, line, indent); }
+/** Gets the indentation width of a line. + * @param sci Scintilla widget. + * @param line Line to get the indentation from. + * @return Indentation width. + * + * @since 0.19 + */ gint sci_get_line_indentation(ScintillaObject *sci, gint line) { return SSM(sci, SCI_GETLINEINDENTATION, line, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.