Display *display = (Display*)wxdisplay;
wxEventLoop evtLoop;
- XSync (display, FALSE);
+ XSync (display, False);
while (evtLoop.Pending())
{
return dest;
}
-static char *GetResourcePath(char *buf, const char *name, bool create = FALSE)
+static char *GetResourcePath(char *buf, const char *name, bool create = false)
{
if (create && wxFileExists (name) ) {
strcpy(buf, name);
{
const char *file = node->GetKeyString();
// If file doesn't exist, create it first.
- (void)GetResourcePath(nameBuffer, file, TRUE);
+ (void)GetResourcePath(nameBuffer, file, true);
XrmDatabase database = (XrmDatabase) node->Data ();
XrmPutFileDatabase (database, nameBuffer);
strcat (resName, entry.c_str());
XrmPutStringResource (&database, resName, value);
- return TRUE;
+ return true;
}
bool wxWriteResource(const wxString& section, const wxString& entry, float value, const wxString& file)
*value = new char[xvalue.size + 1];
strncpy (*value, xvalue.addr, (int) xvalue.size);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
{
*value = (float)strtod(s, NULL);
delete[] s;
- return TRUE;
+ return true;
}
- else return FALSE;
+ else return false;
}
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
{
*value = strtol(s, NULL, 10);
delete[] s;
- return TRUE;
+ return true;
}
- else return FALSE;
+ else return false;
}
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
// Handle True, False here
// True, Yes, Enables, Set or Activated
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
- *value = TRUE;
+ *value = true;
// False, No, Disabled, Reset, Cleared, Deactivated
else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C')
- *value = FALSE;
+ *value = false;
// Handle as Integer
else
*value = (int) strtol (s, NULL, 10);
delete[] s;
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
void wxXMergeDatabases (wxApp * theApp, Display * display)
{
#if (XlibSpecificationRelease>=5)
XrmDatabase db = XtDatabase (dpy);
- XrmCombineDatabase (rdb, &db, FALSE);
+ XrmCombineDatabase (rdb, &db, False);
#else
XrmMergeDatabases (dpy->db, &rdb);
dpy->db = rdb;
#endif
};
-// Return TRUE if we have a colour display
+// Return true if we have a colour display
bool wxColourDisplay()
{
return wxDisplayDepth() > 1;
{
gs_displayName = display_name;
- if ( display_name.IsEmpty() )
+ if ( display_name.empty() )
{
gs_currentDisplay = NULL;
- return TRUE;
+ return true;
}
else
{
if (display)
{
gs_currentDisplay = (WXDisplay*) display;
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
}
return str;
#else
int type = event.xany.type;
- static char* event_name[] = {
- "", "unknown(-)", // 0-1
- "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
- "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", // 6-9
- "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", // 10-13
- "NoExpose", "VisibilityNotify", "CreateNotify", // 14-16
- "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
- "ReparentNotify", "ConfigureNotify", "ConfigureRequest", // 21-23
- "GravityNotify", "ResizeRequest", "CirculateNotify", // 24-26
- "CirculateRequest", "PropertyNotify", "SelectionClear", // 27-29
- "SelectionRequest", "SelectionNotify", "ColormapNotify", // 30-32
- "ClientMessage", "MappingNotify", // 33-34
- "unknown(+)"}; // 35
- type = wxMin(35, type); type = wxMax(1, type);
- wxString str(event_name[type]);
- return str;
+ static char* event_name[] = {
+ "", "unknown(-)", // 0-1
+ "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
+ "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", // 6-9
+ "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", // 10-13
+ "NoExpose", "VisibilityNotify", "CreateNotify", // 14-16
+ "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
+ "ReparentNotify", "ConfigureNotify", "ConfigureRequest", // 21-23
+ "GravityNotify", "ResizeRequest", "CirculateNotify", // 24-26
+ "CirculateRequest", "PropertyNotify", "SelectionClear", // 27-29
+ "SelectionRequest", "SelectionNotify", "ColormapNotify", // 30-32
+ "ClientMessage", "MappingNotify", // 33-34
+ "unknown(+)"}; // 35
+ type = wxMin(35, type); type = wxMax(1, type);
+ wxString str(event_name[type]);
+ return str;
#endif
}
#endif
destDC.SelectObject(newBitmap);
wxBrush brush(colour, wxSOLID);
- // destDC.SetOptimization(FALSE);
destDC.SetBackground(brush);
destDC.Clear();
destDC.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(),
- &srcDC, 0, 0, wxCOPY, TRUE);
+ &srcDC, 0, 0, wxCOPY, true);
return newBitmap;
}