소스 검색

gtk2: add g_slice_xxx functions from glib 2.10

git-svn-id: trunk@12033 -
paul 16 년 전
부모
커밋
4f8838d731
4개의 변경된 파일62개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      .gitattributes
  2. 4 0
      packages/gtk2/src/glib/gincludes.inc
  3. 2 0
      packages/gtk2/src/glib/glib2.pas
  4. 55 0
      packages/gtk2/src/glib/gslice.inc

+ 1 - 0
.gitattributes

@@ -2173,6 +2173,7 @@ packages/gtk2/src/glib/grel.inc svneol=native#text/plain
 packages/gtk2/src/glib/gscanner.inc svneol=native#text/plain
 packages/gtk2/src/glib/gshell.inc svneol=native#text/plain
 packages/gtk2/src/glib/gsignal.inc svneol=native#text/plain
+packages/gtk2/src/glib/gslice.inc svneol=native#text/pascal
 packages/gtk2/src/glib/gslist.inc svneol=native#text/plain
 packages/gtk2/src/glib/gsourceclosure.inc svneol=native#text/plain
 packages/gtk2/src/glib/gspawn.inc svneol=native#text/plain

+ 4 - 0
packages/gtk2/src/glib/gincludes.inc

@@ -72,4 +72,8 @@
 
 {$include goption.inc}
 
+{$ifdef HasGLIB2_10}
+{$include gslice.inc}
+{$endif}
+
 // included by glib2.pas

+ 2 - 0
packages/gtk2/src/glib/glib2.pas

@@ -76,6 +76,8 @@ const
   {$WARNINGS OFF}
 {$ENDIF}
 
+// {$define HasGLIB2_10}
+
 {$DEFINE read_forward_definitions}
 type
   // internal types

+ 55 - 0
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
+
+