Decided to remove the logging for now. Will inject it right into the allocation system later.
This commit is contained in:
parent
3fc36ec582
commit
49ee58ca36
|
@ -2,10 +2,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#define LOGALLOC(p, ty) fprintf(stderr, "%p %s ALLOC\n", p, #ty );
|
|
||||||
#define LOGFREE(p, ty) fprintf(stderr, "%p %s FREE\n", p, #ty );
|
|
||||||
|
|
||||||
typedef struct uiSize uiSize;
|
typedef struct uiSize uiSize;
|
||||||
typedef struct uiSizing uiSizing;
|
typedef struct uiSizing uiSizing;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@ uiWindow *uiNewWindow(char *title, int width, int height)
|
||||||
uiWindow *w;
|
uiWindow *w;
|
||||||
|
|
||||||
w = (uiWindow *) uiAlloc(sizeof (uiWindow));
|
w = (uiWindow *) uiAlloc(sizeof (uiWindow));
|
||||||
LOGALLOC(w, uiWindow)
|
|
||||||
|
|
||||||
w->w = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, (CGFloat) width, (CGFloat) height)
|
w->w = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, (CGFloat) width, (CGFloat) height)
|
||||||
styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)
|
styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)
|
||||||
|
|
|
@ -12,7 +12,6 @@ static void onDestroy(GtkWindow *window, gpointer data)
|
||||||
{
|
{
|
||||||
uiWindow *w = (uiWindow *) data;
|
uiWindow *w = (uiWindow *) data;
|
||||||
|
|
||||||
LOGFREE(w, uiWindow)
|
|
||||||
uiFree(w);
|
uiFree(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +20,6 @@ uiWindow *uiNewWindow(char *title, int width, int height)
|
||||||
uiWindow *w;
|
uiWindow *w;
|
||||||
|
|
||||||
w = uiNew(uiWindow);
|
w = uiNew(uiWindow);
|
||||||
LOGALLOC(w, uiWindow)
|
|
||||||
w->widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
w->widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_window_set_title(GTK_WINDOW(w->widget), title);
|
gtk_window_set_title(GTK_WINDOW(w->widget), title);
|
||||||
gtk_window_resize(GTK_WINDOW(w->widget), width, height);
|
gtk_window_resize(GTK_WINDOW(w->widget), width, height);
|
||||||
|
|
|
@ -46,7 +46,6 @@ static LRESULT CALLBACK uiWindowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPA
|
||||||
return 0;
|
return 0;
|
||||||
break; // fall through to DefWindowProcW()
|
break; // fall through to DefWindowProcW()
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
LOGFREE(w, uiWindow)
|
|
||||||
uiFree(w);
|
uiFree(w);
|
||||||
break; // fall through to DefWindowProcW()
|
break; // fall through to DefWindowProcW()
|
||||||
}
|
}
|
||||||
|
@ -82,7 +81,7 @@ uiWindow *uiNewWindow(char *title, int width, int height)
|
||||||
WCHAR *wtitle;
|
WCHAR *wtitle;
|
||||||
|
|
||||||
w = uiNew(uiWindow);
|
w = uiNew(uiWindow);
|
||||||
LOGALLOC(w, uiWindow)
|
// TODO move other cases of default events here relative
|
||||||
w->onClosing = defaultOnClosing;
|
w->onClosing = defaultOnClosing;
|
||||||
|
|
||||||
adjust.left = 0;
|
adjust.left = 0;
|
||||||
|
|
Loading…
Reference in New Issue