gconvert.inc 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // included by glib2.pas
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. PGConvertError = ^TGConvertError;
  7. TGConvertError = (
  8. G_CONVERT_ERROR_NO_CONVERSION,
  9. G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
  10. G_CONVERT_ERROR_FAILED,
  11. G_CONVERT_ERROR_PARTIAL_INPUT,
  12. G_CONVERT_ERROR_BAD_URI,
  13. G_CONVERT_ERROR_NOT_ABSOLUTE_PATH
  14. );
  15. PGIConv = ^TGIConv;
  16. TGIConv = pointer;
  17. {$ENDIF read_interface_types}
  18. //------------------------------------------------------------------------------
  19. {$IFDEF read_interface_rest}
  20. function G_CONVERT_ERROR : TGQuark;
  21. function g_convert_error_quark:TGQuark;cdecl;external gliblib name 'g_convert_error_quark';
  22. { Thin wrappers around iconv }
  23. function g_iconv_open(to_codeset:Pgchar; from_codeset:Pgchar):TGIConv;cdecl;external gliblib name 'g_iconv_open';
  24. function g_iconv(converter:TGIConv; inbuf:PPgchar; inbytes_left:Pgsize; outbuf:PPgchar; outbytes_left:Pgsize):gsize;cdecl;external gliblib name 'g_iconv';
  25. function g_iconv_close(converter:TGIConv):gint;cdecl;external gliblib name 'g_iconv_close';
  26. function g_convert(str:Pgchar; len:gssize; to_codeset:Pgchar; from_codeset:Pgchar; bytes_read:Pgsize;
  27. bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_convert';
  28. function g_convert_with_iconv(str:Pgchar; len:gssize; converter:TGIConv; bytes_read:Pgsize; bytes_written:Pgsize;
  29. error:PPGError):Pgchar;cdecl;external gliblib name 'g_convert_with_iconv';
  30. function g_convert_with_fallback(str:Pgchar; len:gssize; to_codeset:Pgchar; from_codeset:Pgchar; fallback:Pgchar;
  31. bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_convert_with_fallback';
  32. { Convert between libc's idea of strings and UTF-8. }
  33. function g_locale_to_utf8(opsysstring:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_locale_to_utf8';
  34. function g_locale_from_utf8(utf8string:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_locale_from_utf8';
  35. { Convert between the operating system (or C runtime) representation of file names and UTF-8. }
  36. function g_filename_to_utf8(opsysstring:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_to_utf8';
  37. function g_filename_from_utf8(utf8string:Pgchar; len:gssize; bytes_read:Pgsize; bytes_written:Pgsize; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_from_utf8';
  38. function g_filename_from_uri(uri:PAnsiChar; hostname:PPAnsiChar; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_from_uri';
  39. function g_filename_to_uri(filename:PAnsiChar; hostname:PAnsiChar; error:PPGError):Pgchar;cdecl;external gliblib name 'g_filename_to_uri';
  40. {$ENDIF read_interface_rest}