gtkimcontext.inc 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // included by gtk2.pas
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. PGtkIMContext = ^TGtkIMContext;
  7. TGtkIMContext = record
  8. parent_instance : TGObject;
  9. end;
  10. { Signals }
  11. { Virtual functions }
  12. { Padding for future expansion }
  13. PGtkIMContextClass = ^TGtkIMContextClass;
  14. TGtkIMContextClass = record
  15. parent_class : TGtkObjectClass;
  16. preedit_start : procedure (context:PGtkIMContext); cdecl;
  17. preedit_end : procedure (context:PGtkIMContext); cdecl;
  18. preedit_changed : procedure (context:PGtkIMContext); cdecl;
  19. commit : procedure (context:PGtkIMContext; str:Pgchar); cdecl;
  20. retrieve_surrounding : function (context:PGtkIMContext):gboolean; cdecl;
  21. delete_surrounding : function (context:PGtkIMContext; offset:gint; n_chars:gint):gboolean; cdecl;
  22. set_client_window : procedure (context:PGtkIMContext; window:PGdkWindow); cdecl;
  23. get_preedit_string : procedure (context:PGtkIMContext; str:PPgchar; var attrs:PPangoAttrList; cursor_pos:Pgint); cdecl;
  24. filter_keypress : function (context:PGtkIMContext; event:PGdkEventKey):gboolean; cdecl;
  25. focus_in : procedure (context:PGtkIMContext); cdecl;
  26. focus_out : procedure (context:PGtkIMContext); cdecl;
  27. reset : procedure (context:PGtkIMContext); cdecl;
  28. set_cursor_location : procedure (context:PGtkIMContext; area:PGdkRectangle); cdecl;
  29. set_use_preedit : procedure (context:PGtkIMContext; use_preedit:gboolean); cdecl;
  30. set_surrounding : procedure (context:PGtkIMContext; text:Pgchar; len:gint; cursor_index:gint); cdecl;
  31. get_surrounding : function (context:PGtkIMContext; text:PPgchar; cursor_index:Pgint):gboolean; cdecl;
  32. _gtk_reserved1 : procedure ; cdecl;
  33. _gtk_reserved2 : procedure ; cdecl;
  34. _gtk_reserved3 : procedure ; cdecl;
  35. _gtk_reserved4 : procedure ; cdecl;
  36. _gtk_reserved5 : procedure ; cdecl;
  37. _gtk_reserved6 : procedure ; cdecl;
  38. end;
  39. {$ENDIF read_interface_types}
  40. //------------------------------------------------------------------------------
  41. {$IFDEF read_interface_rest}
  42. function GTK_TYPE_IM_CONTEXT : GType;
  43. function GTK_IM_CONTEXT(obj: pointer) : PGtkIMContext;
  44. function GTK_IM_CONTEXT_CLASS(klass: pointer) : PGtkIMContextClass;
  45. function GTK_IS_IM_CONTEXT(obj: pointer) : boolean;
  46. function GTK_IS_IM_CONTEXT_CLASS(klass: pointer) : boolean;
  47. function GTK_IM_CONTEXT_GET_CLASS(obj: pointer) : PGtkIMContextClass;
  48. function gtk_im_context_get_type:TGtkType; cdecl; external gtklib;
  49. procedure gtk_im_context_set_client_window(context:PGtkIMContext; window:PGdkWindow); cdecl; external gtklib;
  50. procedure gtk_im_context_get_preedit_string(context:PGtkIMContext; str:PPgchar; var attrs:PPangoAttrList; cursor_pos:Pgint); cdecl; external gtklib;
  51. function gtk_im_context_filter_keypress(context:PGtkIMContext; event:PGdkEventKey):gboolean; cdecl; external gtklib;
  52. procedure gtk_im_context_focus_in(context:PGtkIMContext); cdecl; external gtklib;
  53. procedure gtk_im_context_focus_out(context:PGtkIMContext); cdecl; external gtklib;
  54. procedure gtk_im_context_reset(context:PGtkIMContext); cdecl; external gtklib;
  55. procedure gtk_im_context_set_cursor_location(context:PGtkIMContext; area:PGdkRectangle); cdecl; external gtklib;
  56. procedure gtk_im_context_set_use_preedit(context:PGtkIMContext; use_preedit:gboolean); cdecl; external gtklib;
  57. procedure gtk_im_context_set_surrounding(context:PGtkIMContext; text:Pgchar; len:gint; cursor_index:gint); cdecl; external gtklib;
  58. function gtk_im_context_get_surrounding(context:PGtkIMContext; text:PPgchar; cursor_index:Pgint):gboolean; cdecl; external gtklib;
  59. function gtk_im_context_delete_surrounding(context:PGtkIMContext; offset:gint; n_chars:gint):gboolean; cdecl; external gtklib;
  60. {$ENDIF read_interface_rest}
  61. //------------------------------------------------------------------------------
  62. {$IFDEF read_implementation}
  63. function GTK_TYPE_IM_CONTEXT : GType;
  64. begin
  65. GTK_TYPE_IM_CONTEXT:=gtk_im_context_get_type;
  66. end;
  67. function GTK_IM_CONTEXT(obj: pointer) : PGtkIMContext;
  68. begin
  69. GTK_IM_CONTEXT:=PGtkIMContext(GTK_CHECK_CAST(obj,GTK_TYPE_IM_CONTEXT));
  70. end;
  71. function GTK_IM_CONTEXT_CLASS(klass: pointer) : PGtkIMContextClass;
  72. begin
  73. GTK_IM_CONTEXT_CLASS:=PGtkIMContextClass(GTK_CHECK_CLASS_CAST(klass,GTK_TYPE_IM_CONTEXT));
  74. end;
  75. function GTK_IS_IM_CONTEXT(obj: pointer) : boolean;
  76. begin
  77. GTK_IS_IM_CONTEXT:=GTK_CHECK_TYPE(obj,GTK_TYPE_IM_CONTEXT);
  78. end;
  79. function GTK_IS_IM_CONTEXT_CLASS(klass: pointer) : boolean;
  80. begin
  81. GTK_IS_IM_CONTEXT_CLASS:=GTK_CHECK_CLASS_TYPE(klass,GTK_TYPE_IM_CONTEXT);
  82. end;
  83. function GTK_IM_CONTEXT_GET_CLASS(obj: pointer) : PGtkIMContextClass;
  84. begin
  85. GTK_IM_CONTEXT_GET_CLASS:=PGtkIMContextClass(GTK_CHECK_GET_CLASS(obj,GTK_TYPE_IM_CONTEXT));
  86. end;
  87. {$ENDIF read_implementation}
  88. // included by gtk2.pas