diff dwt/widgets/Widget.d @ 60:6537a52fde85

Text
author Frank Benoit <benoit@tionex.de>
date Sat, 12 Jan 2008 11:16:09 +0100
parents 8cec8f536af3
children bb2217c09e61
line wrap: on
line diff
--- a/dwt/widgets/Widget.d	Sat Jan 12 08:44:23 2008 +0100
+++ b/dwt/widgets/Widget.d	Sat Jan 12 11:16:09 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -664,7 +664,7 @@
     return 0;
 }
 
-int /*long*/ gtk_insert_text (GtkWidget* widget, int /*long*/ new_text, int /*long*/ new_text_length, int /*long*/ position) {
+int /*long*/ gtk_insert_text (GtkEditable* widget, char* new_text, int new_text_length, int position) {
     return 0;
 }
 
@@ -764,7 +764,7 @@
     return 0;
 }
 
-int /*long*/ gtk_text_buffer_insert_text (GtkWidget* widget, int /*long*/ iter, int /*long*/ text, int /*long*/ length) {
+int /*long*/ gtk_text_buffer_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, char *text, int len) {
     return 0;
 }
 
@@ -844,7 +844,7 @@
         }
         result [j++] = text [i++];
     }
-    return result;
+    return result[0..j];
 }
 
 /**
@@ -1532,8 +1532,8 @@
     switch (cast(int)/*64*/user_data) {
         case CHANGE_VALUE: return gtk_change_value (handle, arg0, arg1, arg2);
         case EXPAND_COLLAPSE_CURSOR_ROW: return gtk_expand_collapse_cursor_row (handle, arg0, arg1, arg2);
-        case INSERT_TEXT: return gtk_insert_text (handle, arg0, arg1, arg2);
-        case TEXT_BUFFER_INSERT_TEXT: return gtk_text_buffer_insert_text (handle, arg0, arg1, arg2);
+        case INSERT_TEXT: return gtk_insert_text (cast(GtkEditable*)handle, cast(char*)arg0, arg1, arg2);
+        case TEXT_BUFFER_INSERT_TEXT: return gtk_text_buffer_insert_text (cast(GtkTextBuffer*)handle, cast(GtkTextIter*)arg0, cast(char*)arg1, arg2);
         default: return 0;
     }
 }