~ubuntu-branches/ubuntu/jaunty/muine/jaunty-proposed

« back to all changes in this revision

Viewing changes to src/MarkupUtils.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2005-11-08 00:40:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108004042-l6x5vw65u3f2l1dc
Tags: 0.8.3-7ubuntu2
Rebuild against new libdbus-1-cil

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2004 Jorn Baayen <jorn@nl.linux.org>
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or
5
 
 * modify it under the terms of the GNU General Public License as
6
 
 * published by the Free Software Foundation; either version 2 of the
7
 
 * License, or (at your option) any later version.
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful,
10
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
 * General Public License for more details.
13
 
 *
14
 
 * You should have received a copy of the GNU General Public
15
 
 * License along with this program; if not, write to the
16
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
 
 * Boston, MA 02111-1307, USA.
18
 
 */
19
 
 
20
 
using Gtk;
21
 
using System;
22
 
using System.Runtime.InteropServices;
23
 
 
24
 
public class MarkupUtils 
25
 
{
26
 
        [DllImport ("libmuine")]
27
 
        private static extern void label_set_markup (IntPtr label,
28
 
                                                     uint start_index,
29
 
                                                     uint end_index,
30
 
                                                     bool large,
31
 
                                                     bool bold,
32
 
                                                     bool italic);
33
 
 
34
 
        public static void LabelSetMarkup (Label label,
35
 
                                           uint start_index,
36
 
                                           uint end_index,
37
 
                                           bool large,
38
 
                                           bool bold,
39
 
                                           bool italic)
40
 
        {
41
 
                label_set_markup (label.Handle, start_index, end_index,
42
 
                                  large, bold, italic);
43
 
        }
44
 
 
45
 
        [DllImport ("libmuine")]
46
 
        private static extern void cell_set_markup (IntPtr label,
47
 
                                                    uint start_index,
48
 
                                                    uint end_index,
49
 
                                                    bool large,
50
 
                                                    bool bold,
51
 
                                                    bool italic);
52
 
 
53
 
        public static void CellSetMarkup (CellRendererText cell,
54
 
                                          uint start_index,
55
 
                                          uint end_index,
56
 
                                          bool large,
57
 
                                          bool bold,
58
 
                                          bool italic)
59
 
        {
60
 
                cell_set_markup (cell.Handle, start_index, end_index,
61
 
                                 large, bold, italic);
62
 
        }
63
 
}