Renamed the common options variable to uiprivOptions.
This commit is contained in:
parent
e0f800d5eb
commit
4a57b15d09
|
@ -1,17 +1,3 @@
|
||||||
// 6 april 2015
|
|
||||||
|
|
||||||
// this must go outside other extern "C" blocks, otherwise we'll get double-declaration errors
|
|
||||||
#include "utf.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "controlsigs.h"
|
|
||||||
|
|
||||||
extern uiInitOptions options;
|
|
||||||
|
|
||||||
extern void *uiAlloc(size_t, const char *);
|
extern void *uiAlloc(size_t, const char *);
|
||||||
#define uiNew(T) ((T *) uiAlloc(sizeof (T), #T))
|
#define uiNew(T) ((T *) uiAlloc(sizeof (T), #T))
|
||||||
|
@ -60,7 +46,3 @@ extern void fallbackTransformSize(uiDrawMatrix *, double *, double *);
|
||||||
|
|
||||||
// OS-specific text.* files
|
// OS-specific text.* files
|
||||||
extern int uiprivStricmp(const char *a, const char *b);
|
extern int uiprivStricmp(const char *a, const char *b);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
// 6 april 2015
|
// 6 april 2015
|
||||||
|
#include <stdarg.h>
|
||||||
// this must go outside other extern "C" blocks, otherwise we'll get double-declaration errors
|
#include <string.h>
|
||||||
|
#include "controlsigs.h"
|
||||||
#include "utf.h"
|
#include "utf.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
extern uiInitOptions uiprivOptions;
|
||||||
#include <string.h>
|
|
||||||
#include "controlsigs.h"
|
|
||||||
|
|
||||||
extern uiInitOptions options;
|
|
||||||
|
|
||||||
extern void *uiAlloc(size_t, const char *);
|
extern void *uiAlloc(size_t, const char *);
|
||||||
#define uiNew(T) ((T *) uiAlloc(sizeof (T), #T))
|
#define uiNew(T) ((T *) uiAlloc(sizeof (T), #T))
|
||||||
|
|
|
@ -106,12 +106,12 @@ static BOOL stepsIsRunning;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
uiInitOptions options;
|
uiInitOptions uiprivOptions;
|
||||||
|
|
||||||
const char *uiInit(uiInitOptions *o)
|
const char *uiInit(uiInitOptions *o)
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
options = *o;
|
uiprivOptions = *o;
|
||||||
app = [[applicationClass sharedApplication] retain];
|
app = [[applicationClass sharedApplication] retain];
|
||||||
// don't check for a NO return; something (launch services?) causes running from application bundles to always return NO when asking to change activation policy, even if the change is to the same activation policy!
|
// don't check for a NO return; something (launch services?) causes running from application bundles to always return NO when asking to change activation policy, even if the change is to the same activation policy!
|
||||||
// see https://github.com/andlabs/ui/issues/6
|
// see https://github.com/andlabs/ui/issues/6
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
// 6 april 2015
|
// 6 april 2015
|
||||||
#include "uipriv_unix.h"
|
#include "uipriv_unix.h"
|
||||||
|
|
||||||
uiInitOptions options;
|
uiInitOptions uiprivOptions;
|
||||||
|
|
||||||
const char *uiInit(uiInitOptions *o)
|
const char *uiInit(uiInitOptions *o)
|
||||||
{
|
{
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
const char *msg;
|
const char *msg;
|
||||||
|
|
||||||
options = *o;
|
uiprivOptions = *o;
|
||||||
if (gtk_init_with_args(NULL, NULL, NULL, NULL, NULL, &err) == FALSE) {
|
if (gtk_init_with_args(NULL, NULL, NULL, NULL, NULL, &err) == FALSE) {
|
||||||
msg = g_strdup(err->message);
|
msg = g_strdup(err->message);
|
||||||
g_error_free(err);
|
g_error_free(err);
|
||||||
|
|
|
@ -39,8 +39,8 @@ static const char *initerr(const char *message, const WCHAR *label, DWORD value)
|
||||||
#define ieLastErr(msg) initerr("=" msg, L"GetLastError() ==", GetLastError())
|
#define ieLastErr(msg) initerr("=" msg, L"GetLastError() ==", GetLastError())
|
||||||
#define ieHRESULT(msg, hr) initerr("=" msg, L"HRESULT", (DWORD) hr)
|
#define ieHRESULT(msg, hr) initerr("=" msg, L"HRESULT", (DWORD) hr)
|
||||||
|
|
||||||
// LONGTERM make common
|
// LONGTERM put this declaration in a common file
|
||||||
uiInitOptions options;
|
uiInitOptions uiprivOptions;
|
||||||
|
|
||||||
#define wantedICCClasses ( \
|
#define wantedICCClasses ( \
|
||||||
ICC_STANDARD_CLASSES | /* user32.dll controls */ \
|
ICC_STANDARD_CLASSES | /* user32.dll controls */ \
|
||||||
|
@ -62,7 +62,7 @@ const char *uiInit(uiInitOptions *o)
|
||||||
INITCOMMONCONTROLSEX icc;
|
INITCOMMONCONTROLSEX icc;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
options = *o;
|
uiprivOptions = *o;
|
||||||
|
|
||||||
initAlloc();
|
initAlloc();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue