aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/gwin_widget.c')
-rw-r--r--src/gwin/gwin_widget.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/gwin/gwin_widget.c b/src/gwin/gwin_widget.c
index 38b4e236..d4865935 100644
--- a/src/gwin/gwin_widget.c
+++ b/src/gwin/gwin_widget.c
@@ -238,12 +238,12 @@ static void gwidgetEvent(void *param, GEvent *pe) {
return _widgetInFocus;
}
- bool_t gwinSetFocus(GHandle gh) {
+ gBool gwinSetFocus(GHandle gh) {
GHandle oldFocus;
// Do we already have the focus?
if (gh == _widgetInFocus)
- return TRUE;
+ return gTrue;
// The new window must be NULLL or a visible enabled widget with a keyboard handler
if (!gh || ((gh->flags & (GWIN_FLG_WIDGET|GWIN_FLG_ENABLED|GWIN_FLG_SYSENABLED|GWIN_FLG_VISIBLE|GWIN_FLG_SYSVISIBLE)) == (GWIN_FLG_WIDGET|GWIN_FLG_ENABLED|GWIN_FLG_SYSENABLED|GWIN_FLG_VISIBLE|GWIN_FLG_SYSVISIBLE)
@@ -253,20 +253,20 @@ static void gwidgetEvent(void *param, GEvent *pe) {
_widgetInFocus = gh;
if (oldFocus) _gwinUpdate(oldFocus);
if (gh) _gwinUpdate(gh);
- return TRUE;
+ return gTrue;
}
- return FALSE;
+ return gFalse;
}
void _gwinMoveFocus(void) {
GHandle gh;
- bool_t looponce;
+ gBool looponce;
// Find a new focus window (one may or may not exist).
- looponce = FALSE;
+ looponce = gFalse;
for(gh = gwinGetNextWindow(_widgetInFocus); ; gh = gwinGetNextWindow(gh)) {
if (!gh && !looponce) {
- looponce = TRUE;
+ looponce = gTrue;
gh = gwinGetNextWindow(0);
}
if (gwinSetFocus(gh))
@@ -494,7 +494,7 @@ void gwinWidgetClearInit(GWidgetInit *pwi) {
*p++ = 0;
}
-void gwinSetDefaultStyle(const GWidgetStyle *pstyle, bool_t updateAll) {
+void gwinSetDefaultStyle(const GWidgetStyle *pstyle, gBool updateAll) {
if (!pstyle)
pstyle = &BlackWidgetStyle;
@@ -521,7 +521,7 @@ const GWidgetStyle *gwinGetDefaultStyle(void) {
return defaultStyle;
}
-void gwinSetText(GHandle gh, const char *text, bool_t useAlloc) {
+void gwinSetText(GHandle gh, const char *text, gBool useAlloc) {
if (!(gh->flags & GWIN_FLG_WIDGET))
return;
@@ -595,12 +595,12 @@ const char *gwinGetText(GHandle gh) {
return gw->text;
}
-bool_t gwinIsWidget(GHandle gh) {
+gBool gwinIsWidget(GHandle gh) {
if (gh->flags & GWIN_FLG_WIDGET) {
- return TRUE;
+ return gTrue;
}
- return FALSE;
+ return gFalse;
}
void gwinSetStyle(GHandle gh, const GWidgetStyle *pstyle) {
@@ -630,39 +630,39 @@ void gwinSetCustomDraw(GHandle gh, CustomWidgetDrawFunction fn, void *param) {
_gwinUpdate(gh);
}
-bool_t gwinAttachListener(GListener *pl) {
+gBool gwinAttachListener(GListener *pl) {
return geventAttachSource(pl, GWIDGET_SOURCE, 0);
}
#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
- bool_t DEPRECATED("This call can now be removed. Attaching the mouse to GWIN is now automatic.") gwinAttachMouse(uint16_t instance) {
+ gBool DEPRECATED("This call can now be removed. Attaching the mouse to GWIN is now automatic.") gwinAttachMouse(uint16_t instance) {
// This is now a NULL event because we automatically attach to all mice in the system.
(void) instance;
- return TRUE;
+ return gTrue;
}
#endif
#if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE
- bool_t gwinAttachToggle(GHandle gh, uint16_t role, uint16_t instance) {
+ gBool gwinAttachToggle(GHandle gh, uint16_t role, uint16_t instance) {
GSourceHandle gsh;
uint16_t oi;
// Is this a widget
if (!(gh->flags & GWIN_FLG_WIDGET))
- return FALSE;
+ return gFalse;
// Is the role valid
if (role >= wvmt->toggleroles)
- return FALSE;
+ return gFalse;
// Is this a valid device
if (!(gsh = ginputGetToggle(instance)))
- return FALSE;
+ return gFalse;
// Is this already done?
oi = wvmt->ToggleGet(gw, role);
if (instance == oi)
- return TRUE;
+ return gTrue;
// Remove the old instance
if (oi != GWIDGET_NO_INSTANCE) {
@@ -676,16 +676,16 @@ bool_t gwinAttachListener(GListener *pl) {
return geventAttachSource(&gl, gsh, GLISTEN_TOGGLE_ON|GLISTEN_TOGGLE_OFF);
}
- bool_t gwinDetachToggle(GHandle gh, uint16_t role) {
+ gBool gwinDetachToggle(GHandle gh, uint16_t role) {
uint16_t oi;
// Is this a widget
if (!(gh->flags & GWIN_FLG_WIDGET))
- return FALSE;
+ return gFalse;
// Is the role valid
if (role >= ((gwidgetVMT *)gh->vmt)->toggleroles)
- return FALSE;
+ return gFalse;
oi = ((gwidgetVMT *)gh->vmt)->ToggleGet(gw, role);
@@ -695,31 +695,31 @@ bool_t gwinAttachListener(GListener *pl) {
if (!FindToggleUser(oi))
geventDetachSource(&gl, ginputGetToggle(oi));
}
- return TRUE;
+ return gTrue;
}
#endif
#if GFX_USE_GINPUT && GINPUT_NEED_DIAL
- bool_t gwinAttachDial(GHandle gh, uint16_t role, uint16_t instance) {
+ gBool gwinAttachDial(GHandle gh, uint16_t role, uint16_t instance) {
GSourceHandle gsh;
uint16_t oi;
if (!(gh->flags & GWIN_FLG_WIDGET))
- return FALSE;
+ return gFalse;
// Is the role valid
if (role >= wvmt->dialroles)
- return FALSE;
+ return gFalse;
// Is this a valid device
if (!(gsh = ginputGetDial(instance)))
- return FALSE;
+ return gFalse;
// Is this already done?
oi = wvmt->DialGet(gw, role);
if (instance == oi)
- return TRUE;
+ return gTrue;
// Remove the old instance
if (oi != GWIDGET_NO_INSTANCE) {