2015-04-06 11:20:51 -05:00
|
|
|
// 6 april 2015
|
2015-04-06 23:26:27 -05:00
|
|
|
#include "uipriv_unix.h"
|
2015-04-06 11:20:51 -05:00
|
|
|
|
|
|
|
struct uiInitError {
|
|
|
|
GError *err;
|
|
|
|
};
|
|
|
|
|
|
|
|
uiInitError *uiInit(uiInitOptions *o)
|
|
|
|
{
|
2015-04-06 16:41:33 -05:00
|
|
|
uiInitError *err;
|
2015-04-06 11:20:51 -05:00
|
|
|
|
2015-04-07 18:04:09 -05:00
|
|
|
err = uiNew(uiInitError);
|
2015-04-06 16:41:33 -05:00
|
|
|
if (gtk_init_with_args(NULL, NULL, NULL, NULL, NULL, &(err->err)) == FALSE)
|
|
|
|
return err;
|
2015-04-07 18:04:09 -05:00
|
|
|
uiFree(err);
|
2015-04-06 11:20:51 -05:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-04-06 16:41:33 -05:00
|
|
|
const char *uiInitErrorMessage(uiInitError *err)
|
2015-04-06 11:20:51 -05:00
|
|
|
{
|
2015-04-06 16:41:33 -05:00
|
|
|
return err->err->message;
|
2015-04-06 11:20:51 -05:00
|
|
|
}
|
|
|
|
|
2015-04-06 16:41:33 -05:00
|
|
|
void uiInitErrorFree(uiInitError *err)
|
2015-04-06 11:20:51 -05:00
|
|
|
{
|
2015-04-06 16:41:33 -05:00
|
|
|
g_error_free(err->err);
|
2015-04-07 18:04:09 -05:00
|
|
|
uiFree(err);
|
2015-04-06 11:20:51 -05:00
|
|
|
}
|