diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-09 15:25:18 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-09 15:25:18 -0400 |
| commit | 8e0cd27605149f16141470ad49dd71e26598223e (patch) | |
| tree | 3ebf0276eeebace85b09eec81082dfe20398c912 | |
| parent | d1461673210f8616bba6fe3a586148aa44696edd (diff) | |
Laid the foundation for padding.
| -rw-r--r-- | new/uipriv.h | 4 | ||||
| -rw-r--r-- | new/uipriv_darwin.h | 7 | ||||
| -rw-r--r-- | new/uipriv_unix.h | 5 | ||||
| -rw-r--r-- | new/uipriv_windows.h | 1 |
4 files changed, 10 insertions, 7 deletions
diff --git a/new/uipriv.h b/new/uipriv.h index 0521bf6..ebb1be4 100644 --- a/new/uipriv.h +++ b/new/uipriv.h @@ -10,6 +10,10 @@ struct uiSize { intmax_t height; }; +#define uiSizingCommon \ + intmax_t xPadding; \ + intmax_t yPadding; + struct uiControl { void (*destroy)(uiControl *); uintptr_t (*handle)(uiControl *); diff --git a/new/uipriv_darwin.h b/new/uipriv_darwin.h index 5ec8b4c..52d5b38 100644 --- a/new/uipriv_darwin.h +++ b/new/uipriv_darwin.h @@ -8,10 +8,6 @@ #define toNSString(str) [NSString stringWithUTF8String:(str)] #define fromNSString(str) [(str) UTF8String] -// TODO move this to the right place -struct uiSizing { -}; - // TODO see if we can override alloc instead #ifdef uiLogAllocations #import <stdio.h> @@ -36,6 +32,9 @@ struct uiSizing { extern void setStandardControlFont(NSControl *); // container_darwin.m +struct uiSizing { + uiSizingCommon +}; @interface uiContainer : NSView // TODO rename to uiChild @property uiControl *child; diff --git a/new/uipriv_unix.h b/new/uipriv_unix.h index 3187c45..b51bda5 100644 --- a/new/uipriv_unix.h +++ b/new/uipriv_unix.h @@ -7,11 +7,10 @@ #include "uipriv.h" #include "ui_unix.h" -// TODO move this to the right place +// container_unix.c struct uiSizing { + uiSizingCommon }; - -// container_unix.c #define uiContainerType (uiContainer_get_type()) #define uiContainer(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), uiContainerType, uiContainer)) #define uiIsContainer(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), uiContainerType)) diff --git a/new/uipriv_windows.h b/new/uipriv_windows.h index 180937e..2c545ee 100644 --- a/new/uipriv_windows.h +++ b/new/uipriv_windows.h @@ -55,6 +55,7 @@ extern WCHAR *windowText(HWND); // container_windows.c extern BOOL sharedWndProc(HWND, UINT, WPARAM, LPARAM, LRESULT *); struct uiSizing { + uiSizingCommon int baseX; int baseY; LONG internalLeading; |
