~ubuntu-branches/ubuntu/natty/bluefish/natty-proposed

« back to all changes in this revision

Viewing changes to src/snr2.h

  • Committer: Bazaar Package Importer
  • Author(s): Davide Puricelli (evo)
  • Date: 2005-04-23 17:05:18 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050423170518-pb8zi3vg32cm6g04
Tags: 1.0-1
* Acknowledge NMU, thanks Leo; closes: #291222.
* Updated debian/ files, thanks Daniel Leidert. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Bluefish HTML Editor
2
2
 * snr2.h - the search 'n replace rewrite prototypes
3
3
 *
4
 
 * Copyright (C) 2000 Olivier Sessink
 
4
 * Copyright (C) 2000-2002 Olivier Sessink
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
21
21
#ifndef __SNR2_H_
22
22
#define __SNR2_H_
23
23
 
24
 
#include <glib.h>
25
 
#include <gtk/gtkwidget.h>
26
 
 
27
 
void copy_cb(GtkWidget * w, gpointer data);
28
 
void paste_cb(GtkWidget * w, gpointer data);
29
 
void cut_cb(GtkWidget * w, gpointer data);
30
 
void sel_all_cb(GtkWidget * w, gpointer data);
31
 
 
32
 
void snr2_run_extern_replace(gchar *pattern, gint region,
33
 
                                                        gint is_regex, gint is_case_sens, gchar *replace_string);
34
 
void search_cb(GtkWidget *widget, gpointer data);
35
 
void new_search_cb(GtkWidget *widget, gpointer data);
36
 
void replace_again_cb(GtkWidget *widget, gpointer data);
37
 
void search_again_cb(GtkWidget *widget, gpointer data);
38
 
void replace_cb(GtkWidget *widget, gpointer data);
39
 
void new_replace_cb(GtkWidget *widget, gpointer data);
 
24
typedef struct {
 
25
        /* span of characters */
 
26
        gint start;
 
27
        gint end;
 
28
 
 
29
        /* span of byte-data in buffer */
 
30
        gint bstart;
 
31
        gint bend;
 
32
        
 
33
        /* these data are only used (and alloc'ed) if want_submatches is set in the search backend,
 
34
        they should be freed by the calling function! */
 
35
        regmatch_t *pmatch;
 
36
        gint nmatch;
 
37
} Tsearch_result;
 
38
 
 
39
void snr2_init(Tbfwin *bfwin);
 
40
 
 
41
void snr2_run_extern_replace(Tdocument *doc, gchar *search_pattern, gint region,
 
42
                                                        gint matchtype, gint is_case_sens, gchar *replace_pattern,
 
43
                                                        gboolean store_as_last_snr2);
 
44
Tsearch_result doc_search_run_extern(Tdocument *doc, gchar *search_pattern, gint matchtype, gint is_case_sens);
 
45
void search_from_selection(Tbfwin *bfwin);
 
46
void search_cb(GtkWidget *widget, Tbfwin *bfwin);
 
47
void replace_again_cb(GtkWidget *widget, Tbfwin *bfwin);
 
48
void search_again_cb(GtkWidget *widget, Tbfwin *bfwin);
 
49
void replace_cb(GtkWidget *widget, Tbfwin *bfwin);
40
50
void update_filenames_in_file(Tdocument *doc, gchar *oldfilename, gchar *newfilename, gint doc_has_newfilename);
 
51
void update_encoding_meta_in_file(Tdocument *doc, gchar *encoding);
41
52
 
42
 
gint wchar_len(gchar *src, gint src_len);
43
53
#endif                                                  /* __SNR_H_ */