Bläddra i källkod

* PChar -> PAnsiChar

Michaël Van Canneyt 2 år sedan
förälder
incheckning
733f59a35c

+ 1 - 1
packages/gtk1/examples/editform.pp

@@ -8,7 +8,7 @@ program editform;
 uses
   glib,gdk,gtk;
 
-function get_widget(widget:PGtkWidget;widget_name:pchar):PGtkWidget;
+function get_widget(widget:PGtkWidget;widget_name:PAnsiChar):PGtkWidget;
 var
   found_widget : PGtkWidget;
 begin

+ 2 - 2
packages/gtk1/examples/list.pp

@@ -94,7 +94,7 @@ begin
       begin
         list_item := pGTKOBJECT(dlist^.data);
         item_data_string := gtk_object_get_data(list_item,list_item_data_key);
-        write (pchar(item_data_string),' ');
+        write (PAnsiChar(item_data_string),' ');
         dlist := dlist^.next;
       end;
      writeln;
@@ -197,7 +197,7 @@ begin
      buffer:='List Item with Label '+itos(i)+#0;
      list_item := gtk_list_item_new_with_label(buffer);
      dlist := g_list_prepend(dlist, list_item);
-     gtk_object_set_data(pGTKOBJECT(list_item),list_item_data_key,pchar('ListItem with integrated Label'));
+     gtk_object_set_data(pGTKOBJECT(list_item),list_item_data_key,PAnsiChar('ListItem with integrated Label'));
    end;
   gtk_list_append_items(pGTKLIST(thelist), dlist);
 

+ 6 - 6
packages/gtk1/examples/notebook.pp

@@ -81,14 +81,14 @@ begin
     bufferf := 'Append Frame '+itos(i+1)+#0;
     bufferl := 'Page '+itos(i+1)+#0;
 
-    frame := gtk_frame_new (pchar(@bufferf[1]));
+    frame := gtk_frame_new (PAnsiChar(@bufferf[1]));
     gtk_container_set_border_width (pGTKCONTAINER (frame), 10);
     gtk_widget_set_usize (frame, 100, 75);
 
-    thelabel := gtk_label_new (pchar(@bufferf[1]));
+    thelabel := gtk_label_new (PAnsiChar(@bufferf[1]));
     gtk_container_add (pGTKCONTAINER (frame), thelabel);
 
-    thelabel := gtk_label_new (pchar(@bufferl[1]));
+    thelabel := gtk_label_new (PAnsiChar(@bufferl[1]));
     gtk_notebook_append_page (pGTKNOTEBOOK (thenotebook), frame, thelabel);
   end;
 
@@ -104,14 +104,14 @@ begin
     bufferf := 'Prepend Frame '+itos(i+1)+#0;
     bufferl := 'PPage '+itos(i+1)+#0;
 
-    frame := gtk_frame_new (pchar(@bufferf[1]));
+    frame := gtk_frame_new (PAnsiChar(@bufferf[1]));
     gtk_container_set_border_width (pGTKCONTAINER (frame), 10);
     gtk_widget_set_usize (frame, 100, 75);
 
-    thelabel := gtk_label_new (pchar(@bufferf[1]));
+    thelabel := gtk_label_new (PAnsiChar(@bufferf[1]));
     gtk_container_add (pGTKCONTAINER (frame), thelabel);
 
-    thelabel := gtk_label_new (pchar(@bufferl[1]));
+    thelabel := gtk_label_new (PAnsiChar(@bufferl[1]));
     gtk_notebook_prepend_page (pGTKNOTEBOOK(thenotebook), frame, thelabel);
         gtk_widget_show (frame);
   end;

+ 2 - 2
packages/gtk1/examples/paned.pp

@@ -24,7 +24,7 @@ Var
     list_item       : PGtkWidget;
     i               : longint;
     buffer          : ansistring;
-    Ptr_Buffer      : PChar ;
+    Ptr_Buffer      : PAnsiChar ;
 Begin
     // Create a new scrolled window, with scrollbars only if needed
     scrolled_window := gtk_scrolled_window_new (NULL, NULL);
@@ -41,7 +41,7 @@ Begin
     for i:=0 to 10 do Begin
         Str (i,buffer);
         buffer := 'Message #' + buffer;
-        Ptr_buffer := PChar (buffer);
+        Ptr_buffer := PAnsiChar (buffer);
         list_item := gtk_list_item_new_with_label (Ptr_buffer);
         gtk_container_add (GTK_CONTAINER(list), list_item);
         gtk_widget_show (list_item);

+ 1 - 1
packages/gtk1/examples/pixmap.pp

@@ -13,7 +13,7 @@ uses
 { XPM data of Open-File icon }
 
 const
-  xpm_data:array[0..19] of pchar =
+  xpm_data:array[0..19] of PAnsiChar =
   ('16 16 3 1',
    '       c None',
    '.      c #000000000000',

+ 2 - 2
packages/gtk1/examples/spinbutton.pp

@@ -59,7 +59,7 @@ Procedure  get_value( widget : PGtkWidget;
                     data : gpointer ) ; cdecl;
 Var
   Ptr_buf   : PGchar;
-  buf       : string;
+  buf       : ansistring;
   label_l   : PGtkLabel ;
   spin,spin2: PGtkSpinButton;
 Begin
@@ -72,7 +72,7 @@ Begin
     Str(gtk_spin_button_get_value_as_float (spin)
                     :10:gtk_spin_button_get_value_as_int(spin2)  //This checks how many digits we have
                     ,buf);
-  Ptr_buf:=PChar(buf); //We have to change ansistring to a pointer to char PChar == PGChar
+  Ptr_buf:=PAnsiChar(buf); //We have to change ansistring to a pointer to AnsiChar PAnsiChar == PGChar
   gtk_label_set_text (label_l, Ptr_buf);
 End;
 

+ 1 - 1
packages/gtk1/examples/statusbar.pp

@@ -33,7 +33,7 @@ Procedure push_item( widget : PGtkWidget;
       Str(count,buff);
       buff := 'Item ' + buff;
 
-      Ptr_buff := PChar(buff); //changing type from ansistring to PGChar == PChar
+      Ptr_buff := PAnsiChar(buff); //changing type from ansistring to PGChar == PAnsiChar
       gtk_statusbar_push(GTK_STATUSBAR(status_bar), data^, Ptr_buff);
     End;
 Procedure pop_item( widget : PGtkWidget;

+ 3 - 3
packages/gtk1/examples/tutorial/tut3_3.pp

@@ -14,7 +14,7 @@ uses
 
 procedure callback(widget : pGtkWidget ; data: pgpointer ); cdecl;
 begin
-  writeln('Hello again - '+pchar(data)+' was pressed');
+  writeln('Hello again - '+PAnsiChar(data)+' was pressed');
 end;
 
 function delete_event (widget : pGtkWidget ; event: pGdkEvent; data: pgpointer ): integer; cdecl;
@@ -60,7 +60,7 @@ begin
   // Now when the button is clicked, we call the "callback" function
   // with a pointer to "button 1" as its argument */
   gtk_signal_connect (pGTKOBJECT (button), 'clicked',
-                      GTK_SIGNAL_FUNC (@callback), pchar('Button 1'));
+                      GTK_SIGNAL_FUNC (@callback), PAnsiChar('Button 1'));
 
     // Instead of gtk_container_add, we pack this button into the invisible
    // box, which has been packed into the window. */
@@ -76,7 +76,7 @@ begin
   // Call the same callback function with a different argument,
   // passing a pointer to "button 2" instead. */
   gtk_signal_connect (GTK_OBJECT (button), 'clicked',
-                      GTK_SIGNAL_FUNC (@callback), pchar('Button 2'));
+                      GTK_SIGNAL_FUNC (@callback), PAnsiChar('Button 2'));
 
   gtk_box_pack_start(GTK_BOX(box1), button, TRUE, TRUE, 0);
 

+ 1 - 1
packages/gtk1/examples/tutorial/tut4_3.pp

@@ -29,7 +29,7 @@ function make_box(homogeneous: boolean;
 var
   box, button :  pGtkWidget;   //GtkWidget is the storage type for widgets
   padstr : string;
-  ppadstr : Pchar;
+  ppadstr : PAnsiChar;
 begin
 
         //* Create a new hbox with the appropriate homogeneous

+ 3 - 3
packages/gtk1/examples/tutorial/tut4_5.pp

@@ -17,7 +17,7 @@ uses
 //* The data passed to this function is printed to stdout */
 procedure callback(widget : pGtkWidget ; data: pgpointer ); cdecl;
 begin
-  writeln('Hello again - '+pchar(data)+' was pressed');
+  writeln('Hello again - '+PAnsiChar(data)+' was pressed');
 end;
 
 //* This callback quits the program */
@@ -58,7 +58,7 @@ begin
   //* When the button is clicked, we call the "callback" function
   //* with a pointer to "button 1" as its argument */
   gtk_signal_connect (GTK_OBJECT (button), 'clicked',
-                  GTK_SIGNAL_FUNC (@callback), pchar('button 1'));
+                  GTK_SIGNAL_FUNC (@callback), PAnsiChar('button 1'));
 
   //* Insert button 1 into the upper left quadrant of the table */
   gtk_table_attach_defaults (GTK_TABLE(table), button, 0, 1, 0, 1);
@@ -72,7 +72,7 @@ begin
   //* When the button is clicked, we call the "callback" function
   //* with a pointer to "button 2" as its argument */
   gtk_signal_connect (GTK_OBJECT (button), 'clicked',
-                  GTK_SIGNAL_FUNC (@callback), pchar('button 2'));
+                  GTK_SIGNAL_FUNC (@callback), PAnsiChar('button 2'));
   //* Insert button 2 into the upper right quadrant of the table */
   gtk_table_attach_defaults (GTK_TABLE(table), button, 1, 2, 0, 1);
 

+ 4 - 4
packages/gtk1/examples/tutorial/tut6_1.pp

@@ -15,8 +15,8 @@
   //* Create a new hbox with an image and a label packed into it
   //* and return the box. */
    function xpm_label_box( parent: pGtkWidget;
-                           xpm_filename : pchar;
-                           label_text : pchar ): pGtkWidget; cdecl;
+                           xpm_filename : PAnsiChar;
+                           label_text : PAnsiChar ): pGtkWidget; cdecl;
    var
 
      box1, label_,pixmapwid : pGtkWidget;
@@ -52,7 +52,7 @@
    //* Our usual callback function */
  procedure callback( widget : pGtkWidget; data : pgpointer   );cdecl;
    begin
-     writeln ('Hello again - '+pchar(data)+' was pressed');
+     writeln ('Hello again - '+PAnsiChar(data)+' was pressed');
    end;
 
   var
@@ -75,7 +75,7 @@
      button := gtk_button_new ();
      //* Connect the "clicked" signal of the button to our callback */
      gtk_signal_connect (GTK_OBJECT (button), 'clicked',
-                         GTK_SIGNAL_FUNC (@callback), pchar('cool button'));
+                         GTK_SIGNAL_FUNC (@callback), PAnsiChar('cool button'));
      //* This calls our box creating function */
      box1 := xpm_label_box(window, 'info.xpm', 'cool button');
      //* Pack and show all our widgets */

+ 2 - 2
packages/gtk1/examples/tutorial/tut6_2.pp

@@ -16,7 +16,7 @@
 
  procedure toggle_callback( widget : pGtkWidget; data : pgpointer   );cdecl;
    begin
-     writeln ('Hello again - '+pchar(data)+' was pressed');
+     writeln ('Hello again - '+PAnsiChar(data)+' was pressed');
           if active(GTK_TOGGLE_BUTTON(widget)^)<>0 then
             //* If control reaches here, the toggle button is down */
             writeln('Toggle button is down')
@@ -44,7 +44,7 @@
      button := gtk_toggle_button_new ();
      //* Connect the "clicked" signal of the button to our callback */
      gtk_signal_connect (GTK_OBJECT (button), 'clicked',
-                         GTK_SIGNAL_FUNC (@toggle_callback), pchar('toggle button'));
+                         GTK_SIGNAL_FUNC (@toggle_callback), PAnsiChar('toggle button'));
      //* This calls our box creating function */
      box1 := gtk_hbox_new(False, 0);
      gtk_container_set_border_width (GTK_CONTAINER (box1), 2);

+ 2 - 2
packages/gtk1/examples/tutorial/tut6_3.pp

@@ -16,7 +16,7 @@
 
  procedure checkbox_callback( widget : pGtkWidget; data : pgpointer   );cdecl;
    begin
-     writeln ('Hello again - '+pchar(data)+' was pressed');
+     writeln ('Hello again - '+PAnsiChar(data)+' was pressed');
           if active(GTK_CHECK_BUTTON(widget)^.toggle_button)<>0 then
             //* If control reaches here, the check button is down */
             writeln('Check button is down')
@@ -44,7 +44,7 @@
      button := gtk_check_button_new ();
      //* Connect the "clicked" signal of the button to our callback */
      gtk_signal_connect (GTK_OBJECT (button), 'clicked',
-                         GTK_SIGNAL_FUNC (@checkbox_callback), pchar('check button'));
+                         GTK_SIGNAL_FUNC (@checkbox_callback), PAnsiChar('check button'));
      //* This calls our box creating function */
      box1 := gtk_hbox_new(False, 0);
      gtk_container_set_border_width (GTK_CONTAINER (box1), 2);

+ 5 - 5
packages/gtk1/src/gdk/gdkpixbuf.pp

@@ -109,10 +109,10 @@ Uses
   var
 {$ifndef darwin}
     gdk_pixbuf_major_version : guint; cvar; external;
-    gdk_pixbuf_version : Pchar; cvar; external;
+    gdk_pixbuf_version : PAnsiChar; cvar; external;
 {$else darwin}
     gdk_pixbuf_major_version : guint; external libgdkpixbuf name 'gdk_pixbuf_major_version';
-    gdk_pixbuf_version : Pchar; external libgdkpixbuf name 'gdk_pixbuf_version';
+    gdk_pixbuf_version : PAnsiChar; external libgdkpixbuf name 'gdk_pixbuf_version';
 {$endif darwin}
 {$EndIf}
 
@@ -163,12 +163,12 @@ type
   function gdk_pixbuf_copy(pixbuf:PGdkPixbuf):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_copy';
 
   { Simple loading  }
-  function gdk_pixbuf_new_from_file(filename:Pchar):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_new_from_file';
+  function gdk_pixbuf_new_from_file(filename:PAnsiChar):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_new_from_file';
 
   function gdk_pixbuf_new_from_data(data:Pguchar; colorspace:TGdkColorspace; has_alpha:gboolean; bits_per_sample:longint; width:longint;
              height:longint; rowstride:longint; destroy_fn:TGdkPixbufDestroyNotify; destroy_fn_data:gpointer):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_new_from_data';
 
-  function gdk_pixbuf_new_from_xpm_data(data:PPchar):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_new_from_xpm_data';
+  function gdk_pixbuf_new_from_xpm_data(data:PPAnsiChar):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_new_from_xpm_data';
 
   { Adding an alpha channel  }
   function gdk_pixbuf_add_alpha(pixbuf:PGdkPixbuf; substitute_color:gboolean; r:guchar; g:guchar; b:guchar):PGdkPixbuf;cdecl; external libgdkpixbuf name 'gdk_pixbuf_add_alpha';
@@ -227,7 +227,7 @@ type
      TGdkPixbufFrameAction = (GDK_PIXBUF_FRAME_RETAIN,GDK_PIXBUF_FRAME_DISPOSE,
        GDK_PIXBUF_FRAME_REVERT);
 
-  function gdk_pixbuf_animation_new_from_file(filename:Pchar):PGdkPixbufAnimation;cdecl; external libgdkpixbuf name 'gdk_pixbuf_animation_new_from_file';
+  function gdk_pixbuf_animation_new_from_file(filename:PAnsiChar):PGdkPixbufAnimation;cdecl; external libgdkpixbuf name 'gdk_pixbuf_animation_new_from_file';
   function gdk_pixbuf_animation_ref(animation:PGdkPixbufAnimation):PGdkPixbufAnimation;cdecl; external libgdkpixbuf name 'gdk_pixbuf_animation_ref';
   procedure gdk_pixbuf_animation_unref(animation:PGdkPixbufAnimation);cdecl; external libgdkpixbuf name 'gdk_pixbuf_animation_unref';
   function gdk_pixbuf_animation_get_width(animation:PGdkPixbufAnimation):longint;cdecl; external libgdkpixbuf name 'gdk_pixbuf_animation_get_width';

+ 1 - 1
packages/gtk1/src/gdk/gdktypes.pp

@@ -1017,7 +1017,7 @@ type
           dummy : gushort;
           data : record
               case longint of
-                 0 : ( b : array[0..19] of char );
+                 0 : ( b : array[0..19] of AnsiChar );
                  1 : ( s : array[0..9] of system.integer );
                  2 : ( l : array[0..4] of longint );
               end;

+ 2 - 2
packages/gtk1/src/glib/glib.pp

@@ -79,7 +79,7 @@ Type
 type
    PPgchar = ^Pgchar;
    Pgchar = ^gchar;
-   gchar = char;
+   gchar = AnsiChar;
    Pgshort = ^gshort;
    gshort = smallint;
    Pglong = ^glong;
@@ -89,7 +89,7 @@ type
    Pgboolean = ^gboolean;
    gboolean = longbool;
    Pguchar = ^guchar;
-   guchar = char;
+   guchar = AnsiChar;
    Pgushort = ^gushort;
    gushort = word;
    Pgulong = ^gulong;

+ 3 - 3
packages/gtk1/src/gtk/gtklabel.pp

@@ -46,12 +46,12 @@ function  GTK_IS_LABEL(obj:pointer):boolean;
 function  GTK_IS_LABEL_CLASS(klass:pointer):boolean;
 
 function  gtk_label_get_type:TGtkType;cdecl;external gtkdll name 'gtk_label_get_type';
-function  gtk_label_new (str:pchar):PGtkWidget;cdecl;external gtkdll name 'gtk_label_new';
-procedure gtk_label_set_text(theLabel: PGtkLabel; str:pchar);cdecl;external gtkdll name 'gtk_label_set_text';
+function  gtk_label_new (str:PAnsiChar):PGtkWidget;cdecl;external gtkdll name 'gtk_label_new';
+procedure gtk_label_set_text(theLabel: PGtkLabel; str:PAnsiChar);cdecl;external gtkdll name 'gtk_label_set_text';
 procedure gtk_label_set_justify(thelabel:PGtkLabel; jtype:TGtkJustification);cdecl;external gtkdll name 'gtk_label_set_justify';
 procedure gtk_label_set_pattern(thelabel:PGtkLabel; pattern:Pgchar);cdecl;external gtkdll name 'gtk_label_set_pattern';
 procedure gtk_label_set_line_wrap(thelabel:PGtkLabel; wrap:gboolean);cdecl;external gtkdll name 'gtk_label_set_line_wrap';
-procedure gtk_label_get(thelabel:PGtkLabel; str:ppchar);cdecl;external gtkdll name 'gtk_label_get';
+procedure gtk_label_get(thelabel:PGtkLabel; str:PPAnsiChar);cdecl;external gtkdll name 'gtk_label_get';
 function  gtk_label_parse_uline(thelabel:PGtkLabel;thestring:Pgchar):guint;cdecl;external gtkdll name 'gtk_label_parse_uline';
 
 {$endif read_interface}

+ 2 - 2
packages/gtk1/src/gtk/gtkmain.pp

@@ -30,8 +30,8 @@
 {$endif}
 
 function  gtk_check_gtkversion(required_major:guint; required_minor:guint; required_micro:guint):Pgchar;cdecl;external gtkdll name 'gtk_check_version';
-procedure gtk_init(argc:plongint; argv:pppchar);cdecl;external gtkdll name 'gtk_init';
-function  gtk_init_check(argc:plongint; argv:pppchar):gboolean;cdecl;external gtkdll name 'gtk_init_check';
+procedure gtk_init(argc:plongint; argv:PPPAnsiChar);cdecl;external gtkdll name 'gtk_init';
+function  gtk_init_check(argc:plongint; argv:PPPAnsiChar):gboolean;cdecl;external gtkdll name 'gtk_init_check';
 procedure gtk_exit(error_code:gint);cdecl;external gtkdll name 'gtk_exit';
 function  gtk_set_locale:Pgchar;cdecl;external gtkdll name 'gtk_set_locale';
 function  gtk_events_pending:gint;cdecl;external gtkdll name 'gtk_events_pending';

+ 2 - 2
packages/gtk1/src/gtk/gtkmenufactory.pp

@@ -38,10 +38,10 @@
 function  gtk_menu_factory_new(thetype:TGtkMenuFactoryType):PGtkMenuFactory;cdecl;external gtkdll name 'gtk_menu_factory_new';
 procedure gtk_menu_factory_destroy(factory:PGtkMenuFactory);cdecl;external gtkdll name 'gtk_menu_factory_destroy';
 procedure gtk_menu_factory_add_entries(factory:PGtkMenuFactory; entries:PGtkMenuEntry; nentries:longint);cdecl;external gtkdll name 'gtk_menu_factory_add_entries';
-procedure gtk_menu_factory_add_subfactory(factory:PGtkMenuFactory; subfactory:PGtkMenuFactory; path:pchar);cdecl;external gtkdll name 'gtk_menu_factory_add_subfactory';
+procedure gtk_menu_factory_add_subfactory(factory:PGtkMenuFactory; subfactory:PGtkMenuFactory; path:PAnsiChar);cdecl;external gtkdll name 'gtk_menu_factory_add_subfactory';
 procedure gtk_menu_factory_remove_paths(factory:PGtkMenuFactory; paths:PPgchar; npaths:longint);cdecl;external gtkdll name 'gtk_menu_factory_remove_paths';
 procedure gtk_menu_factory_remove_entries(factory:PGtkMenuFactory; entries:PGtkMenuEntry; nentries:longint);cdecl;external gtkdll name 'gtk_menu_factory_remove_entries';
-procedure gtk_menu_factory_remove_subfactory(factory:PGtkMenuFactory; subfactory:PGtkMenuFactory; path:pchar);cdecl;external gtkdll name 'gtk_menu_factory_remove_subfactory';
+procedure gtk_menu_factory_remove_subfactory(factory:PGtkMenuFactory; subfactory:PGtkMenuFactory; path:PAnsiChar);cdecl;external gtkdll name 'gtk_menu_factory_remove_subfactory';
 function  gtk_menu_factory_find(factory:PGtkMenuFactory; path:Pgchar):PGtkMenuPath;cdecl;external gtkdll name 'gtk_menu_factory_find';
 
 {$endif read_interface}

+ 5 - 5
packages/gtk1/src/gtk/gtktext.pp

@@ -93,7 +93,7 @@ Type
   GTK_TEXT=PGtkText;
   GTK_TEXT_CLASS=PGtkTextClass;
 
-function  GTK_TEXT_INDEX(t:PGtkText; index:longint):char;
+function  GTK_TEXT_INDEX(t:PGtkText; index:longint):AnsiChar;
 
 function  GTK_TEXT_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_text_get_type';
 function  GTK_IS_TEXT(obj:pointer):boolean;
@@ -110,7 +110,7 @@ function  gtk_text_get_point(text:PGtkText):guint;cdecl;external gtkdll name 'gt
 function  gtk_text_get_length(text:PGtkText):guint;cdecl;external gtkdll name 'gtk_text_get_length';
 procedure gtk_text_freeze(text:PGtkText);cdecl;external gtkdll name 'gtk_text_freeze';
 procedure gtk_text_thaw(text:PGtkText);cdecl;external gtkdll name 'gtk_text_thaw';
-procedure gtk_text_insert(text:PGtkText; font:PGdkFont; fore:PGdkColor; back:PGdkColor; chars:pchar; length:gint);cdecl;external gtkdll name 'gtk_text_insert';
+procedure gtk_text_insert(text:PGtkText; font:PGdkFont; fore:PGdkColor; back:PGdkColor; chars:PAnsiChar; length:gint);cdecl;external gtkdll name 'gtk_text_insert';
 function  gtk_text_backward_delete(text:PGtkText; nchars:guint):gint;cdecl;external gtkdll name 'gtk_text_backward_delete';
 function  gtk_text_forward_delete(text:PGtkText; nchars:guint):gint;cdecl;external gtkdll name 'gtk_text_forward_delete';
 
@@ -153,14 +153,14 @@ procedure set_use_wchar(var a : TGtkText; __use_wchar : guint);
        a.flag0:=a.flag0 or ((__use_wchar shl bp_TGtkText_use_wchar) and bm_TGtkText_use_wchar);
     end;
 
-function  GTK_TEXT_INDEX(t:PGtkText; index:longint):char;
+function  GTK_TEXT_INDEX(t:PGtkText; index:longint):AnsiChar;
 begin
   if use_wchar(t^)<>0 then
    begin
      if index<t^.gap_position then
-      GTK_TEXT_INDEX:=char(TGdkWchar(t^.text.wc[index]))
+      GTK_TEXT_INDEX:=AnsiChar(TGdkWchar(t^.text.wc[index]))
      else
-      GTK_TEXT_INDEX:=char(TGdkWchar(t^.text.wc[index+t^.gap_position]));
+      GTK_TEXT_INDEX:=AnsiChar(TGdkWchar(t^.text.wc[index+t^.gap_position]));
    end
   else
    begin

+ 1 - 1
packages/gtk1/src/gtk/gtkthemes.pp

@@ -16,7 +16,7 @@ function  gtk_theme_engine_get(name:Pgchar):PGtkThemeEngine;cdecl;external gtkdl
 procedure gtk_theme_engine_ref(engine:PGtkThemeEngine);cdecl;external gtkdll name 'gtk_theme_engine_ref';
 procedure gtk_theme_engine_unref(engine:PGtkThemeEngine);cdecl;external gtkdll name 'gtk_theme_engine_unref';
 {$ifndef gtkdarwin}
-procedure gtk_themes_init(argc:plongint; argv:pppchar);cdecl;external gtkdll name 'gtk_themes_init';
+procedure gtk_themes_init(argc:plongint; argv:PPPAnsiChar);cdecl;external gtkdll name 'gtk_themes_init';
 procedure gtk_themes_exit(error_code:gint);cdecl;external gtkdll name 'gtk_themes_exit';
 {$endif not gtkdarwin}
 {$endif}

+ 9 - 9
packages/gtk1/src/gtk/gtktoolbar.pp

@@ -59,18 +59,18 @@ Type
 
 function  gtk_toolbar_get_type:guint;cdecl;external gtkdll name 'gtk_toolbar_get_type';
 function  gtk_toolbar_new(orientation:TGtkOrientation; style:TGtkToolbarStyle):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_new';
-function  gtk_toolbar_append_item(toolbar:PGtkToolbar; thetext:pchar; tooltip_text:pchar; tooltip_private_text:pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_append_item';
-function  gtk_toolbar_prepend_item(toolbar:PGtkToolbar; thetext:pchar; tooltip_text:pchar; tooltip_private_text:pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_prepend_item';
-function  gtk_toolbar_insert_item(toolbar:PGtkToolbar; thetext:pchar; tooltip_text:pchar; tooltip_private_text:pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer; position:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_insert_item';
+function  gtk_toolbar_append_item(toolbar:PGtkToolbar; thetext:PAnsiChar; tooltip_text:PAnsiChar; tooltip_private_text:PAnsiChar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_append_item';
+function  gtk_toolbar_prepend_item(toolbar:PGtkToolbar; thetext:PAnsiChar; tooltip_text:PAnsiChar; tooltip_private_text:PAnsiChar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_prepend_item';
+function  gtk_toolbar_insert_item(toolbar:PGtkToolbar; thetext:PAnsiChar; tooltip_text:PAnsiChar; tooltip_private_text:PAnsiChar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer; position:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_insert_item';
 procedure gtk_toolbar_append_space(toolbar:PGtkToolbar);cdecl;external gtkdll name 'gtk_toolbar_append_space';
 procedure gtk_toolbar_prepend_space(toolbar:PGtkToolbar);cdecl;external gtkdll name 'gtk_toolbar_prepend_space';
 procedure gtk_toolbar_insert_space(toolbar:PGtkToolbar; position:gint);cdecl;external gtkdll name 'gtk_toolbar_insert_space';
-function  gtk_toolbar_append_element(toolbar:PGtkToolbar; thetype:TGtkToolbarChildType; widget:PGtkWidget; thetext:pchar; tooltip_text:pchar;tooltip_private_text:pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_append_element';
-function  gtk_toolbar_prepend_element(toolbar:PGtkToolbar; thetype:TGtkToolbarChildType; widget:PGtkWidget; thetext:pchar; tooltip_text:pchar;tooltip_private_text:pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget; cdecl;external gtkdll name 'gtk_toolbar_prepend_element';
-function  gtk_toolbar_insert_element(toolbar:PGtkToolbar; thetype:TGtkToolbarChildType; widget:PGtkWidget; thetext:pchar; tooltip_text:pchar;tooltip_private_text:pchar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer; position:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_insert_element';
-procedure gtk_toolbar_append_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:pchar; tooltip_private_text:pchar);cdecl;external gtkdll name 'gtk_toolbar_append_widget';
-procedure gtk_toolbar_prepend_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:pchar; tooltip_private_text:pchar);cdecl;external gtkdll name 'gtk_toolbar_prepend_widget';
-procedure gtk_toolbar_insert_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:pchar; tooltip_private_text:pchar; position:gint);cdecl;external gtkdll name 'gtk_toolbar_insert_widget';
+function  gtk_toolbar_append_element(toolbar:PGtkToolbar; thetype:TGtkToolbarChildType; widget:PGtkWidget; thetext:PAnsiChar; tooltip_text:PAnsiChar;tooltip_private_text:PAnsiChar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_append_element';
+function  gtk_toolbar_prepend_element(toolbar:PGtkToolbar; thetype:TGtkToolbarChildType; widget:PGtkWidget; thetext:PAnsiChar; tooltip_text:PAnsiChar;tooltip_private_text:PAnsiChar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer):PGtkWidget; cdecl;external gtkdll name 'gtk_toolbar_prepend_element';
+function  gtk_toolbar_insert_element(toolbar:PGtkToolbar; thetype:TGtkToolbarChildType; widget:PGtkWidget; thetext:PAnsiChar; tooltip_text:PAnsiChar;tooltip_private_text:PAnsiChar; icon:PGtkWidget; callback:TGtkSignalFunc; user_data:gpointer; position:gint):PGtkWidget;cdecl;external gtkdll name 'gtk_toolbar_insert_element';
+procedure gtk_toolbar_append_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:PAnsiChar; tooltip_private_text:PAnsiChar);cdecl;external gtkdll name 'gtk_toolbar_append_widget';
+procedure gtk_toolbar_prepend_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:PAnsiChar; tooltip_private_text:PAnsiChar);cdecl;external gtkdll name 'gtk_toolbar_prepend_widget';
+procedure gtk_toolbar_insert_widget(toolbar:PGtkToolbar; widget:PGtkWidget; tooltip_text:PAnsiChar; tooltip_private_text:PAnsiChar; position:gint);cdecl;external gtkdll name 'gtk_toolbar_insert_widget';
 procedure gtk_toolbar_set_orientation(toolbar:PGtkToolbar; orientation:TGtkOrientation);cdecl;external gtkdll name 'gtk_toolbar_set_orientation';
 procedure gtk_toolbar_set_style(toolbar:PGtkToolbar; style:TGtkToolbarStyle);cdecl;external gtkdll name 'gtk_toolbar_set_style';
 procedure gtk_toolbar_set_space_size(toolbar:PGtkToolbar; space_size:gint);cdecl;external gtkdll name 'gtk_toolbar_set_space_size';