summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/gtk2/src/gtk+/gtk/gtkimcontext.inc
blob: b8c77b6728323b452a17ba79f740799b2816681c (plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// included by gtk2.pas

{$IFDEF read_forward_definitions}
{$ENDIF read_forward_definitions}

//------------------------------------------------------------------------------

{$IFDEF read_interface_types}
   PGtkIMContext = ^TGtkIMContext;
   TGtkIMContext = record
        parent_instance : TGObject;
     end;

{ Signals  }
{ Virtual functions  }
{ Padding for future expansion  }
   PGtkIMContextClass = ^TGtkIMContextClass;
   TGtkIMContextClass = record
        parent_class : TGtkObjectClass;
        preedit_start : procedure (context:PGtkIMContext); cdecl;
        preedit_end : procedure (context:PGtkIMContext); cdecl;
        preedit_changed : procedure (context:PGtkIMContext); cdecl;
        commit : procedure (context:PGtkIMContext; str:Pgchar); cdecl;
        retrieve_surrounding : function (context:PGtkIMContext):gboolean; cdecl;
        delete_surrounding : function (context:PGtkIMContext; offset:gint; n_chars:gint):gboolean; cdecl;
        set_client_window : procedure (context:PGtkIMContext; window:PGdkWindow); cdecl;
        get_preedit_string : procedure (context:PGtkIMContext; str:PPgchar; var attrs:PPangoAttrList; cursor_pos:Pgint); cdecl;
        filter_keypress : function (context:PGtkIMContext; event:PGdkEventKey):gboolean; cdecl;
        focus_in : procedure (context:PGtkIMContext); cdecl;
        focus_out : procedure (context:PGtkIMContext); cdecl;
        reset : procedure (context:PGtkIMContext); cdecl;
        set_cursor_location : procedure (context:PGtkIMContext; area:PGdkRectangle); cdecl;
        set_use_preedit : procedure (context:PGtkIMContext; use_preedit:gboolean); cdecl;
        set_surrounding : procedure (context:PGtkIMContext; text:Pgchar; len:gint; cursor_index:gint); cdecl;
        get_surrounding : function (context:PGtkIMContext; text:PPgchar; cursor_index:Pgint):gboolean; cdecl;
        _gtk_reserved1 : procedure ; cdecl;
        _gtk_reserved2 : procedure ; cdecl;
        _gtk_reserved3 : procedure ; cdecl;
        _gtk_reserved4 : procedure ; cdecl;
        _gtk_reserved5 : procedure ; cdecl;
        _gtk_reserved6 : procedure ; cdecl;
     end;

{$ENDIF read_interface_types}

//------------------------------------------------------------------------------

{$IFDEF read_interface_rest}
function GTK_TYPE_IM_CONTEXT : GType;
function GTK_IM_CONTEXT(obj: pointer) : PGtkIMContext;
function GTK_IM_CONTEXT_CLASS(klass: pointer) : PGtkIMContextClass;
function GTK_IS_IM_CONTEXT(obj: pointer) : boolean;
function GTK_IS_IM_CONTEXT_CLASS(klass: pointer) : boolean;
function GTK_IM_CONTEXT_GET_CLASS(obj: pointer) : PGtkIMContextClass;


function gtk_im_context_get_type:TGtkType; cdecl; external gtklib;
procedure gtk_im_context_set_client_window(context:PGtkIMContext; window:PGdkWindow); cdecl; external gtklib;
procedure gtk_im_context_get_preedit_string(context:PGtkIMContext; str:PPgchar; var attrs:PPangoAttrList; cursor_pos:Pgint); cdecl; external gtklib;
function gtk_im_context_filter_keypress(context:PGtkIMContext; event:PGdkEventKey):gboolean; cdecl; external gtklib;
procedure gtk_im_context_focus_in(context:PGtkIMContext); cdecl; external gtklib;
procedure gtk_im_context_focus_out(context:PGtkIMContext); cdecl; external gtklib;
procedure gtk_im_context_reset(context:PGtkIMContext); cdecl; external gtklib;
procedure gtk_im_context_set_cursor_location(context:PGtkIMContext; area:PGdkRectangle); cdecl; external gtklib;
procedure gtk_im_context_set_use_preedit(context:PGtkIMContext; use_preedit:gboolean); cdecl; external gtklib;
procedure gtk_im_context_set_surrounding(context:PGtkIMContext; text:Pgchar; len:gint; cursor_index:gint); cdecl; external gtklib;
function gtk_im_context_get_surrounding(context:PGtkIMContext; text:PPgchar; cursor_index:Pgint):gboolean; cdecl; external gtklib;
function gtk_im_context_delete_surrounding(context:PGtkIMContext; offset:gint; n_chars:gint):gboolean; cdecl; external gtklib;
{$ENDIF read_interface_rest}

//------------------------------------------------------------------------------

{$IFDEF read_implementation}
function GTK_TYPE_IM_CONTEXT : GType;
begin
   GTK_TYPE_IM_CONTEXT:=gtk_im_context_get_type;
end;

function GTK_IM_CONTEXT(obj: pointer) : PGtkIMContext;
begin
   GTK_IM_CONTEXT:=PGtkIMContext(GTK_CHECK_CAST(obj,GTK_TYPE_IM_CONTEXT));
end;

function GTK_IM_CONTEXT_CLASS(klass: pointer) : PGtkIMContextClass;
begin
   GTK_IM_CONTEXT_CLASS:=PGtkIMContextClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IM_CONTEXT));
end;

function GTK_IS_IM_CONTEXT(obj: pointer) : boolean;
begin
   GTK_IS_IM_CONTEXT:=GTK_CHECK_TYPE(obj,GTK_TYPE_IM_CONTEXT);
end;

function GTK_IS_IM_CONTEXT_CLASS(klass: pointer) : boolean;
begin
   GTK_IS_IM_CONTEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IM_CONTEXT);
end;

function GTK_IM_CONTEXT_GET_CLASS(obj: pointer) : PGtkIMContextClass;
begin
   GTK_IM_CONTEXT_GET_CLASS:=PGtkIMContextClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IM_CONTEXT));
end;

{$ENDIF read_implementation}
// included by gtk2.pas