Changeset 362
- Timestamp:
- 12/31/07 02:08:47 (1 year ago)
- Files:
-
- trunk/wrap/utils/GtkDClass.d (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wrap/utils/GtkDClass.d
r361 r362 57 57 private import utils.funct; 58 58 59 private import std.ctype; 60 private import std.path; 61 private import std.stdio; 62 private import std.string; 63 59 64 public class GtkDClass 60 65 { 61 62 private import std.ctype;63 private import std.path;64 private import std.stdio;65 private import std.string;66 67 //Moved up... for dsss:68 //private import utils.HtmlStrip;69 //private import utils.WrapperIF;70 //private import utils.convparms;71 //private import utils.funct;72 73 66 private WrapperIF wrapper; 74 67 private char[] inAPI; … … 238 231 gtkDText ~= getNoAssertVersion(); */ 239 232 240 // moved to class level 241 /* Type information should be publicly imported by all modules. */ 242 gtkDText ~= "public import " ~convParms.bindDir~ "." ~convParms.outPack~ "types;\n\n"; 233 /* Type information should be publicly imported by all modules. */ 234 gtkDText ~= "public import " ~convParms.bindDir~ "." ~convParms.outPack~ "types;\n\n"; 243 235 gtkDText ~= "private import " ~convParms.bindDir~ "." ~convParms.outPack ~ ";\n\n"; 244 245 // moved bac to class level 236 237 // move signal imports out of classes - JJR 238 if (needSignalImports) 239 { 240 int i = moveToBlockStart("Signal Details", inLines); 241 // if "Signal Details" exists in API Lines 242 // than we know that we need signal imports. 243 if (i < inLines.length) 244 { 245 gtkDText ~= "private import gobject.Signals;\n"; 246 gtkDText ~= "public import gtkc.gdktypes;\n"; 247 } 248 } 246 249 247 250 // the use of phobs is limited, maybe we can get by with this... … … 300 303 { 301 304 gtkDText ~= importTango; 302 gtkDText ~= importElse~"}\n \n";305 gtkDText ~= importElse~"}\n"; 303 306 } 304 307 … … 888 891 889 892 int i = moveToBlockStart("Signal Details", inLines); 893 890 894 i += 2; 895 891 896 debug(getSignal)if(i<inLines.length)writefln("\t %s", inLines[i]); 892 897 … … 934 939 char[] delegateDeclaration = fun.getDelegateDeclaration(convParms, 1); 935 940 936 addSignalImports(text); 941 // Removed function "addSignalImports" and replaced it 942 // with simple "if" block to make sure class local imports 943 // don't get added - JJR 944 945 if ( needSignalImports ) 946 { 947 if ( !isInterface ) 948 { 949 text ~= "int[char[]] connectedSignals;"; 950 } 951 text ~= ""; 952 953 needSignalImports = false; 954 } 955 937 956 text ~= delegateDeclaration ~ "[] on" ~ gtkDSignal~"Listeners;" ; 938 957 addAddListener(text, signalName, gtkDSignal, delegateDeclaration); … … 1060 1079 } 1061 1080 1062 /**1063 * adding:1064 * "private import gobject.Signals;"1065 * "private import gdk.gdktypes;"1066 * Params:1067 * text =1068 */1069 void addSignalImports(inout char[][] text)1070 {1071 if ( needSignalImports )1072 {1073 text ~= "";1074 text ~= "// imports for the signal processing";1075 text ~= "private import gobject.Signals;";1076 text ~= "private import gtkc.gdktypes;";1077 if ( !isInterface )1078 {1079 text ~= "int[char[]] connectedSignals;";1080 }1081 text ~= "";1082 1083 needSignalImports = false;1084 1085 }1086 }1087 1081 1088 1082 private char[] getSignalFunctionDeclaration(inout int line, char[][] lines)
