summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/gtk2/src/glib/ghash.inc
blob: c39a81d66ecf4de18594190f94979ea0af20c6db (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
// included by glib2.pas

{$IFDEF read_forward_definitions}
{$ENDIF read_forward_definitions}

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

{$IFDEF read_interface_types}
  PGHashTable = pointer;

  TGHRFunc = function (key:gpointer; value:gpointer; user_data:gpointer):gboolean;cdecl;
{$ENDIF read_interface_types}

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

{$IFDEF read_interface_rest}
{ Hash tables }

function g_hash_table_new(hash_func:TGHashFunc; key_equal_func:TGEqualFunc):PGHashTable;cdecl;external gliblib name 'g_hash_table_new';
function g_hash_table_new_full(hash_func:TGHashFunc; key_equal_func:TGEqualFunc; key_destroy_func:TGDestroyNotify; value_destroy_func:TGDestroyNotify):PGHashTable;cdecl;external gliblib name 'g_hash_table_new_full';
procedure g_hash_table_destroy(hash_table:PGHashTable);cdecl;external gliblib name 'g_hash_table_destroy';
procedure g_hash_table_insert(hash_table:PGHashTable; key:gpointer; value:gpointer);cdecl;external gliblib name 'g_hash_table_insert';
procedure g_hash_table_replace(hash_table:PGHashTable; key:gpointer; value:gpointer);cdecl;external gliblib name 'g_hash_table_replace';
function g_hash_table_remove(hash_table:PGHashTable; key:gconstpointer):gboolean;cdecl;external gliblib name 'g_hash_table_remove';
function g_hash_table_steal(hash_table:PGHashTable; key:gconstpointer):gboolean;cdecl;external gliblib name 'g_hash_table_steal';
function g_hash_table_lookup(hash_table:PGHashTable; key:gconstpointer):gpointer;cdecl;external gliblib name 'g_hash_table_lookup';
function g_hash_table_lookup_extended(hash_table:PGHashTable; lookup_key:gconstpointer; orig_key:Pgpointer; value:Pgpointer):gboolean;cdecl;external gliblib name 'g_hash_table_lookup_extended';
procedure g_hash_table_foreach(hash_table:PGHashTable; func:TGHFunc; user_data:gpointer);cdecl;external gliblib name 'g_hash_table_foreach';
function g_hash_table_foreach_remove(hash_table:PGHashTable; func:TGHRFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_hash_table_foreach_remove';
function g_hash_table_foreach_steal(hash_table:PGHashTable; func:TGHRFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_hash_table_foreach_steal';
function g_hash_table_size(hash_table:PGHashTable):guint;cdecl;external gliblib name 'g_hash_table_size';

{ Hash Functions  }

function g_str_equal(v:gconstpointer; v2:gconstpointer):gboolean;cdecl;external gliblib name 'g_str_equal';
function g_str_hash(v:gconstpointer):guint;cdecl;external gliblib name 'g_str_hash';
function g_int_equal(v:gconstpointer; v2:gconstpointer):gboolean;cdecl;external gliblib name 'g_int_equal';
function g_int_hash(v:gconstpointer):guint;cdecl;external gliblib name 'g_int_hash';

function g_direct_hash(v:gconstpointer):guint;cdecl;external gliblib name 'g_direct_hash';
function g_direct_equal(v:gconstpointer; v2:gconstpointer):gboolean;cdecl;external gliblib name 'g_direct_equal';

{$ENDIF read_interface_rest}
// included by glib2.pas