Changeset 538

Show
Ignore:
Timestamp:
07/15/08 16:55:25 (3 months ago)
Author:
Mike Wey
Message:

For functions that accept an GError**, wrap this with an Exception - see ticket #3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/demos/gtkD/TTextView.d

    r535 r538  
    3939 
    4040private import gtk.ComboBox; 
     41 
     42private import glib.GException; 
    4143 
    4244version(Tango) private import tango.io.Stdout; 
     
    268270        try 
    269271        { 
    270             pixbuf = new Pixbuf("images/gtk-logo-rgb.gif", null); 
     272            pixbuf = new Pixbuf("images/gtk-logo-rgb.gif"); 
    271273 
    272274            scaled = pixbuf.scaleSimple(32, 32, InterpType.BILINEAR); 
  • trunk/src/build/gtkD.d

    r525 r538  
    3030private import glib.IOChannel; 
    3131private import glib.ErrorG; 
     32private import glib.GException; 
    3233private import glib.Messages; 
    3334private import glib.MessageLog; 
  • trunk/src/gdk/Pixbuf.d

    r530 r538  
    4747 * imports: 
    4848 *  - glib.Str 
     49 *  - glib.ErrorG 
     50 *  - glib.GException 
    4951 *  - gdkpixbuf.PixbufFormat 
    5052 *  - gdk.Drawable 
     
    7476 
    7577private import glib.Str; 
     78private import glib.ErrorG; 
     79private import glib.GException; 
    7680private import gdkpixbuf.PixbufFormat; 
    7781private import gdk.Drawable; 
     
    637641     * copyPixels =  Whether to copy the pixel data, or use direct pointers 
    638642     *  data for the resulting pixbuf 
    639      * error =  GError return location, may be NULL to ignore errors 
    640      */ 
    641     public this (int dataLength, byte* data, int copyPixels, GError** error
     643     * Throws: GException on failure. 
     644     */ 
     645    public this (int dataLength, byte* data, int copyPixels
    642646    { 
    643647        // GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length,  const guint8 *data,  gboolean copy_pixels,  GError **error); 
    644         auto p = gdk_pixbuf_new_from_inline(dataLength, data, copyPixels, error); 
     648        GError* err = null; 
     649         
     650        auto p = gdk_pixbuf_new_from_inline(dataLength, data, copyPixels, &err); 
     651         
     652        if (err !is null) 
     653        { 
     654            throw new GException( new ErrorG(err) ); 
     655        } 
     656         
    645657        if(p is null) 
    646658        { 
     
    797809     * Params: 
    798810     * filename =  Name of file to load, in the GLib file name encoding 
    799      * error =  Return location for an error 
    800      */ 
    801     public this (string filename, GError** error
     811     * Throws: GException on failure. 
     812     */ 
     813    public this (string filename
    802814    { 
    803815        // GdkPixbuf* gdk_pixbuf_new_from_file (const char *filename,  GError **error); 
    804         auto p = gdk_pixbuf_new_from_file(Str.toStringz(filename), error); 
     816        GError* err = null; 
     817         
     818        auto p = gdk_pixbuf_new_from_file(Str.toStringz(filename), &err); 
     819         
     820        if (err !is null) 
     821        { 
     822            throw new GException( new ErrorG(err) ); 
     823        } 
     824         
    805825        if(p is null) 
    806826        { 
     
    821841     * width =  The width the image should have or -1 to not constrain the width 
    822842     * height =  The height the image should have or -1 to not constrain the height 
    823      * error =  Return location for an error 
    824      */ 
    825     public this (string filename, int width, int height, GError** error
     843     * Throws: GException on failure. 
     844     */ 
     845    public this (string filename, int width, int height
    826846    { 
    827847        // GdkPixbuf* gdk_pixbuf_new_from_file_at_size (const char *filename,  int width,  int height,  GError **error); 
    828         auto p = gdk_pixbuf_new_from_file_at_size(Str.toStringz(filename), width, height, error); 
     848        GError* err = null; 
     849         
     850        auto p = gdk_pixbuf_new_from_file_at_size(Str.toStringz(filename), width, height, &err); 
     851         
     852        if (err !is null) 
     853        { 
     854            throw new GException( new ErrorG(err) ); 
     855        } 
     856         
    829857        if(p is null) 
    830858        { 
     
    852880     * height =  The height the image should have or -1 to not constrain the height 
    853881     * preserveAspectRatio =  TRUE to preserve the image's aspect ratio 
    854      * error =  Return location for an error 
    855      */ 
    856     public this (string filename, int width, int height, int preserveAspectRatio, GError** error
     882     * Throws: GException on failure. 
     883     */ 
     884    public this (string filename, int width, int height, int preserveAspectRatio
    857885    { 
    858886        // GdkPixbuf* gdk_pixbuf_new_from_file_at_scale (const char *filename,  int width,  int height,  gboolean preserve_aspect_ratio,  GError **error); 
    859         auto p = gdk_pixbuf_new_from_file_at_scale(Str.toStringz(filename), width, height, preserveAspectRatio, error); 
     887        GError* err = null; 
     888         
     889        auto p = gdk_pixbuf_new_from_file_at_scale(Str.toStringz(filename), width, height, preserveAspectRatio, &err); 
     890         
     891        if (err !is null) 
     892        { 
     893            throw new GException( new ErrorG(err) ); 
     894        } 
     895         
    860896        if(p is null) 
    861897        { 
     
    874910     * optionKeys =  name of options to set, NULL-terminated 
    875911     * optionValues =  values for named options 
    876      * error =  return location for error, or NULL 
    877912     * Returns: whether an error was set 
    878      */ 
    879     public int savev(string filename, string type, char** optionKeys, char** optionValues, GError** error) 
     913     * Throws: GException on failure. 
     914     */ 
     915    public int savev(string filename, string type, char** optionKeys, char** optionValues) 
    880916    { 
    881917        // gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf,  const char *filename,  const char *type,  char **option_keys,  char **option_values,  GError **error); 
    882         return gdk_pixbuf_savev(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), optionKeys, optionValues, error); 
     918        GError* err = null; 
     919         
     920        auto p = gdk_pixbuf_savev(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), optionKeys, optionValues, &err); 
     921         
     922        if (err !is null) 
     923        { 
     924            throw new GException( new ErrorG(err) ); 
     925        } 
     926         
     927        return p; 
    883928    } 
    884929     
     
    890935     * filename =  name of file to save. 
    891936     * type =  name of file format. 
    892      * error =  return location for error, or NULL 
    893937     * ... =  list of key-value save options 
    894938     * Returns: whether an error was set 
    895      */ 
    896     public int save(string filename, string type, GError** error, ... ) 
     939     * Throws: GException on failure. 
     940     */ 
     941    public int save(string filename, string type, ... ) 
    897942    { 
    898943        // gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf,  const char *filename,  const char *type,  GError **error,  ...); 
    899         return gdk_pixbuf_save(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), error); 
     944        GError* err = null; 
     945         
     946        auto p = gdk_pixbuf_save(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), &err); 
     947         
     948        if (err !is null) 
     949        { 
     950            throw new GException( new ErrorG(err) ); 
     951        } 
     952         
     953        return p; 
    900954    } 
    901955     
     
    914968     * userData =  user data to pass to the save function. 
    915969     * type =  name of file format. 
    916      * error =  return location for error, or NULL 
    917970     * ... =  list of key-value save options 
    918971     * Returns: whether an error was set 
    919      */ 
    920     public int saveToCallback(GdkPixbufSaveFunc saveFunc, void* userData, string type, GError** error, ... ) 
     972     * Throws: GException on failure. 
     973     */ 
     974    public int saveToCallback(GdkPixbufSaveFunc saveFunc, void* userData, string type, ... ) 
    921975    { 
    922976        // gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf,  GdkPixbufSaveFunc save_func,  gpointer user_data,  const char *type,  GError **error,  ...); 
    923         return gdk_pixbuf_save_to_callback(gdkPixbuf, saveFunc, userData, Str.toStringz(type), error); 
     977        GError* err = null; 
     978         
     979        auto p = gdk_pixbuf_save_to_callback(gdkPixbuf, saveFunc, userData, Str.toStringz(type), &err); 
     980         
     981        if (err !is null) 
     982        { 
     983            throw new GException( new ErrorG(err) ); 
     984        } 
     985         
     986        return p; 
    924987    } 
    925988     
     
    936999     * optionKeys =  name of options to set, NULL-terminated 
    9371000     * optionValues =  values for named options 
    938      * error =  return location for error, or NULL 
    9391001     * Returns: whether an error was set 
    940      */ 
    941     public int saveToCallbackv(GdkPixbufSaveFunc saveFunc, void* userData, string type, char** optionKeys, char** optionValues, GError** error) 
     1002     * Throws: GException on failure. 
     1003     */ 
     1004    public int saveToCallbackv(GdkPixbufSaveFunc saveFunc, void* userData, string type, char** optionKeys, char** optionValues) 
    9421005    { 
    9431006        // gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf,  GdkPixbufSaveFunc save_func,  gpointer user_data,  const char *type,  char **option_keys,  char **option_values,  GError **error); 
    944         return gdk_pixbuf_save_to_callbackv(gdkPixbuf, saveFunc, userData, Str.toStringz(type), optionKeys, optionValues, error); 
     1007        GError* err = null; 
     1008         
     1009        auto p = gdk_pixbuf_save_to_callbackv(gdkPixbuf, saveFunc, userData, Str.toStringz(type), optionKeys, optionValues, &err); 
     1010         
     1011        if (err !is null) 
     1012        { 
     1013            throw new GException( new ErrorG(err) ); 
     1014        } 
     1015         
     1016        return p; 
    9451017    } 
    9461018     
     
    9591031     * bufferSize =  location to receive the size of the new buffer. 
    9601032     * type =  name of file format. 
    961      * error =  return location for error, or NULL 
    9621033     * ... =  list of key-value save options 
    9631034     * Returns: whether an error was set 
    964      */ 
    965     public int saveToBuffer(char** buffer, uint* bufferSize, string type, GError** error, ... ) 
     1035     * Throws: GException on failure. 
     1036     */ 
     1037    public int saveToBuffer(char** buffer, uint* bufferSize, string type, ... ) 
    9661038    { 
    9671039        // gboolean gdk_pixbuf_save_to_buffer (GdkPixbuf *pixbuf,  gchar **buffer,  gsize *buffer_size,  const char *type,  GError **error,  ...); 
    968         return gdk_pixbuf_save_to_buffer(gdkPixbuf, buffer, bufferSize, Str.toStringz(type), error); 
     1040        GError* err = null; 
     1041         
     1042        auto p = gdk_pixbuf_save_to_buffer(gdkPixbuf, buffer, bufferSize, Str.toStringz(type), &err); 
     1043         
     1044        if (err !is null) 
     1045        { 
     1046            throw new GException( new ErrorG(err) ); 
     1047        } 
     1048         
     1049        return p; 
    9691050    } 
    9701051     
     
    9791060     * optionKeys =  name of options to set, NULL-terminated 
    9801061     * optionValues =  values for named options 
    981      * error =  return location for error, or NULL 
    9821062     * Returns: whether an error was set 
    983      */ 
    984     public int saveToBufferv(char** buffer, uint* bufferSize, string type, char** optionKeys, char** optionValues, GError** error) 
     1063     * Throws: GException on failure. 
     1064     */ 
     1065    public int saveToBufferv(char** buffer, uint* bufferSize, string type, char** optionKeys, char** optionValues) 
    9851066    { 
    9861067        // gboolean gdk_pixbuf_save_to_bufferv (GdkPixbuf *pixbuf,  gchar **buffer,  gsize *buffer_size,  const char *type,  char **option_keys,  char **option_values,  GError **error); 
    987         return gdk_pixbuf_save_to_bufferv(gdkPixbuf, buffer, bufferSize, Str.toStringz(type), optionKeys, optionValues, error); 
     1068        GError* err = null; 
     1069         
     1070        auto p = gdk_pixbuf_save_to_bufferv(gdkPixbuf, buffer, bufferSize, Str.toStringz(type), optionKeys, optionValues, &err); 
     1071         
     1072        if (err !is null) 
     1073        { 
     1074            throw new GException( new ErrorG(err) ); 
     1075        } 
     1076         
     1077        return p; 
    9881078    } 
    9891079     
  • trunk/src/gdk/Screen.d

    r530 r538  
    4444 * imports: 
    4545 *  - glib.Str 
     46 *  - glib.ErrorG 
     47 *  - glib.GException 
    4648 *  - cairo.FontOption 
    4749 *  - gdk.Screen 
     
    8082 
    8183private import glib.Str; 
     84private import glib.ErrorG; 
     85private import glib.GException; 
    8286private import cairo.FontOption; 
    8387private import gdk.Screen; 
     
    758762     * userData =  user data for child_setup 
    759763     * childPid =  return location for child process ID, or NULL 
    760      * error =  return location for error 
    761764     * Returns: TRUE on success, FALSE if error is set 
    762      */ 
    763     public int gdkSpawnOnScreen(string workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, int* childPid, GError** error) 
     765     * Throws: GException on failure. 
     766     */ 
     767    public int gdkSpawnOnScreen(string workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, int* childPid) 
    764768    { 
    765769        // gboolean gdk_spawn_on_screen (GdkScreen *screen,  const gchar *working_directory,  gchar **argv,  gchar **envp,  GSpawnFlags flags,  GSpawnChildSetupFunc child_setup,  gpointer user_data,  gint *child_pid,  GError **error); 
    766         return gdk_spawn_on_screen(gdkScreen, Str.toStringz(workingDirectory), argv, envp, flags, childSetup, userData, childPid, error); 
     770        GError* err = null; 
     771         
     772        auto p = gdk_spawn_on_screen(gdkScreen, Str.toStringz(workingDirectory), argv, envp, flags, childSetup, userData, childPid, &err); 
     773         
     774        if (err !is null) 
     775        { 
     776            throw new GException( new ErrorG(err) ); 
     777        } 
     778         
     779        return p; 
    767780    } 
    768781     
     
    790803     * standardError =  return location for file descriptor to read child's 
    791804     *  stderr, or NULL 
    792      * error =  return location for error 
    793805     * Returns: TRUE on success, FALSE if an error was set 
    794      */ 
    795     public int gdkSpawnOnScreenWithPipes(string workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, int* childPid, int* standardInput, int* standardOutput, int* standardError, GError** error) 
     806     * Throws: GException on failure. 
     807     */ 
     808    public int gdkSpawnOnScreenWithPipes(string workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, int* childPid, int* standardInput, int* standardOutput, int* standardError) 
    796809    { 
    797810        // gboolean gdk_spawn_on_screen_with_pipes (GdkScreen *screen,  const gchar *working_directory,  gchar **argv,  gchar **envp,  GSpawnFlags flags,  GSpawnChildSetupFunc child_setup,  gpointer user_data,  gint *child_pid,  gint *standard_input,  gint *standard_output,  gint *standard_error,  GError **error); 
    798         return gdk_spawn_on_screen_with_pipes(gdkScreen, Str.toStringz(workingDirectory), argv, envp, flags, childSetup, userData, childPid, standardInput, standardOutput, standardError, error); 
     811        GError* err = null; 
     812         
     813        auto p = gdk_spawn_on_screen_with_pipes(gdkScreen, Str.toStringz(workingDirectory), argv, envp, flags, childSetup, userData, childPid, standardInput, standardOutput, standardError, &err); 
     814         
     815        if (err !is null) 
     816        { 
     817            throw new GException( new ErrorG(err) ); 
     818        } 
     819         
     820        return p; 
    799821    } 
    800822     
     
    809831     * Params: 
    810832     * commandLine =  a command line 
    811      * error =  return location for errors 
    812833     * Returns: TRUE on success, FALSE if error is set. 
    813      */ 
    814     public int gdkSpawnCommandLineOnScreen(string commandLine, GError** error) 
     834     * Throws: GException on failure. 
     835     */ 
     836    public int gdkSpawnCommandLineOnScreen(string commandLine) 
    815837    { 
    816838        // gboolean gdk_spawn_command_line_on_screen (GdkScreen *screen,  const gchar *command_line,  GError **error); 
    817         return gdk_spawn_command_line_on_screen(gdkScreen, Str.toStringz(commandLine), error); 
     839        GError* err = null; 
     840         
     841        auto p = gdk_spawn_command_line_on_screen(gdkScreen, Str.toStringz(commandLine), &err); 
     842         
     843        if (err !is null) 
     844        { 
     845            throw new GException( new ErrorG(err) ); 
     846        } 
     847         
     848        return p; 
    818849    } 
    819850} 
  • trunk/src/gdkpixbuf/PixbufAnimation.d

    r530 r538  
    4444 * omit signals: 
    4545 * imports: 
     46 *  - glib.ErrorG 
     47 *  - glib.GException 
    4648 *  - glib.TimeVal 
    4749 *  - gdk.Pixbuf 
     
    6365 
    6466 
     67private import glib.ErrorG; 
     68private import glib.GException; 
    6569private import glib.TimeVal; 
    6670private import gdk.Pixbuf; 
     
    131135     * Params: 
    132136     * filename =  Name of file to load, in the GLib file name encoding 
    133      * error =  return location for error 
    134      */ 
    135     public this (string filename, GError** error
     137     * Throws: GException on failure. 
     138     */ 
     139    public this (string filename
    136140    { 
    137141        // GdkPixbufAnimation* gdk_pixbuf_animation_new_from_file (const char *filename,  GError **error); 
    138         auto p = gdk_pixbuf_animation_new_from_file(Str.toStringz(filename), error); 
     142        GError* err = null; 
     143         
     144        auto p = gdk_pixbuf_animation_new_from_file(Str.toStringz(filename), &err); 
     145         
     146        if (err !is null) 
     147        { 
     148            throw new GException( new ErrorG(err) ); 
     149        } 
     150         
    139151        if(p is null) 
    140152        { 
  • trunk/src/gdkpixbuf/PixbufLoader.d

    r530 r538  
    4646 * imports: 
    4747 *  - gdkpixbuf.PixbufFormat 
     48 *  - glib.ErrorG 
     49 *  - glib.GException 
    4850 *  - gdk.Pixbuf 
    4951 *  - gdkpixbuf.PixbufAnimation 
     
    6870 
    6971private import gdkpixbuf.PixbufFormat; 
     72private import glib.ErrorG; 
     73private import glib.GException; 
    7074private import gdk.Pixbuf; 
    7175private import gdkpixbuf.PixbufAnimation; 
     
    375379     * buf =  Pointer to image data. 
    376380     * count =  Length of the buf buffer in bytes. 
    377      * error =  return location for errors 
    378381     * Returns: TRUE if the write was successful, or FALSE if the loadercannot parse the buffer. 
    379      */ 
    380     public int write(char* buf, uint count, GError** error) 
     382     * Throws: GException on failure. 
     383     */ 
     384    public int write(char* buf, uint count) 
    381385    { 
    382386        // gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader,  const guchar *buf,  gsize count,  GError **error); 
    383         return gdk_pixbuf_loader_write(gdkPixbufLoader, buf, count, error); 
     387        GError* err = null; 
     388         
     389        auto p = gdk_pixbuf_loader_write(gdkPixbufLoader, buf, count, &err); 
     390         
     391        if (err !is null) 
     392        { 
     393            throw new GException( new ErrorG(err) ); 
     394        } 
     395         
     396        return p; 
    384397    } 
    385398     
     
    456469     * to be finished, passing NULL for error to ignore it is 
    457470     * reasonable. 
    458      * Params: 
    459      * error =  return location for a GError, or NULL to ignore errors 
    460471     * Returns: TRUE if all image data written so far was successfully passed out via the update_area signalSignal DetailsThe "area-prepared" signalvoid user_function (GdkPixbufLoader *loader, gpointer user_data) : Run LastThis signal is emitted when the pixbuf loader has allocated the pixbuf in the desired size. After this signal is emitted, applications can call gdk_pixbuf_loader_get_pixbuf() to fetch the partially-loaded pixbuf. 
    461      */ 
    462     public int close(GError** error) 
     472     * Throws: GException on failure. 
     473     */ 
     474    public int close() 
    463475    { 
    464476        // gboolean gdk_pixbuf_loader_close (GdkPixbufLoader *loader,  GError **error); 
    465         return gdk_pixbuf_loader_close(gdkPixbufLoader, error); 
     477        GError* err = null; 
     478         
     479        auto p = gdk_pixbuf_loader_close(gdkPixbufLoader, &err); 
     480         
     481        if (err !is null) 
     482        { 
     483            throw new GException( new ErrorG(err) ); 
     484        } 
     485         
     486        return p; 
    466487    } 
    467488} 
  • trunk/src/gdkpixbuf/Pixdata.d

    r530 r538  
    4444 * imports: 
    4545 *  - gdk.Pixbuf 
     46 *  - glib.ErrorG 
     47 *  - glib.GException 
    4648 *  - glib.StringG 
    4749 *  - glib.Str 
     
    6264 
    6365private import gdk.Pixbuf; 
     66private import glib.ErrorG; 
     67private import glib.GException; 
    6468private import glib.StringG; 
    6569private import glib.Str; 
     
    134138     * copyPixels =  whether to copy raw pixel data; run-length encoded 
    135139     *  pixel data is always copied. 
    136      * error =  location to store possible errors. 
    137140     * Returns: a new GdkPixbuf. 
    138      */ 
    139     public Pixbuf gdkPixbufFromPixdata(int copyPixels, GError** error) 
     141     * Throws: GException on failure. 
     142     */ 
     143    public Pixbuf gdkPixbufFromPixdata(int copyPixels) 
    140144    { 
    141145        // GdkPixbuf* gdk_pixbuf_from_pixdata (const GdkPixdata *pixdata,  gboolean copy_pixels,  GError **error); 
    142         auto p = gdk_pixbuf_from_pixdata(gdkPixdata, copyPixels, error); 
     146        GError* err = null; 
     147         
     148        auto p = gdk_pixbuf_from_pixdata(gdkPixdata, copyPixels, &err); 
     149         
     150        if (err !is null) 
     151        { 
     152            throw new GException( new ErrorG(err) ); 
     153        } 
     154         
    143155        if(p is null) 
    144156        { 
     
    174186     * streamLength =  length of the stream used for deserialization. 
    175187     * stream =  stream of bytes containing a serialized GdkPixdata structure. 
    176      * error =  GError location to indicate failures (maybe NULL to ignore errors). 
    177188     * Returns: Upon successful deserialization TRUE is returned,FALSE otherwise. 
    178      */ 
    179     public int deserialize(uint streamLength, byte* stream, GError** error) 
     189     * Throws: GException on failure. 
     190     */ 
     191    public int deserialize(uint streamLength, byte* stream) 
    180192    { 
    181193        // gboolean gdk_pixdata_deserialize (GdkPixdata *pixdata,  guint stream_length,  const guint8 *stream,  GError **error); 
    182         return gdk_pixdata_deserialize(gdkPixdata, streamLength, stream, error); 
     194        GError* err = null; 
     195         
     196        auto p = gdk_pixdata_deserialize(gdkPixdata, streamLength, stream, &err); 
     197         
     198        if (err !is null) 
     199        { 
     200            throw new GException( new ErrorG(err) ); 
     201        } 
     202         
     203        return p; 
    183204    } 
    184205     
  • trunk/src/glib/BookmarkFile.d

    r530 r538  
    4343 * omit signals: 
    4444 * imports: 
     45 *  - glib.ErrorG 
     46 *  - glib.GException 
    4547 *  - glib.Str 
    4648 * structWrap: 
     
    5759 
    5860 
     61private import glib.ErrorG; 
     62private import glib.GException; 
    5963private import glib.Str; 
    6064 
     
    190194     * Params: 
    191195     * filename =  the path of a filename to load, in the GLib file name encoding 
    192      * error =  return location for a GError, or NULL 
    193196     * Returns: TRUE if a desktop bookmark file could be loaded 
    194      */ 
    195     public int loadFromFile(string filename, GError** error) 
     197     * Throws: GException on failure. 
     198     */ 
     199    public int loadFromFile(string filename) 
    196200    { 
    197201        // gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark,  const gchar *filename,  GError **error); 
    198         return g_bookmark_file_load_from_file(gBookmarkFile, Str.toStringz(filename), error); 
     202        GError* err = null; 
     203         
     204        auto p = g_bookmark_file_load_from_file(gBookmarkFile, Str.toStringz(filename), &err); 
     205         
     206        if (err !is null) 
     207        { 
     208            throw new GException( new ErrorG(err) ); 
     209        } 
     210         
     211        return p; 
    199212    } 
    200213     
     
    207220     * data =  desktop bookmarks loaded in memory 
    208221     * length =  the length of data in bytes 
    209      * error =  return location for a GError, or NULL 
    210222     * Returns: TRUE if a desktop bookmark could be loaded. 
    211      */ 
    212     public int loadFromData(string data, uint length, GError** error) 
     223     * Throws: GException on failure. 
     224     */ 
     225    public int loadFromData(string data, uint length) 
    213226    { 
    214227        // gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark,  const gchar *data,  gsize length,  GError **error); 
    215         return g_bookmark_file_load_from_data(gBookmarkFile, Str.toStringz(data), length, error); 
     228        GError* err = null; 
     229         
     230        auto p = g_bookmark_file_load_from_data(gBookmarkFile, Str.toStringz(data), length, &err); 
     231         
     232        if (err !is null) 
     233        { 
     234            throw new GException( new ErrorG(err) ); 
     235        } 
     236         
     237        return p; 
    216238    } 
    217239     
     
    227249     * fullPath =  return location for a string containing the full path 
    228250     *  of the file, or NULL 
    229      * error =  return location for a GError, or NULL 
    230251     * Returns: TRUE if a key file could be loaded, FALSE othewise 
    231      */ 
    232     public int loadFromDataDirs(string file, char** fullPath, GError** error) 
     252     * Throws: GException on failure. 
     253     */ 
     254    public int loadFromDataDirs(string file, char** fullPath) 
    233255    { 
    234256        // gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark,  const gchar *file,  gchar **full_path,  GError **error); 
    235         return g_bookmark_file_load_from_data_dirs(gBookmarkFile, Str.toStringz(file), fullPath, error); 
     257        GError* err = null; 
     258         
     259        auto p = g_bookmark_file_load_from_data_dirs(gBookmarkFile, Str.toStringz(file), fullPath, &err); 
     260         
     261        if (err !is null) 
     262        { 
     263            throw new GException( new ErrorG(err) ); 
     264        } 
     265         
     266        return p; 
    236267    } 
    237268     
     
    241272     * Params: 
    242273     * length =  return location for the length of the returned string, or NULL 
    243      * error =  return location for a GError, or NULL 
    244274     * Returns: a newly allocated string holding the contents of the GBookmarkFile 
    245      */ 
    246     public string toData(uint* length, GError** error) 
     275     * Throws: GException on failure. 
     276     */ 
     277    public string toData(uint* length) 
    247278    { 
    248279        // gchar* g_bookmark_file_to_data (GBookmarkFile *bookmark,  gsize *length,  GError **error); 
    249         return Str.toString(g_bookmark_file_to_data(gBookmarkFile, length, error)); 
     280        GError* err = null; 
     281         
     282        auto p = Str.toString(g_bookmark_file_to_data(gBookmarkFile, length, &err)); 
     283         
     284        if (err !is null) 
     285        { 
     286            throw new GException( new ErrorG(err) ); 
     287        } 
     288         
     289        return p; 
    250290    } 
    251291     
     
    256296     * Params: 
    257297     * filename =  path of the output file 
    258      * error =  return location for a GError, or NULL 
    259298     * Returns: TRUE if the file was successfully written. 
    260      */ 
    261     public int toFile(string filename, GError** error) 
     299     * Throws: GException on failure. 
     300     */ 
     301    public int toFile(string filename) 
    262302    { 
    263303        // gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark,  const gchar *filename,  GError **error); 
    264         return g_bookmark_file_to_file(gBookmarkFile, Str.toStringz(filename), error); 
     304        GError* err = null; 
     305         
     306        auto p = g_bookmark_file_to_file(gBookmarkFile, Str.toStringz(filename), &err); 
     307         
     308        if (err !is null) 
     309        { 
     310            throw new GException( new ErrorG(err) ); 
     311        } 
     312         
     313        return p; 
    265314    } 
    266315     
     
    287336     * uri =  a valid URI 
    288337     * group =  the group name to be searched 
    289      * error =  return location for a GError, or NULL 
    290338     * Returns: TRUE if group was found. 
    291      */ 
    292     public int hasGroup(string uri, string group, GError** error) 
     339     * Throws: GException on failure. 
     340     */ 
     341    public int hasGroup(string uri, string group) 
    293342    { 
    294343        // gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark,  const gchar *uri,  const gchar *group,  GError **error); 
    295         return g_bookmark_file_has_group(gBookmarkFile, Str.toStringz(uri), Str.toStringz(group), error); 
     344        GError* err = null; 
     345         
     346        auto p = g_bookmark_file_has_group(gBookmarkFile, Str.toStringz(uri), Str.toStringz(group), &err); 
     347         
     348        if (err !is null) 
     349        { 
     350            throw new GException( new ErrorG(err) ); 
     351        } 
     352         
     353        return p; 
    296354    } 
    297355     
     
    305363     * uri =  a valid URI 
    306364     * name =  the name of the application 
    307      * error =  return location for a GError or NULL 
    308365     * Returns: TRUE if the application name was found 
    309      */ 
    310     public int hasApplication(string uri, string name, GError** error) 
     366     * Throws: GException on failure. 
     367     */ 
     368    public int hasApplication(string uri, string name) 
    311369    { 
    312370        // gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark,  const gchar *uri,  const gchar *name,  GError **error); 
    313         return g_bookmark_file_has_application(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), error); 
     371        GError* err = null; 
     372         
     373        auto p = g_bookmark_file_has_application(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), &err); 
     374         
     375        if (err !is null) 
     376        { 
     377            throw new GException( new ErrorG(err) ); 
     378        } 
     379         
     380        return p; 
    314381    } 
    315382     
     
    348415     * Params: 
    349416     * uri =  a valid URI or NULL 
    350      * error =  return location for a GError, or NULL 
    351417     * Returns: a newly allocated string or NULL if the specified URI cannot be found. 
    352      */ 
    353     public string getTitle(string uri, GError** error) 
     418     * Throws: GException on failure. 
     419     */ 
     420    public string getTitle(string uri) 
    354421    { 
    355422        // gchar* g_bookmark_file_get_title (GBookmarkFile *bookmark,  const gchar *uri,  GError **error); 
    356         return Str.toString(g_bookmark_file_get_title(gBookmarkFile, Str.toStringz(uri), error)); 
     423        GError* err = null; 
     424         
     425        auto p = Str.toString(g_bookmark_file_get_title(gBookmarkFile, Str.toStringz(uri), &err)); 
     426         
     427        if (err !is null) 
     428        { 
     429            throw new GException( new ErrorG(err) ); 
     430        } 
     431         
     432        return p; 
    357433    } 
    358434     
     
    364440     * Params: 
    365441     * uri =  a valid URI 
    366      * error =  return location for a GError, or NULL 
    367442     * Returns: a newly allocated string or NULL if the specified URI cannot be found. 
    368      */ 
    369     public string getDescription(string uri, GError** error) 
     443     * Throws: GException on failure. 
     444     */ 
     445    public string getDescription(string uri) 
    370446    { 
    371447        // gchar* g_bookmark_file_get_description (GBookmarkFile *bookmark,  const gchar *uri,  GError **error); 
    372         return Str.toString(g_bookmark_file_get_description(gBookmarkFile, Str.toStringz(uri), error)); 
     448        GError* err = null; 
     449         
     450        auto p = Str.toString(g_bookmark_file_get_description(gBookmarkFile, Str.toStringz(uri), &err)); 
     451         
     452        if (err !is null) 
     453        { 
     454            throw new GException( new ErrorG(err) ); 
     455        } 
     456         
     457        return p; 
    373458    } 
    374459     
     
    382467     * Params: 
    383468     * uri =  a valid URI 
    384      * error =  return location for a GError, or NULL 
    385469     * Returns: a newly allocated string or NULL if the specified URI cannot be found. 
    386      */ 
    387     public string getMimeType(string uri, GError** error) 
     470     * Throws: GException on failure. 
     471     */ 
     472    public string getMimeType(string uri) 
    388473    { 
    389474        // gchar* g_bookmark_file_get_mime_type (GBookmarkFile *bookmark,  const gchar *uri,  GError **error); 
    390         return Str.toString(g_bookmark_file_get_mime_type(gBookmarkFile, Str.toStringz(uri), error)); 
     475        GError* err = null; 
     476         
     477        auto p = Str.toString(g_bookmark_file_get_mime_type(gBookmarkFile, Str.toStringz(uri), &err)); 
     478         
     479        if (err !is null) 
     480        { 
     481            throw new GException( new ErrorG(err) ); 
     482        } 
     483         
     484        return p; 
    391485    } 
    392486     
     
    400494     * Params: 
    401495     * uri =  a valid URI 
    402      * error =  return location f