SF.net SVN: geany:[4516] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Thu Dec 31 15:47:56 UTC 2009


Revision: 4516
          http://geany.svn.sourceforge.net/geany/?rev=4516&view=rev
Author:   eht16
Date:     2009-12-31 15:47:56 +0000 (Thu, 31 Dec 2009)

Log Message:
-----------
Add sci_find_text() to the plugin API.

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	2009-12-31 15:47:25 UTC (rev 4515)
+++ trunk/ChangeLog	2009-12-31 15:47:56 UTC (rev 4516)
@@ -2,6 +2,9 @@
 
  * autogen.sh, configure.in, configure.ac:
    Rename configure.in to configure.ac.
+ * plugins/geanyfunctions.h, src/plugins.c, src/plugindata.h,
+   src/sciwrappers.c:
+   Add sci_find_text() to the plugin API.
 
 
 2009-12-29  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h	2009-12-31 15:47:25 UTC (rev 4515)
+++ trunk/plugins/geanyfunctions.h	2009-12-31 15:47:56 UTC (rev 4516)
@@ -186,6 +186,8 @@
 	geany_functions->p_sci->is_marker_set_at_line
 #define sci_goto_line \
 	geany_functions->p_sci->goto_line
+#define sci_find_text \
+	geany_functions->p_sci->find_text
 #define templates_get_template_fileheader \
 	geany_functions->p_templates->get_template_fileheader
 #define utils_str_equal \

Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h	2009-12-31 15:47:25 UTC (rev 4515)
+++ trunk/src/plugindata.h	2009-12-31 15:47:56 UTC (rev 4516)
@@ -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 = 166,
+	GEANY_API_VERSION = 167,
 
 	/** The Application Binary Interface (ABI) version, incremented whenever
 	 * existing fields in the plugin data types have to be changed or reordered. */
@@ -347,6 +347,7 @@
 	void	(*delete_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker);
 	gboolean (*is_marker_set_at_line) (struct _ScintillaObject *sci, gint line, gint marker);
 	void 	(*goto_line) (struct _ScintillaObject *sci, gint line, gboolean unfold);
+	gint	(*find_text) (struct _ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf);
 }
 SciFuncs;
 

Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c	2009-12-31 15:47:25 UTC (rev 4515)
+++ trunk/src/plugins.c	2009-12-31 15:47:56 UTC (rev 4516)
@@ -180,7 +180,8 @@
 	&sci_set_marker_at_line,
 	&sci_delete_marker_at_line,
 	&sci_is_marker_set_at_line,
-	&sci_goto_line
+	&sci_goto_line,
+	&sci_find_text
 };
 
 static TemplateFuncs template_funcs = {

Modified: trunk/src/sciwrappers.c
===================================================================
--- trunk/src/sciwrappers.c	2009-12-31 15:47:25 UTC (rev 4515)
+++ trunk/src/sciwrappers.c	2009-12-31 15:47:56 UTC (rev 4516)
@@ -799,6 +799,19 @@
 }
 
 
+/** Find a text in the document.
+ * The @a ttf argument should be a pointer to a Sci_TextToFind structure which contains
+ * the text to find and the range in which the text should be searched.
+ * 
+ * Please refer to the Scintilla documentation for a more detailed description.
+ * 
+ * @param sci Scintilla widget.
+ * @param flags Bitmask of Scintilla search flags (@c SCFIND_*, see Scintilla documentation).
+ * @param ttf Pointer to a TextToFind structure which contains the text to find and the range.
+ * @return The position of the start of the found text if it succeeds, otherwise @c -1. 
+ *         The @c chrgText.cpMin and @c chrgText.cpMax members of @c TextToFind are filled in 
+ *         with the start and end positions of the found text.
+ */
 gint sci_find_text(ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf)
 {
 	return SSM(sci, SCI_FINDTEXT, flags, (long) ttf);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list