diff --git a/uppsrc/Core/config.h b/uppsrc/Core/config.h index 0b5b669..9fdb62a 100644 Index: uppsrc/Core/config.h =================================================================== --- uppsrc/Core/config.h +++ uppsrc/Core/config.h @@ -14,10 +14,6 @@ #if __unix || __unix__ || __APPLE__ #define PLATFORM_POSIX 1 - #ifdef flagGUI - #define PLATFORM_X11 1 - #endif - #if __linux #define PLATFORM_LINUX 1 #else diff --git a/uppsrc/CtrlCore/CtrlCore.h b/uppsrc/CtrlCore/CtrlCore.h index 07d3c81..3265e2f 100644 Index: uppsrc/CtrlCore/CtrlCore.h =================================================================== --- uppsrc/CtrlCore/CtrlCore.h +++ uppsrc/CtrlCore/CtrlCore.h @@ -11,7 +11,7 @@ #define GUIPLATFORM_INCLUDE "Win32Gui.h" #endif -#ifdef PLATFORM_X11 +#ifdef PLATFORM_POSIX #define GUIPLATFORM_INCLUDE "X11Gui.h" #endif diff --git a/uppsrc/CtrlCore/X11DHCtrl.cpp b/uppsrc/CtrlCore/X11DHCtrl.cpp index 33d6d69..0562192 100644 Index: uppsrc/CtrlCore/X11DHCtrl.cpp =================================================================== --- uppsrc/CtrlCore/X11DHCtrl.cpp +++ uppsrc/CtrlCore/X11DHCtrl.cpp @@ -1,6 +1,6 @@ #include "CtrlCore.h" -#ifdef PLATFORM_X11 +#ifdef GUI_X11 NAMESPACE_UPP diff --git a/uppsrc/CtrlLib/FileSel.cpp b/uppsrc/CtrlLib/FileSel.cpp index 39a0d65..11dab86 100644 Index: uppsrc/CtrlLib/FileSel.cpp =================================================================== --- uppsrc/CtrlLib/FileSel.cpp +++ uppsrc/CtrlLib/FileSel.cpp @@ -76,7 +76,7 @@ Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick #endif -#if defined(PLATFORM_X11) && !defined(flagNOGTK) +#if defined(GUI_X11) && !defined(flagNOGTK) Image GtkThemeIcon(const char *name, bool large); @@ -336,7 +336,7 @@ bool Load(FileList& list, const String& dir, const char *patterns, bool dirs, if(fi.filename != "." && fi.filename != ".." != 0 && (fi.is_directory || PatternMatchMulti(patterns, fi.filename)) && MatchSearch(fi.filename, search) && show) { - #ifdef PLATFORM_X11 + #ifdef PLATFORM_POSIX Image img = isdrive ? PosixGetDriveImage(fi.filename, false) : GetFileIcon(dir, fi.filename, fi.is_directory, fi.unix_mode & 0111, false); #else @@ -911,7 +911,7 @@ String DirectoryUp(String& dir, bool basedir) name = s; } #endif -#ifdef PLATFORM_X11 +#ifdef PLATFORM_POSIX if(i == 0 && s.GetLength() > 1) { dir = "/"; name = s.Mid(1); @@ -1152,7 +1152,7 @@ void FileSel::Rename(const String& on, const String& nn) { #ifdef PLATFORM_WIN32 if(FileMove(FilePath(on), FilePath(nn))) #endif -#ifdef PLATFORM_X11 +#ifdef PLATFORM_POSIX if(rename(FilePath(on), FilePath(nn)) == 0) #endif { @@ -1213,7 +1213,7 @@ struct FolderDisplay : public Display { Image GetDirIcon(const String& s) { -#ifdef PLATFORM_X11 +#ifdef PLATFORM_POSIX Image img = GetFileIcon(GetFileFolder(s), GetFileName(s), true, false, false); #else Image img; diff --git a/uppsrc/Draw/Image.h b/uppsrc/Draw/Image.h index 5439682..4886085 100644 Index: uppsrc/Draw/Image.h =================================================================== --- uppsrc/Draw/Image.h +++ uppsrc/Draw/Image.h @@ -204,7 +204,7 @@ private: #endif #endif -#ifdef PLATFORM_X11 +#ifdef GUI_X11 void SetCursorCheat(int id); int GetCursorCheat() const; friend void *CursorX11(const Image&); diff --git a/uppsrc/GLCtrl/GLCtrl.h b/uppsrc/GLCtrl/GLCtrl.h index 6b5c54f..5f58230 100644 Index: uppsrc/GLCtrl/GLCtrl.h =================================================================== --- uppsrc/GLCtrl/GLCtrl.h +++ uppsrc/GLCtrl/GLCtrl.h @@ -3,7 +3,7 @@ #include -#ifdef PLATFORM_X11 +#ifdef GUI_X11 #define Time XTime #define Font XFont #define Display XDisplay @@ -14,7 +14,7 @@ #include #include -#ifdef PLATFORM_X11 +#ifdef GUI_X11 #include @@ -47,7 +47,7 @@ private: GLPicking() : _isPicking(false) {} }; -#ifdef PLATFORM_X11 +#ifdef GUI_X11 class GLPane : public DHCtrl { friend class GLCtrl; diff --git a/uppsrc/GLCtrl/X11GLCtrl.cpp b/uppsrc/GLCtrl/X11GLCtrl.cpp index 0d8944c..d1df09a 100644 Index: uppsrc/GLCtrl/X11GLCtrl.cpp =================================================================== --- uppsrc/GLCtrl/X11GLCtrl.cpp +++ uppsrc/GLCtrl/X11GLCtrl.cpp @@ -2,7 +2,7 @@ NAMESPACE_UPP -#ifdef PLATFORM_X11 +#ifdef GUI_X11 ///////////////////////////////////////////////////////////////////////////////////////// // Destructor diff --git a/uppsrc/Geom/Draw/plotter.cpp b/uppsrc/Geom/Draw/plotter.cpp index 2424d29..b442690 100644 Index: uppsrc/Geom/Draw/plotter.cpp =================================================================== --- uppsrc/Geom/Draw/plotter.cpp +++ uppsrc/Geom/Draw/plotter.cpp @@ -665,7 +665,7 @@ void Plotter::SetXorMode(bool xm) #ifdef PLATFORM_WIN32 SetROP2(*sdraw, xm ? R2_NOTXORPEN : R2_COPYPEN); #endif -#ifdef PLATFORM_X11 +#ifdef GUI_X11 XSetFunction(Xdisplay, sdraw->GetGC(), xm ? X11_ROP2_NOT_XOR : X11_ROP2_COPY); #endif } @@ -722,7 +722,7 @@ static void PaintRectPart(Draw& draw, int x, int y, int w, int h) if(SystemDraw *sdraw = dynamic_cast(&draw)) { #if defined(PLATFORM_WIN32) ::PatBlt(*sdraw, x, y, w, h, PATINVERT); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) Point offset = sdraw->GetOffset(); XFillRectangle(Xdisplay, sdraw->GetDrawable(), sdraw->GetGC(), x + offset.x, y + offset.y, w, h); #endif @@ -746,7 +746,7 @@ void PaintDragHorzLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn COLORREF cc1 = (COLORREF)c1 ^ (COLORREF)bgnd, cc2 = (COLORREF)c2 ^ (COLORREF)bgnd; COLORREF old_bk = SetTextColor(*sdraw, cc1); HGDIOBJ old_brush = SelectObject(*sdraw, brush); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XGCValues gcv_old, gcv_new; XGetGCValues(Xdisplay, sdraw->GetGC(), GCForeground | GCFunction, &gcv_old); gcv_new.function = X11_ROP2_XOR; @@ -761,7 +761,7 @@ void PaintDragHorzLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn PaintRectPart(*sdraw, rc.right - mingap, rc.top, mingap, sz.cy); #if defined(PLATFORM_WIN32) SetTextColor(*sdraw, cc2); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) gcv_new.foreground = GetXPixel(c2) ^ GetXPixel(bgnd); XChangeGC(Xdisplay, sdraw->GetGC(), GCForeground, &gcv_new); #endif @@ -779,7 +779,7 @@ void PaintDragHorzLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn PaintRectPart(*sdraw, start + 2 * DRAG_STEP * i, rc.top, DRAG_STEP, sz.cy); #if defined(PLATFORM_WIN32) SetTextColor(*sdraw, cc2); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) gcv_new.foreground = GetXPixel(c2) ^ GetXPixel(bgnd); XChangeGC(Xdisplay, sdraw->GetGC(), GCForeground, &gcv_new); #endif @@ -792,7 +792,7 @@ void PaintDragHorzLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn DeleteObject(brush); SetTextColor(*sdraw, old_bk); sdraw->EndGdi(); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XChangeGC(Xdisplay, sdraw->GetGC(), GCForeground | GCFunction, &gcv_old); #endif } @@ -811,7 +811,7 @@ void PaintDragVertLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn COLORREF cc1 = (COLORREF)c1 ^ (COLORREF)bgnd, cc2 = (COLORREF)c2 ^ (COLORREF)bgnd; COLORREF old_bk = SetTextColor(*sdraw, cc1); HGDIOBJ old_brush = SelectObject(*sdraw, brush); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XGCValues gcv_old, gcv_new; XGetGCValues(Xdisplay, sdraw->GetGC(), GCForeground | GCFunction, &gcv_old); gcv_new.function = X11_ROP2_XOR; @@ -827,7 +827,7 @@ void PaintDragVertLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn PaintRectPart(*sdraw, rc.left, rc.bottom - mingap, sz.cx, mingap); #if defined(PLATFORM_WIN32) SetTextColor(*sdraw, cc2); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) gcv_new.foreground = GetXPixel(c2) ^ GetXPixel(bgnd); XChangeGC(Xdisplay, sdraw->GetGC(), GCForeground, &gcv_new); #endif @@ -845,7 +845,7 @@ void PaintDragVertLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn PaintRectPart(*sdraw, rc.left, start + 2 * DRAG_STEP * i, sz.cx, DRAG_STEP); #if defined(PLATFORM_WIN32) SetTextColor(*sdraw, cc2); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) gcv_new.foreground = GetXPixel(c2) ^ GetXPixel(bgnd); XChangeGC(Xdisplay, sdraw->GetGC(), GCForeground, &gcv_new); #endif @@ -858,7 +858,7 @@ void PaintDragVertLine(Draw& draw, const Rect& rc, Color c1, Color c2, Color bgn DeleteObject(brush); SetTextColor(*sdraw, old_bk); sdraw->EndGdi(); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XChangeGC(Xdisplay, sdraw->GetGC(), GCForeground | GCFunction, &gcv_old); #endif } diff --git a/uppsrc/TDraw/util.cpp b/uppsrc/TDraw/util.cpp index ef4dc16..979c1ff 100644 Index: uppsrc/TDraw/util.cpp =================================================================== --- uppsrc/TDraw/util.cpp +++ uppsrc/TDraw/util.cpp @@ -333,7 +333,7 @@ static void DrawDragDropRectRaw(Draw& draw, const Rect& rc, HBRUSH brush, int wi } #endif -#ifdef PLATFORM_X11 +#ifdef GUI_X11 static void DrawDragDropRectRaw(Draw& draw, const Rect& rc, int width) { Size size = rc.Size(); @@ -373,7 +373,7 @@ void DrawDragDropRect(Draw& draw, const Rect& rc_old, const Rect& rc_new, int wi } #endif #endif -#ifdef PLATFORM_X11 +#ifdef GUI_X11 XGCValues gcv_old, gcv_new; XGetGCValues(Xdisplay, draw.GetGC(), GCForeground | GCFunction, &gcv_old); gcv_new.function = X11_ROP2_XOR; @@ -600,7 +600,7 @@ void DrawPolyPolyline(Draw& draw, const Point *vertices, int vertex_count, } if(is_xor) SetROP2(draw, R2_COPYPEN); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XGCValues gcv_old, gcv_new; XGetGCValues(Xdisplay, draw.GetGC(), GCForeground | GCLineWidth | GCFunction, &gcv_old); gcv_new.function = is_xor ? X11_ROP2_COPY : X11_ROP2_XOR; @@ -797,7 +797,7 @@ static void DrawPolyPolygonRaw(Draw& draw, const Point *vertices, int vertex_cou } #endif } -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) static void FillPolyPolygonRaw(GC gc, Drawable drawable, Rect clip, Point offset, const Point *vertices, int vertex_count, const int *subpolygon_counts, int subpolygon_count_count) @@ -852,7 +852,7 @@ static void DrawPolyPolygonRaw(GC gc, Drawable drawable, Point offset, #endif /* -#ifdef PLATFORM_X11 +#ifdef GUI_X11 Pixmap GetPatternPixmap(int64 pattern) { static VectorMap cache; @@ -922,7 +922,7 @@ void DrawPolyPolyPolygon(Draw& draw, const Point *vertices, int vertex_count, // TIMING("DrawPolyPolygon/hdc"); bool is_xor = !IsNull(doxor); -#ifdef PLATFORM_X11 +#ifdef GUI_X11 unsigned xor_pixel = (is_xor ? GetXPixel(doxor) : 0); XGCValues gcv; gcv.function = is_xor ? X11_ROP2_XOR : X11_ROP2_COPY; @@ -1045,7 +1045,7 @@ void DrawPolyPolyPolygon(Draw& draw, const Point *vertices, int vertex_count, #ifdef SYSTEMDRAW } #endif -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) if(fill_gc) FillPolyPolygonRaw(fill_gc, draw.GetDrawable(), draw.GetClip(), draw.GetOffset(), vertices, poly, subpolygon_counts, sub); @@ -1059,7 +1059,7 @@ void DrawPolyPolyPolygon(Draw& draw, const Point *vertices, int vertex_count, subpolygon_counts += sub; } -#ifdef PLATFORM_X11 +#ifdef GUI_X11 if(fill_gc) XFreeGC(Xdisplay, fill_gc); if(line_gc) @@ -1181,7 +1181,7 @@ void DrawEllipse(Draw& draw, const Rect& rc, Color color, Color outline, int out draw.SetDrawPen(outline_width, outline); draw.SetColor(color); DrawEllipse(draw, rc); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XGCValues gcv, gcv_old; enum { GC_BACKUP = GCForeground | GCArcMode | GCLineWidth }; XGetGCValues(Xdisplay, draw.GetGC(), GC_BACKUP, &gcv_old); @@ -1244,7 +1244,7 @@ void DrawArc(Draw& draw, const Rect& rc, Point start, Point end, Color color, in #if defined(PLATFORM_WIN32) draw.SetDrawPen(width, color); DrawArc(draw.GetHandle(), rc, start, end); -#elif defined(PLATFORM_X11) +#elif defined(GUI_X11) XGCValues gcv, gcv_old; XGetGCValues(Xdisplay, draw.GetGC(), GCForeground, &gcv_old); Point offset = draw.GetOffset(); diff --git a/uppsrc/ide/LayDes/laylib.cpp b/uppsrc/ide/LayDes/laylib.cpp index dbb9f1a..efe1840 100644 Index: uppsrc/ide/LayDes/laylib.cpp =================================================================== --- uppsrc/ide/LayDes/laylib.cpp +++ uppsrc/ide/LayDes/laylib.cpp @@ -379,7 +379,7 @@ void EscDraw::DrawSmartText(EscEscape& e) if(ii < e.GetCount()) font = FontEsc(e[ii++]); if(font.GetHeight() == 0) -#ifdef PLATFORM_X11 +#ifdef GUI_X11 font.Height(12); #else font.Height(11); @@ -412,7 +412,7 @@ void EscDraw::GetTextSize(EscEscape& e) WString text = e[0]; Font font = StdFont(); if(font.GetHeight() == 0) -#ifdef PLATFORM_X11 +#ifdef GUI_X11 font.Height(12); #else font.Height(11);