~ubuntu-branches/ubuntu/vivid/winefish/vivid

« back to all changes in this revision

Viewing changes to src/snr2.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Leidert (dale)
  • Date: 2006-04-14 14:41:11 UTC
  • Revision ID: james.westby@ubuntu.com-20060414144111-wi90w6pr70ifwxtw
Tags: upstream-1.3.3
ImportĀ upstreamĀ versionĀ 1.3.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: snr2.h 1830 2006-02-11 16:34:41Z kyanh $ */
 
2
/* Winefish LaTeX Editor (based on Bluefish HTML Editor)
 
3
 * snr2.h - the search 'n replace rewrite prototypes
 
4
 *
 
5
 * Copyright (C) 2000-2002 Olivier Sessink
 
6
 * Modified for Winefish (C) 2005 Ky Anh <kyanh@o2.pl> 
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
21
 */
 
22
 
 
23
#ifndef __SNR2_H_
 
24
#define __SNR2_H_
 
25
 
 
26
typedef struct {
 
27
        /* span of characters */
 
28
        gint start;
 
29
        gint end;
 
30
 
 
31
        /* span of byte-data in buffer */
 
32
        gint bstart;
 
33
        gint bend;
 
34
        
 
35
        /* these data are only used (and alloc'ed) if want_submatches is set in the search backend,
 
36
        they should be freed by the calling function! */
 
37
        regmatch_t *pmatch;
 
38
        gint nmatch;
 
39
} Tsearch_result;
 
40
 
 
41
void snr2_init(Tbfwin *bfwin);
 
42
 
 
43
void snr2_run_extern_replace(Tdocument *doc, gchar *search_pattern, gint region,
 
44
                                                        gint matchtype, gint is_case_sens, gchar *replace_pattern,
 
45
                                                        gboolean store_as_last_snr2);
 
46
Tsearch_result doc_search_run_extern(Tdocument *doc, gchar *search_pattern, gint matchtype, gint is_case_sens);
 
47
void search_from_selection(Tbfwin *bfwin);
 
48
void search_cb(GtkWidget *widget, Tbfwin *bfwin);
 
49
void replace_again_cb(GtkWidget *widget, Tbfwin *bfwin);
 
50
void search_again_cb(GtkWidget *widget, Tbfwin *bfwin);
 
51
void replace_cb(GtkWidget *widget, Tbfwin *bfwin);
 
52
void update_filenames_in_file(Tdocument *doc, gchar *oldfilename, gchar *newfilename, gint doc_has_newfilename);
 
53
/* kyanh, removed, 20050220
 
54
void update_encoding_meta_in_file(Tdocument *doc, gchar *encoding);
 
55
*/
 
56
void snr2_cleanup(Tbfwin *bfwin);
 
57
#endif                                                  /* __SNR_H_ */