diff options
| author | paul <paul@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2008-11-08 10:10:24 +0000 |
|---|---|---|
| committer | paul <paul@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2008-11-08 10:10:24 +0000 |
| commit | 25010b540539a6b3b1867c7d439ad1df697b267c (patch) | |
| tree | 22112eb9680eab485680af0143beaaae933d260e /packages/gtk2 | |
| parent | e2f8f270dbd6829c0a9d36fbc0223e8275cde521 (diff) | |
| download | fpc-25010b540539a6b3b1867c7d439ad1df697b267c.tar.gz | |
gtk2: add g_slice_xxx functions from glib 2.10
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@12033 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/gtk2')
| -rw-r--r-- | packages/gtk2/src/glib/gincludes.inc | 4 | ||||
| -rw-r--r-- | packages/gtk2/src/glib/glib2.pas | 2 | ||||
| -rw-r--r-- | packages/gtk2/src/glib/gslice.inc | 55 |
3 files changed, 61 insertions, 0 deletions
diff --git a/packages/gtk2/src/glib/gincludes.inc b/packages/gtk2/src/glib/gincludes.inc index 663c90edf9..5db929ffca 100644 --- a/packages/gtk2/src/glib/gincludes.inc +++ b/packages/gtk2/src/glib/gincludes.inc @@ -72,4 +72,8 @@ {$include goption.inc} +{$ifdef HasGLIB2_10} +{$include gslice.inc} +{$endif} + // included by glib2.pas diff --git a/packages/gtk2/src/glib/glib2.pas b/packages/gtk2/src/glib/glib2.pas index 389dfa4236..d458f78bfa 100644 --- a/packages/gtk2/src/glib/glib2.pas +++ b/packages/gtk2/src/glib/glib2.pas @@ -76,6 +76,8 @@ const {$WARNINGS OFF} {$ENDIF} +// {$define HasGLIB2_10} + {$DEFINE read_forward_definitions} type // internal types diff --git a/packages/gtk2/src/glib/gslice.inc b/packages/gtk2/src/glib/gslice.inc new file mode 100644 index 0000000000..96fcd9dc36 --- /dev/null +++ b/packages/gtk2/src/glib/gslice.inc @@ -0,0 +1,55 @@ +// included by glib2.pas + +// slices - fast allocation/release of small memory blocks + +{$IFDEF read_forward_definitions} +{$ENDIF read_forward_definitions} + +//------------------------------------------------------------------------------ + +{$IFDEF read_interface_types} + TGSliceConfig = ( + G_SLICE_CONFIG_ALWAYS_MALLOC = 1, + G_SLICE_CONFIG_BYPASS_MAGAZINES, + G_SLICE_CONFIG_WORKING_SET_MSECS, + G_SLICE_CONFIG_COLOR_INCREMENT, + G_SLICE_CONFIG_CHUNK_SIZES, + G_SLICE_CONFIG_CONTENTION_COUNTER + ) ; +{$ENDIF read_interface_types} + +//------------------------------------------------------------------------------ + +{$IFDEF read_interface_rest} + +function g_slice_alloc(block_size:gsize):gpointer;cdecl;external gliblib; +function g_slice_alloc0(block_size:gsize):gpointer;cdecl;external gliblib; +function g_slice_copy(block_size:gsize; mem_block:gconstpointer):gpointer;cdecl;external gliblib; +procedure g_slice_free1(block_size:gsize; mem_block:gpointer);cdecl;external gliblib; +procedure g_slice_free_chain_with_offset(block_size:gsize; mem_chain:gpointer; next_offset:gsize);cdecl;external gliblib; + +{ + MemoryBlockType * + g_slice_dup (MemoryBlockType, + MemoryBlockType *mem_block); + g_slice_free (MemoryBlockType, + MemoryBlockType *mem_block); + g_slice_free_chain (MemoryBlockType, + MemoryBlockType *first_chain_block, + memory_block_next_field); + pseudo prototypes for the macro + definitions following below. +} + +procedure g_slice_set_config(ckey:TGSliceConfig; value:gint64);cdecl;external gliblib; +function g_slice_get_config(ckey:TGSliceConfig):gint64;cdecl;external gliblib; +function g_slice_get_config_state(ckey:TGSliceConfig; address:gint64; n_values:pguint):Pgint64;cdecl;external gliblib; + +{$ENDIF read_interface_rest} + +{$IFDEF read_implementation} +{$ENDIF read_implementation} + +// included by glib2.pas + + |
