Changeset 46

Show
Ignore:
Timestamp:
06/01/06 20:10:38 (2 years ago)
Author:
Gregor
Message:

bcd/gen/bcdgen.d: Support instantiation of template classes with more than one template parameter.

bcd/cairo, bcd/glib2, bcd/pango, bcd/gdk, bcd/gtk2: Regenerated with constants.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bcd/cairo/cairo.d

    r42 r46  
    11/* THIS FILE GENERATED BY bcd.gen */ 
    22module bcd.cairo.cairo; 
     3const int CAIRO_VERSION_MAJOR = 1; 
     4const int CAIRO_VERSION_MINOR = 0; 
     5const int CAIRO_VERSION_MICRO = 0; 
     6const int CAIRO_HAS_XLIB_SURFACE = 1; 
     7const int CAIRO_HAS_FT_FONT = 1; 
     8const int CAIRO_HAS_PNG_FUNCTIONS = 1; 
    39enum _cairo_filter { 
    410CAIRO_FILTER_FAST=0, 
  • trunk/bcd/gdk/gdk.d

    r42 r46  
    44import bcd.pango.pango; 
    55import bcd.glib2.glib; 
     6const int GDK_PIXBUF_FEATURES_H = 1; 
     7const int GDK_MAX_TIMECOORD_AXES = 128; 
    68alias _GdkWindowObjectClass GdkWindowObjectClass; 
    79alias _GdkDrawableClass GdkDrawableClass; 
  • trunk/bcd/gen/bcdgen.d

    r45 r46  
    7979        writefln("Options:"); 
    8080        writefln("  -I<include prefix>"); 
    81         writefln("  -N<symbol to ignore>"); 
    8281        writefln("  -C"); 
    8382        writefln("    Read/write C instead of C++"); 
    84         writefln("  -R<include directory>=<BCD/D namespace>"); 
    85         writefln("    Depend upon other BCD namespaces."); 
    8683        writefln("  -A"); 
    8784        writefln("    Include all symbols provided by headers in the same"); 
     
    8986        writefln("    they are actually provded by the included file."); 
    9087        writefln("  -F<forced import>"); 
    91         writefln("  -T<template class>"); 
    92         writefln("    Make the given template class accessable from D."); 
     88        writefln("  -R<include directory>=<BCD/D namespace>"); 
     89        writefln("    Depend upon other BCD namespaces."); 
    9390        writefln("  -E"); 
    9491        writefln("    Generate const int's for unnamed enum values"); 
     92        writefln("  -T<template class>[=<count>]"); 
     93        writefln("    Make the given template class accessable from D.  If the"); 
     94        writefln("    class has more than one template parameter, also provide"); 
     95        writefln("    the count."); 
     96        writefln("  -N<symbol to ignore>"); 
    9597        return 1; 
    9698    } 
     
    113115        if (args[i][0..2] == "-I") { 
    114116            incPrefix = args[i][2..args[i].length]; 
     117             
    115118        } else if (args[i][0..2] == "-N") { 
    116119            ignoreSyms ~= args[i][2..args[i].length]; 
     120             
    117121        } else if (args[i] == "-C") { 
    118122            outputC = true; 
     123             
    119124        } else if (args[i][0..2] == "-R") { 
    120125            char[] req = args[i][2..args[i].length]; 
     
    125130            } 
    126131            reqDependencies[req[0..eqloc]] = req[eqloc + 1 .. req.length]; 
     132             
    127133        } else if (args[i] == "-A") { 
    128134            outputAll = true; 
     135             
    129136        } else if (args[i][0..2] == "-F") { 
    130137            forcedImport ~= "import " ~ args[i][2..args[i].length] ~ ";\n"; 
     138             
    131139        } else if (args[i][0..2] == "-T") { 
    132             templates ~= args[i][2..args[i].length] ~ "<DReflectedClass> __IGNORE_" ~ toString(onTemplate) ~ ";\n"; 
     140            char[] temp = args[i][2..args[i].length]; 
     141            int count = 1, eqloc; 
     142             
     143            eqloc = find(temp, '='); 
     144            if (eqloc != -1) { 
     145                count = atoi(temp[eqloc + 1 .. temp.length]); 
     146                temp = temp[0..eqloc]; 
     147            } 
     148             
     149            templates ~= temp ~ "<DReflectedClass"; 
     150             
     151            for (int i = 1; i < count; i++) 
     152                templates ~= ", DReflectedClass"; 
     153             
     154            templates ~= "> __IGNORE_" ~ toString(onTemplate) ~ ";\n"; 
     155             
    133156            onTemplate++; 
     157             
    134158        } else if (args[i] == "-E") { 
    135159            outputEnumConst = true; 
     160             
    136161        } else { 
    137162            writefln("Argument %s not recognized.", args[i]); 
  • trunk/bcd/glib2/glib_object.d

    r42 r46  
    33struct _GStaticMutex {} 
    44struct _GSystemThread {} 
     5const double G_E = 2.7182818284590452353602874713526624977572470937000; 
     6const double G_LN2 = 0.69314718055994530941723212145817656807550013436026; 
     7const double G_LN10 = 2.3025850929940456840179914546843642076011014886288; 
     8const double G_PI = 3.1415926535897932384626433832795028841971693993751; 
     9const double G_PI_2 = 1.5707963267948966192313216916397514420985846996876; 
     10const double G_PI_4 = 0.78539816339744830961566084581987572104929234984378; 
     11const double G_SQRT2 = 1.4142135623730950488016887242096980785696718753769; 
     12const int G_LITTLE_ENDIAN = 1234; 
     13const int G_BIG_ENDIAN = 4321; 
     14const int G_PDP_ENDIAN = 3412; 
     15const int G_ALLOC_ONLY = 1; 
     16const int G_ALLOC_AND_FREE = 2; 
     17const int G_DATALIST_FLAGS_MASK = 0x3; 
     18const int G_PRIORITY_HIGH = -100; 
     19const int G_PRIORITY_DEFAULT = 0; 
     20const int G_PRIORITY_HIGH_IDLE = 100; 
     21const int G_PRIORITY_DEFAULT_IDLE = 200; 
     22const int G_PRIORITY_LOW = 300; 
     23const int G_USEC_PER_SEC = 1000000; 
    524alias char gchar; 
    625alias char * gchararray; 
  • trunk/bcd/gtk2/gtk.d

    r42 r46  
    66import bcd.gdk.gdk; 
    77import bcd.glib2.glib; 
     8const int GTK_BUTTONBOX_DEFAULT = -1; 
     9const int GTK_MAX_COMPOSE_LEN = 7; 
     10const int GTK_INPUT_ERROR = -1; 
    811alias _GtkVSeparatorClass GtkVSeparatorClass; 
    912alias _GtkSeparatorClass GtkSeparatorClass; 
     
    803806GTK_BUTTON_DRAGS=2, 
    804807GTK_BUTTON_EXPANDS=4, 
     808} 
     809enum __205 { 
     810GTK_CLIST_IN_DRAG=1, 
     811GTK_CLIST_ROW_HEIGHT_SET=2, 
     812GTK_CLIST_SHOW_TITLES=4, 
     813GTK_CLIST_ADD_MODE=16, 
     814GTK_CLIST_AUTO_SORT=32, 
     815GTK_CLIST_AUTO_RESIZE_BLOCKED=64, 
     816GTK_CLIST_REORDERABLE=128, 
     817GTK_CLIST_USE_DRAG_ICONS=256, 
     818GTK_CLIST_DRAW_DRAG_LINE=512, 
     819GTK_CLIST_DRAW_DRAG_RECT=1024, 
    805820} 
    806821alias _GtkVScrollbarClass GtkVScrollbarClass; 
     
    894909alias void function(void *, _BCD_func__10268, void *, _BCD_func__11666) _BCD_func__15269; 
    895910alias int function(void *) _BCD_func__15270; 
     911enum __203 { 
     912GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID=-1, 
     913GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID=-2, 
     914} 
    896915enum GtkTreeModelFlags { 
    897916GTK_TREE_MODEL_ITERS_PERSIST=1, 
  • trunk/bcd/pango/pango.d

    r42 r46  
    22module bcd.pango.pango; 
    33import bcd.glib2.glib; 
     4const int PANGO_SCALE = 1024; 
    45enum PangoRenderPart { 
    56PANGO_RENDER_PART_FOREGROUND=0, 
  • trunk/scripts/gdk.sh

    r42 r46  
    22export CFLAGS="$CFLAGS `pkg-config --cflags gdk-2.0`" 
    33 
    4 rm -rf bcd/gdk2 
     4rm -rf bcd/gdk 
    55 
    66echo gdk