No more inline code included in apps. This removes the need to recompile apps when DVX changes.
This commit is contained in:
parent
8d815e8e82
commit
bcd0b863fb
3 changed files with 16 additions and 12 deletions
|
|
@ -59,17 +59,9 @@ struct WidgetClassT;
|
||||||
#define WGT_SIZE_CHARS 0x40000000
|
#define WGT_SIZE_CHARS 0x40000000
|
||||||
#define WGT_SIZE_PERCENT 0x80000000
|
#define WGT_SIZE_PERCENT 0x80000000
|
||||||
|
|
||||||
static inline int32_t wgtPixels(int32_t v) {
|
#define wgtPixels(v) ((int32_t)(WGT_SIZE_PIXELS | ((uint32_t)(v) & WGT_SIZE_VAL_MASK)))
|
||||||
return (int32_t)(WGT_SIZE_PIXELS | ((uint32_t)v & WGT_SIZE_VAL_MASK));
|
#define wgtChars(v) ((int32_t)(WGT_SIZE_CHARS | ((uint32_t)(v) & WGT_SIZE_VAL_MASK)))
|
||||||
}
|
#define wgtPercent(v) ((int32_t)(WGT_SIZE_PERCENT | ((uint32_t)(v) & WGT_SIZE_VAL_MASK)))
|
||||||
|
|
||||||
static inline int32_t wgtChars(int32_t v) {
|
|
||||||
return (int32_t)(WGT_SIZE_CHARS | ((uint32_t)v & WGT_SIZE_VAL_MASK));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int32_t wgtPercent(int32_t v) {
|
|
||||||
return (int32_t)(WGT_SIZE_PERCENT | ((uint32_t)v & WGT_SIZE_VAL_MASK));
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Widget type enum
|
// Widget type enum
|
||||||
|
|
@ -935,7 +927,7 @@ void wgtListBoxSetReorderable(WidgetT *w, bool reorderable);
|
||||||
|
|
||||||
// Set tooltip text for a widget (NULL to remove).
|
// Set tooltip text for a widget (NULL to remove).
|
||||||
// Caller owns the string — it must outlive the widget.
|
// Caller owns the string — it must outlive the widget.
|
||||||
static inline void wgtSetTooltip(WidgetT *w, const char *text) { w->tooltip = text; }
|
void wgtSetTooltip(WidgetT *w, const char *text);
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// Debug
|
// Debug
|
||||||
|
|
|
||||||
|
|
@ -487,6 +487,17 @@ void wgtSetText(WidgetT *w, const char *text) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ============================================================
|
||||||
|
// wgtSetTooltip
|
||||||
|
// ============================================================
|
||||||
|
|
||||||
|
void wgtSetTooltip(WidgetT *w, const char *text) {
|
||||||
|
if (w) {
|
||||||
|
w->tooltip = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// wgtSetVisible
|
// wgtSetVisible
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,7 @@ DXE_EXPORT_TABLE(shellExportTable)
|
||||||
DXE_EXPORT(wgtInvalidatePaint)
|
DXE_EXPORT(wgtInvalidatePaint)
|
||||||
DXE_EXPORT(wgtSetDebugLayout)
|
DXE_EXPORT(wgtSetDebugLayout)
|
||||||
DXE_EXPORT(wgtSetText)
|
DXE_EXPORT(wgtSetText)
|
||||||
|
DXE_EXPORT(wgtSetTooltip)
|
||||||
DXE_EXPORT(wgtGetText)
|
DXE_EXPORT(wgtGetText)
|
||||||
DXE_EXPORT(wgtSetEnabled)
|
DXE_EXPORT(wgtSetEnabled)
|
||||||
DXE_EXPORT(wgtSetVisible)
|
DXE_EXPORT(wgtSetVisible)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue