~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to src/sciwrappers.c

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *      sciwrappers.c - this file is part of Geany, a fast and lightweight IDE
3
3
 *
4
 
 *      Copyright 2005-2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5
 
 *      Copyright 2006-2010 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
 
4
 *      Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
 
5
 *      Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
6
6
 *
7
7
 *      This program is free software; you can redistribute it and/or modify
8
8
 *      it under the terms of the GNU General Public License as published by
18
18
 *      along with this program; if not, write to the Free Software
19
19
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $Id: sciwrappers.c 5065 2010-06-25 16:50:27Z ntrel $
 
21
 * $Id: sciwrappers.c 5652 2011-03-29 23:52:03Z colombanw $
22
22
 */
23
23
 
24
24
/** @file sciwrappers.h
357
357
 
358
358
/** Gets the line number from @a position.
359
359
 * @param sci Scintilla widget.
360
 
 * @param position Position. */
 
360
 * @param position Position.
 
361
 * @return The line. */
361
362
gint sci_get_line_from_position(ScintillaObject *sci, gint position)
362
363
{
363
364
        return SSM(sci, SCI_LINEFROMPOSITION, position, 0);
366
367
 
367
368
/** Gets the column number relative to the start of the line that @a position is on.
368
369
 * @param sci Scintilla widget.
369
 
 * @param position Position. */
 
370
 * @param position Position.
 
371
 * @return The column. */
370
372
gint sci_get_col_from_position(ScintillaObject *sci, gint position)
371
373
{
372
374
        return SSM(sci, SCI_GETCOLUMN, position, 0);
419
421
 
420
422
 
421
423
/** Gets the total number of lines.
422
 
 * @param sci Scintilla widget. */
 
424
 * @param sci Scintilla widget.
 
425
 * @return The line count. */
423
426
gint sci_get_line_count(ScintillaObject *sci)
424
427
{
425
428
        return SSM(sci, SCI_GETLINECOUNT, 0, 0);
450
453
}
451
454
 
452
455
 
 
456
/** Gets the position at the end of a line
 
457
 * @param sci Scintilla widget.
 
458
 * @param line Line.
 
459
 * @return The position at the end of the line. */
453
460
gint sci_get_line_end_position(ScintillaObject *sci, gint line)
454
461
{
455
462
        return SSM(sci, SCI_GETLINEENDPOSITION, line, 0);
823
830
}
824
831
 
825
832
 
 
833
/** Sets the font for a particular style.
 
834
 * @param sci Scintilla widget.
 
835
 * @param style The style.
 
836
 * @param font The font name.
 
837
 * @param size The font size. */
826
838
void sci_set_font(ScintillaObject *sci, gint style, const gchar *font, gint size)
827
839
{
828
840
        SSM(sci, SCI_STYLESETFONT, style, (sptr_t) font);