libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#define IPATCH_ERROR enum IpatchError; #define ipatch_code_error (...) extern char *ipatch_application_name; void ipatch_init (void
); void ipatch_set_application_name (const char *name
); GQuark ipatch_error_quark (void
); const char * ipatch_gerror_message (GError *err
); void ipatch_strconcat_num (const char *src
,int num
,char *dest
,int size
); void ipatch_dump_object (GObject *object
,gboolean recursive
,FILE *file
);
typedef enum { IPATCH_ERROR_FAIL, /* a general failure */ IPATCH_ERROR_IO, /* I/O error (file operations, etc) */ IPATCH_ERROR_PROGRAM, /* a programming error */ IPATCH_ERROR_INVALID, /* invalid parameter or data */ IPATCH_ERROR_CORRUPT, /* corrupted data */ IPATCH_ERROR_NOMEM, /* out of memory error */ IPATCH_ERROR_UNSUPPORTED, /* unsupported feature */ IPATCH_ERROR_UNEXPECTED_EOF, /* unexpected end of file */ IPATCH_ERROR_UNHANDLED_CONVERSION /* unhandled object conversion */ } IpatchError;
void ipatch_init (void
);
Initialize libInstPatch library. Should be called before any other libInstPatch related functions.
void ipatch_set_application_name (const char *name
);
Set the global application name string which is used as the software string written to patch files. This string should contain the name of the application, and its version, that is using libInstPatch. The libInstPatch version will also be output where appropriate, so the software string written to a SoundFont for example would look something like "swami 1.0 (libInstPatch 1.0)".
|
Application name and version (example: "swami 1.0") or NULL to
unset application name
|
const char * ipatch_gerror_message (GError *err
);
A utility function to check if a GError is set and return the
GError's message field if it is, or a string explaining that there
isn't any error info if err
is NULL
.
|
A GError object or NULL
|
Returns : |
The GError's message or a "<No detailed error information>" string. |
void ipatch_strconcat_num (const char *src
,int num
,char *dest
,int size
);
Creates a string with a number appended to it but ensures that it is
of the specified size
(including NULL termination). Characters in the
middle of the string are removed and a ".." is inserted, if necessary.
|
Source string |
|
Number to concatenate |
|
Destination buffer |
|
Size of destination buffer |
void ipatch_dump_object (GObject *object
,gboolean recursive
,FILE *file
);
Dumps object info to a file for debugging purposes.
|
Object to dump |
|
Set to TRUE to recurse the object children (if its a
IpatchContainer derived object).
|
|
File to dump to or NULL for stdout
|