File: client.h

package info (click to toggle)
gedit 0.5.4-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,388 kB
  • ctags: 1,622
  • sloc: ansic: 10,760; sh: 4,975; makefile: 463; sed: 93
file content (71 lines) | stat: -rw-r--r-- 2,500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* client.h - libraries for acting as a plugin.
 *
 * Copyright (C) 1998 Chris Lahey.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __CLIENT_H__
#define __CLIENT_H__

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
  
#include <glib.h>
  
  typedef struct
  {
    gchar *menu_location;
    gchar *suggested_accelerator;
  } client_info;
  
  extern client_info empty_info;
  
  typedef struct
  {
    gint start;
    gint end;
  } selection_range;
  
  gint client_init( gint *argc, gchar **argv[], client_info *info );
  gint client_document_current( gint context );
  gchar *client_document_filename( gint docid );
  gint client_document_new( gint context, gchar *title );
  gint client_document_open( gint context, gchar *title );
  gboolean client_document_close( gint docid );
  void client_text_append( gint docid, gchar *buff, gint length );
  void client_text_insert( gint docid, gchar *buff, gint length, gint position );
  void client_document_show( gint docid );
  void client_finish( gint context );
  gchar *client_text_get( gint docid );
  gboolean client_program_quit();
  gint client_document_get_postion( gint docid );
  selection_range client_document_get_selection_range( gint docid );
  gchar *client_text_get_selection_text( gint docid );
  void client_text_set_selection_text( gint docid, gchar *buffer, gint length );
  void client_document_set_auto_indent( gint docid, gint auto_indent );
  void client_document_set_status_bar( gint docid, gint status_bar );
  void client_document_set_word_wrap( gint docid, gint word_wrap );
  void client_document_set_read_only( gint docid, gint read_only );
  void client_document_set_split_screen( gint docid, gint split_screen );
  void client_document_set_scroll_ball( gint docid, gint scroll_ball );

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __CLIENT_H__ */