Changeset 24 for trunk/gtk/util.h


Ignore:
Timestamp:
Jan 12, 2006, 7:04:05 PM (16 years ago)
Author:
root
Message:

Update 2006-01-03

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/util.h

    r11 r24  
    4141#define ALEN(a)                 (sizeof(a) / sizeof((a)[0]))
    4242
     43/* used for a callback function with a data parameter */
     44typedef void (*callbackfunc_t)(void*);
     45
     46/* try to interpret a string as a textual representation of a boolean */
    4347gboolean
    4448strbool(const char *str);
    4549
     50/* return a human-readable string for the size given in bytes with the
     51   requested number of decimal places.  the string must be g_free()d */
    4652char *
    4753readablesize(guint64 size, int decimals);
    4854
     55/* create a directory and any missing parent directories */
    4956gboolean
    5057mkdir_p(const char *name, mode_t mode);
    5158
    52 typedef void (*errfunc_t)(void*);
     59/* set up a handler for various fatal signals */
     60void
     61setuphandlers(callbackfunc_t func, void *data);
     62
     63/* clear the handlers for fatal signals */
     64void
     65clearhandlers(void);
     66
     67/* blocks and unblocks delivery of fatal signals. calls to these
     68   functions can be nested as long as unblocksigs() is called exactly
     69   as many times as blocksigs().  only the first blocksigs() will
     70   block signals and only the last unblocksigs() will unblock them. */
     71void
     72blocksigs(void);
     73void
     74unblocksigs(void);
    5375
    5476/* if wind is NULL then you must call gtk_widget_show on the returned widget */
     
    6284
    6385GtkWidget *
    64 errmsg_full(GtkWindow *wind, errfunc_t func, void *data,
     86errmsg_full(GtkWindow *wind, callbackfunc_t func, void *data,
    6587            const char *format, ...)
    6688#ifdef __GNUC__
     
    7092
    7193GtkWidget *
    72 verrmsg(GtkWindow *wind, errfunc_t func, void *data,
     94verrmsg(GtkWindow *wind, callbackfunc_t func, void *data,
    7395        const char *format, va_list ap);
    7496
Note: See TracChangeset for help on using the changeset viewer.