misc

misc — Miscellaneous stuff

Stability Level

Stable, unless otherwise indicated

Functions

Types and Values

#define IPATCH_ERROR
enum IpatchError
extern char * ipatch_application_name

Description

Functions

ipatch_code_error()

#define             ipatch_code_error(...)

ipatch_init ()

void
ipatch_init (void);

Initialize libInstPatch library. Should be called before any other libInstPatch related functions.


ipatch_close ()

void
ipatch_close (void);

This should be called prior to application close.

Decrement the reference counter and if it reaches 0 performs cleanup of libInstPatch, such as deleting temporary files and internal caches. If the counter is still > 0, the function return without doing cleanup (the library is still owned).

Does nothing if the library is already deinitialized (or was not initialized).

Since: 1.1.0


ipatch_set_application_name ()

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)".

Parameters

name

Application name and version (example: "swami 1.0") or NULL to unset application name

 

ipatch_error_quark ()

GQuark
ipatch_error_quark (void);

ipatch_gerror_message ()

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.

[skip]

Parameters

err

A GError object or NULL

 

Returns

The GError's message or a "<No detailed error information>" string.


ipatch_strconcat_num ()

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.

[skip]

Parameters

src

Source string

 

num

Number to concatenate

 

dest

Destination buffer

 

size

Size of destination buffer

 

ipatch_dump_object ()

void
ipatch_dump_object (GObject *object,
                    gboolean recursive,
                    FILE *file);

Dumps object info to a file for debugging purposes.

[skip]

Parameters

object

Object to dump

 

recursive

Set to TRUE to recurse the object children (if its a IpatchContainer derived object).

 

file

File to dump to or NULL for stdout

 

ipatch_glist_unref_free ()

void
ipatch_glist_unref_free (GList *objlist);

Unreference each GObject in a GList and free the list.

[skip]

Parameters

objlist

List of GObjects

 

Since: 1.1.0

Types and Values

IPATCH_ERROR

#define IPATCH_ERROR  ipatch_error_quark()

libInstPatch domain for g_set_error


enum IpatchError

Members

IPATCH_ERROR_FAIL

   

IPATCH_ERROR_IO

   

IPATCH_ERROR_PROGRAM

   

IPATCH_ERROR_INVALID

   

IPATCH_ERROR_CORRUPT

   

IPATCH_ERROR_NOMEM

   

IPATCH_ERROR_UNSUPPORTED

   

IPATCH_ERROR_UNEXPECTED_EOF

   

IPATCH_ERROR_UNHANDLED_CONVERSION

   

IPATCH_ERROR_BUSY

   

ipatch_application_name

extern char *ipatch_application_name;