diff --git a/include/mac/carbon/LgiOsDefs.h b/include/mac/carbon/LgiOsDefs.h --- a/include/mac/carbon/LgiOsDefs.h +++ b/include/mac/carbon/LgiOsDefs.h @@ -1,340 +1,340 @@ // // FILE: LgiOsDefs.h (Mac) // AUTHOR: Matthew Allen // DATE: 1/12/2005 // DESCRIPTION: Lgi Mac OS X defines // // Copyright (C) 2005, Matthew Allen // fret@memecode.com // #ifndef __LGI_MAC_OS_DEFS_H #define __LGI_MAC_OS_DEFS_H #include #include #include #include #include "LgiInc.h" #include "LgiDefs.h" #include "GAutoPtr.h" #include "LgiClass.h" #include "pthread.h" ////////////////////////////////////////////////////////////////// // Includes #include "LgiInc.h" ////////////////////////////////////////////////////////////////// // Typedefs typedef WindowRef OsWindow; typedef ControlRef OsView; typedef pthread_t OsThread; typedef UniChar OsChar; typedef ATSUStyle OsFont; typedef CGContextRef OsPainter; typedef CGContextRef OsBitmap; typedef int OsProcessId; class LgiClass GMessage { public: typedef NativeInt Param; typedef NativeInt Result; int m; Param a; Param b; GMessage() { m = a = b = 0; } GMessage(int M, Param A = 0, Param B = 0) { m = M; a = A; b = B; } }; class OsAppArguments { struct OsAppArgumentsPriv *d; public: int Args; char **Arg; OsAppArguments(int args = 0, char **arg = 0); ~OsAppArguments(); void Set(char *CmdLine); OsAppArguments &operator =(OsAppArguments &a); }; ////////////////////////////////////////////////////////////////// // Defines #define MsgCode(msg) (msg->m) #define MsgA(msg) (msg->a) #define MsgB(msg) (msg->b) extern GMessage CreateMsg(int m, int a = 0, int b = 0); #define _stricmp strcasecmp #define _strnicmp strncasecmp // Posix system #define POSIX 1 // Process typedef int OsProcess; typedef int OsProcessId; // Threads typedef pthread_t OsThreadId; typedef pthread_mutex_t OsSemaphore; #define LgiGetCurrentThread() pthread_self() // Sockets #define ValidSocket(s) ((s)>=0) #define INVALID_SOCKET -1 typedef int OsSocket; // Sleep the current thread LgiFunc void LgiSleep(int i); // Run the message loop to process any pending messages #define LgiYield() GApp::ObjInstance()->Run(false) #define LGI_GViewMagic 0x14412662 #define LGI_FileDropFormat "furl" // typeFileURL #define LGI_LgiDropFormat "lgi " #define LGI_WideCharset "utf-16" #define LGI_PrintfInt64 "%lli" #define atoi64 atoll #define sprintf_s snprintf #define vsprintf_s vsnprintf #define swprintf_s swprintf -#define LGI_IllegalFileNameChars "/" // FIXME: what other characters should be in here? +#define LGI_IllegalFileNameChars "/:" // FIXME: what other characters should be in here? // Window flags #define GWF_VISIBLE 0x00000001 #define GWF_DISABLED 0x00000002 #define GWF_FOCUS 0x00000004 #define GWF_OVER 0x00000008 #define GWF_DROP_TARGET 0x00000010 #define GWF_SUNKEN 0x00000020 #define GWF_FLAT 0x00000040 #define GWF_RAISED 0x00000080 #define GWF_BORDER 0x00000100 #define GWF_DIALOG 0x00000200 #define GWF_DESTRUCTOR 0x00000400 #define GWF_QUIT_WND 0x00000800 // Menu flags #define ODS_SELECTED 0x1 #define ODS_DISABLED 0x2 #define ODS_CHECKED 0x4 /// Edge type: Sunken #define SUNKEN 1 /// Edge type: Raised #define RAISED 2 /// Edge type: Chiseled #define CHISEL 3 /// Edge type: Flat #define FLAT 4 /// The directory separator character on Linux as a char #define DIR_CHAR '/' /// The directory separator character on Linux as a string #define DIR_STR "/" /// The standard end of line string for Linux #define EOL_SEQUENCE "\n" /// Tests a char for being a slash #define IsSlash(c) (((c)=='/')||((c)=='\\')) /// Tests a char for being a quote #define IsQuote(c) (((c)=='\"')||((c)=='\'')) /// The path list separator character for Linux #define LGI_PATH_SEPARATOR ":" /// The pattern that matches all files in Linux #define LGI_ALL_FILES "*" /// The stardard extension for dynamically linked code #define LGI_LIBRARY_EXT "dylib" // Carbon user events #define GViewThisPtr 'gvtp' #define kEventClassUser 'user' #define kEventUser 1 #define kEventParamLgiEvent 'Lgie' #define kEventParamLgiA 'Lgia' #define kEventParamLgiB 'Lgib' /// Base point for system messages. #define M_SYSTEM 0 /// Message that indicates the user is trying to close a top level window. #define M_CLOSE (M_SYSTEM+92) /// Minimum value for application defined message ID's #define M_USER (M_SYSTEM+1000) /// \brief Mouse enter event /// /// a = bool Inside; // is the mouse inside the client area?\n /// b = MAKELONG(x, y); // mouse location #define M_MOUSEENTER (M_USER+100) /// \brief Mouse exit event /// /// a = bool Inside; // is the mouse inside the client area?\n /// b = MAKELONG(x, y); // mouse location #define M_MOUSEEXIT (M_USER+101) /// \brief GView change notification /// /// a = (GView*) Wnd;\n /// b = (int) Flags; // Specific to each GView #define M_CHANGE (M_USER+102) /// \brief Pass a text message up to the UI to descibe whats happening /// /// a = (GView*) Wnd;\n /// b = (char*) Text; // description from window #define M_DESCRIBE (M_USER+103) // return (bool) #define M_WANT_DIALOG_PROC (M_USER+104) #define M_MENU (M_USER+105) #define M_COMMAND (M_USER+106) #define M_DRAG_DROP (M_USER+107) #define M_TRAY_NOTIFY (M_USER+108) #define M_CUT (M_USER+109) #define M_COPY (M_USER+110) #define M_PASTE (M_USER+111) #define M_PULSE (M_USER+112) #define M_DELETE (M_USER+113) /// GThreadWork object completed /// /// MsgA = (GThreadOwner*) Owner; /// MsgB = (GThreadWork*) WorkUnit; #define M_GTHREADWORK_COMPELTE (M_USER+114) /// Standard ID for an "Ok" button. /// \sa LgiMsg #define IDOK 1 /// Standard ID for a "Cancel" button. /// \sa LgiMsg #define IDCANCEL 2 /// Standard ID for a "Yes" button. /// \sa LgiMsg #define IDYES 3 /// Standard ID for a "No" button. /// \sa LgiMsg #define IDNO 4 /// Standard message box with an Ok button. /// \sa LgiMsg #define MB_OK 5 /// Standard message box with Ok and Cancel buttons. /// \sa LgiMsg #define MB_OKCANCEL 6 /// Standard message box with Yes and No buttons. /// \sa LgiMsg #define MB_YESNO 7 /// Standard message box with Yes, No and Cancel buttons. /// \sa LgiMsg #define MB_YESNOCANCEL 8 #define MB_SYSTEMMODAL 0x1000 /// The CTRL key is pressed /// \sa GKey #define LGI_VKEY_CTRL 0x001 /// The ALT key is pressed /// \sa GKey #define LGI_VKEY_ALT 0x002 /// The SHIFT key is pressed /// \sa GKey #define LGI_VKEY_SHIFT 0x004 /// The left mouse button is pressed /// \sa GMouse #define LGI_VMOUSE_LEFT 0x008 /// The middle mouse button is pressed /// \sa GMouse #define LGI_VMOUSE_MIDDLE 0x010 /// The right mouse button is pressed /// \sa GMouse #define LGI_VMOUSE_RIGHT 0x020 /// The ctrl key is pressed /// \sa GMouse #define LGI_VMOUSE_CTRL 0x040 /// The alt key is pressed /// \sa GMouse #define LGI_VMOUSE_ALT 0x080 /// The shift key is pressed /// \sa GMouse #define LGI_VMOUSE_SHIFT 0x100 /// The mouse event is a down click /// \sa GMouse #define LGI_VMOUSE_DOWN 0x200 /// The mouse event is a double click /// \sa GMouse #define LGI_VMOUSE_DOUBLE 0x400 // Keys #define VK_F1 1 #define VK_F2 2 #define VK_ENTER 3 #define VK_F3 4 #define VK_F4 5 #define VK_F5 6 #define VK_F6 7 #define VK_BACKSPACE 8 #define VK_TAB 9 #define VK_F7 11 #define VK_F8 12 #define VK_RETURN 13 #define VK_F9 14 #define VK_F10 15 #define VK_F11 16 #define VK_F12 17 #define VK_SHIFT 18 #define VK_PAGEUP 19 #define VK_PAGEDOWN 20 #define VK_HOME 21 #define VK_END 22 #define VK_INSERT 23 #define VK_DELETE 24 #define VK_APPS 25 #define VK_ESCAPE 27 #define VK_LEFT 28 #define VK_RIGHT 29 #define VK_UP 30 #define VK_DOWN 31 ///////////////////////////////////////////////////////////////////////////////////// // Externs LgiFunc GView *GWindowFromHandle(OsView hWnd); LgiFunc int GetMouseWheelLines(); LgiFunc int WinPointToHeight(int Pt); LgiFunc int WinHeightToPoint(int Ht); LgiFunc int stricmp(const char *a, const char *b); LgiFunc char *strlwr(char *a); LgiFunc char *strupr(char *a); LgiFunc char *p2c(unsigned char *s); LgiFunc void c2p255(Str255 &d, char *s); LgiFunc char *CFStringToUtf8(CFStringRef r); LgiFunc CFStringRef Utf8ToCFString(char *s, int len = -1); /// Convert a string d'n'd format to an OS dependant integer. LgiFunc int FormatToInt(char *s); /// Convert a Os dependant integer d'n'd format to a string. LgiFunc char *FormatToStr(int f); #endif diff --git a/src/common/Gdc2/Alpha.cpp b/src/common/Gdc2/Alpha.cpp --- a/src/common/Gdc2/Alpha.cpp +++ b/src/common/Gdc2/Alpha.cpp @@ -1,2614 +1,2618 @@ /** \file \author Matthew Allen \date 4/3/1998 \brief Draw mode effects */ #include #include #include #include #include "Gdc2.h" #include "GPath.h" #include "GPixelRops.h" -#include "GPalette.h" +#include "GPalette.h" // #define Div255(a) DivLut[a] #define Div255(a) ((a)/255) /// Alpha blending applicators class GAlphaApp : public GApplicator { protected: uchar alpha, oma; int Bits, Bytes; uchar *Ptr; uchar *APtr; const char *GetClass() { return "GAlphaApp"; } template void CreatePaletteLut(T *c, GPalette *Pal, int Scale = 255) { if (Scale < 255) { uchar *DivLut = Div255Lut; for (int i=0; i<256; i++) { GdcRGB *p = (Pal) ? (*Pal)[i] : 0; if (p) { c[i].r = DivLut[p->r * Scale]; c[i].g = DivLut[p->g * Scale]; c[i].b = DivLut[p->b * Scale]; } else { c[i].r = DivLut[i * Scale]; c[i].g = c[i].r; c[i].b = c[i].r; } } } else if (Scale) { for (int i=0; i<256; i++) { GdcRGB *p = (Pal) ? (*Pal)[i] : 0; if (p) { c[i].r = p->r; c[i].g = p->g; c[i].b = p->b; } else { c[i].r = i; c[i].g = i; c[i].b = i; } } } else { memset(c, 0, sizeof(*c) * 256); } } public: GAlphaApp() { Op = GDC_ALPHA; alpha = 0xFF; oma = 0; Bits = 8; Bytes = 1; Ptr = 0; APtr = 0; } int GetVar(int Var) { switch (Var) { case GAPP_ALPHA_A: return alpha; } return 0; } int SetVar(int Var, NativeInt Value) { switch (Var) { case GAPP_ALPHA_A: { int Old = alpha; alpha = Value; oma = 0xFF - alpha; return Old; } case GAPP_ALPHA_PAL: { } } return 0; } bool SetSurface(GBmpMem *d, GPalette *p, GBmpMem *a) { if (d && d->GetBits() == Bits) { Dest = d; Pal = p; Ptr = d->Base; Alpha = a; APtr = Alpha ? Alpha->Base : 0; return true; } return false; } void SetPtr(int x, int y) { LgiAssert(Dest && Dest->Base); Ptr = Dest->Base + ((y * Dest->Line) + (x * Bytes)); if (APtr) APtr = Alpha->Base + ((y * Alpha->Line) + x); } void IncX() { Ptr += Bytes; if (APtr) APtr++; } void IncY() { Ptr += Dest->Line; if (APtr) APtr += Alpha->Line; } void IncPtr(int X, int Y) { Ptr += (Y * Dest->Line) + (X * Bytes); if (APtr) APtr += (Y * Dest->Line) + X; } COLOUR Get() { switch (Bytes) { case 1: return *((uint8*)Ptr); case 2: return *((uint16*)Ptr); case 3: return Rgb24(Ptr[2], Ptr[1], Ptr[0]); case 4: return *((uint32*)Ptr); } return 0; } }; class GdcApp8Alpha : public GAlphaApp { char Remap[256]; uchar *DivLut; public: GdcApp8Alpha(); int SetVar(int Var, NativeInt Value); void Set(); void VLine(int height); void Rectangle(int x, int y); bool Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha); }; class GdcApp15Alpha : public GAlphaApp { public: GdcApp15Alpha() { Bits = 15; Bytes = 2; } void Set(); void VLine(int height); void Rectangle(int x, int y); bool Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha); }; class GdcApp16Alpha : public GAlphaApp { public: GdcApp16Alpha() { Bits = 16; Bytes = 2; } void Set(); void VLine(int height); void Rectangle(int x, int y); bool Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha); }; class GdcApp24Alpha : public GAlphaApp { public: GdcApp24Alpha() { Bits = 24; Bytes = 3; } void Set(); void VLine(int height); void Rectangle(int x, int y); bool Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha); }; class GdcApp32Alpha : public GAlphaApp { public: GdcApp32Alpha() { Bits = 32; Bytes = 4; } void Set(); void VLine(int height); void Rectangle(int x, int y); bool Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha); }; GApplicator *GAlphaFactory::Create(GColourSpace Cs, int Op) { if (Op == GDC_ALPHA) { switch (Cs) { default: printf("%s:%i - Unknown colour space: 0x%x %s\n", _FL, Cs, GColourSpaceToString(Cs)); LgiAssert(0); break; case CsIndex8: return new GdcApp8Alpha; case CsRgb15: return new GdcApp15Alpha; case CsRgb16: case CsBgr16: return new GdcApp16Alpha; case System24BitColourSpace: return new GdcApp24Alpha; case System32BitColourSpace: return new GdcApp32Alpha; } } return 0; } GdcApp8Alpha::GdcApp8Alpha() { Bits = 8; Bytes = 1; Op = GDC_ALPHA; ZeroObj(Remap); DivLut = Div255Lut; } int GdcApp8Alpha::SetVar(int Var, NativeInt Value) { int Status = GAlphaApp::SetVar(Var, Value); switch (Var) { case GAPP_ALPHA_PAL: { GPalette *Pal = (GPalette*)Value; if (Pal && alpha < 255) { GdcRGB *p = (*Pal)[0]; GdcRGB *Col = (*Pal)[c&0xFF]; for (int i=0; iGetSize(); i++) { COLOUR Rgb = Rgb24( Div255((oma * p[i].r) + (alpha * Col->r)), Div255((oma * p[i].g) + (alpha * Col->g)), Div255((oma * p[i].b) + (alpha * Col->b))); Remap[i] = Pal->MatchRgb(Rgb); } } else { for (int i=0; i<256; i++) { Remap[i] = c; } } break; } } return Status; } void GdcApp8Alpha::Set() { *Ptr = Remap[*Ptr]; if (APtr) { *APtr += DivLut[(255 - *APtr) * alpha]; } } void GdcApp8Alpha::VLine(int y) { while (y--) { *Ptr = Remap[*Ptr]; Ptr += Dest->Line; if (APtr) { *APtr += DivLut[(255 - *APtr) * alpha]; APtr += Alpha->Line; } } } void GdcApp8Alpha::Rectangle(int x, int y) { while (y--) { uchar *p = Ptr; for (int X=0; XLine; if (APtr) { uchar *a = APtr; for (int X=0; XLine; } } } bool GdcApp8Alpha::Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha) { if (!Src) return false; if (!SPal) SPal = Pal; GPalette Grey; GPalette *DPal; if (Pal) { DPal = Pal; } else { Grey.CreateGreyScale(); DPal = &Grey; } uchar *DivLut = Div255Lut; uchar *Lut = 0; uchar lookup[256]; for (int i=0; i<256; i++) { lookup[i] = (i * (int)alpha) / 255; } if (SrcAlpha) { // Per pixel source alpha GdcRGB *SRgb = (*SPal)[0]; GdcRGB *DRgb = (*DPal)[0]; if (!SRgb || !DRgb) return false; switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 sc[256]; CreatePaletteLut(sc, SPal); GRgb24 dc[256]; CreatePaletteLut(dc, DPal); for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); uchar *d = Ptr; int r, g, b; Lut = DPal->MakeLut(15); for (int x=0; xx; x++) { uchar a = lookup[*sa]; GRgb24 *src = sc + *s; if (a == 255) { r = src->r; g = src->g; b = src->b; } else if (a) { uchar o = 0xff - a; GRgb24 *dst = dc + *d; r = DivLut[(dst->r * o) + (src->r * a)]; g = DivLut[(dst->g * o) + (src->g * a)]; b = DivLut[(dst->b * o) + (src->b * a)]; } *d++ = Lut[Rgb15(r, g, b)]; sa++; s++; } Ptr += Dest->Line; } break; } case System15BitColourSpace: { GRgb24 dc[256]; CreatePaletteLut(dc, DPal); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); uchar *d = Ptr; uchar *end = d + Src->x; while (d < end) { uchar a = lookup[*sa++]; if (a == 255) { *d = Lut[*s]; } else if (a) { uchar o = 255 - a; GRgb24 *dst = dc + *d; int r = DivLut[(dst->r * o) + (Rc15(*s) * a)]; int g = DivLut[(dst->g * o) + (Gc15(*s) * a)]; int b = DivLut[(dst->b * o) + (Bc15(*s) * a)]; *d = Lut[Rgb15(r, g, b)]; } d++; s++; } Ptr += Dest->Line; } break; } case System16BitColourSpace: { GRgb24 dc[256]; CreatePaletteLut(dc, DPal); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); uchar *d = Ptr; uchar *end = d + Src->x; while (d < end) { uchar a = lookup[*sa++]; if (a == 255) { *d = Lut[Rgb16To15(*s)]; } else if (a) { uchar o = 255 - a; GRgb24 *dst = dc + *d; int r = DivLut[(dst->r * o) + (Rc16(*s) * a)]; int g = DivLut[(dst->g * o) + (Gc16(*s) * a)]; int b = DivLut[(dst->b * o) + (Bc16(*s) * a)]; *d = Lut[Rgb15(r, g, b)]; } d++; s++; } Ptr += Dest->Line; } break; } case CsBgr24: { GBgr24 dc[256]; CreatePaletteLut(dc, DPal, 255); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); uchar *d = Ptr; for (int x=0; xx; x++) { uchar a = lookup[*sa++]; if (a == 255) { *d = Lut[Rgb15(s->r, s->g, s->b)]; } else if (a) { uchar o = 255 - a; GBgr24 *dst = dc + *d; int r = DivLut[(dst->r * o) + (s->r * a)]; int g = DivLut[(dst->g * o) + (s->g * a)]; int b = DivLut[(dst->b * o) + (s->b * a)]; *d = Lut[Rgb15(r, g, b)]; } d++; s++; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { GRgb24 dc[256]; CreatePaletteLut(dc, DPal, 255); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); uchar *d = Ptr; for (int x=0; xx; x++) { uchar a = lookup[*sa++]; if (a == 255) { *d = Lut[Rgb15(s->r, s->g, s->b)]; } else if (a) { uchar o = 255 - a; GRgb24 *dst = dc + *d; int r = DivLut[(dst->r * o) + (s->r * a)]; int g = DivLut[(dst->g * o) + (s->g * a)]; int b = DivLut[(dst->b * o) + (s->b * a)]; *d = Lut[Rgb15(r, g, b)]; } d++; s++; } Ptr += Dest->Line; } break; } } } else { // Global alpha level GdcRGB *SRgb = (*SPal)[0]; GdcRGB *DRgb = (*DPal)[0]; if (!SRgb || !DRgb) return false; switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { if (alpha == 255) { // do a straight blt for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *d = Ptr; memcpy(d, s, Src->x); Ptr += Dest->Line; } } else if (alpha) { GRgb24 sc[256]; CreatePaletteLut(sc, SPal, alpha); GRgb24 dc[256]; CreatePaletteLut(dc, DPal, oma); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *d = Ptr; for (int x=0; xx; x++, s++, d++) { GRgb24 *src = sc + *s; GRgb24 *dst = dc + *d; int r = src->r + dst->r; int g = src->g + dst->g; int b = src->b + dst->b; *d = Lut[Rgb15(r, g, b)]; } Ptr += Dest->Line; } } break; } case System15BitColourSpace: { GRgb24 dc[256]; CreatePaletteLut(dc, DPal, oma); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *d = Ptr; uchar *e = d + Src->x; while (d < e) { GRgb24 *dst = dc + *d; int r = dst->r + DivLut[Rc15(*s) * alpha]; int g = dst->g + DivLut[Gc15(*s) * alpha]; int b = dst->b + DivLut[Bc15(*s) * alpha]; *d++ = Lut[Rgb15(r, g, b)]; s++; } Ptr += Dest->Line; } break; } case System16BitColourSpace: { GRgb24 dc[256]; CreatePaletteLut(dc, DPal, oma); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *d = Ptr; for (int x=0; xx; x++, s++, d++) { GRgb24 *dst = dc + *d; int r = dst->r + DivLut[Rc16(*s) * alpha]; int g = dst->g + DivLut[Gc16(*s) * alpha]; int b = dst->b + DivLut[Bc16(*s) * alpha]; *d = Lut[Rgb15(r, g, b)]; } Ptr += Dest->Line; } break; } case CsBgr24: { GBgr24 dc[256]; CreatePaletteLut(dc, DPal, oma); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); uchar *d = Ptr; uchar *e = Ptr + Src->x; while (d < e) { GBgr24 *dst = dc + *d; int r = dst->r + DivLut[s->r * alpha]; int g = dst->g + DivLut[s->g * alpha]; int b = dst->b + DivLut[s->b * alpha]; s++; *d++ = Lut[Rgb15(r, g, b)]; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { GRgb24 dc[256]; CreatePaletteLut(dc, DPal); if (!Lut) Lut = DPal->MakeLut(15); for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); uchar *d = Ptr; uchar *end = d + Src->x; while (d < end) { uchar a = lookup[s->a]; if (a) { GRgb24 *dst = dc + *d; uchar o = 255 - a; int r = lookup[s->r] + DivLut[dst->r * o]; int g = lookup[s->g] + DivLut[dst->g * o]; int b = lookup[s->b] + DivLut[dst->b * o]; *d = Lut[Rgb15(r, g, b)]; } s++; d++; } Ptr += Dest->Line; } break; } } } return false; } /////////////////////////////////////////////////////////////////////////////////////////////////// #define Setup15() \ uchar *DivLut = Div255Lut; \ int r = DivLut[Rc15(c)]; \ int g = DivLut[Gc15(c)]; \ int b = DivLut[Bc15(c)]; #define Comp15() \ *p = Rgb15( DivLut[r + (oma * Rc15(*p))], \ DivLut[g + (oma * Gc15(*p))], \ DivLut[b + (oma * Bc15(*p))] ); void GdcApp15Alpha::Set() { ushort *p = (ushort*) Ptr; Setup15(); Comp15(); } void GdcApp15Alpha::VLine(int height) { ushort *p = (ushort*) Ptr; Setup15(); while (height--) { Comp15(); p = (ushort*)(Ptr += Dest->Line); } } void GdcApp15Alpha::Rectangle(int x, int y) { ushort *p = (ushort*) Ptr; Setup15(); while (y--) { for (int n=0; nLine); } } bool GdcApp15Alpha::Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha) { if (!Src) return 0; uchar *DivLut = Div255Lut; if (SrcAlpha) { uchar lookup[256]; for (int i=0; i<256; i++) { lookup[i] = (i * (int)alpha) / 255; } switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 c[256]; CreatePaletteLut(c, SPal, 255); for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { uchar a = lookup[*sa++]; if (a == 255) { GRgb24 *src = c + *s; *d = Rgb15(src->r, src->g, src->b); } else if (a) { GRgb24 *src = c + *s; uchar o = 255 - a; *d = Rgb15( DivLut[(o * Rc15(*d)) + (a * src->r)], DivLut[(o * Gc15(*d)) + (a * src->g)], DivLut[(o * Bc15(*d)) + (a * src->b)]); } d++; s++; } Ptr += Dest->Line; } break; } case CsRgb15: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *src_a = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { uchar a = lookup[*src_a++]; uchar oma = 255 - a; if (a == 255) { *d = *s; } else if (a) { *d = Rgb15 ( DivLut[(oma * Rc15(*d)) + (a * Rc15(*s))], DivLut[(oma * Gc15(*d)) + (a * Gc15(*s))], DivLut[(oma * Bc15(*d)) + (a * Bc15(*s))] ); } d++; s++; } Ptr += Dest->Line; } break; } case CsRgb16: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *src_a = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; for (int x=0; xx; x++) { uchar my_a = lookup[*src_a++]; uchar my_oma = 255 - my_a; if (my_oma == 0) { *d = *s; } else if (my_oma < 255) { *d = Rgb15( Div255((my_oma * Rc15(*d)) + (my_a * Rc16(*s))), Div255((my_oma * Gc15(*d)) + (my_a * Gc16(*s))), Div255((my_oma * Bc15(*d)) + (my_a * Bc16(*s)))); } d++; s++; } Ptr += Dest->Line; } break; } case CsBgr24: { for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { uchar a = lookup[*sa++]; uchar o = 255 - a; if (a == 255) { *d = Rgb15(s->r, s->g, s->b); } else if (a) { *d = Rgb15( Div255( (o * Rc15(*d)) + (a * s->r) ), Div255( (o * Gc15(*d)) + (a * s->g) ), Div255( (o * Bc15(*d)) + (a * s->b) )); } s++; d++; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { uchar a = lookup[*sa++]; uchar o = 255 - a; if (a == 255) { *d = Rgb15(s->r, s->g, s->b); } else if (a) { *d = Rgb15( Div255( (o * Rc15(*d)) + (a * s->r) ), Div255( (o * Gc15(*d)) + (a * s->g) ), Div255( (o * Bc15(*d)) + (a * s->b) )); } d++; s++; } Ptr += Dest->Line; } break; } } } else { switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 c[256]; if (alpha) CreatePaletteLut(c, SPal, alpha); for (int y=0; yy; y++) { ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; uchar *s = Src->Base + (Src->Line * y); GRgb24 *Src; if (alpha == 255) { // copy while (d < e) { Src = c + *s++; *d = Rgb15(Src->r, Src->g, Src->b); } } else if (alpha) { // blend while (d < e) { Src = c + *s++; - *d++ = Rgb15 + *d = Rgb15 ( DivLut[oma * Rc15(*d)] + Src->r, DivLut[oma * Gc15(*d)] + Src->g, DivLut[oma * Bc15(*d)] + Src->b ); + d++; } } Ptr += Dest->Line; } break; } case CsRgb15: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; if (alpha == 255) { // copy while (d < e) { *d++ = *s++; } } else if (alpha) { // blend while (d < e) { *d = Rgb15 ( DivLut[(oma * Rc15(*d)) + (alpha * Rc15(*s))], DivLut[(oma * Gc15(*d)) + (alpha * Gc15(*s))], DivLut[(oma * Bc15(*d)) + (alpha * Bc15(*s))] ); s++; d++; } } Ptr += Dest->Line; } break; } case CsRgb16: { // this code combines the colour bitmap with the destination // bitmap using the given alpha value for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; for (int x=0; xx; x++, d++, s++) { *d = Rgb15( Div255((oma * Rc15(*d)) + (alpha * Rc16(*s))), Div255((oma * Gc15(*d)) + (alpha * Gc16(*s))), Div255((oma * Bc15(*d)) + (alpha * Bc16(*s)))); } Ptr += Dest->Line; } break; } case CsBgr24: { for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { *d = Rgb15 ( DivLut[(oma * Rc15(*d)) + (alpha * s->r)], DivLut[(oma * Gc15(*d)) + (alpha * s->g)], DivLut[(oma * Bc15(*d)) + (alpha * s->b)] ); s++; d++; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { *d = Rgb15 ( DivLut[(oma * Rc15(*d)) + (alpha * s->r)], DivLut[(oma * Gc15(*d)) + (alpha * s->g)], DivLut[(oma * Bc15(*d)) + (alpha * s->b)] ); s++; d++; } Ptr += Dest->Line; } break; } } } return false; } /////////////////////////////////////////////////////////////////////////////////////////////////// #define Setup16() \ uchar *DivLut = Div255Lut; \ int r = Rc16(c) * alpha; \ int g = Gc16(c) * alpha; \ int b = Bc16(c) * alpha; #define Comp16() \ *p = Rgb16( DivLut[r + (oma * Rc16(*p))], \ DivLut[g + (oma * Gc16(*p))], \ DivLut[b + (oma * Bc16(*p))]); void GdcApp16Alpha::Set() { ushort *p = (ushort*) Ptr; Setup16(); Comp16(); } void GdcApp16Alpha::VLine(int height) { ushort *p = (ushort*) Ptr; Setup16(); while (height--) { Comp16(); p = (ushort*) (Ptr += Dest->Line); } } void GdcApp16Alpha::Rectangle(int x, int y) { ushort *p = (ushort*) Ptr; Setup16(); while (y--) { for (int n=0; nLine); } } bool GdcApp16Alpha::Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha) { if (!Src) return 0; uchar *DivLut = Div255Lut; uchar lookup[256]; for (int i=0; i<256; i++) { lookup[i] = (i * (int)alpha) / 255; } if (SrcAlpha) { switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 c[256]; CreatePaletteLut(c, SPal, 255); for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *EndD = d + Src->x; while (d < EndD) { uchar a = lookup[*sa++]; if (a == 255) { GRgb24 *src = c + *s; *d = Rgb16(src->r, src->g, src->b); } else if (a) { GRgb24 *src = c + *s; uchar o = 255 - a; int r = DivLut[(Rc16(*d) * o) + (src->r * a)]; int g = DivLut[(Gc16(*d) * o) + (src->g * a)]; int b = DivLut[(Bc16(*d) * o) + (src->b * a)]; *d = Rgb16(r, g, b); } d++; s++; } Ptr += Dest->Line; } break; } case System15BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { uchar a = lookup[*sa++]; uchar o = 255 - a; if (a == 255) { *d = Rgb15To16(*s); } else if (a) { *d = Rgb16( Div255((o * Rc16(*d)) + (a * Rc15(*s))), Div255((o * Gc16(*d)) + (a * Gc15(*s))), Div255((o * Bc16(*d)) + (a * Bc15(*s)))); } d++; s++; } Ptr += Dest->Line; } break; } case System16BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) ((uchar*)Src->Base + (y * Src->Line)); uchar *src_a = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; for (int x=0; xx; x++) { uchar my_a = lookup[*src_a++]; uchar my_oma = 255 - my_a; if (my_oma == 0) { *d = *s; } else if (my_oma < 255) { *d = Rgb16( Div255((my_oma * Rc16(*d)) + (my_a * Rc16(*s))), Div255((my_oma * Gc16(*d)) + (my_a * Gc16(*s))), Div255((my_oma * Bc16(*d)) + (my_a * Bc16(*s)))); } d++; s++; } Ptr += Dest->Line; } break; } case CsBgr24: #ifndef LINUX { for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *end = d + Src->x; while (d < end) { uchar a = lookup[*sa++]; if (a == 255) { *d = Rgb16(s->r, s->g, s->b); } else if (a) { uchar o = 255 - a; int r = DivLut[(Rc16(*d) * o) + (s->r * a)]; int g = DivLut[(Gc16(*d) * o) + (s->g * a)]; int b = DivLut[(Bc16(*d) * o) + (s->b * a)]; *d = Rgb16(r, g, b); } s++; d++; } Ptr += Dest->Line; } break; } #endif case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); ushort *d = (ushort*) Ptr; ushort *end = d + Src->x; while (d < end) { uchar a = lookup[*sa++]; if (a == 255) { *d = Rgb16(s->r, s->g, s->b); } else if (a) { uchar o = 255 - a; int r = DivLut[(Rc16(*d) * o) + (s->r * a)]; int g = DivLut[(Gc16(*d) * o) + (s->g * a)]; int b = DivLut[(Bc16(*d) * o) + (s->b * a)]; *d = Rgb16(r, g, b); } d++; s++; } Ptr += Dest->Line; } break; } } } else { switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { // this code uses the input bitmap as a mask to say where // to draw the current colour at the given alpha value GRgb24 c[256]; CreatePaletteLut(c, SPal, alpha); for (int y=0; yy; y++) { ushort *d = (ushort*) Ptr; uchar *s = Src->Base + (Src->Line * y); for (int x=0; xx; x++, d++, s++) { GRgb24 *src = c + *s; int r = src->r + DivLut[Rc16(*d) * oma]; int g = src->g + DivLut[Gc16(*d) * oma]; int b = src->b + DivLut[Bc16(*d) * oma]; *d = Rgb16(r, g, b); } Ptr += Dest->Line; } break; } case CsRgb15: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { *d = Rgb16 ( DivLut[(oma * Rc16(*d)) + (alpha * Rc15(*s))], DivLut[(oma * Gc16(*d)) + (alpha * Gc15(*s))], DivLut[(oma * Bc16(*d)) + (alpha * Bc15(*s))] ); s++; d++; } Ptr += Dest->Line; } break; } case CsRgb16: case CsBgr16: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; for (int x=0; xx; x++, d++, s++) { *d = Rgb16( Div255((oma * Rc16(*d)) + (alpha * Rc16(*s))), Div255((oma * Gc16(*d)) + (alpha * Gc16(*s))), Div255((oma * Bc16(*d)) + (alpha * Bc16(*s)))); } Ptr += Dest->Line; } break; } case CsBgr24: { for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; ushort *e = d + Src->x; while (d < e) { - *d++ = Rgb16( Div255((oma * Rc16(*d)) + (alpha * s->r)), + *d = Rgb16( Div255((oma * Rc16(*d)) + (alpha * s->r)), Div255((oma * Gc16(*d)) + (alpha * s->g)), Div255((oma * Bc16(*d)) + (alpha * s->b))); + d++; s++; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); ushort *d = (ushort*) Ptr; ushort *end = d + Src->x; if (alpha == 255) { while (d < end) { if (s->a) { uchar o = 255 - s->a; int r = DivLut[(Rc16(*d) * o) + (s->r * s->a)]; int g = DivLut[(Rc16(*d) * o) + (s->g * s->a)]; int b = DivLut[(Rc16(*d) * o) + (s->b * s->a)]; *d = Rgb16(r, g, b); } s++; d++; } } else if (alpha) { while (d < end) { uchar a = lookup[s->a]; if (a == 255) { *d = Rgb16(s->r, s->g, s->b); } else if (a) { uchar o = 255 - a; int r = lookup[s->r] + DivLut[o * Rc16(*d)]; int g = lookup[s->g] + DivLut[o * Gc16(*d)]; int b = lookup[s->b] + DivLut[o * Bc16(*d)]; *d = Rgb16(r, g, b); } s++; d++; } } Ptr += Dest->Line; } break; } } } return false; } ///////////////////////////////////////////////////////////////////////////////////////////////////// #define Setup24() \ GRgb24 *p = (GRgb24*)Ptr; \ uchar *DivLut = Div255Lut; \ int r = R24(c) * alpha; \ int g = G24(c) * alpha; \ int b = B24(c) * alpha; #define Comp24() \ p->r = DivLut[(oma * p->r) + r]; \ p->g = DivLut[(oma * p->g) + g]; \ p->b = DivLut[(oma * p->b) + b]; \ void GdcApp24Alpha::Set() { Setup24(); Comp24(); } void GdcApp24Alpha::VLine(int height) { Setup24(); while (height--) { Comp24(); p = (GRgb24*) (Ptr += Dest->Line); } } void GdcApp24Alpha::Rectangle(int x, int y) { Setup24(); while (y--) { for (int n=0; nLine); } } bool GdcApp24Alpha::Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha) { if (!Src) return false; uchar *DivLut = Div255Lut; uchar lookup[256]; for (int i=0; i<256; i++) { lookup[i] = (i * (int)alpha) / 255; } if (SrcAlpha) { switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 c[256]; CreatePaletteLut(c, SPal, 255); for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *e = s + Src->x; uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); GRgb24 *d = (GRgb24*) Ptr; while (s < e) { uchar a = lookup[*sa++]; uchar o = 255 - a; if (a == 255) { GRgb24 *src = c + *s; *d = *src; } else if (a) { GRgb24 *src = c + *s; d->r = DivLut[(o * d->r) + (a * src->r)]; d->g = DivLut[(o * d->g) + (a * src->g)]; d->b = DivLut[(o * d->b) + (a * src->b)]; } s++; d++; } Ptr += Dest->Line; } break; } case System15BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *e = s + Src->x; uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); GRgb24 *d = (GRgb24*) Ptr; while (s < e) { uchar a = lookup[*sa++]; if (a == 255) { d->r = Bc15(*s); d->g = Gc15(*s); d->b = Rc15(*s); } else if (a) { uchar o = 255 - a; d->r = Div255((o * d->r) + (a * Rc15(*s))); d->g = Div255((o * d->g) + (a * Gc15(*s))); d->b = Div255((o * d->b) + (a * Bc15(*s))); } s++; d++; } Ptr += Dest->Line; } break; } case System16BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *e = s + Src->x; uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); GRgb24 *d = (GRgb24*) Ptr; while (s < e) { uchar a = lookup[*sa++]; if (a == 255) { d->r = Bc16(*s); d->g = Gc16(*s); d->b = Rc16(*s); } else if (a) { uchar o = 255 - a; d->r = Div255((o * d->r) + (a * Rc16(*s))); d->g = Div255((o * d->g) + (a * Gc16(*s))); d->b = Div255((o * d->b) + (a * Bc16(*s))); } s++; d++; } Ptr += Dest->Line; } break; } case CsBgr24: { for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *src_a = SrcAlpha->Base + (y * SrcAlpha->Line); uchar *d = Ptr; for (int x=0; xx; x++) { uchar my_a = lookup[*src_a++]; uchar my_oma = 255 - my_a; if (my_oma == 0) { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; } else if (my_oma < 255) { d[0] = Div255( (my_oma * d[0]) + (my_a * s[0]) ); d[1] = Div255( (my_oma * d[1]) + (my_a * s[1]) ); d[2] = Div255( (my_oma * d[2]) + (my_a * s[2]) ); } d += Bytes; s += Bytes; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); System32BitPixel *e = s + Src->x; uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); GRgb24 *d = (GRgb24*) Ptr; while (s < e) { uchar a = lookup[*sa++]; if (a == 255) { d->r = s->r; d->g = s->g; d->b = s->b; } else if (a) { uchar o = 255 - a; d->r = DivLut[(d->r * o) + (s->r * a)]; d->g = DivLut[(d->g * o) + (s->g * a)]; d->b = DivLut[(d->b * o) + (s->b * a)]; } s++; d++; } Ptr += Dest->Line; } break; } } } else { switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 c[256]; CreatePaletteLut(c, SPal, alpha); for (int y=0; yy; y++) { uchar *s = Src->Base + (y * Src->Line); uchar *e = s + Src->x; GRgb24 *d = (GRgb24*) Ptr; while (s < e) { GRgb24 *src = c + *s++; d->r = src->r + DivLut[d->r * oma]; d->g = src->g + DivLut[d->g * oma]; d->b = src->b + DivLut[d->b * oma]; d++; } Ptr += Dest->Line; } break; } case System15BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *e = s + Src->x; GRgb24 *d = (GRgb24*) Ptr; while (s < e) { d->r = DivLut[(oma * d->r) + (alpha * Rc15(*s))]; d->g = DivLut[(oma * d->g) + (alpha * Gc15(*s))]; d->b = DivLut[(oma * d->b) + (alpha * Bc15(*s))]; s++; d++; } Ptr += Dest->Line; } break; } case System16BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); GRgb24 *d = (GRgb24*) Ptr; if (alpha == 255) { for (int x=0; xx; x++) { d->r = Rc16(*s); d->g = Gc16(*s); d->b = Bc16(*s); s++; d++; } } else if (alpha) { for (int x=0; xx; x++) { d->r = DivLut[(oma * d->r) + (alpha * Rc15(*s))]; d->g = DivLut[(oma * d->g) + (alpha * Gc16(*s))]; d->b = DivLut[(oma * d->b) + (alpha * Bc16(*s))]; s++; d++; } } Ptr += Dest->Line; } break; } case CsBgr24: { for (int y=0; yy; y++) { GBgr24 *s = (GBgr24*) (Src->Base + (y * Src->Line)); GBgr24 *d = (GBgr24*) Ptr; if (alpha == 255) { memcpy(d, s, Src->x * 3); } else if (alpha) { for (int x=0; xx; x++) { d->r = DivLut[(oma * d->r) + (alpha * s->r)]; d->g = DivLut[(oma * d->g) + (alpha * s->g)]; d->b = DivLut[(oma * d->b) + (alpha * s->b)]; s++; d++; } } Ptr += Dest->Line; } break; } case CsBgr48: { for (int y=0; yy; y++) { GBgr48 *s = (GBgr48*) (Src->Base + (y * Src->Line)); GBgr24 *d = (GBgr24*) Ptr; if (alpha == 255) { GBgr48 *e = s + Src->x; while (s < e) { d->r = s->r >> 8; d->g = s->g >> 8; d->b = s->b >> 8; d++; s++; } } else if (alpha) { for (int x=0; xx; x++) { d->r = DivLut[(oma * d->r) + (alpha * (s->r >> 8))]; d->g = DivLut[(oma * d->g) + (alpha * (s->g >> 8))]; d->b = DivLut[(oma * d->b) + (alpha * (s->b >> 8))]; s++; d++; } } Ptr += Dest->Line; } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); GRgb24 *d = (GRgb24*) Ptr; if (alpha == 255) { for (int x=0; xx; x++) { if (s->a) { uchar o = 255 - s->a; d->r = DivLut[(s->r * s->a) + (d->r * o)]; d->g = DivLut[(s->g * s->a) + (d->g * o)]; d->b = DivLut[(s->b * s->a) + (d->b * o)]; } s++; d++; } } else if (alpha) { for (int x=0; xx; x++) { uchar a = lookup[s->a]; if (a == 255) { d->r = s->r; d->g = s->g; d->b = s->b; } else if (a) { uchar o = 255 - a; d->r = lookup[s->r] + DivLut[o * d->r]; d->g = lookup[s->g] + DivLut[o * d->g]; d->b = lookup[s->b] + DivLut[o * d->b]; } s++; d++; } } Ptr += Dest->Line; } break; } } } return false; } ///////////////////////////////////////////////////////////////////////////////////////////////////// #define Setup32() \ uchar *DivLut = Div255Lut; \ int a = DivLut[A32(c) * alpha]; \ int oma = 255 - a; \ int r = R32(c) * a; \ int g = G32(c) * a; \ int b = B32(c) * a; #define Comp32() \ p->r = DivLut[(oma * p->r) + r]; \ p->g = DivLut[(oma * p->g) + g]; \ p->b = DivLut[(oma * p->b) + b]; \ p->a = (p->a + a) - DivLut[p->a * a]; void GdcApp32Alpha::Set() { System32BitPixel *p = (System32BitPixel*) Ptr; Setup32(); Comp32(); } void GdcApp32Alpha::VLine(int height) { Setup32(); while (height--) { System32BitPixel *p = (System32BitPixel*) Ptr; Comp32(); Ptr = (((uchar*) Ptr) + Dest->Line); } } void GdcApp32Alpha::Rectangle(int x, int y) { Setup32(); while (y--) { System32BitPixel *p = (System32BitPixel*) Ptr; for (int n=0; nLine); } } bool GdcApp32Alpha::Blt(GBmpMem *Src, GPalette *SPal, GBmpMem *SrcAlpha) { if (!Src) return 0; uchar *DivLut = Div255Lut; uchar lookup[256]; for (int i=0; i<256; i++) { lookup[i] = DivLut[i * alpha]; } if (SrcAlpha) { switch (Src->Cs) { default: { LgiAssert(!"Not impl."); break; } case CsIndex8: { GRgb24 c[256]; CreatePaletteLut(c, SPal); for (int y=0; yy; y++) { uchar *s = (uchar*) (Src->Base + (y * Src->Line)); uchar *sa = (uchar*) (SrcAlpha->Base + (y * SrcAlpha->Line)); GRgb24 *sc; System32BitPixel *d = (System32BitPixel*) Ptr; uchar a, o; for (int x=0; xx; x++) { a = lookup[*sa++]; if (a == 255) { sc = c + *s; d->r = sc->r; d->g = sc->g; d->b = sc->b; d->a = 255; } else if (a) { sc = c + *s; o = 0xff - a; d->r = DivLut[(d->r * o) + (sc->r * a)]; d->g = DivLut[(d->g * o) + (sc->g * a)]; d->b = DivLut[(d->b * o) + (sc->b * a)]; d->a = (a + d->a) - DivLut[a * d->a]; } s++; d++; } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } case System15BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); System32BitPixel *d = (System32BitPixel*) Ptr; for (int x=0; xx; x++) { uchar a = lookup[*sa++]; if (a == 255) { d->r = Rc15(*s); d->g = Gc15(*s); d->b = Bc15(*s); } else if (a) { uchar o = 255 - a; d->r = DivLut[(a * Rc15(*s)) + (o * d->r)]; d->g = DivLut[(a * Gc15(*s)) + (o * d->g)]; d->b = DivLut[(a * Bc15(*s)) + (o * d->b)]; } s++; d++; } Ptr += Dest->Line; } break; } case System16BitColourSpace: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); System32BitPixel *d = (System32BitPixel*) Ptr; for (int x=0; xx; x++) { uchar a = lookup[*sa++]; if (a == 255) { d->r = Rc16(*s); d->g = Gc16(*s); d->b = Bc16(*s); } else if (a) { uchar o = 255 - a; d->r = DivLut[(a * Rc16(*s)) + (o * d->r)]; d->g = DivLut[(a * Gc16(*s)) + (o * d->g)]; d->b = DivLut[(a * Bc16(*s)) + (o * d->b)]; } s++; d++; } Ptr += Dest->Line; } break; } case System24BitColourSpace: { for (int y=0; yy; y++) { uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); System32BitPixel *d = (System32BitPixel*) Ptr; System24BitPixel *s = (System24BitPixel*) (Src->Base + (y * Src->Line)); for (int x=0; xx; x++) { uchar a = lookup[*sa++]; if (a == 255) { d->r = s->r; d->g = s->g; d->b = s->b; } else if (a) { uchar o = 255 - a; d->r = DivLut[(a * s->r) + (o * d->r)]; d->g = DivLut[(a * s->g) + (o * d->g)]; d->b = DivLut[(a * s->b) + (o * d->b)]; } d++; s++; } Ptr += Dest->Line; } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *d = (System32BitPixel*) Ptr; System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); uchar *sa = SrcAlpha->Base + (y * SrcAlpha->Line); for (int x=0; xx; x++) { uchar a = lookup[*sa++]; if (a == 255) { d->r = s->r; d->g = s->g; d->b = s->b; d->a = 255; } else if (a) { uchar o = 255 - a; d->r = DivLut[(a * s->r) + (o * d->r)]; d->g = DivLut[(a * s->g) + (o * d->g)]; d->b = DivLut[(a * s->b) + (o * d->b)]; d->a = (s->a + d->a) - DivLut[s->a * d->a]; } d++; s++; } Ptr += Dest->Line; } break; } } } else { switch (Src->Cs) { default: { GUniversalBlt( System32BitColourSpace, Ptr, Dest->Line, Src->Cs, Src->Base, Src->Line, Src->x, Src->y); break; } case CsIndex8: { GRgb24 c[256]; CreatePaletteLut(c, SPal, alpha); for (int y=0; yy; y++) { uchar *s = (uchar*) (Src->Base + (y * Src->Line)); GRgb24 *sc; System32BitPixel *d = (System32BitPixel*) Ptr; if (alpha == 255) { for (int x=0; xx; x++) { sc = c + *s++; d->r = sc->r; d->g = sc->g; d->b = sc->b; d->a = 255; d++; } } else if (alpha) { for (int x=0; xx; x++) { sc = c + *s++; d->r = sc->r + DivLut[d->r * oma]; d->g = sc->g + DivLut[d->g * oma]; d->b = sc->b + DivLut[d->b * oma]; d->a = (alpha + d->a) - DivLut[alpha * d->a]; d++; } } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } case CsRgb15: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); ushort *e = s + Src->x; System32BitPixel *d = (System32BitPixel*) Ptr; while (s < e) { d->r = DivLut[(oma * d->r) + (alpha * Rc15(*s))]; d->g = DivLut[(oma * d->g) + (alpha * Gc15(*s))]; d->b = DivLut[(oma * d->b) + (alpha * Bc15(*s))]; s++; d++; } Ptr += Dest->Line; } break; } case CsRgb16: { for (int y=0; yy; y++) { ushort *s = (ushort*) (Src->Base + (y * Src->Line)); System32BitPixel *d = (System32BitPixel*) Ptr; if (alpha == 255) { for (int x=0; xx; x++) { d->r = Rc16(*s); d->g = Gc16(*s); d->b = Bc16(*s); d->a = 255; d++; s++; } } else if (alpha) { for (int x=0; xx; x++) { d->r = DivLut[(d->r * oma) + (Rc16(*s) * alpha)]; d->g = DivLut[(d->g * oma) + (Gc16(*s) * alpha)]; d->b = DivLut[(d->b * oma) + (Bc16(*s) * alpha)]; d->a = (alpha + d->a) - DivLut[alpha * d->a]; d++; s++; } } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } case CsBgr16: { for (int y=0; yy; y++) { GBgr16 *s = (GBgr16*) (Src->Base + (y * Src->Line)); System32BitPixel *d = (System32BitPixel*) Ptr; #define Comp5BitTo8Bit(c) \ (((uint8)(c) << 3) | ((c) >> 2)) #define Comp6BitTo8Bit(c) \ (((uint8)(c) << 2) | ((c) >> 4)) if (alpha == 255) { for (int x=0; xx; x++) { d->r = Comp5BitTo8Bit(s->r); d->g = Comp6BitTo8Bit(s->g); d->b = Comp5BitTo8Bit(s->b); d->a = 255; d++; s++; } } else if (alpha) { for (int x=0; xx; x++) { d->r = DivLut[(d->r * oma) + (Comp5BitTo8Bit(s->r) * alpha)]; d->g = DivLut[(d->g * oma) + (Comp6BitTo8Bit(s->g) * alpha)]; d->b = DivLut[(d->b * oma) + (Comp5BitTo8Bit(s->b) * alpha)]; d->a = (alpha + d->a) - DivLut[alpha * d->a]; d++; s++; } } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } case System24BitColourSpace: { for (int y=0; yy; y++) { System24BitPixel *s = (System24BitPixel*) (Src->Base + (y * Src->Line)); System32BitPixel *d = (System32BitPixel*) Ptr; if (alpha == 255) { for (int x=0; xx; x++) { d->r = s->r; d->g = s->g; d->b = s->b; d->a = 255; d++; s++; } } else if (alpha) { for (int x=0; xx; x++) { d->r = DivLut[(d->r * oma) + (s->r * alpha)]; d->g = DivLut[(d->g * oma) + (s->g * alpha)]; d->b = DivLut[(d->b * oma) + (s->b * alpha)]; d->a = (d->a * alpha) - DivLut[d->a * alpha]; d++; s++; } } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } case System32BitColourSpace: { for (int y=0; yy; y++) { System32BitPixel *s = (System32BitPixel*) (Src->Base + (y * Src->Line)); System32BitPixel *d = (System32BitPixel*) Ptr; if (alpha == 255) { // 32bit alpha channel blt for (int x=0; xx; x++) { if (s->a == 255) { *d = *s; } else if (s->a) { uchar o = 255 - s->a; int ra = (d->a + s->a) - DivLut[d->a * s->a]; #define rop(c) d->c = (DivLut[DivLut[d->c * d->a] * o] + DivLut[s->c * s->a]) * 255 / ra; rop(r); rop(g); rop(b); #undef rop d->a = ra; } d++; s++; } } else if (alpha) { // Const alpha + 32bit alpha channel blt for (int x=0; xx; x++) { uchar a = lookup[s->a]; uchar o = 255 - a; d->r = lookup[s->r] + DivLut[d->r * o]; d->g = lookup[s->g] + DivLut[d->g * o]; d->b = lookup[s->b] + DivLut[d->b * o]; d->a = (d->a + a) - DivLut[d->a * a]; d++; s++; } } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } case CsBgra64: { for (int y=0; yy; y++) { GBgra64 *s = (GBgra64*) (Src->Base + (y * Src->Line)); System32BitPixel *d = (System32BitPixel*) Ptr; if (alpha == 255) { // 32bit alpha channel blt GBgra64 *end = s + Src->x; while (s < end) { if (s->a == 0xffff) { d->r = s->r >> 8; d->g = s->g >> 8; d->b = s->b >> 8; d->a = s->a >> 8; } else if (s->a) { uint8 o = (0xffff - s->a) >> 8; uint8 dc, sc; Rgb16to8PreMul(r); Rgb16to8PreMul(g); Rgb16to8PreMul(b); } d++; s++; } } else if (alpha) { // Const alpha + 32bit alpha channel blt LgiAssert(0); /* for (int x=0; xx; x++) { uchar a = lookup[s->a]; uchar o = 255 - a; d->r = lookup[s->r] + DivLut[d->r * o]; d->g = lookup[s->g] + DivLut[d->g * o]; d->b = lookup[s->b] + DivLut[d->b * o]; d->a = (d->a + a) - DivLut[d->a * a]; d++; s++; } */ } Ptr = (((uchar*) Ptr) + Dest->Line); } break; } } } return true; } diff --git a/src/common/Gdc2/Tools/GdcTools.cpp b/src/common/Gdc2/Tools/GdcTools.cpp --- a/src/common/Gdc2/Tools/GdcTools.cpp +++ b/src/common/Gdc2/Tools/GdcTools.cpp @@ -1,791 +1,791 @@ /* ** FILE: DcTools.cpp ** AUTHOR: Matthew Allen ** DATE: 3/8/98 ** DESCRIPTION: Device context tools ** ** Copyright (C) 1998-2001, Matthew Allen ** fret@memecode.com */ #include #include "Gdc2.h" #include "GdcTools.h" #include "GPalette.h" bool IsGreyScale(GSurface *pDC) { bool Status = false; if (pDC) { GPalette *Pal = pDC->Palette(); Status = true; if (Pal && Pal->GetSize() > 0) { for (int i=0; iGetSize(); i++) { GdcRGB *p = (*Pal)[i]; if (p) { int Grey = i * 255 / Pal->GetSize(); if (p->r != Grey || p->g != Grey || p->b != Grey) { Status = false; } } } } } return Status; } #define FP_RED_TO_GREY 19595 // 0.299 * 65536 #define FP_GREEN_TO_GREY 38469 // 0.587 * 65536 #define FP_BLUE_TO_GREY 7471 // 0.114 * 65536 bool GreyScaleDC(GSurface *pDest, GSurface *pSrc) { bool Status = false; if (pDest && pSrc) { switch (pSrc->GetBits()) { case 8: { // 8 -> 8 greyscale convert if (pDest->Create(pSrc->X(), pSrc->Y(), 8)) { GPalette *Pal = pSrc->Palette(); if (Pal) { // convert palette uchar Map[256]; ZeroObj(Map); for (int i=0; iGetSize(); i++) { // Weights, r:.299, g:.587, b:.114 GdcRGB *n = (*Pal)[i]; if (n) { uint32 r = ((uint32) n->r << 16) * FP_RED_TO_GREY; uint32 g = ((uint32) n->g << 16) * FP_GREEN_TO_GREY; uint32 b = ((uint32) n->b << 16) * FP_BLUE_TO_GREY; Map[i] = (r + g + b) >> 16; n->r = n->g = n->b = i; } } Pal->Update(); pDest->Palette(Pal, true); Status = true; // convert pixels.. for (int y=0; yY(); y++) { uchar *s = (*pSrc)[y]; uchar *d = (*pDest)[y]; for (int x=0; xX(); x++) { d[x] = Map[s[x]]; } } } } break; } case 16: case 24: case 32: { if (pDest->Create(pSrc->X(), pSrc->Y(), 8)) { uchar RMap[256]; uchar GMap[256]; uchar BMap[256]; for (int i=0; i<256; i++) { RMap[i] = ((i << 16) * FP_RED_TO_GREY) >> 16; GMap[i] = ((i << 16) * FP_GREEN_TO_GREY) >> 16; BMap[i] = ((i << 16) * FP_BLUE_TO_GREY) >> 16; } int SBits = pSrc->GetBits(); for (int y=0; yY(); y++) { switch (SBits) { case 16: { ushort *Src = (ushort*) (*pSrc)[y]; uchar *Dest = (*pDest)[y]; for (int x=0; xX(); x++) { uchar r = R16(Src[x]) << 3; uchar g = G16(Src[x]) << 2; uchar b = B16(Src[x]) << 3; Dest[x] = RMap[r] + GMap[g] + BMap[b]; } break; } case 24: { uchar *Src = (*pSrc)[y]; uchar *Dest = (*pDest)[y]; for (int x=0; xX(); x++) { uchar *x3 = Src + ((x<<1) + x); Dest[x] = RMap[ x3[2] ] + GMap[ x3[1] ] + BMap[ x3[0] ]; } break; } case 32: { ulong *Src = (ulong*) (*pSrc)[y]; uchar *Dest = (*pDest)[y]; for (int x=0; xX(); x++) { uchar r = R32(Src[x]); uchar g = G32(Src[x]); uchar b = B32(Src[x]); Dest[x] = RMap[r] + GMap[g] + BMap[b]; } break; } } } GPalette *Pal = new GPalette(0, 256); if (Pal) { // convert palette for (int i=0; iGetSize(); i++) { GdcRGB *n = (*Pal)[i]; if (n) { n->r = n->g = n->b = i; } } pDest->Palette(Pal); Status = true; } } break; } } } return Status; } bool InvertDC(GSurface *pDC) { bool Status = true; if (pDC) { switch (pDC->GetBits()) { case 8: { if (IsGreyScale(pDC)) { for (int y=0; yY(); y++) { uchar *d = (*pDC)[y]; if (d) { for (int x=0; xX(); x++) { d[x] = 255 - d[x]; } } } Status = true; } else { GPalette *Pal = pDC->Palette(); if (Pal) { GdcRGB *p = (*Pal)[0]; if (p) { for (int i=0; iGetSize(); i++) { p[i].r = 255 - p[i].r; p[i].g = 255 - p[i].g; p[i].b = 255 - p[i].b; } Status = true; } } } break; } case 16: { for (int y=0; yY(); y++) { ushort *d = (ushort*) (*pDC)[y]; if (d) { for (int x=0; xX(); x++) { d[x] = ((31 - R16(d[x])) << 11) | ((63 - G16(d[x])) << 5) | ((31 - B16(d[x]))); } } } break; } case 24: { for (int y=0; yY(); y++) { uchar *d = (*pDC)[y]; if (d) { for (int x=0; xX(); x++) { - *d++ = 255 - *d; - *d++ = 255 - *d; - *d++ = 255 - *d; + *d = 255 - *d; d++; + *d = 255 - *d; d++; + *d = 255 - *d; d++; } } } break; } case 32: { for (int y=0; yY(); y++) { uchar *d = (*pDC)[y]; if (d) { for (int x=0; xX(); x++) { - *d++ = 255 - *d; - *d++ = 255 - *d; - *d++ = 255 - *d; + *d = 255 - *d; d++; + *d = 255 - *d; d++; + *d = 255 - *d; d++; d++; // leave alpha channel alone } } } break; } } } return Status; } bool FlipDC(GSurface *pDC, int Dir) { bool Status = false; if (pDC) { switch (Dir) { case FLIP_X: { for (int y=0; yY(); y++) { for (int x=0, nx=pDC->X()-1; xGet(x, y); pDC->Colour(pDC->Get(nx, y)); pDC->Set(x, y); pDC->Colour(c); pDC->Set(nx, y); } } Status = true; break; } case FLIP_Y: { for (int y=0, ny=pDC->Y()-1; yX(); x++) { COLOUR c = pDC->Get(x, y); pDC->Colour(pDC->Get(x, ny)); pDC->Set(x, y); pDC->Colour(c); pDC->Set(x, ny); } } Status = true; break; } } } return Status; } bool RotateDC(GSurface *pDC, double Angle) { if (!pDC) return false; GAutoPtr pOld(new GMemDC(pDC)); // do the rotation if (Angle == 180) { GSurface *pOldAlpha = pOld->AlphaDC(); GSurface *pAlpha = pDC->AlphaDC(); for (int y=0; yY(); y++) { for (int x=0; xX(); x++) { pDC->Colour(pOld->Get(x, y)); pDC->Set(pOld->X()-x-1, pOld->Y()-y-1); if (pOldAlpha && pAlpha) { pAlpha->Colour(pOldAlpha->Get(x, y)); pAlpha->Set(pOld->X()-x-1, pOld->Y()-y-1); } } } } else if (Angle == 90 || Angle == 270) { if (!pDC->Create(pOld->Y(), pOld->X(), pOld->GetBits())) return false; GSurface *pOldAlpha = pOld->AlphaDC(); if (pOldAlpha) { pDC->HasAlpha(true); } GSurface *pAlpha = pDC->AlphaDC(); if (Angle == 90) { for (int y=0; yY(); y++) { for (int x=0; xX(); x++) { pDC->Colour(pOld->Get(x, y)); pDC->Set(pDC->X()-y-1, x); if (pOldAlpha && pAlpha) { pAlpha->Colour(pOldAlpha->Get(x, y)); pAlpha->Set(pDC->X()-y-1, x); } } } } else { for (int y=0; yY(); y++) { int Dy = pDC->Y() - 1; for (int x=0; xX(); x++, Dy--) { pDC->Colour(pOld->Get(x, y)); pDC->Set(y, Dy); if (pOldAlpha && pAlpha) { pAlpha->Colour(pOldAlpha->Get(x, y)); pAlpha->Set(y, Dy); } } } } } else { // free angle return false; } return true; } bool FlipXDC(GSurface *pDC) { bool Status = false; if (pDC) { for (int y=0; yY(); y++) { int Sx = 0; int Ex = pDC->X()-1; for (; SxGet(Sx, y); pDC->Colour(pDC->Get(Ex, y)); pDC->Set(Sx, y); pDC->Colour(c); pDC->Set(Ex, y); } } Status = true; } return Status; } bool FlipYDC(GSurface *pDC) { bool Status = false; if (pDC) { for (int x=0; xX(); x++) { int Sy = 0; int Ey = pDC->Y()-1; for (; SyGet(x, Sy); pDC->Colour(pDC->Get(x, Ey)); pDC->Set(x, Sy); pDC->Colour(c); pDC->Set(x, Ey); } } Status = true; } return Status; } // Remaps DC to new palette bool RemapDC(GSurface *pDC, GPalette *DestPal) { bool Status = false; if (pDC && pDC->GetBits() <= 8 && DestPal) { GPalette *SrcPal = pDC->Palette(); int Colours = (SrcPal) ? SrcPal->GetSize() : 1 << pDC->GetBits(); uchar *Remap = new uchar[Colours]; if (Remap) { if (SrcPal) { for (int i=0; iMatchRgb(Rgb24(p->r, p->g, p->b)); } else { Remap[i] = 0; } } } else { for (int i=0; iMatchRgb(Rgb24(i, i, i)); } } for (int y=0; yY(); y++) { for (int x=0; xX(); x++) { pDC->Colour(Remap[pDC->Get(x, y)]); pDC->Set(x, y); } } Status = true; DeleteArray(Remap); } } return Status; } /* floating point resample code... double Area = 0.0; double R = 0.0; double G = 0.0; double B = 0.0; // Calc the right and bottom bounds of the original scale double x2 = ((double) Dx+1) * ScaleX; double y2 = ((double) Dy+1) * ScaleY; // Loop through the source pixel(s) and sum all the area // and RGB data for (double x = (double) Dx * ScaleX; xGet((int)x, (int)y), pSrc->GetBits(), pPal); // Calculate bounds of source pixel double Fx, Fy, j; Fx = modf(x, &j); double Width = (x2 < ceil(x)) ? x2 - j : 1.0; Fy = modf(y, &j); double Height = (y2 < ceil(y)) ? y2 - j : 1.0; // Calculate area double a = (Width-Fx) * (Height-Fy); // Add the colour and area to the running total R += a * R24(c); G += a * G24(c); B += a * B24(c); Area += a; } } R /= Area; G /= Area; B /= Area; COLOUR c = Rgb24( ((int)R), ((int)G), ((int)B) ); pDest->Colour(CBit(pDest->GetBits(), c, 24)); pDest->Set(Dx, Dy); */ bool ResampleDC(GSurface *pDest, GSurface *pSrc, GRect *FromRgn, Progress *Prog) { if (!pDest || !pSrc) return false; GRect Full(0, 0, pSrc->X()-1, pSrc->Y()-1), Sr; if (FromRgn) { Sr = *FromRgn; Sr.Bound(&Full); } else { Sr = Full; } double ScaleX = (double) Sr.X() / pDest->X(); double ScaleY = (double) Sr.Y() / pDest->Y(); int Sx = (int) (ScaleX * 256.0); int Sy = (int) (ScaleY * 256.0); int SrcBits = pSrc->GetBits(); int OutBits = pDest->GetBits() == 32 ? 32 : 24; RgbLut ToLinear(RgbLutLinear, RgbLutSRGB); RgbLut ToSRGB(RgbLutSRGB, RgbLutLinear); if (Prog) { Prog->SetDescription("Resampling image..."); Prog->SetLimits(0, pDest->Y()-1); } Sr.x1 <<= 8; Sr.y1 <<= 8; Sr.x2 <<= 8; Sr.y2 <<= 8; GPalette *DestPal = pDest->Palette(); System32BitPixel pal8[256]; if (pSrc->GetBits() <= 8) { GPalette *p = pSrc->Palette(); for (int i=0; i<256; i++) { if (p && i < p->GetSize()) { GdcRGB *rgb = (*p)[i]; pal8[i].r = rgb->r; pal8[i].g = rgb->g; pal8[i].b = rgb->b; } else { pal8[i].r = i; pal8[i].g = i; pal8[i].b = i; } pal8[i].a = 255; } } // For each destination pixel GSurface *pAlpha = pSrc->AlphaDC(); bool HasDestAlpha = pDest->GetBits() == 32 || pDest->GetBits() == 64; for (int Dy = 0; DyY(); Dy++) { for (int Dx = 0; DxX(); Dx++) { uint64 Area = 0; uint64 R = 0; uint64 G = 0; uint64 B = 0; uint64 A = 0; uint64 a; int NextX = (Dx+1)*Sx+Sr.x1; int NextY = (Dy+1)*Sy+Sr.y1; int Nx, Ny; COLOUR c; uint16 *lin = ToLinear.Lut; switch (pSrc->GetBits()) { case 32: { for (int y=Dy*Sy+Sr.y1; yGet(x >> 8, y >> 8); a = (Nx - x) * (Ny - y); // Add the colour and area to the running total R += a * lin[R32(c)]; G += a * lin[G32(c)]; B += a * lin[B32(c)]; A += a * lin[A32(c)]; Area += a; } } break; } case 8: { for (int y=Dy*Sy+Sr.y1; y> 8; SrcY = y >> 8; c = pSrc->Get(SrcX, SrcY); Alpha = pAlpha->Get(SrcX, SrcY); a = (Nx - x) * (Ny - y); // Add the colour and area to the running total R += a * lin[pal8[c].r]; G += a * lin[pal8[c].g]; B += a * lin[pal8[c].b]; A += a * lin[Alpha]; Area += a; } } else { for (int x=Dx*Sx+Sr.x1; xGet(x>>8, y>>8); a = (Nx - x) * (Ny - y); // Add the colour and area to the running total R += a * lin[pal8[c].r]; G += a * lin[pal8[c].g]; B += a * lin[pal8[c].b]; Area += a; } } } break; } default: { for (int y=Dy*Sy+Sr.y1; yGet(x>>8, y>>8), SrcBits); a = (Nx - x) * (Ny - y); // Add the colour and area to the running total R += a * lin[R24(c)]; G += a * lin[G24(c)]; B += a * lin[B24(c)]; Area += a; } } break; } } if (Area) { R /= Area; G /= Area; B /= Area; if (HasDestAlpha) { A /= Area; c = Rgba32( ToSRGB.Lut[R], ToSRGB.Lut[G], ToSRGB.Lut[B], ToSRGB.Lut[A]); } else { c = Rgb24( ToSRGB.Lut[R], ToSRGB.Lut[G], ToSRGB.Lut[B]); } } else { c = 0; } if (DestPal) { c = DestPal->MatchRgb(c); pDest->Colour(c); } else { pDest->Colour(c, OutBits); } pDest->Set(Dx, Dy); } if (Prog) { Prog->Value(Dy); } } return true; } diff --git a/src/common/Lgi/GCss.cpp b/src/common/Lgi/GCss.cpp --- a/src/common/Lgi/GCss.cpp +++ b/src/common/Lgi/GCss.cpp @@ -1,2633 +1,2634 @@ #include #include "GCss.h" #include "LgiCommon.h" #define DEBUG_CSS_LOGGING 0 #define IsWhite(s) ((s) && strchr(WhiteSpace, (s)) != NULL) #define SkipWhite(s) while (IsWhite(*s)) s++; #undef IsNumeric #define IsNumeric(s) \ ( \ (*(s)) && \ ( \ strchr("-.", *(s)) || \ (*(s) >= '0' && *(s) <= '9') \ ) \ ) #undef IsAlpha #define IsAlpha(s) \ ( \ ((s) >= 'a' && (s) <= 'z') || \ ((s) >= 'A' && (s) <= 'Z') || \ (((uint8)s) > 0xa0) \ ) #define CopyPropOnSave(Type, Id) \ { \ Type *e = (Type*)Props.Find(Id); \ if (e) *e = *(t); \ else Props.Add(Id, new Type(*(t))); \ } #define ReleasePropOnSave(Type, Id) \ { \ Type *e = (Type*)Props.Find(Id); \ if (e) *e = *(t); \ else Props.Add(Id, (t).Release()); \ } GHashTbl GCss::Lut(0, false); GHashTbl GCss::ParentProp; const char *GCss::PropName(PropType p) { const char *s; for (PropType t = Lut.First(&s); t; t = Lut.Next(&s)) { if (p == t) return s; } LgiAssert(!"Add this field to the LUT"); return 0; } ///////////////////////////////////////////////////////////////////////////// static bool ParseWord(const char *&s, const char *word) { const char *doc = s; while (*doc && *word) { if (tolower(*doc) == tolower(*word)) { doc++; word++; } else return false; } if (*word) return false; if (*doc && (IsAlpha(*doc) || IsDigit(*doc))) return false; s = doc; return true; } bool ParseProp(char *&s, char *w) { char *doc = s; char *word = w; while (*doc && *word) { if (tolower(*doc) == tolower(*word)) { doc++; word++; } else return false; } if (*word) return false; SkipWhite(doc); if (*doc != ':') return false; s = doc + 1; return true; } static int ParseComponent(const char *&s) { int ret = 0; SkipWhite(s); if (!strnicmp(s, "0x", 2)) { ret = htoi(s); while (*s && (IsDigit(*s) || *s == 'x' || *s == 'X')) s++; } else { ret = atoi(s); while (*s && (IsDigit(*s) || *s == '.' || *s == '-')) s++; SkipWhite(s); if (*s == '%') { s++; ret = ret * 255 / 100; } } SkipWhite(s); return ret; } static char *ParseString(const char *&s) { char *ret = 0; if (*s == '\'' || *s == '\"') { char delim = *s++; char *e = strchr((char*)s, delim); if (!e) return 0; ret = NewStr(s, e - s); s = e + 1; } else { const char *e = s; while (*e && (IsAlpha(*e) || IsDigit(*e) || strchr("_-", *e))) e++; ret = NewStr(s, e - s); s = e; } return ret; } ///////////////////////////////////////////////////////////////////////////// GCss::GCss() : Props(0, false, PropNull) { if (Lut.Length() == 0) { Lut.Add("border-collapse", PropBorderCollapse); Lut.Add("letter-spacing", PropLetterSpacing); Lut.Add("word-wrap", PropWordWrap); Lut.Add("list-style", PropListStyle); Lut.Add("list-style-type", PropListStyleType); Lut.Add("text-align", PropTextAlign); Lut.Add("text-decoration", PropTextDecoration); Lut.Add("display", PropDisplay); Lut.Add("float", PropFloat); Lut.Add("position", PropPosition); Lut.Add("overflow", PropOverflow); Lut.Add("visibility", PropVisibility); Lut.Add("font", PropFont); Lut.Add("font-size", PropFontSize); Lut.Add("fontsize", PropFontSize); // Really, do we need this in the real world?? Lut.Add("font-style", PropFontStyle); Lut.Add("font-variant", PropFontVariant); Lut.Add("font-weight", PropFontWeight); Lut.Add("z-index", PropZIndex); Lut.Add("width", PropWidth); Lut.Add("min-width", PropMinWidth); Lut.Add("max-width", PropMaxWidth); Lut.Add("height", PropHeight); Lut.Add("min-height", PropMinHeight); Lut.Add("max-height", PropMaxHeight); Lut.Add("top", PropTop); Lut.Add("right", PropRight); Lut.Add("bottom", PropBottom); Lut.Add("left", PropLeft); Lut.Add("margin", PropMargin); Lut.Add("margin-top", PropMarginTop); Lut.Add("margin-right", PropMarginRight); Lut.Add("margin-bottom", PropMarginBottom); Lut.Add("margin-left", PropMarginLeft); Lut.Add("padding", PropPadding); Lut.Add("padding-top", PropPaddingTop); Lut.Add("padding-right", PropPaddingRight); Lut.Add("padding-bottom", PropPaddingBottom); Lut.Add("padding-left", PropPaddingLeft); Lut.Add("background", PropBackground); Lut.Add("background-color", PropBackgroundColor); Lut.Add("background-image", PropBackgroundImage); Lut.Add("background-repeat", PropBackgroundRepeat); Lut.Add("background-attachment", PropBackgroundAttachment); Lut.Add("background-x", PropBackgroundX); Lut.Add("background-y", PropBackgroundY); Lut.Add("background-position", PropBackgroundPos); Lut.Add("border", PropBorder); Lut.Add("border-style", PropBorderStyle); Lut.Add("border-color", PropBorderColor); Lut.Add("border-top", PropBorderTop); Lut.Add("border-top-color", PropBorderTopColor); Lut.Add("border-top-style", PropBorderTopStyle); Lut.Add("border-top-width", PropBorderTopWidth); Lut.Add("border-right", PropBorderRight); Lut.Add("border-right-color", PropBorderRightColor); Lut.Add("border-right-style", PropBorderRightStyle); Lut.Add("border-right-width", PropBorderRightWidth); Lut.Add("border-bottom", PropBorderBottom); Lut.Add("border-bottom-color", PropBorderBottomColor); Lut.Add("border-bottom-style", PropBorderBottomStyle); Lut.Add("border-bottom-width", PropBorderBottomWidth); Lut.Add("border-left", PropBorderLeft); Lut.Add("border-left-color", PropBorderLeftColor); Lut.Add("border-left-style", PropBorderLeftStyle); Lut.Add("border-left-width", PropBorderLeftWidth); Lut.Add("line-height", PropLineHeight); Lut.Add("vertical-align", PropVerticalAlign); Lut.Add("clip", PropClip); Lut.Add("x-rect", PropXSubRect); Lut.Add("color", PropColor); Lut.Add("font-family", PropFontFamily); } if (ParentProp.Length() == 0) { ParentProp.Add(PropBorderTopColor, PropBorderTop); ParentProp.Add(PropBorderTopStyle, PropBorderTop); ParentProp.Add(PropBorderTopWidth, PropBorderTop); ParentProp.Add(PropBorderLeftColor, PropBorderLeft); ParentProp.Add(PropBorderLeftStyle, PropBorderLeft); ParentProp.Add(PropBorderLeftWidth, PropBorderLeft); ParentProp.Add(PropBorderRightColor, PropBorderRight); ParentProp.Add(PropBorderRightStyle, PropBorderRight); ParentProp.Add(PropBorderRightWidth, PropBorderRight); ParentProp.Add(PropBorderBottomColor, PropBorderBottom); ParentProp.Add(PropBorderBottomStyle, PropBorderBottom); ParentProp.Add(PropBorderBottomWidth, PropBorderBottom); /* ParentProp.Add(PropBackgroundColor, PropBackground); ParentProp.Add(PropBackgroundImage, PropBackground); ParentProp.Add(PropBackgroundRepeat, PropBackground); ParentProp.Add(PropBackgroundAttachment, PropBackground); ParentProp.Add(PropBackgroundX, PropBackground); ParentProp.Add(PropBackgroundY, PropBackground); */ } } GCss::GCss(const GCss &c) : Props(0, false, PropNull) { *this = c; } GCss::~GCss() { Empty(); } int GCss::Len::ToPx(int Box, GFont *Font, int Dpi) { switch (Type) { default: case LenInherit: return 0; case LenAuto: case LenNormal: case LenPx: return (int)Value; case LenPt: return (int) (Value * Dpi / 72.0); case LenCm: return (int) (Value * Dpi / 2.54); case LenEm: return (int) (Value * (Font ? Font->GetHeight() : 18)); case LenEx: return (int) (Value * (Font ? Font->Ascent() : 18)); // haha I don't care. case LenPercent: return (int) (Box * Value / 100.0); } } bool GCss::Len::ToString(GStream &p) { const char *Unit = 0; switch (Type) { case LenPx: Unit = "px"; break; case LenPt: Unit = "pt"; break; case LenEm: Unit = "em"; break; case LenEx: Unit = "ex"; break; case LenPercent: Unit = "%"; break; default: break; } if (Unit) { return p.Print("%g%s", Value, Unit) > 0; } switch (Type) { case LenInherit: Unit = "Inherit"; break; case LenAuto: Unit = "Auto"; break; case LenNormal: Unit = "Normal"; break; case AlignLeft: Unit = "left"; break; case AlignRight: Unit = "right"; break; case AlignCenter: Unit = "center"; break; case AlignJustify: Unit = "justify"; break; case VerticalBaseline: Unit = "baseline"; break; case VerticalSub: Unit = "sub"; break; case VerticalSuper: Unit = "super"; break; case VerticalTop: Unit = "top"; break; case VerticalTextTop: Unit = "text-top"; break; case VerticalMiddle: Unit = "middle"; break; case VerticalBottom: Unit = "bottom"; break; case VerticalTextBottom: Unit = "text-bottom"; break; default: break; } if (!Unit) { LgiAssert(!"Impl missing length enum."); return false; } return p.Print("%s", Unit) > 0; } bool GCss::ColorDef::ToString(GStream &p) { switch (Type) { case ColorInherit: { break; } case ColorRgb: { p.Print("#%02.2x%02.2x%02.2x", R32(Rgb32), G32(Rgb32), B32(Rgb32)); break; } default: { LgiAssert(!"Impl me."); return false; } } return true; } GAutoString GCss::ToString() { GStringPipe p; PropType Prop; for (void *v = Props.First((int*)&Prop); v; v = Props.Next((int*)&Prop)) { switch (Prop >> 8) { case TypeEnum: { const char *s = 0; const char *Name = PropName(Prop); switch (Prop) { case PropFontWeight: { FontWeightType *b = (FontWeightType*)v; switch (*b) { case FontWeightInherit: s = "inherit"; break; case FontWeightNormal: s = "normal"; break; case FontWeightBold: s = "bold"; break; case FontWeightBolder: s = "bolder"; break; case FontWeightLighter: s = "lighter"; break; case FontWeight100: s = "100"; break; case FontWeight200: s = "200"; break; case FontWeight300: s = "300"; break; case FontWeight400: s = "400"; break; case FontWeight500: s = "500"; break; case FontWeight600: s = "600"; break; case FontWeight700: s = "700"; break; case FontWeight800: s = "800"; break; case FontWeight900: s = "900"; break; } break; } case PropFontStyle: { FontStyleType *t = (FontStyleType*)v; switch (*t) { case FontStyleInherit: s = "inherit"; break; case FontStyleNormal: s = "normal"; break; case FontStyleItalic: s = "italic"; break; case FontStyleOblique: s = "oblique"; break; } break; } case PropTextDecoration: { TextDecorType *d = (TextDecorType*)v; switch (*d) { case TextDecorInherit: s= "inherit"; break; case TextDecorNone: s= "none"; break; case TextDecorUnderline: s= "underline"; break; case TextDecorOverline: s= "overline"; break; case TextDecorLineThrough: s= "line-Through"; break; case TextDecorBlink: s= "blink"; break; } break; } case PropDisplay: { DisplayType *d = (DisplayType*)v; switch (*d) { case DispInherit: s = "inherit"; break; case DispBlock: s = "block"; break; case DispInline: s = "inline"; break; case DispInlineBlock: s = "inline-block"; break; case DispListItem: s = "list-item"; break; case DispNone: s = "none"; break; } break; } case PropFloat: { FloatType *d = (FloatType*)v; switch (*d) { case FloatInherit: s = "inherit"; break; case FloatLeft: s = "left"; break; case FloatRight: s = "right"; break; case FloatNone: s = "none"; break; } break; } case PropPosition: { PositionType *d = (PositionType*)v; switch (*d) { case PosInherit: s = "inherit"; break; case PosStatic: s = "static"; break; case PosRelative: s = "relative"; break; case PosAbsolute: s = "absolute"; break; case PosFixed: s = "fixed"; break; } break; } case PropOverflow: { OverflowType *d = (OverflowType*)v; switch (*d) { case OverflowInherit: s = "inherit"; break; case OverflowVisible: s = "visible"; break; case OverflowHidden: s = "hidden"; break; case OverflowScroll: s = "scroll"; break; case OverflowAuto: s = "auto"; break; } break; } case PropVisibility: { VisibilityType *d = (VisibilityType*)v; switch (*d) { case VisibilityInherit: s = "inherit"; break; case VisibilityVisible: s = "visible"; break; case VisibilityHidden: s = "hidden"; break; case VisibilityCollapse: s = "collapse"; break; } break; } case PropFontVariant: { FontVariantType *d = (FontVariantType*)v; switch (*d) { case FontVariantInherit: s = "inherit"; break; case FontVariantNormal: s = "normal"; break; case FontVariantSmallCaps: s = "small-caps"; break; } break; } case PropBackgroundRepeat: { RepeatType *d = (RepeatType*)v; switch (*d) { default: s = "inherit"; break; case RepeatBoth: s = "repeat"; break; case RepeatX: s = "repeat-x"; break; case RepeatY: s = "repeat-y"; break; case RepeatNone: s = "none"; break; } break; } case PropBackgroundAttachment: { AttachmentType *d = (AttachmentType*)v; switch (*d) { default: s = "inherit"; break; case AttachmentScroll: s = "scroll"; break; case AttachmentFixed: s = "fixed"; break; } break; } case PropListStyleType: { ListStyleTypes *w = (ListStyleTypes*)v; switch (*w) { default: s = "inherit"; break; case ListNone: s = "none"; break; case ListDisc: s = "disc"; break; case ListCircle: s = "circle"; break; case ListSquare: s = "square"; break; case ListDecimal: s = "decimal"; break; case ListDecimalLeadingZero: s = "decimalleadingzero"; break; case ListLowerRoman: s = "lowerroman"; break; case ListUpperRoman: s = "upperroman"; break; case ListLowerGreek: s = "lowergreek"; break; case ListUpperGreek: s = "uppergreek"; break; case ListLowerAlpha: s = "loweralpha"; break; case ListUpperAlpha: s = "upperalpha"; break; case ListArmenian: s = "armenian"; break; case ListGeorgian: s = "georgian"; break; } break; } case PropBorderCollapse: { BorderCollapseType *w = (BorderCollapseType*)v; switch (*w) { default: s = "inherit"; break; case CollapseCollapse: s = "Collapse"; break; case CollapseSeparate: s = "Separate"; break; } break; } default: { LgiAssert(!"Impl me."); break; } } if (s) p.Print("%s: %s;\n", Name, s); break; } case TypeLen: { Len *l = (Len*)v; const char *Name = PropName(Prop); p.Print("%s: ", Name); l->ToString(p); p.Print(";\n"); break; } case TypeGRect: { GRect *r = (GRect*)v; const char *Name = PropName(Prop); p.Print("%s: rect(%ipx,%ipx,%ipx,%ipx);\n", Name, r->y1, r->x2, r->y2, r->x1); break; } case TypeColor: { ColorDef *c = (ColorDef*)v; const char *Name = PropName(Prop); p.Print("%s: ", Name); c->ToString(p); p.Print(";\n"); break; } case TypeImage: { ImageDef *i = (ImageDef*)v; const char *Name = PropName(Prop); switch (i->Type) { case ImageInherit: { p.Print("%s: inherit;\n", Name); break; } case ImageOwn: case ImageRef: { if (i->Uri) p.Print("%s: url(%s);\n", Name, i->Uri.Get()); break; } default: break; } break; } case TypeBorder: { BorderDef *b = (BorderDef*)v; const char *Name = PropName(Prop); p.Print("%s:", Name); b->ToString(p); const char *s = 0; switch (b->Style) { case BorderNone: s = "none"; break; case BorderHidden: s = "hidden"; break; case BorderDotted: s = "dotted"; break; case BorderDashed: s = "dashed"; break; case BorderDouble: s = "double"; break; case BorderGroove: s = "groove"; break; case BorderRidge: s = "ridge"; break; case BorderInset: s = "inset"; break; case BorderOutset: s = "outset"; break; default: case BorderSolid: s = "solid"; break; } p.Print(" %s", s); if (b->Color.Type != ColorInherit) { p.Print(" "); b->Color.ToString(p); } p.Print(";\n"); break; } case TypeStrings: { StringsDef *s = (StringsDef*)v; const char *Name = PropName(Prop); p.Print("%s: ", Name); for (int i=0; iLength(); i++) { p.Print("%s%s", i?",":"", (*s)[i]); } p.Print(";\n"); break; } default: { LgiAssert(!"Invalid type."); break; } } } return GAutoString(p.NewStr()); } bool GCss::InheritCollect(GCss &c, PropMap &Contrib) { int StillInherit = 0; int p; for (PropArray *a = Contrib.First(&p); a; a = Contrib.Next(&p)) { switch (p >> 8) { #define InheritEnum(prop, type, inherit) \ case prop: \ { \ type *Mine = (type*)Props.Find(p); \ if (!Mine || *Mine == inherit) \ { \ type *Theirs = (type*)c.Props.Find(p); \ if (Theirs) \ { \ if (!Mine) Props.Add(p, Mine = new type); \ *Mine = *Theirs; \ } \ else StillInherit++; \ } \ break; \ } #define InheritClass(prop, type, inherit) \ case prop: \ { \ type *Mine = (type*)Props.Find(p); \ if (!Mine || Mine->Type == inherit) \ { \ type *Theirs = (type*)c.Props.Find(p); \ if (Theirs) \ { \ if (!Mine) Props.Add(p, Mine = new type); \ *Mine = *Theirs; \ } \ else StillInherit++; \ } \ break; \ } case TypeEnum: { switch (p) { InheritEnum(PropFontStyle, FontStyleType, FontStyleInherit); InheritEnum(PropFontVariant, FontVariantType, FontVariantInherit); InheritEnum(PropFontWeight, FontWeightType, FontWeightInherit); InheritEnum(PropTextDecoration, TextDecorType, TextDecorInherit); default: { LgiAssert(!"Not impl."); break; } } break; } case TypeLen: { Len *Mine = (Len*)Props.Find(p); if (!Mine || Mine->IsDynamic()) { Len *Cur = (Len*)c.Props.Find(p); if (Cur && Cur->Type != LenInherit) { if (!Mine) Props.Add(p, Mine = new Len); *Mine = *Cur; a->Add(Cur); } else StillInherit++; } break; } case TypeGRect: { GRect *Mine = (GRect*)Props.Find(p); if (!Mine || !Mine->Valid()) { GRect *Theirs = (GRect*)c.Props.Find(p); if (Theirs) { if (!Mine) Props.Add(p, Mine = new GRect); *Mine = *Theirs; } else StillInherit++; } break; } case TypeStrings: { StringsDef *Mine = (StringsDef*)Props.Find(p); if (!Mine || Mine->Length() == 0) { StringsDef *Theirs = (StringsDef*)c.Props.Find(p); if (Theirs) { if (!Mine) Props.Add(p, Mine = new StringsDef); *Mine = *Theirs; } else StillInherit++; } break; } InheritClass(TypeColor, ColorDef, ColorInherit); InheritClass(TypeImage, ImageDef, ImageInherit); InheritClass(TypeBorder, BorderDef, LenInherit); default: { LgiAssert(!"Not impl."); break; } } } return StillInherit > 0; } bool GCss::InheritResolve(PropMap &Contrib) { int p; for (PropArray *a = Contrib.First(&p); a; a = Contrib.Next(&p)) { switch (p >> 8) { case TypeLen: { Len *Mine = (Len*)Props.Find(p); for (int i=a->Length()-1; i>=0; i--) { Len *Cur = (Len*)(*a)[i]; if (Cur->IsDynamic()) { switch (Cur->Type) { case SizeSmaller: { switch (Mine->Type) { case LenPt: case LenPx: { Mine->Value = Mine->Value - 1; break; } case SizeXXSmall: { // No smaller sizes.. break; } case SizeXSmall: { Mine->Value = SizeXXSmall; break; } case SizeSmall: { Mine->Value = SizeXSmall; break; } case SizeMedium: { Mine->Value = SizeSmall; break; } case SizeLarge: { Mine->Value = SizeMedium; break; } case SizeXLarge: { Mine->Value = SizeLarge; break; } case SizeXXLarge: { Mine->Value = SizeXLarge; break; } default: { LgiAssert(!"Not impl"); break; } } break; } case SizeLarger: { switch (Mine->Type) { case LenPt: case LenPx: { Mine->Value = Mine->Value + 1; break; } case SizeXXSmall: { Mine->Value = SizeXSmall; break; } case SizeXSmall: { Mine->Value = SizeSmall; break; } case SizeSmall: { Mine->Value = SizeMedium; break; } case SizeMedium: { Mine->Value = SizeLarge; break; } case SizeLarge: { Mine->Value = SizeXLarge; break; } case SizeXLarge: { Mine->Value = SizeXXLarge; break; } case SizeXXLarge: { // No higher sizess... break; } default: { LgiAssert(!"Not impl"); break; } } break; } case LenPercent: { switch (Mine->Type) { case LenPt: case LenPercent: case LenPx: case LenEm: case LenEx: case LenCm: { Mine->Value *= Cur->Value / 100; break; } default: { LgiAssert(!"Not impl"); break; } } break; } default: { LgiAssert(!"Not impl"); break; } } } else { *Mine = *Cur; } } break; } } } return false; } bool GCss::CopyStyle(const GCss &c) { Empty(); int Prop; GCss &cc = (GCss&)c; for (void *p=cc.Props.First(&Prop); p; p=cc.Props.Next(&Prop)) { switch (Prop >> 8) { #define CopyProp(TypeId, Type) \ case TypeId: \ { \ Type *n = new Type; \ *n = *(Type*)p; \ Props.Add(Prop, n); \ break; \ } case TypeEnum: { void *n = new DisplayType; *(uint32*)n = *(uint32*)p; Props.Add(Prop, n); break; } CopyProp(TypeLen, Len); CopyProp(TypeGRect, GRect); CopyProp(TypeColor, ColorDef); CopyProp(TypeImage, ImageDef); CopyProp(TypeBorder, BorderDef); CopyProp(TypeStrings, StringsDef); default: { LgiAssert(!"Invalidate property type."); return false; } } } return true; } bool GCss::operator ==(GCss &c) { if (Props.Length() != c.Props.Length()) return false; // Check individual types bool Eq = true; PropType Prop; for (void *Local=Props.First((int*)&Prop); Local && Eq; Local=Props.Next((int*)&Prop)) { void *Other = c.Props.Find(Prop); if (!Other) return false; switch (Prop >> 8) { #define CmpType(id, type) \ case id: \ { \ if ( *((type*)Local) != *((type*)Other)) \ Eq = false; \ break; \ } CmpType(TypeEnum, uint32); CmpType(TypeLen, Len); CmpType(TypeGRect, GRect); CmpType(TypeColor, ColorDef); CmpType(TypeImage, ImageDef); CmpType(TypeBorder, BorderDef); CmpType(TypeStrings, StringsDef); default: LgiAssert(!"Unknown type."); break; } } return Eq; } void GCss::DeleteProp(PropType p) { void *Data = Props.Find(p); if (Data) { DeleteProp(p, Data); Props.Delete(p); } } void GCss::DeleteProp(PropType Prop, void *Data) { if (!Data) return; int Type = Prop >> 8; switch (Type) { case TypeEnum: delete ((PropType*)Data); break; case TypeLen: delete ((Len*)Data); break; case TypeGRect: delete ((GRect*)Data); break; case TypeColor: delete ((ColorDef*)Data); break; case TypeImage: delete ((ImageDef*)Data); break; case TypeBorder: delete ((BorderDef*)Data); break; case TypeStrings: delete ((StringsDef*)Data); break; default: LgiAssert(!"Unknown property type."); break; } } void GCss::Empty() { int Prop; for (void *Data=Props.First(&Prop); Data; Data=Props.Next(&Prop)) { DeleteProp((PropType)Prop, Data); } Props.Empty(); } void GCss::OnChange(PropType Prop) { } bool GCss::ParseFontStyle(PropType PropId, const char *&s) { FontStyleType *w = (FontStyleType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new FontStyleType); if (ParseWord(s, "inherit")) *w = FontStyleInherit; else if (ParseWord(s, "normal")) *w = FontStyleNormal; else if (ParseWord(s, "italic")) *w = FontStyleItalic; else if (ParseWord(s, "oblique")) *w = FontStyleOblique; else { Props.Delete(PropId); DeleteObj(w); return false; } return true; } bool GCss::ParseFontVariant(PropType PropId, const char *&s) { FontVariantType *w = (FontVariantType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new FontVariantType); if (ParseWord(s, "inherit")) *w = FontVariantInherit; else if (ParseWord(s, "normal")) *w = FontVariantNormal; else if (ParseWord(s, "small-caps")) *w = FontVariantSmallCaps; else { Props.Delete(PropId); DeleteObj(w); return false; } return true; } bool GCss::ParseFontWeight(PropType PropId, const char *&s) { FontWeightType *w = (FontWeightType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new FontWeightType); if (ParseWord(s, "Inherit")) *w = FontWeightInherit; else if (ParseWord(s, "Normal")) *w = FontWeightNormal; else if (ParseWord(s, "Bold")) *w = FontWeightBold; else if (ParseWord(s, "Bolder")) *w = FontWeightBolder; else if (ParseWord(s, "Lighter")) *w = FontWeightLighter; else if (ParseWord(s, "100")) *w = FontWeight100; else if (ParseWord(s, "200")) *w = FontWeight200; else if (ParseWord(s, "300")) *w = FontWeight300; else if (ParseWord(s, "400")) *w = FontWeight400; else if (ParseWord(s, "500")) *w = FontWeight500; else if (ParseWord(s, "600")) *w = FontWeight600; else if (ParseWord(s, "700")) *w = FontWeight700; else if (ParseWord(s, "800")) *w = FontWeight800; else if (ParseWord(s, "900")) *w = FontWeight900; else { Props.Delete(PropId); DeleteObj(w); return false; } return true; } bool GCss::ParseBackgroundRepeat(const char *&s) { RepeatType *w = (RepeatType*)Props.Find(PropBackgroundRepeat); if (!w) Props.Add(PropBackgroundRepeat, w = new RepeatType); if (ParseWord(s, "inherit")) *w = RepeatInherit; else if (ParseWord(s, "repeat-x")) *w = RepeatX; else if (ParseWord(s, "repeat-y")) *w = RepeatY; else if (ParseWord(s, "no-repeat")) *w = RepeatNone; else if (ParseWord(s, "repeat")) *w = RepeatBoth; else return false; return true; } bool GCss::Parse(const char *&s, ParsingStyle Type) { if (!s) return false; while (*s && *s != '}') { // Parse the prop name out while (*s && !IsAlpha(*s) && !strchr("-_", *s)) s++; char Prop[64], *p = Prop, *end = Prop + sizeof(Prop) - 1; if (!*s) break; while (*s && (IsAlpha(*s) || strchr("-_", *s))) { if (p < end) *p++ = *s++; else s++; } *p++ = 0; SkipWhite(s); if (*s != ':') return false; s++; PropType PropId = Lut.Find(Prop); PropTypes PropType = (PropTypes)((int)PropId >> 8); SkipWhite(s); const char *ValueStart = s; // Do the data parsing based on type switch (PropType) { case TypeEnum: { switch (PropId) { case PropDisplay: { DisplayType *t = (DisplayType*)Props.Find(PropId); if (!t) Props.Add(PropId, t = new DisplayType); if (ParseWord(s, "block")) *t = DispBlock; else if (ParseWord(s, "inline-block")) *t = DispInlineBlock; else if (ParseWord(s, "inline")) *t = DispInline; else if (ParseWord(s, "list-item")) *t = DispListItem; else if (ParseWord(s, "none")) *t = DispNone; else *t = DispInherit; break; } case PropPosition: { PositionType *t = (PositionType*)Props.Find(PropId); if (!t) Props.Add(PropId, t = new PositionType); if (ParseWord(s, "static")) *t = PosStatic; else if (ParseWord(s, "relative")) *t = PosRelative; else if (ParseWord(s, "absolute")) *t = PosAbsolute; else if (ParseWord(s, "fixed")) *t = PosFixed; else *t = PosInherit; break; } case PropFloat: { FloatType *t = (FloatType*)Props.Find(PropId); if (!t) Props.Add(PropId, t = new FloatType); if (ParseWord(s, "left")) *t = FloatLeft; else if (ParseWord(s, "right")) *t = FloatRight; else if (ParseWord(s, "none")) *t = FloatNone; else *t = FloatInherit; break; } case PropFontStyle: { ParseFontStyle(PropId, s); break; } case PropFontVariant: { ParseFontVariant(PropId, s); break; } case PropFontWeight: { ParseFontWeight(PropId, s); break; } case PropTextDecoration: { TextDecorType *w = (TextDecorType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new TextDecorType); if (ParseWord(s, "inherit")) *w = TextDecorInherit; else if (ParseWord(s, "none")) *w = TextDecorNone; else if (ParseWord(s, "underline")) *w = TextDecorUnderline; else if (ParseWord(s, "overline")) *w = TextDecorOverline; else if (ParseWord(s, "line-through")) *w = TextDecorLineThrough; else if (ParseWord(s, "blink")) *w = TextDecorBlink; break; } case PropWordWrap: { WordWrapType *w = (WordWrapType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new WordWrapType); if (ParseWord(s, "break-word")) *w = WrapBreakWord; else *w = WrapNormal; break; } case PropBorderCollapse: { BorderCollapseType *w = (BorderCollapseType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new BorderCollapseType); if (ParseWord(s, "inherit")) *w = CollapseInherit; else if (ParseWord(s, "Collapse")) *w = CollapseCollapse; else if (ParseWord(s, "Separate")) *w = CollapseSeparate; break; } case PropBackgroundRepeat: { ParseBackgroundRepeat(s); break; } case PropListStyle: { int asd=0; // Fall thru } case PropListStyleType: { ListStyleTypes *w = (ListStyleTypes*)Props.Find(PropListStyleType); if (!w) Props.Add(PropListStyleType, w = new ListStyleTypes); if (ParseWord(s, "none")) *w = ListNone; else if (ParseWord(s, "disc")) *w = ListDisc; else if (ParseWord(s, "circle")) *w = ListCircle; else if (ParseWord(s, "square")) *w = ListSquare; else if (ParseWord(s, "decimal")) *w = ListDecimal; else if (ParseWord(s, "decimalleadingzero")) *w = ListDecimalLeadingZero; else if (ParseWord(s, "lowerroman")) *w = ListLowerRoman; else if (ParseWord(s, "upperroman")) *w = ListUpperRoman; else if (ParseWord(s, "lowergreek")) *w = ListLowerGreek; else if (ParseWord(s, "uppergreek")) *w = ListUpperGreek; else if (ParseWord(s, "loweralpha")) *w = ListLowerAlpha; else if (ParseWord(s, "upperalpha")) *w = ListUpperAlpha; else if (ParseWord(s, "armenian")) *w = ListArmenian; else if (ParseWord(s, "georgian")) *w = ListGeorgian; else *w = ListInherit; break; } case PropLetterSpacing: { // Fixme: do not care right now... break; } case PropBackgroundAttachment: { AttachmentType *w = (AttachmentType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new AttachmentType); if (ParseWord(s, "inherit")) *w = AttachmentInherit; else if (ParseWord(s, "scroll")) *w = AttachmentScroll; else if (ParseWord(s, "fixed")) *w = AttachmentFixed; break; } case PropOverflow: { OverflowType *w = (OverflowType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new OverflowType); if (ParseWord(s, "inherit")) *w = OverflowInherit; else if (ParseWord(s, "visible")) *w = OverflowVisible; else if (ParseWord(s, "hidden")) *w = OverflowHidden; else if (ParseWord(s, "scroll")) *w = OverflowScroll; else if (ParseWord(s, "auto")) *w = OverflowAuto; break; } case PropVisibility: { VisibilityType *w = (VisibilityType*)Props.Find(PropId); if (!w) Props.Add(PropId, w = new VisibilityType); if (ParseWord(s, "inherit")) *w = VisibilityInherit; else if (ParseWord(s, "visible")) *w = VisibilityVisible; else if (ParseWord(s, "hidden")) *w = VisibilityHidden; else if (ParseWord(s, "collapse")) *w = VisibilityCollapse; break; } case PropBorderTopStyle: case PropBorderRightStyle: case PropBorderBottomStyle: case PropBorderLeftStyle: { GCss::PropType Parent = ParentProp.Find(PropId); if (Parent) { BorderDef *b = (BorderDef*) Props.Find(Parent); if (!b && (b = new BorderDef)) Props.Add(Parent, b); if (b) { if (!b->ParseStyle(s)) { if (Type == ParseStrict) LgiAssert(!"Colour parsing failed."); } } } break; } case PropFont: { // Clear any existing style info. DeleteProp(PropFontStyle); DeleteProp(PropFontVariant); DeleteProp(PropFontWeight); DeleteProp(PropFontSize); DeleteProp(PropLineHeight); DeleteProp(PropFontFamily); bool ApplySize = true; while (*s) { // Try and guess the parts in any order... SkipWhite(s); if (*s == ';') break; if (*s == '/') { ApplySize = false; s++; } else if (*s == ',') { s++; } else { // Point size...? GAutoPtr Pt(new Len); if (Pt->Parse(s, ApplySize ? PropFontSize : PropLineHeight, Type)) { if (ApplySize) FontSize(*Pt); else LineHeight(*Pt); } else if (!ParseFontStyle(PropFontStyle, s) && !ParseFontVariant(PropFontVariant, s) && !ParseFontWeight(PropFontWeight, s)) { // Face name... GAutoPtr Fam(new StringsDef); if (Fam->Parse(s)) FontFamily(*Fam); else break; } } } break; } default: { LgiAssert(!"Prop parsing support not implemented."); } } break; } case TypeLen: { GArray Lengths; SkipWhite(s); while (*s && *s != ';') { GAutoPtr t(new Len); if (t->Parse(s, PropId, PropId == PropZIndex ? ParseRelaxed : Type)) { Lengths.Add(t.Release()); SkipWhite(s); } else { if (Type == ParseStrict) LgiAssert(!"Parsing failed."); break; } } SkipWhite(s); bool Mismatch = false; switch (PropId) { case PropBorderTopWidth: case PropBorderRightWidth: case PropBorderBottomWidth: case PropBorderLeftWidth: { GCss::PropType Parent = ParentProp.Find(PropId); if (Parent) { BorderDef *b = (BorderDef*) Props.Find(Parent); if (!b && (b = new BorderDef)) Props.Add(Parent, b); if (b && Lengths.Length() == 1) { *((GCss::Len*&)b) = *Lengths[0]; } else if (Type == ParseStrict) { LgiAssert(0); } } break; } case PropPadding: { if (Lengths.Length() == 4) { StoreProp(PropPaddingTop, Lengths[0], true); StoreProp(PropPaddingRight, Lengths[1], true); StoreProp(PropPaddingBottom, Lengths[2], true); StoreProp(PropPaddingLeft, Lengths[3], true); } else if (Lengths.Length() == 3) { StoreProp(PropPaddingTop, Lengths[0], true); StoreProp(PropPaddingLeft, Lengths[1], false); StoreProp(PropPaddingRight, Lengths[1], true); StoreProp(PropPaddingBottom, Lengths[2], true); } else if (Lengths.Length() == 2) { StoreProp(PropPaddingTop, Lengths[0], false); StoreProp(PropPaddingBottom, Lengths[0], true); StoreProp(PropPaddingRight, Lengths[1], false); StoreProp(PropPaddingLeft, Lengths[1], true); } else if (Lengths.Length() == 1) { StoreProp(PropPadding, Lengths[0], true); DeleteProp(PropPaddingLeft); DeleteProp(PropPaddingTop); DeleteProp(PropPaddingRight); DeleteProp(PropPaddingBottom); } else Mismatch = true; if (!Mismatch) { Lengths.Length(0); OnChange(PropPadding); } break; } case PropMargin: { if (Lengths.Length() == 4) { StoreProp(PropMarginTop, Lengths[0], true); StoreProp(PropMarginRight, Lengths[1], true); StoreProp(PropMarginBottom, Lengths[2], true); StoreProp(PropMarginLeft, Lengths[3], true); } else if (Lengths.Length() == 3) { StoreProp(PropMarginTop, Lengths[0], true); StoreProp(PropMarginLeft, Lengths[1], false); StoreProp(PropMarginRight, Lengths[1], true); StoreProp(PropMarginBottom, Lengths[2], true); } else if (Lengths.Length() == 2) { StoreProp(PropMarginTop, Lengths[0], false); StoreProp(PropMarginBottom, Lengths[0], true); StoreProp(PropMarginRight, Lengths[1], false); StoreProp(PropMarginLeft, Lengths[1], true); } else if (Lengths.Length() == 1) { StoreProp(PropMargin, Lengths[0], true); DeleteProp(PropMarginTop); DeleteProp(PropMarginBottom); DeleteProp(PropMarginRight); DeleteProp(PropMarginLeft); } else Mismatch = true; if (!Mismatch) { Lengths.Length(0); OnChange(PropMargin); } } default: { LgiAssert(ParentProp.Find(PropId) == PropNull); if (Lengths.Length() > 0) { StoreProp(PropId, Lengths[0], true); Lengths.DeleteAt(0); OnChange(PropId); } break; } } Lengths.DeleteObjects(); break; } case TypeBackground: { while (*s && !strchr(";}", *s)) { const char *Start = s; ImageDef Img; if (Img.Parse(s)) { BackgroundImage(Img); continue;; } Len x, y; if (x.Parse(s)) { y.Parse(s); BackgroundX(x); BackgroundY(y); continue; } if (ParseBackgroundRepeat(s)) { continue; } ColorDef Color; if (Color.Parse(s) || OnUnhandledColor(&Color, s)) { BackgroundColor(Color); continue; } SkipWhite(s); while (*s && *s != ';' && !IsWhite(*s)) s++; if (Start == s) { LgiAssert(!"Parsing hang."); break; } } break; } case TypeColor: { GAutoPtr t(new ColorDef); if (t->Parse(s) || OnUnhandledColor(t, s)) { switch (PropId) { case PropBorderTopColor: case PropBorderRightColor: case PropBorderBottomColor: case PropBorderLeftColor: { GCss::PropType Parent = ParentProp.Find(PropId); if (Parent) { BorderDef *b = (BorderDef*) Props.Find(Parent); if (!b && (b = new BorderDef)) Props.Add(Parent, b); if (b) b->Color = *t; } else LgiAssert(0); break; } default: { LgiAssert(ParentProp.Find(PropId) == PropNull); ColorDef *e = (ColorDef*)Props.Find(PropId); if (e) *e = *t; else Props.Add(PropId, t.Release()); break; } } } else if (Type == ParseStrict) LgiAssert(!"Parsing failed."); break; } case TypeStrings: { GAutoPtr t(new StringsDef); if (t->Parse(s)) { StringsDef *e = (StringsDef*)Props.Find(PropId); if (e) *e = *t; else Props.Add(PropId, t.Release()); } else LgiAssert(!"Parsing failed."); break; } case TypeBorder: { if (PropId == PropBorderStyle) { GCss::BorderDef b; if (b.ParseStyle(s)) { GCss::BorderDef *db; GetOrCreate(db, PropBorderLeft)->Style = b.Style; GetOrCreate(db, PropBorderRight)->Style = b.Style; GetOrCreate(db, PropBorderTop)->Style = b.Style; GetOrCreate(db, PropBorderBottom)->Style = b.Style; } } else if (PropId == PropBorderColor) { ColorDef c; if (c.Parse(s)) { GCss::BorderDef *db; GetOrCreate(db, PropBorderLeft)->Color = c; GetOrCreate(db, PropBorderRight)->Color = c; GetOrCreate(db, PropBorderTop)->Color = c; GetOrCreate(db, PropBorderBottom)->Color = c; } } else { GAutoPtr t(new BorderDef); if (t->Parse(s)) { if (PropId == PropBorder) { CopyPropOnSave(BorderDef, PropBorderLeft); CopyPropOnSave(BorderDef, PropBorderRight); CopyPropOnSave(BorderDef, PropBorderTop); ReleasePropOnSave(BorderDef, PropBorderBottom); } else { ReleasePropOnSave(BorderDef, PropId); } } } break; } case TypeGRect: { GRect r; if (ParseWord(s, "rect")) { SkipWhite(s); if (*s == '(') { s++; r.y1 = ParseComponent(s); if (*s == ',') s++; else break; r.x2 = ParseComponent(s); if (*s == ',') s++; else break; r.y2 = ParseComponent(s); if (*s == ',') s++; else break; r.x1 = ParseComponent(s); if (*s == ')') { s++; GRect *e = (GRect*)Props.Find(PropId); if (e) *e = r; else Props.Add(PropId, new GRect(r)); } } } break; } case TypeImage: { GAutoPtr Img(new ImageDef); if (Img->Parse(s)) { ImageDef *i = (ImageDef*)Props.Find(PropId); if (i) *i = *Img; else Props.Add(PropId, Img.Release()); } else if (Type == ParseStrict) { LgiAssert(!"Failed to parse Image definition"); return false; } break; } default: { if (Type == ParseStrict) { LgiAssert(!"Unsupported property type."); return false; } else { #if DEBUG_CSS_LOGGING LgiTrace("%s:%i - Unsupported CSS property: %s\n", _FL, Prop); #endif } break; } } // End of property delimiter while (*s && *s != ';') s++; if (*s != ';') break; s++; } return true; } ///////////////////////////////////////////////////////////////////////////// bool GCss::Len::Parse(const char *&s, PropType Prop, ParsingStyle ParseType) { if (!s) return false; SkipWhite(s); if (ParseWord(s, "inherit")) Type = LenInherit; else if (ParseWord(s, "auto")) Type = LenAuto; else if (ParseWord(s, "normal")) Type = LenNormal; else if (ParseWord(s, "center")) Type = AlignCenter; else if (ParseWord(s, "left")) Type = AlignLeft; else if (ParseWord(s, "right")) Type = AlignRight; else if (ParseWord(s, "justify")) Type = AlignJustify; else if (ParseWord(s, "xx-small")) Type = SizeXXSmall; else if (ParseWord(s, "x-small")) Type = SizeXSmall; else if (ParseWord(s, "small")) Type = SizeSmall; else if (ParseWord(s, "medium")) Type = SizeMedium; else if (ParseWord(s, "large")) Type = SizeLarge; else if (ParseWord(s, "x-large")) Type = SizeXLarge; else if (ParseWord(s, "xx-large")) Type = SizeXXLarge; else if (ParseWord(s, "smaller")) Type = SizeSmaller; else if (ParseWord(s, "larger")) Type = SizeLarger; else if (ParseWord(s, "baseline")) Type = VerticalBaseline; else if (ParseWord(s, "sub")) Type = VerticalSub; else if (ParseWord(s, "super")) Type = VerticalSuper; else if (ParseWord(s, "top")) Type = VerticalTop; else if (ParseWord(s, "text-top")) Type = VerticalTextTop; else if (ParseWord(s, "middle")) Type = VerticalMiddle; else if (ParseWord(s, "bottom")) Type = VerticalBottom; else if (ParseWord(s, "text-bottom")) Type = VerticalTextBottom; else if (IsNumeric(s)) { Value = atof(s); while (IsNumeric(s)) s++; SkipWhite(s); if (*s == '%') { Type = LenPercent; s++; } else if (ParseWord(s, "px"))Type = LenPx; else if (ParseWord(s, "pt")) Type = LenPt; else if (ParseWord(s, "em")) Type = LenEm; else if (ParseWord(s, "ex")) Type = LenEx; else if (ParseWord(s, "cm")) Type = LenCm; else if (IsAlpha(*s)) return false; else if (ParseType == ParseRelaxed) { if (Value > 0) { if (Prop == PropLineHeight) { Type = LenPercent; Value *= 100; } else { Type = LenPx; } } else { Type = LenInherit; } } else return false; } else return false; return true; } bool GCss::ColorDef::Parse(const char *&s) { if (!s) return false; #define NamedColour(Name, Value) \ else if (ParseWord(s, #Name)) { Type = ColorRgb; Rgb32 = Value; return true; } #define ParseExpect(s, ch) \ if (*s != ch) return false; \ else s++; SkipWhite(s); if (*s == '#') { s++; int v = 0; const char *e = s; while (*e && e < s + 6) { if (*e >= 'a' && *e <= 'f') { v <<= 4; v |= *e - 'a' + 10; e++; } else if (*e >= 'A' && *e <= 'F') { v <<= 4; v |= *e - 'A' + 10; e++; } else if (*e >= '0' && *e <= '9') { v <<= 4; v |= *e - '0'; e++; } else break; } if (e == s + 3) { Type = ColorRgb; int r = (v >> 8) & 0xf; int g = (v >> 4) & 0xf; int b = v & 0xf; Rgb32 = Rgb32( (r << 4 | r), (g << 4 | g), (b << 4 | b) ); s = e; } else if (e == s + 6) { Type = ColorRgb; int r = (v >> 16) & 0xff; int g = (v >> 8) & 0xff; int b = v & 0xff; Rgb32 = Rgb32(r, g, b); s = e; } else return false; } else if (ParseWord(s, "rgb") && *s == '(') { s++; int r = ParseComponent(s); ParseExpect(s, ','); int g = ParseComponent(s); ParseExpect(s, ','); int b = ParseComponent(s); ParseExpect(s, ')'); Type = ColorRgb; Rgb32 = Rgb32(r, g, b); } else if (ParseWord(s, "rgba") && *s == '(') { s++; int r = ParseComponent(s); ParseExpect(s, ','); int g = ParseComponent(s); ParseExpect(s, ','); int b = ParseComponent(s); ParseExpect(s, ','); int a = ParseComponent(s); ParseExpect(s, ')'); Type = ColorRgb; Rgb32 = Rgba32(r, g, b, a); } else if (ParseWord(s, "-webkit-gradient(")) { GAutoString GradientType(ParseString(s)); ParseExpect(s, ','); if (!GradientType) return false; if (!stricmp(GradientType, "radial")) { } else if (!stricmp(GradientType, "linear")) { Len StartX, StartY, EndX, EndY; if (!StartX.Parse(s, PropNull) || !StartY.Parse(s, PropNull)) return false; ParseExpect(s, ','); if (!EndX.Parse(s, PropNull) || !EndY.Parse(s, PropNull)) return false; ParseExpect(s, ','); SkipWhite(s); while (*s) { if (*s == ')') { Type = ColorLinearGradient; break; } else { GAutoString Stop(ParseString(s)); if (!Stop) return false; if (!stricmp(Stop, "from")) { } else if (!stricmp(Stop, "to")) { } else if (!stricmp(Stop, "stop")) { } else return false; } } } else return false; } NamedColour(black, Rgb32(0x00, 0x00, 0x00)) NamedColour(white, Rgb32(0xff, 0xff, 0xff)) NamedColour(gray, Rgb32(0x80, 0x80, 0x80)) NamedColour(red, Rgb32(0xff, 0x00, 0x00)) NamedColour(yellow, Rgb32(0xff, 0xff, 0x00)) NamedColour(green, Rgb32(0x00, 0x80, 0x00)) NamedColour(orange, Rgb32(0xff, 0xA5, 0x00)) NamedColour(blue, Rgb32(0x00, 0x00, 0xff)) NamedColour(maroon, Rgb32(0x80, 0x00, 0x00)) NamedColour(olive, Rgb32(0x80, 0x80, 0x00)) NamedColour(purple, Rgb32(0x80, 0x00, 0x80)) NamedColour(fuchsia, Rgb32(0xff, 0x00, 0xff)) NamedColour(lime, Rgb32(0x00, 0xff, 0x00)) NamedColour(navy, Rgb32(0x00, 0x00, 0x80)) NamedColour(aqua, Rgb32(0x00, 0xff, 0xff)) NamedColour(teal, Rgb32(0x00, 0x80, 0x80)) NamedColour(silver, Rgb32(0xc0, 0xc0, 0xc0)) else return false; return true; } bool GCss::ImageDef::Parse(const char *&s) { SkipWhite(s); if (*s == '-') s++; if (ParseWord(s, "initial")) { Type = ImageInherit; } else if (ParseWord(s, "none")) { Type = ImageNone; } else if (!strnicmp(s, "url(", 4)) { s += 4; char *e = strchr((char*)s, ')'); if (!e) return false; Uri.Reset(NewStr(s, e - s)); s = e + 1; Type = ImageRef; } else { return false; } return true; } bool GCss::ImageDef::operator !=(const ImageDef &i) { if (Type != i.Type) return false; if (Uri && i.Uri) return stricmp(Uri, i.Uri) == 0; return true; } GCss::ImageDef &GCss::ImageDef::operator =(const ImageDef &o) { if (Type == ImageOwn) DeleteObj(Img); if (o.Img) { Img = o.Img; Type = ImageRef; } else if (Uri.Reset(NewStr(o.Uri))) { Type = ImageUri; } return *this; } bool GCss::BorderDef::Parse(const char *&s) { if (!s) return false; if (!Len::Parse(s, PropBorder, ParseRelaxed)) return false; SkipWhite(s); if (!*s || *s == ';') return true; if (!ParseStyle(s)) return false; SkipWhite(s); if (!*s || *s == ';') return true; if (!Color.Parse(s)) return false; return true; } bool GCss::BorderDef::ParseStyle(const char *&s) { GAutoString Pat(ParseString(s)); if (!Pat) return false; if (!stricmp(Pat, "Hidden")) Style = BorderHidden; else if (!stricmp(Pat, "Solid")) Style = BorderSolid; else if (!stricmp(Pat, "Dotted")) Style = BorderDotted; else if (!stricmp(Pat, "Dashed")) Style = BorderDashed; else if (!stricmp(Pat, "Double")) Style = BorderDouble; else if (!stricmp(Pat, "Groove")) Style = BorderGroove; else if (!stricmp(Pat, "Ridge")) Style = BorderRidge; else if (!stricmp(Pat, "Inset")) Style = BorderInset; else if (!stricmp(Pat, "Outset")) Style = BorderOutset; else Style = BorderSolid; return true; } ///////////////////////////////////////////////////////////////////////////////////////// GCss::Selector &GCss::Selector::operator =(const GCss::Selector &s) { Parts.Length(0); for (int i=0; i"; case CombAdjacent: return "+"; default: break; } return ""; }; GAutoString GCss::Selector::Print() { GStringPipe p; for (int i=0; i Offsets; GStringPipe p; while (*s) { SkipWhite(s); if (*s == '{' || *s == ',') { break; } else if (*s == '/') { if (s[1] != '*') return false; s += 2; char *End = strstr((char*)s, "*/"); if (!End) return false; s = End + 2; continue; } else if (*s == '<') { if (s[1] != '!' && s[2] != '-' && s[3] != '-') return false; s += 4; char *End = strstr((char*)s, "-->"); if (!End) return false; s = End + 3; continue; } else if (*s == ':') { s++; if (*s == ':') { s++; } else if (!IsAlpha(*s)) { s++; break; } Part &n = Parts.New(); n.Type = SelPseudo; if (!TokString(n.Value, s)) break; if (*s == '(') { char *e = strchr(s + 1, ')'); if (e && e - s < 100) { - n.Param.Reset(NewStr(++s, e - s)); + s++; + n.Param.Reset(NewStr(s, e - s)); s = e + 1; } } } else if (*s == '#') { s++; Part &n = Parts.New(); n.Type = SelID; if (!TokString(n.Value, s)) break; } else if (*s == '.') { s++; while (*s && !IsAlpha(*s)) s++; Part &n = Parts.New(); n.Type = SelClass; if (!TokString(n.Value, s)) break; } else if (*s == '@') { s++; Part &n = Parts.New(); n.Type = SelMedia; n.Media = MediaNull; GAutoString Str; if (!TokString(Str, s)) break; if (!Str || stricmp(Str, "media")) return false; SkipWhite(s); while (*s && !strchr(";{", *s)) { if (*s == '(') { const char *e = strchr(s, ')'); if (e) { s = e + 1; SkipWhite(s); continue; } } if (*s == ',') { s++; SkipWhite(s); continue; } if (!TokString(Str, s)) { // Skip bad char... s++; break; } SkipWhite(s); if (!Str) break; if (!stricmp(Str, "screen")) n.Media |= MediaScreen; else if (!stricmp(Str, "print")) n.Media |= MediaPrint; } } else if (s[0] == '*') { s++; Part &n = Parts.New(); n.Type = SelUniversal; } else if (IsAlpha(*s)) { Part &n = Parts.New(); n.Type = SelType; if (!TokString(n.Value, s)) break; } else if (*s == '[') { s++; Part &n = Parts.New(); n.Type = SelAttrib; char *End = strchr((char*)s, ']'); if (!End) return false; n.Value.Reset(NewStr(s, End - s)); s = End + 1; } else { // Unexpected character s++; continue; } const char *Last = s; SkipWhite(s); if (*s == '+') { s++; LgiAssert(Parts.Length() > 0); Combs.Add(Parts.Length()); Part &n = Parts.New(); n.Type = CombAdjacent; } else if (*s == '>') { s++; LgiAssert(Parts.Length() > 0); Combs.Add(Parts.Length()); Part &n = Parts.New(); n.Type = CombChild; } else if (s > Last && (IsAlpha(*s) || strchr(".:#", *s))) { LgiAssert(Parts.Length() > 0); Combs.Add(Parts.Length()); Part &n = Parts.New(); n.Type = CombDesc; } if (*s && s == Prev) { LgiAssert(!"Parsing is stuck."); return false; } Prev = s; } Raw.Reset(NewStr(Start, s - Start)); return Parts.Length() > 0; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// #define SkipWhiteSpace(s) while (*s && strchr(" \t\r\n", *s)) s++; static const char *SkipComment(const char *c) { // Skip comment SkipWhiteSpace(c); if (c[0] == '/' && c[1] == '*') { char *e = strstr((char*)c + 2, "*/"); if (e) c = e + 2; else c += 2; SkipWhiteSpace(c); } return c; } bool GCss::Store::Dump(GStream &out) { const char *MapNames[] = {"TypeMap", "ClassMap", "IdMap", NULL}; SelectorMap *Maps[] = {&TypeMap, &ClassMap, &IdMap, NULL}; for (int i=0; Maps[i]; i++) { SelectorMap *m = Maps[i]; out.Print("%s = {\n", MapNames[i]); const char *Key; for (SelArray *a = m->First(&Key); a; a = m->Next(&Key)) { out.Print("\t'%s' -> ", Key); for (int n=0; nLength(); n++) { GCss::Selector *sel = (*a)[n]; if (n) out.Print("\t\t"); out.Print("%i of %i: %s\n", n, a->Length(), sel->Raw.Get()); // out.Print("\t\t{ %s }\n", sel->Style); } } } return true; } bool GCss::Store::Parse(const char *&c) { if (!c) return false; const char *Start = c; c = SkipComment(c); if (!strncmp(c, "", 3)) break; // read selector GArray Selectors; GCss::Selector *Cur = new GCss::Selector; if (Cur->Parse(c)) Selectors.Add(Cur); else DeleteObj(Cur); while (*c) { SkipWhiteSpace(c); if (*c == ',') { c++; Cur = new GCss::Selector; if (Cur && Cur->Parse(c)) Selectors.Add(Cur); else DeleteObj(Cur); } else if (*c == '/') { const char *n = SkipComment(c); if (n == c) c++; else c = n; } else break; } SkipWhiteSpace(c); // read styles if (*c++ == '{') { SkipWhiteSpace(c); const char *Start = c; while (*c && *c != '}') c++; char *Style = NewStr(Start, c - Start); Styles.Add(Style); c++; for (int i=0; iStyle = Style; int n = s->GetSimpleIndex(); if (n >= s->Parts.Length()) { char err[256]; sprintf_s(err, sizeof(err), "ErrSimpleIndex %i>=%i @ '%.80s'", n, s->Parts.Length(), c); Error.Reset(NewStr(err)); LgiAssert(!"Part index too high."); return false; } GCss::Selector::Part &p = s->Parts[n]; switch (p.Type) { case GCss::Selector::SelType: { if (p.Value) { SelArray *a = TypeMap.Get(p.Value); a->Add(s); } break; } case GCss::Selector::SelClass: { if (p.Value) { SelArray *a = ClassMap.Get(p.Value); a->Add(s); } break; } case GCss::Selector::SelID: { if (p.Value) { SelArray *a = IdMap.Get(p.Value); a->Add(s); } break; } default: { Other.Add(s); break; } } } } else { Selectors.DeleteObjects(); break; } } return true; } diff --git a/src/mac/carbon/Lgi/GApp.cpp b/src/mac/carbon/Lgi/GApp.cpp --- a/src/mac/carbon/Lgi/GApp.cpp +++ b/src/mac/carbon/Lgi/GApp.cpp @@ -1,1117 +1,1122 @@ #include #include #include #include #include #include #include "Lgi.h" #include "GProcess.h" #include "GSkinEngine.h" #include "GArray.h" #include "GToken.h" #include "GThread.h" #include "GXmlTree.h" #include "GSymLookup.h" #include #include #include #include #include extern int hndstate(int hnd); struct OsAppArgumentsPriv { GAutoString Str; GArray Ptr; }; OsAppArguments::OsAppArguments(int args, char **arg) { d = new OsAppArgumentsPriv; Args = args; Arg = arg; } OsAppArguments::~OsAppArguments() { DeleteObj(d); } void OsAppArguments::Set(char *CmdLine) { d->Str.Reset(); d->Ptr.Length(0); GArray Raw; GArray Offsets; char Exe[256]; Offsets.Add(0); if (LgiGetExeFile(Exe, sizeof(Exe))) { int Len = strlen(Exe); Raw.Length(Len + 1); strcpy(&Raw[0], Exe); } else { Raw.Add(0); } if (CmdLine) { for (char *s = CmdLine; *s; ) { while (*s && strchr(WhiteSpace, *s)) s++; char *e; if (*s == '\'' || *s == '\"') { char delim = *s++; Offsets.Add(Raw.Length()); e = s; while (*e && *e != delim) { Raw.Add(*e++); } Raw.Add(0); } else { Offsets.Add(Raw.Length()); for (e = s; *e && !strchr(WhiteSpace, *e); e++) { Raw.Add(*e); } Raw.Add(0); } s = *e ? e + 1 : e; } } d->Str.Reset(Raw.Release()); for (int n=0; nPtr[n] = d->Str + Offsets[n]; } Args = d->Ptr.Length(); Arg = &d->Ptr[0]; } OsAppArguments &OsAppArguments::operator =(OsAppArguments &a) { GArray Raw; GArray Offsets; for (int i=0; iStr.Reset(new char[Raw.Length()]); memcpy(d->Str, &Raw[0], Raw.Length()); for (int n=0; nPtr[n] = d->Str + Offsets[n]; } Args = d->Ptr.Length(); Arg = &d->Ptr[0]; return *this; } //////////////////////////////////////////////////////////////// typedef GArray AppArray; void OnSigPipe(int i) { } void OnCrash(int i) { printf("%s:%i - on crash.\n", __FILE__, __LINE__); signal(SIGBUS, 0); signal(SIGSEGV, 0); struct Pipe { int Read; int Write; Pipe() { Read = -1; Write = -1; } }; Pipe Read; Pipe Write; Pipe Error; int Pid; pipe((int*)&Read); pipe((int*)&Error); char Exe[256] = ""; LgiGetExeFile(Exe, sizeof(Exe)); // Has stdin pipe pipe((int*)&Write); if (!(Pid = fork())) { // stdin -> Write close(0); // close stdin dup(Write.Read); close(Write.Write); // stdout -> Read close(1); // close stdout dup(Read.Write); close(Read.Read); // stderr -> Error close(2); // close stderr dup(Error.Write); close(Error.Read); // setup read & write handles char sPid[32]; sprintf(sPid, "--pid=%i", getpid()); char *Args[] = {sPid, Exe, 0}; // printf("Calling: execv('gdb', '%s', '%s');\n", Exe, sPid); execv("/usr/bin/gdb", Args); // We should never get here printf("%s:%i - execv(gdb) failed.\n", __FILE__, __LINE__); exit(-1); } int r, Used = 0; char Buf[1025]; bool Capture = false; while ((r = read(Read.Read, Buf + Used, sizeof(Buf) - Used - 1)) > 0) { printf("Got %i bytes\n", r); Used += r; Buf[Used] = 0; printf("Capt=%i Buf='%s'\n", Capture, Buf); if (!Capture) { if (stristr(Buf, "(gdb)")) { char c[] = "info pid\n"; int w = write(Write.Write, c, strlen(c)); printf("Writing cmd %i bytes\n", w); Capture = true; Used = 0; Buf[0] = 0; } } char *Eol; while ((Eol = strstr(Buf, "\n"))) { *Eol = 0; if (Capture) { printf("Capture '%s'\n", Buf); } Eol += 1; int Len = Eol - Buf; memmove(Buf, Eol, Used + 1 - Len); Used -= Len; } } exit(-1); } class GAppPrivate { public: // Common GXmlTag *Config; GFileSystem *FileSystem; GdcDevice *GdcSystem; OsAppArguments Args; GLibrary *SkinLib; GHashTable MimeToApp; OsThread GuiThread; GSymLookup SymLookup; GAutoString Mime; GAutoString Name; GAutoString UrlArg; GAppPrivate() { FileSystem = 0; GdcSystem = 0; Config = 0; SkinLib = 0; GuiThread = LgiGetCurrentThread(); } ~GAppPrivate() { DeleteObj(SkinLib); for (void *p = MimeToApp.First(); p; p = MimeToApp.Next()) { AppArray *a = (AppArray*)p; a->DeleteObjects(); DeleteObj(a); } } }; pascal OSStatus AppProc(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData) { OSStatus result = eventNotHandledErr; GApp *a = (GApp*)inUserData; if (!a) return result; UInt32 eventClass = GetEventClass( inEvent ); UInt32 eventKind = GetEventKind( inEvent ); #if 0 UInt32 ec = LgiSwap32(eventClass); UInt32 ek = LgiSwap32(eventKind); printf("AppProc %4.4s - %u\n", (char*)&ec, (unsigned)eventKind); #endif switch (eventClass) { case kEventClassCommand: { switch (eventKind) { case kEventCommandProcess: { HICommand command; result = GetEventParameter(inEvent, kEventParamDirectObject, typeHICommand, NULL, sizeof(command), NULL, &command); if (result) printf("%s:%i - GetEventParameter failed with %i\n", _FL, (int)result); else if (a->AppWnd) { a->AppWnd->OnTrayMenuResult(command.commandID); } } } break; } case kEventClassApplication: { switch (eventKind) { case kEventAppGetDockTileMenu: { if (a->AppWnd) { GSubMenu s; a->AppWnd->OnTrayMenu(s); MenuRef gDockMenu = s.Release(); CFRetain(gDockMenu); SetEventParameter( inEvent, kEventParamMenuRef, typeMenuRef, sizeof(MenuRef), &gDockMenu); result = noErr; } break; } case kEventAppActivated: case kEventAppFrontSwitched: { if (eventKind == kEventAppFrontSwitched) { ProcessSerialNumber frontProcess, ourProcess; GetCurrentProcess(&ourProcess); // Get the new process ID out if (GetEventParameter(inEvent, kEventParamProcessID, typeProcessSerialNumber, NULL, sizeof(ProcessSerialNumber), NULL, &frontProcess) == noErr) { if (frontProcess.highLongOfPSN != ourProcess.highLongOfPSN || frontProcess.lowLongOfPSN != ourProcess.lowLongOfPSN) break; } } GWindow *a = LgiApp->AppWnd; if (a) { /* printf("%s:%i - onfrontswitch(true) %x act=%i switch=%i\n", _FL, eventKind, eventKind == kEventAppActivated, eventKind == kEventAppFrontSwitched); */ a->OnFrontSwitch(true); } result = noErr; break; } } break; } } return result; } pascal OSErr AppleEventProc(const AppleEvent *ae, AppleEvent *reply, SRefCon handlerRefcon) { OSErr err = eventNotHandledErr; GApp *App = (GApp*) handlerRefcon; printf("********** AppleEventProc called ***************\n"); #if 0 LgiTrace("AppleEvent received\n"); OSType aeID = typeWildCard; OSType aeClass = typeWildCard; AEGetAttributePtr(ae, keyEventClassAttr, typeType, 0, &aeClass, sizeof(aeClass), 0); AEGetAttributePtr(ae, keyEventIDAttr, typeType, 0, &aeID, sizeof(aeID), 0); uint32 id = LgiSwap32(aeID), cls = LgiSwap32(aeClass); if (aeClass == kInternetEventClass && aeID == kAEGetURL) { DescType type; Size dataSize = 0, size = 0; err = AESizeOfParam(ae, keyDirectObject, &type, &dataSize); if (err != noErr) return err; GAutoString Url(new char[dataSize + 1]); err = AEGetParamPtr(ae, keyDirectObject, typeChar, &type, Url, dataSize, &size); if (err != noErr) return err; Url[size] = 0; App->OnUrl(Url); } else if (aeClass == kCoreEventClass && aeID == kAEOpenApplication) { AEDescList docs; err = AEGetParamDesc(ae, keyDirectObject, typeAEList, &docs); LgiTrace("%s:%i - AEGetParamDesc = %i\n", _FL, err); if (err == noErr) { long n = 0; AECountItems(&docs, &n); LgiTrace("%s:%i - n = %i\n", _FL, n); UInt8 strBuffer[256]; GArray Files; GArray Mem; for (int i = 0; i < n; i++) { FSRef ref; err = AEGetNthPtr(&docs, i + 1, typeFSRef, 0, 0, &ref, sizeof(ref), 0); LgiTrace("%s:%i - AEGetNthPtr = %i\n", _FL, err); if (err != noErr) continue; err = FSRefMakePath(&ref, strBuffer, 256); LgiTrace("%s:%i - FSRefMakePath = %i\n", _FL, err); if (err == noErr) { Mem[i].Reset(NewStr((char*)strBuffer)); Files[i] = Mem[i].Get(); } } if (Files.Length()) App->OnReceiveFiles(Files); } } #endif return err; } ///////////////////////////////////////////////////////////////////////////// GSkinEngine *GApp::SkinEngine = 0; GApp *TheApp = 0; GMouseHook *GApp::MouseHook = 0; GApp::GApp(OsAppArguments &AppArgs, const char *AppName, GAppArguments *ObjArgs) : OsApplication(AppArgs.Args, AppArgs.Arg) { TheApp = this; d = new GAppPrivate; d->Name.Reset(NewStr(AppName)); AppWnd = 0; Name(AppName); // Catch and ignore SIGPIPE signal(SIGPIPE, OnSigPipe); #if 0 // Crash handler... signal(SIGBUS, OnCrash); signal(SIGSEGV, OnCrash); #endif // We want our printf's NOW! setvbuf(stdout,(char *)NULL,_IONBF,0); // print mesgs immediately. // Setup the file and graphics sub-systems d->FileSystem = new GFileSystem; d->GdcSystem = new GdcDevice; srand(LgiCurrentTime()); LgiInitColours(); SetAppArgs(AppArgs); MouseHook = new GMouseHook; // System font setup SystemNormal = 0; GFontType SysFontType; if (SysFontType.GetSystemFont("System")) { SystemNormal = SysFontType.Create(); if (SystemNormal) { SystemNormal->Transparent(true); } else { printf("%s:%i - Error creating system font.\n", __FILE__, __LINE__); } SystemBold = SysFontType.Create(); if (SystemBold) { SystemBold->Bold(true); SystemBold->Transparent(true); SystemBold->Create(); } else { printf("%s:%i - Error creating bold version of the system font.\n", __FILE__, __LINE__); } } else { printf("%s:%i - Couldn't get system font setting.\n", __FILE__, __LINE__); } if (!SystemNormal) { LgiMsg(0, "Error: Couldn't create system font.", "Lgi Error: GApp::GApp", MB_OK); LgiExitApp(); } if (!GetOption("noskin")) { #if 0 // Load dynamic library skin engine char Name[64]; #ifdef _DEBUG char *Build = "d"; #else char *Build = ""; #endif sprintf(Name, "lgiskin%s.%s", Build, LGI_LIBRARY_EXT); d->SkinLib = new GLibrary(Name); #else // Static version of the skinning engine #endif if (d->SkinLib) { if (d->SkinLib->IsLoaded()) { Proc_CreateSkinEngine CreateSkinEngine = (Proc_CreateSkinEngine)d->SkinLib->GetAddress(LgiSkinEntryPoint); if (CreateSkinEngine) { SkinEngine = CreateSkinEngine(this); } } else { DeleteObj(d->SkinLib); } } } OSStatus e; // Setup apple event handlers /* e = AEInstallEventHandler( kInternetEventClass, kAEGetURL, NewAEEventHandlerUPP(AppleEventProc), (SRefCon)this, false); printf("AEInstallEventHandler(kInternetEventClass, kAEGetURL, ...)=%i\n", (int)e); if (e) LgiTrace("%s:%i - AEInstallEventHandler = %i\n", _FL, e); e = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication, NewAEEventHandlerUPP(AppleEventProc), (SRefCon)this, false); LgiTrace("%s:%i - AEInstallEventHandler = %i\n", _FL, e); */ #if 1 // Setup application handler EventTypeSpec AppEvents[] = { { kEventClassApplication, kEventAppActivated }, { kEventClassApplication, kEventAppFrontSwitched }, { kEventClassApplication, kEventAppGetDockTileMenu }, { kEventClassCommand, kEventCommandProcess }, }; EventHandlerRef Handler = 0; e = InstallApplicationEventHandler( NewEventHandlerUPP(AppProc), GetEventTypeCount(AppEvents), AppEvents, (void*)this, &Handler); if (e) LgiTrace("%s:%i - InstallEventHandler for app failed (%i)\n", _FL, e); #endif } GApp::~GApp() { DeleteObj(AppWnd); DeleteObj(SystemNormal); DeleteObj(SystemBold); DeleteObj(MouseHook); DeleteObj(d->FileSystem); DeleteObj(d->GdcSystem); DeleteObj(d->Config); DeleteObj(GFontSystem::Me); DeleteObj(d); TheApp = 0; } /* const char *GApp::GetName() { if (d->Name) return d->Name; if (d->Mime) { char *i = strchr(d->Mime, '/'); if (i) { static char s[128]; i++; if (ToLower(i[0]) == 'x' && i[1] == '-') i += 2; char *o = s; bool First = true; while (*i && o < s + sizeof(s) - 1) { if (*i != '-') { if (First) { *o++ = ToUpper(*i); First = false; } else *o++ = *i; } else First = true; i++; } *o = 0; return s; } } return 0; } void GApp::SetName(const char *Name) { d->Name.Reset(NewStr(Name)); } */ GApp *GApp::ObjInstance() { return TheApp; } bool GApp::IsOk() { bool Status = (this != 0) && (d != 0) /* #ifdef XWIN && (XDisplay() != 0) #endif */ ; LgiAssert(Status); return Status; } GMouseHook *GApp::GetMouseHook() { return MouseHook; } int GApp::GetMetric(LgiSystemMetric Metric) { switch (Metric) { default: break; case LGI_MET_DECOR_X: { return 0; } case LGI_MET_DECOR_Y: case LGI_MET_DECOR_CAPTION: { if (AppWnd) { Rect r; OSStatus e = GetWindowBounds(AppWnd->WindowHandle(), kWindowTitleBarRgn, &r); if (e) printf("%s:%i - GetWindowBounds failed with %i\n", _FL, (int)e); else { int y = r.bottom - r.top; return y; } } return 22; } } return 0; } GViewI *GApp::GetFocus() { WindowRef w = FrontNonFloatingWindow(); if (w) { ControlRef v; OSErr e = GetKeyboardFocus(w, &v); if (e) printf("%s:%i - GetKeyboardFocus failed with %i\n", __FILE__, __LINE__, e); else { GViewI *Ptr = 0; UInt32 Size = 0; e = GetControlProperty(v, 'meme', 'view', sizeof(Ptr), &Size, &Ptr); if (e) printf("%s:%i - GetControlProperty failed with %i\n", __FILE__, __LINE__, e); else { return Ptr; } } } else printf("FrontNonFloatingWindow failed.\n"); return 0; } OsThreadId GApp::GetGuiThread() { return d->GuiThread; } OsProcessId GApp::GetProcessId() { return getpid(); } OsAppArguments *GApp::GetAppArgs() { return IsOk() ? &d->Args : 0; } void GApp::SetAppArgs(OsAppArguments &AppArgs) { if (IsOk()) { d->Args = AppArgs; } } struct IdleGluePtrs { GApp::OnIdleProc Callback; void *Param; }; void IdleGlue(EventLoopTimerRef inTimer, void *inUserData) { IdleGluePtrs *p = (IdleGluePtrs*)inUserData; p->Callback(p->Param); } bool GApp::Run(bool Loop, OnIdleProc IdleCallback, void *IdleParam) { EventRef theEvent; EventTargetRef theTarget; theTarget = GetEventDispatcherTarget(); if (Loop) { OnCommandLine(); EventLoopTimerRef timer; IdleGluePtrs Ptrs; if (IdleCallback) { Ptrs.Callback = IdleCallback; Ptrs.Param = IdleParam; InstallEventLoopTimer( GetCurrentEventLoop(), 0, kEventDurationSecond / 10, NewEventLoopTimerUPP(IdleGlue), &Ptrs, &timer); } do { RunApplicationEventLoop(); } while (AppWnd && !AppWnd->CloseRequestDone() && !AppWnd->OnRequestClose(false)); } else { while ( ReceiveNextEvent ( 0, NULL, 0.001, // kEventDurationForever, true, &theEvent ) == noErr ) { SendEventToEventTarget (theEvent, theTarget); ReleaseEvent(theEvent); } } return 0; } void GApp::Exit(int Code) { if (Code) { // hard exit ::exit(Code); } else { // soft exit QuitApplicationEventLoop(); } } void GApp::OnUrl(const char *Url) { if (AppWnd) AppWnd->OnUrl(Url); else d->UrlArg.Reset(NewStr(Url)); } void GApp::OnReceiveFiles(GArray &Files) { if (AppWnd) AppWnd->OnReceiveFiles(Files); } GXmlTag *GApp::GetConfig(const char *Tag) { if (IsOk() && !d->Config) { char File[] = "lgi.conf"; char Path[256]; if (LgiGetExePath(Path, sizeof(Path))) { if (Path[strlen(Path)-1] != DIR_CHAR) strcat(Path, DIR_STR); strcat(Path, File); if (FileExists(Path)) { d->Config = new GXmlTag("Config"); if (d->Config) { GFile f; if (f.Open(Path, O_READ)) { GXmlTree t; t.Read(d->Config, &f, 0); } } } } if (!d->Config) { d->Config = new GXmlTag("Options"); } } if (Tag && d->Config) { return d->Config->GetTag(Tag); } return 0; } void GApp::SetConfig(GXmlTag *Tag) { if (IsOk() && Tag) { GXmlTag *Old = GetConfig(Tag->Tag); if (Old) { Old->RemoveTag(); DeleteObj(Old); } if (!d->Config) { GetConfig(0); } if (d->Config) { d->Config->InsertTag(Tag); } } } char *GApp::GetArgumentAt(int n) { return n >= 0 && n < d->Args.Args ? d->Args.Arg[n] : 0; } bool GApp::GetOption(const char *Option, char *Dest, int DestLen) { GAutoString Buf; if (GetOption(Option, Buf)) { if (Dest) strcpy_s(Dest, DestLen, Buf); return true; } return false; } bool GApp::GetOption(const char *Option, GAutoString &Buf) { if (IsOk() && Option) { int OptLen = strlen(Option); for (int i=1; iArgs.Args; i++) { char *a = d->Args.Arg[i]; if (strchr("-/\\", a[0])) { if (strncmp(a+1, Option, OptLen) == 0) { char *Arg = 0; if (strlen(a+1+OptLen) > 0) { Arg = a + 1 + OptLen; } else if (i < d->Args.Args - 1) { Arg = d->Args.Arg[i + 1]; } if (Arg) { if (strchr("\'\"", *Arg)) { char Delim = *Arg++; char *End = strchr(Arg, Delim); if (End) { int Len = (int)End-(int)Arg; if (Len > 0) { Buf.Reset(NewStr(Arg, Len)); } else return false; } else return false; } else { Buf.Reset(NewStr(Arg)); } } return true; } } } } return false; } void GApp::OnCommandLine() { GArray Files; for (int i=1; iArgs; i++) { char *a = GetAppArgs()->Arg[i]; if (FileExists(a)) { Files.Add(NewStr(a)); } } // call app if (Files.Length() > 0) { OnReceiveFiles(Files); } // clear up Files.DeleteArrays(); } GAutoString GApp::GetFileMimeType(const char *File) { GAutoString Ret; if (!FileExists(File)) { // Look in the path GToken p(getenv("PATH"), LGI_PATH_SEPARATOR); for (int i=0; i &Apps) { // Use LSCopyApplicationForMIMEType? // Find alternative version of the MIME type (e.g. x-type and type). char AltMime[256]; strcpy(AltMime, Mime); char *s = strchr(AltMime, '/'); if (s) { s++; int Len = strlen(s) + 1; if (strnicmp(s, "x-", 2) == 0) { memmove(s, s+2, Len - 2); } else { memmove(s+2, s, Len); s[0] = 'x'; s[1] = '-'; } } if (!d->MimeToApp.Length()) { // printf("%s:%i - Building MimeToApp.\n", __FILE__, __LINE__); } AppArray *p = (AppArray*)d->MimeToApp.Find(Mime); if (p) { for (int i=0; iLength(); i++) { Apps[i] = (*p)[i]; } return true; } return false; } GSymLookup *GApp::GetSymLookup() { return &d->SymLookup; } + +bool GApp::IsElevated() +{ + return geteuid() == 0; +} diff --git a/src/mac/carbon/Lgi/GFileSelect.cpp b/src/mac/carbon/Lgi/GFileSelect.cpp --- a/src/mac/carbon/Lgi/GFileSelect.cpp +++ b/src/mac/carbon/Lgi/GFileSelect.cpp @@ -1,500 +1,509 @@ /// \file /// \author Matthew Allen /// \brief Native mac file open dialog. #include #include #include "Lgi.h" #include "GToken.h" ////////////////////////////////////////////////////////////////////////// // This is just a private data container to make it easier to change the // implementation of this class without effecting headers and applications. class GFileSelectPrivate { friend class GFileSelect; friend class GFileSelectDlg; friend class GFolderList; GView *Parent; GFileSelect *Select; char *Title; char *DefExt; bool MultiSelect; List Files; int CurrentType; List Types; List History; bool ShowReadOnly; bool ReadOnly; bool EatClose; public: static char *InitPath; static bool InitShowHiddenFiles; static GRect InitSize; GFileSelectPrivate(GFileSelect *select) { ShowReadOnly = false; ReadOnly = false; EatClose = false; Select = select; Title = 0; DefExt = 0; MultiSelect = false; Parent = 0; CurrentType = -1; } virtual ~GFileSelectPrivate() { DeleteArray(Title); DeleteArray(DefExt); Types.DeleteObjects(); Files.DeleteArrays(); History.DeleteArrays(); } Boolean FilterProc(AEDesc * theItem, NavFilterModes filterMode) { FSRef fs; if (!AEGetDescData(theItem, &fs, sizeof(fs))) { UInt8 path[300]; FSRefMakePath(&fs, path, sizeof(path)); if (DirExists((char*)path)) return true; char *Dir = strrchr((char*)path, '/'); if (Dir) { Dir++; for (GFileType *t = Types.First(); t; t = Types.Next()) { char *e = t->Extension(); if (e) { if (MatchStr(e, Dir)) return true; } } return false; } } return true; } void DoTypes(NavDialogRef Dlg) { if (Types.Length()) { int Len = 0; for (GFileType *t = Types.First(); t; t = Types.Next()) { if (t->Extension()) { if (stricmp(t->Extension(), LGI_ALL_FILES)) Len++; } } if (Len) { CFMutableArrayRef identifiers = CFArrayCreateMutable( kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks ); if (identifiers) { for (GFileType *t = Types.First(); t; t = Types.Next()) { char *Ext = t->Extension(); GToken e(Ext, ";"); for (int i=0; iShowReadOnly = b;; } bool GFileSelect::ReadOnly() { return d->ReadOnly; } char *GFileSelect::Name() { return d->Files.First(); } bool GFileSelect::Name(const char *n) { d->Files.DeleteArrays(); if (n) { - d->Files.Insert(NewStr(n)); + char *ns = NewStr(n); + if (ns) + { + for (char *c = ns; *c; c++) + { + if (strchr(LGI_IllegalFileNameChars, *c)) + *c = '_'; + } + d->Files.Insert(ns); + } } return true; } char *GFileSelect::operator [](int i) { return d->Files.ItemAt(i); } int GFileSelect::Length() { return d->Files.Length(); } int GFileSelect::Types() { return d->Types.Length(); } void GFileSelect::ClearTypes() { d->Types.DeleteObjects(); } GFileType *GFileSelect::TypeAt(int n) { return d->Types.ItemAt(n); } bool GFileSelect::Type(const char *Description, const char *Extension, int Data) { GFileType *Type = new GFileType; if (Type) { Type->Description(Description); Type->Extension(Extension); d->Types.Insert(Type); } return Type != 0; } int GFileSelect::SelectedType() { return d->CurrentType; } GViewI *GFileSelect::Parent() { return d->Parent; } void GFileSelect::Parent(GViewI *Window) { d->Parent = dynamic_cast(Window); } bool GFileSelect::MultiSelect() { return d->MultiSelect; } void GFileSelect::MultiSelect(bool Multi) { d->MultiSelect = Multi; } #define CharPropImpl(Func, Var) \ char *GFileSelect::Func() \ { \ return Var; \ } \ void GFileSelect::Func(const char *i) \ { \ DeleteArray(Var); \ if (i) \ { \ Var = NewStr(i); \ } \ } CharPropImpl(InitialDir, d->InitPath); CharPropImpl(Title, d->Title); CharPropImpl(DefaultExtension, d->DefExt); void Lgi_NavEventProc( NavEventCallbackMessage callBackSelector, NavCBRecPtr callBackParms, void * callBackUD) { GFileSelectPrivate *d = (GFileSelectPrivate*) callBackUD; switch (callBackSelector) { case kNavCBStart: { if (d->InitPath) { OSStatus e = noErr; AEDesc theLocation = {typeNull, NULL}; FSRef Ref; e = FSPathMakeRef((uchar*) d->InitPath, &Ref, 0); if (e) printf("%s:%i - FSPathMakeRef failed.\n", _FL); FSSpec Spec; FSGetCatalogInfo(&Ref, kFSCatInfoNone, 0, 0, &Spec, 0); e = AECreateDesc(typeFSS, &Spec, sizeof(FSSpec), &theLocation); if (e) printf("%s:%i - FSMakeFSSpec failed.\n", _FL); e = NavCustomControl(callBackParms->context, kNavCtlSetLocation, (void*)&theLocation); if (e) printf("%s:%i - FSMakeFSSpec failed.\n", _FL); } break; } } } Boolean Lgi_NavObjectFilterProc(AEDesc * theItem, void *info, void *callBackUD, NavFilterModes filterMode) { GFileSelectPrivate *d = (GFileSelectPrivate*) callBackUD; return d->FilterProc(theItem, filterMode); } bool GFileSelect::Open() { bool Status = false; NavDialogCreationOptions o; ZeroObj(o); OSStatus e = NavGetDefaultDialogCreationOptions(&o); if (e) printf("%s:%i - NavGetDefaultDialogCreationOptions failed with %i\n", _FL, (int)e); else { if (Name()) o.saveFileName = Utf8ToCFString(Name()); o.modality = kWindowModalityAppModal; if (MultiSelect()) o.optionFlags |= kNavAllowMultipleFiles; NavEventUPP EventUPP = NewNavEventUPP(Lgi_NavEventProc); NavObjectFilterUPP ObjectUPP = NewNavObjectFilterUPP(Lgi_NavObjectFilterProc); NavDialogRef Dlg = 0; e = NavCreateGetFileDialog( &o, 0, // NavTypeListHandle inTypeList, EventUPP, 0, // NavPreviewUPP inPreviewProc, 0, // ObjectUPP, d, &Dlg); if (e) printf("%s:%i - NavCreateGetFileDialog failed with %i\n", _FL, (int)e); else { d->DoTypes(Dlg); e = NavDialogRun(Dlg); if (e) printf("%s:%i - NavDialogRun failed with %i\n", _FL, (int)e); else { Status = d->DoReply(Dlg); } NavDialogDispose(Dlg); } DisposeNavEventUPP(EventUPP); DisposeNavObjectFilterUPP(ObjectUPP); } return Status; } bool GFileSelect::OpenFolder() { bool Status = false; NavDialogCreationOptions o; ZeroObj(o); OSStatus e = NavGetDefaultDialogCreationOptions(&o); if (e) printf("%s:%i - NavGetDefaultDialogCreationOptions failed with %i\n", _FL, (int)e); else { if (Name()) o.saveFileName = Utf8ToCFString(Name()); o.modality = kWindowModalityAppModal; NavEventUPP EventUPP = NewNavEventUPP(Lgi_NavEventProc); NavObjectFilterUPP ObjectUPP = NewNavObjectFilterUPP(Lgi_NavObjectFilterProc); NavDialogRef Dlg = 0; e = NavCreateChooseFolderDialog(&o, EventUPP, 0, // ObjectUPP, d, &Dlg); if (e) printf("%s:%i - NavCreateGetFileDialog failed with %i\n", _FL, (int)e); else { d->DoTypes(Dlg); e = NavDialogRun(Dlg); if (e) printf("%s:%i - NavDialogRun failed with %i\n", _FL, (int)e); else { Status = d->DoReply(Dlg); } NavDialogDispose(Dlg); } DisposeNavEventUPP(EventUPP); DisposeNavObjectFilterUPP(ObjectUPP); } return Status; } bool GFileSelect::Save() { bool Status = false; NavDialogCreationOptions o; ZeroObj(o); OSStatus e = NavGetDefaultDialogCreationOptions(&o); if (e) printf("%s:%i - NavGetDefaultDialogCreationOptions failed with %i\n", _FL, (int)e); else { if (Name()) o.saveFileName = Utf8ToCFString(Name()); o.modality = kWindowModalityAppModal; NavEventUPP EventUPP = NewNavEventUPP(Lgi_NavEventProc); NavObjectFilterUPP ObjectUPP = NewNavObjectFilterUPP(Lgi_NavObjectFilterProc); NavDialogRef Dlg = 0; e = NavCreatePutFileDialog( &o, 'type', 'lgi ', EventUPP, d, &Dlg); if (e) printf("%s:%i - NavCreatePutFileDialog failed with %i\n", _FL, (int)e); else { d->DoTypes(Dlg); e = NavDialogRun(Dlg); if (e) printf("%s:%i - NavDialogRun failed with %i\n", _FL, (int)e); else { Status = d->DoReply(Dlg, true); } NavDialogDispose(Dlg); } DisposeNavEventUPP(EventUPP); DisposeNavObjectFilterUPP(ObjectUPP); } return Status; } diff --git a/src/mac/carbon/LgiCarbon.xcodeproj/project.pbxproj b/src/mac/carbon/LgiCarbon.xcodeproj/project.pbxproj --- a/src/mac/carbon/LgiCarbon.xcodeproj/project.pbxproj +++ b/src/mac/carbon/LgiCarbon.xcodeproj/project.pbxproj @@ -1,1183 +1,1185 @@ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 340BFC15096A0E0100A11AE6 /* LgiCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 340BFC14096A0E0100A11AE6 /* LgiCommon.h */; }; 340BFC4A096A9D4600A11AE6 /* GArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 340BFC49096A9D4600A11AE6 /* GArray.h */; }; 340FEA9E096E375600E534D5 /* GToolBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 340FEA9C096E375600E534D5 /* GToolBar.h */; }; 340FEA9F096E375600E534D5 /* GToolTabBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 340FEA9D096E375600E534D5 /* GToolTabBar.h */; }; 3413BBC21349EC6900AE15B0 /* GXmlTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 3413BBC11349EC6900AE15B0 /* GXmlTree.h */; }; 3416C27B096775AF00DD79DC /* GRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 3416C27A096775AF00DD79DC /* GRect.h */; }; 341B7C491956D3AA00AAA225 /* GCheckBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 341B7C481956D3AA00AAA225 /* GCheckBox.h */; }; 341B7C4B1956E08500AAA225 /* GRadioGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 341B7C4A1956E08500AAA225 /* GRadioGroup.h */; }; 341BE43F123ED1E6009BF203 /* md5.h in Headers */ = {isa = PBXBuildFile; fileRef = 341BE43E123ED1E6009BF203 /* md5.h */; }; 341BE442123ED1F1009BF203 /* sha1.c in Sources */ = {isa = PBXBuildFile; fileRef = 341BE440123ED1F1009BF203 /* sha1.c */; }; 341BE443123ED1F1009BF203 /* sha1.h in Headers */ = {isa = PBXBuildFile; fileRef = 341BE441123ED1F1009BF203 /* sha1.h */; }; 3427C3BE11FC02AE002AC215 /* LgiInc.h in Headers */ = {isa = PBXBuildFile; fileRef = 3427C3BD11FC02AE002AC215 /* LgiInc.h */; }; 3429212C1087D57200578ECC /* GCss.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3429212B1087D57200578ECC /* GCss.cpp */; }; 3429212E1087D58100578ECC /* GCss.h in Headers */ = {isa = PBXBuildFile; fileRef = 3429212D1087D58100578ECC /* GCss.h */; }; 342CE46211FDAB57000B1F3C /* LgiRes.h in Headers */ = {isa = PBXBuildFile; fileRef = 342CE46111FDAB57000B1F3C /* LgiRes.h */; }; 342D52FB0F0CBE0A002A1C7C /* GFileSelect.h in Headers */ = {isa = PBXBuildFile; fileRef = 342D52FA0F0CBE0A002A1C7C /* GFileSelect.h */; }; 342D78F111FAD1AF005BADBD /* GStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 342D78F011FAD1AF005BADBD /* GStream.h */; }; 3433784B19178B09007A4DC5 /* GColourSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = 3433784A19178B09007A4DC5 /* GColourSpace.h */; }; 34372AD00C46E0290090CDC9 /* GDocView.h in Headers */ = {isa = PBXBuildFile; fileRef = 34372ACF0C46E0290090CDC9 /* GDocView.h */; }; 343BF8420B58A110008AFE75 /* GMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 343BF8410B58A110008AFE75 /* GMenu.h */; }; 343E950D1751C6090085611D /* GThreadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 343E950C1751C6090085611D /* GThreadEvent.cpp */; }; 3443CBFE0C16BA64008F7B02 /* GOptionsFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3443CBFD0C16BA64008F7B02 /* GOptionsFile.cpp */; }; 3444A36112275BDD004ADADE /* GToolBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3444A36012275BDD004ADADE /* GToolBar.cpp */; }; 34463F2511FBE25E009BB91F /* GTextView3.h in Headers */ = {isa = PBXBuildFile; fileRef = 34463F2411FBE25E009BB91F /* GTextView3.h */; }; 3446E2B908D0E4AF005024EB /* Gdc2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E2B508D0E4AF005024EB /* Gdc2.cpp */; }; 3446E2BA08D0E4AF005024EB /* GMemDC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E2B608D0E4AF005024EB /* GMemDC.cpp */; }; 3446E2BB08D0E4AF005024EB /* GPrintDC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E2B708D0E4AF005024EB /* GPrintDC.cpp */; }; 3446E2BC08D0E4AF005024EB /* GScreenDC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E2B808D0E4AF005024EB /* GScreenDC.cpp */; }; 3446E2D008D0E5C2005024EB /* Gdc2.h in Headers */ = {isa = PBXBuildFile; fileRef = 3446E2CF08D0E5C2005024EB /* Gdc2.h */; }; 3446E32508D0E9D6005024EB /* 8Bit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E32008D0E9D6005024EB /* 8Bit.cpp */; }; 3446E32608D0E9D6005024EB /* 15Bit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E32108D0E9D6005024EB /* 15Bit.cpp */; }; 3446E32708D0E9D6005024EB /* 16Bit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E32208D0E9D6005024EB /* 16Bit.cpp */; }; 3446E32808D0E9D6005024EB /* 24Bit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E32308D0E9D6005024EB /* 24Bit.cpp */; }; 3446E32908D0E9D6005024EB /* 32Bit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E32408D0E9D6005024EB /* 32Bit.cpp */; }; 3446E32B08D0E9E4005024EB /* Alpha.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3446E32A08D0E9E4005024EB /* Alpha.cpp */; }; 344AC3E31915AC25003FFE7E /* GFileCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AC3E21915AC25003FFE7E /* GFileCommon.cpp */; }; 344AF36008E0322F004ED88C /* GToken.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF35E08E0322F004ED88C /* GToken.cpp */; }; 344AF36108E0322F004ED88C /* GXmlTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF35F08E0322F004ED88C /* GXmlTree.cpp */; }; 344AF36308E03284004ED88C /* GDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF36208E03284004ED88C /* GDateTime.cpp */; }; 344AF36808E04156004ED88C /* GSurface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF36708E04156004ED88C /* GSurface.cpp */; }; 344AF38408E045C5004ED88C /* GStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF38308E045C5004ED88C /* GStream.cpp */; }; 344AF38708E045F2004ED88C /* GRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF38608E045F2004ED88C /* GRect.cpp */; }; 344AF39008E04707004ED88C /* GVariant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF38F08E04707004ED88C /* GVariant.cpp */; }; 344AF39608E0476A004ED88C /* GApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF39508E0476A004ED88C /* GApp.cpp */; }; 344AF3A108E048C2004ED88C /* GProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF3A008E048C2004ED88C /* GProcess.cpp */; }; 344AF3C308E04A94004ED88C /* LgiDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 344AF3C208E04A94004ED88C /* LgiDefs.h */; }; 344AF3C908E04B32004ED88C /* GProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF3C808E04B32004ED88C /* GProperties.cpp */; }; 344AF3CC08E04B63004ED88C /* GLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF3CB08E04B63004ED88C /* GLibrary.cpp */; }; 344AF3D708E04BE0004ED88C /* GLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 344AF3D608E04BE0004ED88C /* GLibrary.h */; }; 344AF3DD08E04C75004ED88C /* GObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344AF3DC08E04C75004ED88C /* GObject.cpp */; }; 344B736408D83E8300D49457 /* Lgi.h in Headers */ = {isa = PBXBuildFile; fileRef = 344B736308D83E8300D49457 /* Lgi.h */; }; 344B736C08D83F1800D49457 /* GGeneral.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344B736B08D83F1800D49457 /* GGeneral.cpp */; }; 344B737808D83F6C00D49457 /* LgiClasses.h in Headers */ = {isa = PBXBuildFile; fileRef = 344B737708D83F6C00D49457 /* LgiClasses.h */; }; 344B737B08D8401600D49457 /* Lgi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344B737A08D8401600D49457 /* Lgi.cpp */; }; 344B738108D8406900D49457 /* GdcCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344B738008D8406900D49457 /* GdcCommon.cpp */; }; 344B738708D840CF00D49457 /* GFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344B738608D840CF00D49457 /* GFile.cpp */; }; 344B738A08D8410B00D49457 /* LgiMsg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344B738908D8410B00D49457 /* LgiMsg.cpp */; }; 344B738D08D8414400D49457 /* GGuiUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344B738C08D8414400D49457 /* GGuiUtils.cpp */; }; 344CD2D4176C75B9008A716C /* GCssTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344CD2D3176C75B9008A716C /* GCssTools.cpp */; }; 344D1B0608F4A26300228075 /* GSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = 344D1B0508F4A26300228075 /* GSlider.h */; }; 344D1B0E08F4A2DB00228075 /* LgiRes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B0C08F4A2DB00228075 /* LgiRes.cpp */; }; 344D1B0F08F4A2DB00228075 /* Res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B0D08F4A2DB00228075 /* Res.cpp */; }; 344D1B1308F4A30D00228075 /* GFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1208F4A30D00228075 /* GFilter.cpp */; }; 344D1B1508F4A33400228075 /* GRadioGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1408F4A33400228075 /* GRadioGroup.cpp */; }; 344D1B2608F4A36300228075 /* GBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1608F4A36300228075 /* GBitmap.cpp */; }; 344D1B2708F4A36300228075 /* GButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1708F4A36300228075 /* GButton.cpp */; }; 344D1B2808F4A36300228075 /* GCheckBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1808F4A36300228075 /* GCheckBox.cpp */; }; 344D1B2908F4A36300228075 /* GCombo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1908F4A36300228075 /* GCombo.cpp */; }; 344D1B2A08F4A36300228075 /* GEdit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1A08F4A36300228075 /* GEdit.cpp */; }; 344D1B2B08F4A36300228075 /* GList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1B08F4A36300228075 /* GList.cpp */; }; 344D1B2C08F4A36300228075 /* GPanel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1C08F4A36300228075 /* GPanel.cpp */; }; 344D1B2D08F4A36300228075 /* GProgress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1D08F4A36300228075 /* GProgress.cpp */; }; 344D1B2E08F4A36300228075 /* GProgressDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1E08F4A36300228075 /* GProgressDlg.cpp */; }; 344D1B2F08F4A36300228075 /* GSplitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B1F08F4A36300228075 /* GSplitter.cpp */; }; 344D1B3008F4A36300228075 /* GStatusBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B2008F4A36300228075 /* GStatusBar.cpp */; }; 344D1B3108F4A36300228075 /* GTableLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B2108F4A36300228075 /* GTableLayout.cpp */; }; 344D1B3208F4A36300228075 /* GTabView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B2208F4A36300228075 /* GTabView.cpp */; }; 344D1B3308F4A36300228075 /* GTextLabel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B2308F4A36300228075 /* GTextLabel.cpp */; }; 344D1B3508F4A36300228075 /* GTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 344D1B2508F4A36300228075 /* GTree.cpp */; }; 344E922D19602E1B000074D2 /* GThreadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 344E922C19602E1B000074D2 /* GThreadEvent.h */; }; 345C1BF30B3F4AFF00E80FF1 /* LgiClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 345C1BF20B3F4AFF00E80FF1 /* LgiClass.h */; }; 345C1EC90B46017000E80FF1 /* LgiWidgets.h in Headers */ = {isa = PBXBuildFile; fileRef = 345C1EC80B46017000E80FF1 /* LgiWidgets.h */; }; 345F4B9F0F058D4F0015A7EE /* GScrollBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 345F4B9E0F058D4F0015A7EE /* GScrollBar.h */; }; 345F9C2308F0F622007DAFE2 /* GView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 345F9C2208F0F622007DAFE2 /* GView.cpp */; }; 34637EBA0F876EB1005A9B80 /* GDateTime.h in Headers */ = {isa = PBXBuildFile; fileRef = 34637EB90F876EB1005A9B80 /* GDateTime.h */; }; 3465BDD908C5DEC100B4C217 /* GContainers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3465BDD808C5DEC100B4C217 /* GContainers.cpp */; }; 34661C7913C7407000B4C2A7 /* GUtf8.h in Headers */ = {isa = PBXBuildFile; fileRef = 34661C7813C7407000B4C2A7 /* GUtf8.h */; }; 346BF43B193AAD02000C2030 /* GBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 346BF43A193AAD02000C2030 /* GBox.cpp */; }; 3476333318E2D12300766FC4 /* GColour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3476333218E2D12300766FC4 /* GColour.cpp */; }; 3476680F093F1FD400623A44 /* LgiInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = 3476680E093F1FD400623A44 /* LgiInterfaces.h */; }; 34766828093F207D00623A44 /* GFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 34766827093F207D00623A44 /* GFile.h */; }; 34766832093F20EE00623A44 /* GThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 34766831093F20EE00623A44 /* GThread.h */; }; 347677640FE5BB2800E2E445 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 347677630FE5BB2800E2E445 /* md5.c */; }; 3478B20A12E6F87200936EFA /* GEdit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3478B20912E6F87200936EFA /* GEdit.h */; }; 347CB600172A97D600AC3EA6 /* GTableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 347CB5FF172A97D600AC3EA6 /* GTableLayout.h */; }; 3489C3EA0DD1C4DB0095F0E1 /* GMru.h in Headers */ = {isa = PBXBuildFile; fileRef = 3489C3E90DD1C4DB0095F0E1 /* GMru.h */; }; 3493304A0F60CE440092EAE8 /* GViewCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 349330490F60CE440092EAE8 /* GViewCommon.cpp */; }; 3493304C0F60CE690092EAE8 /* GViewPriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 3493304B0F60CE690092EAE8 /* GViewPriv.h */; }; 34983BE308F4A54C0054868C /* GDragAndDrop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983BE208F4A54C0054868C /* GDragAndDrop.cpp */; }; 34983BE608F4A5790054868C /* GMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983BE508F4A5790054868C /* GMenu.cpp */; }; 34983C1408F5482D0054868C /* GDocView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1208F5482D0054868C /* GDocView.cpp */; }; 34983C1508F5482D0054868C /* GTextView3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1308F5482D0054868C /* GTextView3.cpp */; }; 34983C1708F5484C0054868C /* GToolTip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1608F5484C0054868C /* GToolTip.cpp */; }; 34983C1908F548620054868C /* GClipBoard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1808F548620054868C /* GClipBoard.cpp */; }; 34983C2408F548DF0054868C /* GAlert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1D08F548DF0054868C /* GAlert.cpp */; }; 34983C2508F548DF0054868C /* GDataDlg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1E08F548DF0054868C /* GDataDlg.cpp */; }; 34983C2608F548DF0054868C /* GFindReplace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C1F08F548DF0054868C /* GFindReplace.cpp */; }; 34983C2708F548DF0054868C /* GInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C2008F548DF0054868C /* GInput.cpp */; }; 34983C2808F548DF0054868C /* GMru.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C2108F548DF0054868C /* GMru.cpp */; }; 34983C2908F548DF0054868C /* GTrayIcon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C2208F548DF0054868C /* GTrayIcon.cpp */; }; 34983C2A08F548DF0054868C /* LgiRand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C2308F548DF0054868C /* LgiRand.cpp */; }; 34983C2E08F5492E0054868C /* GPassword.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34983C2D08F5492E0054868C /* GPassword.cpp */; }; 34A11A7A1675347500FCC5D7 /* GThreadCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34A11A791675347500FCC5D7 /* GThreadCommon.cpp */; }; 34A11A7C1675349900FCC5D7 /* GMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34A11A7B1675349900FCC5D7 /* GMutex.cpp */; }; 34A11A7E167534A500FCC5D7 /* GMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 34A11A7D167534A500FCC5D7 /* GMutex.h */; }; 34A3ABF70EF5AA0A009A5E95 /* GDisplayString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34A3ABF60EF5AA0A009A5E95 /* GDisplayString.cpp */; }; 34A3ABF90EF5AA1A009A5E95 /* GDisplayString.h in Headers */ = {isa = PBXBuildFile; fileRef = 34A3ABF80EF5AA1A009A5E95 /* GDisplayString.h */; }; 34A671970F3725860073A86C /* GContainers.h in Headers */ = {isa = PBXBuildFile; fileRef = 34A671960F3725860073A86C /* GContainers.h */; }; 34A8A3BD1303408000CAA8DF /* GPopup.h in Headers */ = {isa = PBXBuildFile; fileRef = 34A8A3BC1303408000CAA8DF /* GPopup.h */; }; 34ADC9E10F4CC395009C6B75 /* GAutoPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 34ADC9E00F4CC395009C6B75 /* GAutoPtr.h */; }; 34B28AF0143FA69B0023662F /* GPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B28AEF143FA69B0023662F /* GPath.cpp */; }; 34B28AF2143FA6AF0023662F /* GPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B28AF1143FA6AF0023662F /* GPath.h */; }; 34B423820EBE762000D370A7 /* GSymLookup.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B423810EBE762000D370A7 /* GSymLookup.h */; }; 34B4A4FF0C05962100CDD0D1 /* GPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B4A4FE0C05962100CDD0D1 /* GPrinter.cpp */; }; 34B4A5010C05966000CDD0D1 /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B4A5000C05966000CDD0D1 /* Base64.cpp */; }; 34B4A5070C05987F00CDD0D1 /* GMemStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B4A5060C05987F00CDD0D1 /* GMemStream.cpp */; }; 34B4A50B0C0598B600CDD0D1 /* GMem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B4A50A0C0598B600CDD0D1 /* GMem.cpp */; }; 34B4A50F0C0598E900CDD0D1 /* GMem.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B4A50E0C0598E900CDD0D1 /* GMem.h */; }; 34B4A5300C059A2100CDD0D1 /* GUtf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B4A52F0C059A2100CDD0D1 /* GUtf8.cpp */; }; 34B5EAE40DD5B39F005A24D0 /* GFileSelect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B5EAE30DD5B39F005A24D0 /* GFileSelect.cpp */; }; 34B9505B0939DA3000477A2D /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34B9505A0939DA3000477A2D /* Carbon.framework */; }; 34B9545D0939DB5A00477A2D /* GString.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B9545C0939DB5A00477A2D /* GString.h */; }; 34B954840939DCC400477A2D /* INet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B954820939DCC400477A2D /* INet.cpp */; }; 34B954850939DCC400477A2D /* INetTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34B954830939DCC400477A2D /* INetTools.cpp */; }; 34B954880939DCDD00477A2D /* INet.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B954860939DCDD00477A2D /* INet.h */; }; 34B954890939DCDD00477A2D /* INetTools.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B954870939DCDD00477A2D /* INetTools.h */; }; 34BC1E1F134DC748005451EE /* Res.h in Headers */ = {isa = PBXBuildFile; fileRef = 34BC1E1E134DC748005451EE /* Res.h */; }; 34CDDAE308C5DF5B005EAAC7 /* LgiMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 34CDDAE008C5DF5B005EAAC7 /* LgiMac.h */; }; 34CDDAE408C5DF5B005EAAC7 /* LgiOsClasses.h in Headers */ = {isa = PBXBuildFile; fileRef = 34CDDAE108C5DF5B005EAAC7 /* LgiOsClasses.h */; }; 34CDDAE508C5DF5B005EAAC7 /* LgiOsDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 34CDDAE208C5DF5B005EAAC7 /* LgiOsDefs.h */; }; 34CDDAEB08C5DFB1005EAAC7 /* GString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34CDDAEA08C5DFB1005EAAC7 /* GString.cpp */; }; 34CDDAED08C5DFCF005EAAC7 /* GFontCodePages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34CDDAEC08C5DFCF005EAAC7 /* GFontCodePages.cpp */; }; 34CEBFE70DDC5EF800DE0E0B /* GCombo.h in Headers */ = {isa = PBXBuildFile; fileRef = 34CEBFE60DDC5EF800DE0E0B /* GCombo.h */; }; 34D2CC4F08F0FB490009968C /* GPopup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CC4E08F0FB490009968C /* GPopup.cpp */; }; 34D2CC6108F0FC7F0009968C /* GFontSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CC6008F0FC7F0009968C /* GFontSystem.cpp */; }; 34D2CC6308F0FCA00009968C /* GFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CC6208F0FCA00009968C /* GFont.cpp */; }; 34D2CC7308F115AD0009968C /* GFont.h in Headers */ = {isa = PBXBuildFile; fileRef = 34D2CC7208F115AD0009968C /* GFont.h */; }; 34D2CC8C08F116A80009968C /* GThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CC8B08F116A80009968C /* GThread.cpp */; }; 34D2CCA508F117A20009968C /* GFont_A.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CCA308F117A20009968C /* GFont_A.cpp */; }; 34D2CCA608F117A20009968C /* GFont_W.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CCA408F117A20009968C /* GFont_W.cpp */; }; 34D2CCAA08F1181C0009968C /* GFontSelect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CCA908F1181C0009968C /* GFontSelect.cpp */; }; 34D2CCAC08F1183F0009968C /* GWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CCAB08F1183F0009968C /* GWindow.cpp */; }; 34D2CCED08F11BEF0009968C /* GWidgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D2CCEC08F11BEF0009968C /* GWidgets.cpp */; }; 34D4D55B1250AF98000DA1FD /* GHashTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 34D4D55A1250AF98000DA1FD /* GHashTable.h */; }; 34D979D11150F0E100CE462B /* GLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34D979D01150F0E100CE462B /* GLayout.cpp */; }; 34DA5CB70DE0DE930050C7E4 /* GScrollBar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34DA5CB60DE0DE930050C7E4 /* GScrollBar.cpp */; }; 34E51DB00D2EFCCB0021AA08 /* GList.h in Headers */ = {isa = PBXBuildFile; fileRef = 34E51DAF0D2EFCCB0021AA08 /* GList.h */; }; 34F2E65A0E1849D300E8DA6A /* GTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 34F2E6590E1849D300E8DA6A /* GTree.h */; }; 34F45B9E18C161E40040FD99 /* GPixelRops.h in Headers */ = {isa = PBXBuildFile; fileRef = 34F45B9D18C161E40040FD99 /* GPixelRops.h */; }; 34F96DAA0DB9B82B009C64B8 /* GDragAndDrop.h in Headers */ = {isa = PBXBuildFile; fileRef = 34F96DA90DB9B82B009C64B8 /* GDragAndDrop.h */; }; 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 340BFC14096A0E0100A11AE6 /* LgiCommon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiCommon.h; path = ../../../include/common/LgiCommon.h; sourceTree = ""; }; 340BFC49096A9D4600A11AE6 /* GArray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GArray.h; path = ../../../include/common/GArray.h; sourceTree = ""; }; 340FEA9C096E375600E534D5 /* GToolBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GToolBar.h; path = ../../../include/common/GToolBar.h; sourceTree = ""; }; 340FEA9D096E375600E534D5 /* GToolTabBar.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GToolTabBar.h; path = ../../../include/common/GToolTabBar.h; sourceTree = ""; }; 3413BBC11349EC6900AE15B0 /* GXmlTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GXmlTree.h; path = ../../../include/common/GXmlTree.h; sourceTree = ""; }; 3416C27A096775AF00DD79DC /* GRect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GRect.h; path = ../../../include/common/GRect.h; sourceTree = ""; }; 341B7C481956D3AA00AAA225 /* GCheckBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCheckBox.h; path = ../../../include/common/GCheckBox.h; sourceTree = ""; }; 341B7C4A1956E08500AAA225 /* GRadioGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRadioGroup.h; path = ../../../include/common/GRadioGroup.h; sourceTree = ""; }; 341BE43E123ED1E6009BF203 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = md5.h; path = ../../common/Hash/md5/md5.h; sourceTree = ""; }; 341BE440123ED1F1009BF203 /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha1.c; path = ../../common/Hash/sha1/sha1.c; sourceTree = ""; }; 341BE441123ED1F1009BF203 /* sha1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sha1.h; path = ../../common/Hash/sha1/sha1.h; sourceTree = ""; }; 3427C3BD11FC02AE002AC215 /* LgiInc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LgiInc.h; path = ../../../include/common/LgiInc.h; sourceTree = ""; }; 3429212B1087D57200578ECC /* GCss.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GCss.cpp; path = ../../common/Lgi/GCss.cpp; sourceTree = ""; }; 3429212D1087D58100578ECC /* GCss.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCss.h; path = ../../../include/common/GCss.h; sourceTree = ""; }; 342CE46111FDAB57000B1F3C /* LgiRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LgiRes.h; path = ../../../include/common/LgiRes.h; sourceTree = ""; }; 342D52FA0F0CBE0A002A1C7C /* GFileSelect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GFileSelect.h; path = ../../../include/common/GFileSelect.h; sourceTree = ""; }; 342D78F011FAD1AF005BADBD /* GStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GStream.h; path = ../../../include/common/GStream.h; sourceTree = ""; }; 3433784A19178B09007A4DC5 /* GColourSpace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GColourSpace.h; path = ../../../include/common/GColourSpace.h; sourceTree = ""; }; 34372ACF0C46E0290090CDC9 /* GDocView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDocView.h; path = ../../../include/common/GDocView.h; sourceTree = ""; }; 343BF8410B58A110008AFE75 /* GMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GMenu.h; path = ../../../include/common/GMenu.h; sourceTree = ""; }; 343E950C1751C6090085611D /* GThreadEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GThreadEvent.cpp; path = ../../common/Lgi/GThreadEvent.cpp; sourceTree = ""; }; 3443CBFD0C16BA64008F7B02 /* GOptionsFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GOptionsFile.cpp; path = ../../common/Lgi/GOptionsFile.cpp; sourceTree = ""; }; 3444A36012275BDD004ADADE /* GToolBar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GToolBar.cpp; path = ../../common/Widgets/GToolBar.cpp; sourceTree = ""; }; 34463F2411FBE25E009BB91F /* GTextView3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTextView3.h; path = ../../../include/common/GTextView3.h; sourceTree = ""; }; 3446E2B508D0E4AF005024EB /* Gdc2.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Gdc2.cpp; path = Gdc2/Gdc2.cpp; sourceTree = ""; }; 3446E2B608D0E4AF005024EB /* GMemDC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GMemDC.cpp; path = Gdc2/GMemDC.cpp; sourceTree = ""; }; 3446E2B708D0E4AF005024EB /* GPrintDC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GPrintDC.cpp; path = Gdc2/GPrintDC.cpp; sourceTree = ""; }; 3446E2B808D0E4AF005024EB /* GScreenDC.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GScreenDC.cpp; path = Gdc2/GScreenDC.cpp; sourceTree = ""; }; 3446E2CF08D0E5C2005024EB /* Gdc2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Gdc2.h; path = ../../../include/common/Gdc2.h; sourceTree = ""; }; 3446E32008D0E9D6005024EB /* 8Bit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = 8Bit.cpp; path = ../../common/Gdc2/8Bit.cpp; sourceTree = ""; }; 3446E32108D0E9D6005024EB /* 15Bit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = 15Bit.cpp; path = ../../common/Gdc2/15Bit.cpp; sourceTree = ""; }; 3446E32208D0E9D6005024EB /* 16Bit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = 16Bit.cpp; path = ../../common/Gdc2/16Bit.cpp; sourceTree = ""; }; 3446E32308D0E9D6005024EB /* 24Bit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = 24Bit.cpp; path = ../../common/Gdc2/24Bit.cpp; sourceTree = ""; }; 3446E32408D0E9D6005024EB /* 32Bit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = 32Bit.cpp; path = ../../common/Gdc2/32Bit.cpp; sourceTree = ""; }; 3446E32A08D0E9E4005024EB /* Alpha.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Alpha.cpp; path = ../../common/Gdc2/Alpha.cpp; sourceTree = ""; }; 344AC3E21915AC25003FFE7E /* GFileCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GFileCommon.cpp; path = ../../common/General/GFileCommon.cpp; sourceTree = ""; }; 344AF35E08E0322F004ED88C /* GToken.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GToken.cpp; path = ../../common/Text/GToken.cpp; sourceTree = ""; }; 344AF35F08E0322F004ED88C /* GXmlTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GXmlTree.cpp; path = ../../common/Text/GXmlTree.cpp; sourceTree = ""; }; 344AF36208E03284004ED88C /* GDateTime.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GDateTime.cpp; path = ../../common/General/GDateTime.cpp; sourceTree = ""; }; 344AF36708E04156004ED88C /* GSurface.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GSurface.cpp; path = ../../common/Gdc2/GSurface.cpp; sourceTree = ""; }; 344AF38308E045C5004ED88C /* GStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GStream.cpp; path = ../../common/Lgi/GStream.cpp; sourceTree = ""; }; 344AF38608E045F2004ED88C /* GRect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GRect.cpp; path = ../../common/Gdc2/GRect.cpp; sourceTree = ""; }; 344AF38F08E04707004ED88C /* GVariant.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GVariant.cpp; path = ../../common/Lgi/GVariant.cpp; sourceTree = ""; }; 344AF39508E0476A004ED88C /* GApp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GApp.cpp; path = Lgi/GApp.cpp; sourceTree = ""; }; 344AF3A008E048C2004ED88C /* GProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GProcess.cpp; path = ../../common/Lgi/GProcess.cpp; sourceTree = ""; }; 344AF3C208E04A94004ED88C /* LgiDefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiDefs.h; path = ../../../include/common/LgiDefs.h; sourceTree = ""; }; 344AF3C808E04B32004ED88C /* GProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GProperties.cpp; path = ../../common/General/GProperties.cpp; sourceTree = ""; }; 344AF3CB08E04B63004ED88C /* GLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GLibrary.cpp; path = ../../common/Lgi/GLibrary.cpp; sourceTree = ""; }; 344AF3D608E04BE0004ED88C /* GLibrary.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GLibrary.h; path = ../../../include/common/GLibrary.h; sourceTree = ""; }; 344AF3DC08E04C75004ED88C /* GObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GObject.cpp; path = ../../common/Lgi/GObject.cpp; sourceTree = ""; }; 344B736308D83E8300D49457 /* Lgi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Lgi.h; path = ../../../include/common/Lgi.h; sourceTree = ""; }; 344B736B08D83F1800D49457 /* GGeneral.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GGeneral.cpp; path = Lgi/GGeneral.cpp; sourceTree = ""; }; 344B737708D83F6C00D49457 /* LgiClasses.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiClasses.h; path = ../../../include/common/LgiClasses.h; sourceTree = ""; }; 344B737A08D8401600D49457 /* Lgi.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Lgi.cpp; path = ../../common/Lgi/Lgi.cpp; sourceTree = ""; }; 344B738008D8406900D49457 /* GdcCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GdcCommon.cpp; path = ../../common/Gdc2/GdcCommon.cpp; sourceTree = ""; }; 344B738608D840CF00D49457 /* GFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFile.cpp; path = General/GFile.cpp; sourceTree = ""; }; 344B738908D8410B00D49457 /* LgiMsg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LgiMsg.cpp; path = ../../common/Lgi/LgiMsg.cpp; sourceTree = ""; }; 344B738C08D8414400D49457 /* GGuiUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GGuiUtils.cpp; path = ../../common/Lgi/GGuiUtils.cpp; sourceTree = ""; }; 344CD2D3176C75B9008A716C /* GCssTools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GCssTools.cpp; path = ../../common/Lgi/GCssTools.cpp; sourceTree = ""; }; 344D1B0508F4A26300228075 /* GSlider.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GSlider.h; path = ../../../include/common/GSlider.h; sourceTree = ""; }; 344D1B0C08F4A2DB00228075 /* LgiRes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LgiRes.cpp; path = ../../common/Resource/LgiRes.cpp; sourceTree = ""; }; 344D1B0D08F4A2DB00228075 /* Res.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Res.cpp; path = ../../common/Resource/Res.cpp; sourceTree = ""; }; 344D1B1208F4A30D00228075 /* GFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFilter.cpp; path = ../../common/Gdc2/Filters/GFilter.cpp; sourceTree = ""; }; 344D1B1408F4A33400228075 /* GRadioGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GRadioGroup.cpp; path = ../../common/Widgets/GRadioGroup.cpp; sourceTree = ""; }; 344D1B1608F4A36300228075 /* GBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GBitmap.cpp; path = ../../common/Widgets/GBitmap.cpp; sourceTree = ""; }; 344D1B1708F4A36300228075 /* GButton.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GButton.cpp; path = ../../common/Widgets/GButton.cpp; sourceTree = ""; }; 344D1B1808F4A36300228075 /* GCheckBox.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GCheckBox.cpp; path = ../../common/Widgets/GCheckBox.cpp; sourceTree = ""; }; 344D1B1908F4A36300228075 /* GCombo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GCombo.cpp; path = ../../common/Widgets/GCombo.cpp; sourceTree = ""; }; 344D1B1A08F4A36300228075 /* GEdit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GEdit.cpp; path = ../../common/Widgets/GEdit.cpp; sourceTree = ""; }; 344D1B1B08F4A36300228075 /* GList.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GList.cpp; path = ../../common/Widgets/GList.cpp; sourceTree = ""; }; 344D1B1C08F4A36300228075 /* GPanel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GPanel.cpp; path = ../../common/Widgets/GPanel.cpp; sourceTree = ""; }; 344D1B1D08F4A36300228075 /* GProgress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GProgress.cpp; path = ../../common/Widgets/GProgress.cpp; sourceTree = ""; }; 344D1B1E08F4A36300228075 /* GProgressDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GProgressDlg.cpp; path = ../../common/Widgets/GProgressDlg.cpp; sourceTree = ""; }; 344D1B1F08F4A36300228075 /* GSplitter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GSplitter.cpp; path = ../../common/Widgets/GSplitter.cpp; sourceTree = ""; }; 344D1B2008F4A36300228075 /* GStatusBar.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GStatusBar.cpp; path = ../../common/Widgets/GStatusBar.cpp; sourceTree = ""; }; 344D1B2108F4A36300228075 /* GTableLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GTableLayout.cpp; path = ../../common/Widgets/GTableLayout.cpp; sourceTree = ""; }; 344D1B2208F4A36300228075 /* GTabView.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GTabView.cpp; path = ../../common/Widgets/GTabView.cpp; sourceTree = ""; }; 344D1B2308F4A36300228075 /* GTextLabel.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GTextLabel.cpp; path = ../../common/Widgets/GTextLabel.cpp; sourceTree = ""; }; 344D1B2508F4A36300228075 /* GTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GTree.cpp; path = ../../common/Widgets/GTree.cpp; sourceTree = ""; }; 344E922C19602E1B000074D2 /* GThreadEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GThreadEvent.h; path = ../../../include/common/GThreadEvent.h; sourceTree = ""; }; 345C1BF20B3F4AFF00E80FF1 /* LgiClass.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiClass.h; path = ../../../include/common/LgiClass.h; sourceTree = ""; }; 345C1EC80B46017000E80FF1 /* LgiWidgets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiWidgets.h; path = ../../../include/common/LgiWidgets.h; sourceTree = ""; }; 345ECABC0FB1A74700C8BFA8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = ""; }; 345F4B9E0F058D4F0015A7EE /* GScrollBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GScrollBar.h; path = ../../../include/common/GScrollBar.h; sourceTree = ""; }; 345F9C2208F0F622007DAFE2 /* GView.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GView.cpp; path = Lgi/GView.cpp; sourceTree = ""; }; 34637EB90F876EB1005A9B80 /* GDateTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDateTime.h; path = ../../../include/common/GDateTime.h; sourceTree = ""; }; 3465BDD808C5DEC100B4C217 /* GContainers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GContainers.cpp; path = ../../common/General/GContainers.cpp; sourceTree = ""; }; 34661C7813C7407000B4C2A7 /* GUtf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GUtf8.h; path = ../../../include/common/GUtf8.h; sourceTree = ""; }; 346BF43A193AAD02000C2030 /* GBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GBox.cpp; path = ../../common/Widgets/GBox.cpp; sourceTree = ""; }; 3476333218E2D12300766FC4 /* GColour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GColour.cpp; path = ../../common/Gdc2/GColour.cpp; sourceTree = ""; }; 3476680E093F1FD400623A44 /* LgiInterfaces.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiInterfaces.h; path = ../../../include/common/LgiInterfaces.h; sourceTree = ""; }; 34766827093F207D00623A44 /* GFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GFile.h; path = ../../../include/common/GFile.h; sourceTree = ""; }; 34766831093F20EE00623A44 /* GThread.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GThread.h; path = ../../../include/common/GThread.h; sourceTree = ""; }; 347677630FE5BB2800E2E445 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../common/Hash/md5/md5.c; sourceTree = ""; }; 3478B20912E6F87200936EFA /* GEdit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GEdit.h; path = ../../../include/common/GEdit.h; sourceTree = ""; }; 347CB5FF172A97D600AC3EA6 /* GTableLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTableLayout.h; path = ../../../include/common/GTableLayout.h; sourceTree = SOURCE_ROOT; }; 3489C3E90DD1C4DB0095F0E1 /* GMru.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GMru.h; path = ../../../include/common/GMru.h; sourceTree = ""; }; 349330490F60CE440092EAE8 /* GViewCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GViewCommon.cpp; path = ../../common/Lgi/GViewCommon.cpp; sourceTree = ""; }; 3493304B0F60CE690092EAE8 /* GViewPriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GViewPriv.h; path = ../../../include/common/GViewPriv.h; sourceTree = ""; }; 34983BE208F4A54C0054868C /* GDragAndDrop.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GDragAndDrop.cpp; path = ../../common/Lgi/GDragAndDrop.cpp; sourceTree = ""; }; 34983BE508F4A5790054868C /* GMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GMenu.cpp; path = Lgi/GMenu.cpp; sourceTree = ""; }; 34983C1208F5482D0054868C /* GDocView.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GDocView.cpp; path = ../../common/Text/GDocView.cpp; sourceTree = ""; }; 34983C1308F5482D0054868C /* GTextView3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GTextView3.cpp; path = ../../common/Text/GTextView3.cpp; sourceTree = ""; }; 34983C1608F5484C0054868C /* GToolTip.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GToolTip.cpp; path = ../../common/Lgi/GToolTip.cpp; sourceTree = ""; }; 34983C1808F548620054868C /* GClipBoard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GClipBoard.cpp; path = Lgi/GClipBoard.cpp; sourceTree = ""; }; 34983C1D08F548DF0054868C /* GAlert.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GAlert.cpp; path = ../../common/Lgi/GAlert.cpp; sourceTree = ""; }; 34983C1E08F548DF0054868C /* GDataDlg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GDataDlg.cpp; path = ../../common/Lgi/GDataDlg.cpp; sourceTree = ""; }; 34983C1F08F548DF0054868C /* GFindReplace.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFindReplace.cpp; path = ../../common/Lgi/GFindReplace.cpp; sourceTree = ""; }; 34983C2008F548DF0054868C /* GInput.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GInput.cpp; path = ../../common/Lgi/GInput.cpp; sourceTree = ""; }; 34983C2108F548DF0054868C /* GMru.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GMru.cpp; path = ../../common/Lgi/GMru.cpp; sourceTree = ""; }; 34983C2208F548DF0054868C /* GTrayIcon.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GTrayIcon.cpp; path = ../../common/Lgi/GTrayIcon.cpp; sourceTree = ""; }; 34983C2308F548DF0054868C /* LgiRand.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LgiRand.cpp; path = ../../common/Lgi/LgiRand.cpp; sourceTree = ""; }; 34983C2D08F5492E0054868C /* GPassword.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GPassword.cpp; path = ../../common/General/GPassword.cpp; sourceTree = ""; }; 34A11A791675347500FCC5D7 /* GThreadCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GThreadCommon.cpp; path = ../../common/Lgi/GThreadCommon.cpp; sourceTree = ""; }; 34A11A7B1675349900FCC5D7 /* GMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GMutex.cpp; path = ../../common/Lgi/GMutex.cpp; sourceTree = ""; }; 34A11A7D167534A500FCC5D7 /* GMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GMutex.h; path = ../../../include/common/GMutex.h; sourceTree = ""; }; 34A3ABF60EF5AA0A009A5E95 /* GDisplayString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GDisplayString.cpp; path = ../../common/Gdc2/Font/GDisplayString.cpp; sourceTree = ""; }; 34A3ABF80EF5AA1A009A5E95 /* GDisplayString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDisplayString.h; path = ../../../include/common/GDisplayString.h; sourceTree = ""; }; 34A671960F3725860073A86C /* GContainers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GContainers.h; path = ../../../include/common/GContainers.h; sourceTree = ""; }; 34A8A3BC1303408000CAA8DF /* GPopup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GPopup.h; path = ../../../include/common/GPopup.h; sourceTree = ""; }; 34ADC9E00F4CC395009C6B75 /* GAutoPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GAutoPtr.h; path = ../../../include/common/GAutoPtr.h; sourceTree = ""; }; 34B28AEF143FA69B0023662F /* GPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GPath.cpp; path = ../../common/Gdc2/Path/GPath.cpp; sourceTree = ""; }; 34B28AF1143FA6AF0023662F /* GPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GPath.h; path = ../../../include/common/GPath.h; sourceTree = ""; }; 34B423810EBE762000D370A7 /* GSymLookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GSymLookup.h; path = ../../../include/mac/carbon/GSymLookup.h; sourceTree = ""; }; 34B4A4FE0C05962100CDD0D1 /* GPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GPrinter.cpp; path = Lgi/GPrinter.cpp; sourceTree = ""; }; 34B4A5000C05966000CDD0D1 /* Base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Base64.cpp; path = ../../common/INet/Base64.cpp; sourceTree = ""; }; 34B4A5060C05987F00CDD0D1 /* GMemStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GMemStream.cpp; path = ../../common/Lgi/GMemStream.cpp; sourceTree = ""; }; 34B4A50A0C0598B600CDD0D1 /* GMem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GMem.cpp; path = General/GMem.cpp; sourceTree = ""; }; 34B4A50E0C0598E900CDD0D1 /* GMem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GMem.h; path = ../../../include/common/GMem.h; sourceTree = ""; }; 34B4A52F0C059A2100CDD0D1 /* GUtf8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GUtf8.cpp; path = ../../common/Text/GUtf8.cpp; sourceTree = ""; }; 34B5EAE30DD5B39F005A24D0 /* GFileSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GFileSelect.cpp; path = Lgi/GFileSelect.cpp; sourceTree = ""; }; 34B9505A0939DA3000477A2D /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 34B9545C0939DB5A00477A2D /* GString.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GString.h; path = ../../../include/common/GString.h; sourceTree = SOURCE_ROOT; }; 34B954820939DCC400477A2D /* INet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = INet.cpp; path = ../../common/INet/INet.cpp; sourceTree = SOURCE_ROOT; }; 34B954830939DCC400477A2D /* INetTools.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = INetTools.cpp; path = ../../common/INet/INetTools.cpp; sourceTree = SOURCE_ROOT; }; 34B954860939DCDD00477A2D /* INet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = INet.h; path = ../../../include/common/INet.h; sourceTree = SOURCE_ROOT; }; 34B954870939DCDD00477A2D /* INetTools.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = INetTools.h; path = ../../../include/common/INetTools.h; sourceTree = SOURCE_ROOT; }; 34BC1E1E134DC748005451EE /* Res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Res.h; path = ../../../include/common/Res.h; sourceTree = ""; }; 34CDDAE008C5DF5B005EAAC7 /* LgiMac.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiMac.h; path = ../../../include/mac/carbon/LgiMac.h; sourceTree = ""; }; 34CDDAE108C5DF5B005EAAC7 /* LgiOsClasses.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiOsClasses.h; path = ../../../include/mac/carbon/LgiOsClasses.h; sourceTree = ""; }; 34CDDAE208C5DF5B005EAAC7 /* LgiOsDefs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = LgiOsDefs.h; path = ../../../include/mac/carbon/LgiOsDefs.h; sourceTree = ""; }; 34CDDAEA08C5DFB1005EAAC7 /* GString.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GString.cpp; path = ../../common/Text/GString.cpp; sourceTree = ""; }; 34CDDAEC08C5DFCF005EAAC7 /* GFontCodePages.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFontCodePages.cpp; path = ../../common/Gdc2/Font/GFontCodePages.cpp; sourceTree = ""; }; 34CEBFE60DDC5EF800DE0E0B /* GCombo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GCombo.h; path = ../../../include/common/GCombo.h; sourceTree = ""; }; 34D2CC4E08F0FB490009968C /* GPopup.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GPopup.cpp; path = ../../common/Widgets/GPopup.cpp; sourceTree = ""; }; 34D2CC6008F0FC7F0009968C /* GFontSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFontSystem.cpp; path = ../../common/Gdc2/Font/GFontSystem.cpp; sourceTree = ""; }; 34D2CC6208F0FCA00009968C /* GFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFont.cpp; path = ../../common/Gdc2/Font/GFont.cpp; sourceTree = ""; }; 34D2CC7208F115AD0009968C /* GFont.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = GFont.h; path = ../../../include/common/GFont.h; sourceTree = ""; }; 34D2CC8B08F116A80009968C /* GThread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GThread.cpp; path = Lgi/GThread.cpp; sourceTree = ""; }; 34D2CCA308F117A20009968C /* GFont_A.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFont_A.cpp; path = ../../common/Gdc2/Font/GFont_A.cpp; sourceTree = ""; }; 34D2CCA408F117A20009968C /* GFont_W.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFont_W.cpp; path = ../../common/Gdc2/Font/GFont_W.cpp; sourceTree = ""; }; 34D2CCA908F1181C0009968C /* GFontSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GFontSelect.cpp; path = ../../common/Lgi/GFontSelect.cpp; sourceTree = ""; }; 34D2CCAB08F1183F0009968C /* GWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GWindow.cpp; path = Lgi/GWindow.cpp; sourceTree = ""; }; 34D2CCEC08F11BEF0009968C /* GWidgets.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = GWidgets.cpp; path = Lgi/GWidgets.cpp; sourceTree = ""; }; 34D4D55A1250AF98000DA1FD /* GHashTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GHashTable.h; path = ../../../include/common/GHashTable.h; sourceTree = ""; }; 34D979D01150F0E100CE462B /* GLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GLayout.cpp; path = ../../common/Lgi/GLayout.cpp; sourceTree = ""; }; 34DA5CB60DE0DE930050C7E4 /* GScrollBar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GScrollBar.cpp; path = ../../common/Widgets/GScrollBar.cpp; sourceTree = ""; }; 34E51DAF0D2EFCCB0021AA08 /* GList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GList.h; path = ../../../include/common/GList.h; sourceTree = ""; }; 34F2E6590E1849D300E8DA6A /* GTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTree.h; path = ../../../include/common/GTree.h; sourceTree = ""; }; 34F45B9D18C161E40040FD99 /* GPixelRops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GPixelRops.h; path = ../../../include/common/GPixelRops.h; sourceTree = ""; }; 34F96DA90DB9B82B009C64B8 /* GDragAndDrop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDragAndDrop.h; path = ../../../include/common/GDragAndDrop.h; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* Lgi.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Lgi.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 8DC2EF560486A6940098B216 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 34B9505B0939DA3000477A2D /* Carbon.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 034768DFFF38A50411DB9C8B /* Products */ = { isa = PBXGroup; children = ( 8DC2EF5B0486A6940098B216 /* Lgi.framework */, ); name = Products; sourceTree = ""; }; 0867D691FE84028FC02AAC07 /* Lgi */ = { isa = PBXGroup; children = ( 08FB77AEFE84172EC02AAC07 /* Classes */, 089C1665FE841158C02AAC07 /* Resources */, 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */, 034768DFFF38A50411DB9C8B /* Products */, ); name = Lgi; sourceTree = ""; }; 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = { isa = PBXGroup; children = ( 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */, 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */, ); name = "External Frameworks and Libraries"; sourceTree = ""; }; 089C1665FE841158C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( 8DC2EF5A0486A6940098B216 /* Info.plist */, 089C1666FE841158C02AAC07 /* InfoPlist.strings */, ); name = Resources; sourceTree = ""; }; 08FB77AEFE84172EC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( 344B736A08D83F0700D49457 /* Core */, 34D2CCA808F118020009968C /* Dialogs */, 3446E2CE08D0E59E005024EB /* Graphics */, 34CDDADF08C5DF4A005EAAC7 /* Headers */, 34B954810939DCA400477A2D /* Network */, 344B738308D8409900D49457 /* Text */, 34D2CC5008F0FB510009968C /* Widgets */, ); name = Classes; sourceTree = ""; }; 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( 34B9505A0939DA3000477A2D /* Carbon.framework */, ); name = "Linked Frameworks"; sourceTree = ""; }; 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = { isa = PBXGroup; children = ( 345ECABC0FB1A74700C8BFA8 /* SystemConfiguration.framework */, 0867D69BFE84028FC02AAC07 /* Foundation.framework */, ); name = "Other Frameworks"; sourceTree = ""; }; 3416C2790967759800DD79DC /* Regions */ = { isa = PBXGroup; children = ( 3416C27A096775AF00DD79DC /* GRect.h */, 344AF38608E045F2004ED88C /* GRect.cpp */, ); name = Regions; sourceTree = ""; }; 341BE43D123ED1CE009BF203 /* Hashing */ = { isa = PBXGroup; children = ( 341BE440123ED1F1009BF203 /* sha1.c */, 341BE441123ED1F1009BF203 /* sha1.h */, 341BE43E123ED1E6009BF203 /* md5.h */, 347677630FE5BB2800E2E445 /* md5.c */, ); name = Hashing; sourceTree = ""; }; 3429212A1087D55900578ECC /* Css */ = { isa = PBXGroup; children = ( 344CD2D3176C75B9008A716C /* GCssTools.cpp */, 3429212D1087D58100578ECC /* GCss.h */, 3429212B1087D57200578ECC /* GCss.cpp */, ); name = Css; sourceTree = ""; }; 3433784D19178B33007A4DC5 /* Colour */ = { isa = PBXGroup; children = ( 3433784A19178B09007A4DC5 /* GColourSpace.h */, 3476333218E2D12300766FC4 /* GColour.cpp */, ); name = Colour; sourceTree = ""; }; 3446E2CE08D0E59E005024EB /* Graphics */ = { isa = PBXGroup; children = ( 3446E2B508D0E4AF005024EB /* Gdc2.cpp */, 344B738008D8406900D49457 /* GdcCommon.cpp */, 3446E2B608D0E4AF005024EB /* GMemDC.cpp */, 3446E2B708D0E4AF005024EB /* GPrintDC.cpp */, 3446E2B808D0E4AF005024EB /* GScreenDC.cpp */, 344AF36708E04156004ED88C /* GSurface.cpp */, 3446E2CF08D0E5C2005024EB /* Gdc2.h */, 34F45B9D18C161E40040FD99 /* GPixelRops.h */, 3446E31F08D0E9BB005024EB /* Applicators */, 3433784D19178B33007A4DC5 /* Colour */, 344D1B1108F4A2F900228075 /* Filters */, 344B738208D8408500D49457 /* Font */, 34B28AEE143FA6860023662F /* Path */, 3416C2790967759800DD79DC /* Regions */, ); name = Graphics; sourceTree = ""; }; 3446E31F08D0E9BB005024EB /* Applicators */ = { isa = PBXGroup; children = ( 3446E32A08D0E9E4005024EB /* Alpha.cpp */, 3446E32008D0E9D6005024EB /* 8Bit.cpp */, 3446E32108D0E9D6005024EB /* 15Bit.cpp */, 3446E32208D0E9D6005024EB /* 16Bit.cpp */, 3446E32308D0E9D6005024EB /* 24Bit.cpp */, 3446E32408D0E9D6005024EB /* 32Bit.cpp */, ); name = Applicators; sourceTree = ""; }; 344AF36408E0328B004ED88C /* Date/Time */ = { isa = PBXGroup; children = ( 34637EB90F876EB1005A9B80 /* GDateTime.h */, 344AF36208E03284004ED88C /* GDateTime.cpp */, ); name = Date/Time; sourceTree = ""; }; 344AF38208E045A6004ED88C /* Stream */ = { isa = PBXGroup; children = ( 342D78F011FAD1AF005BADBD /* GStream.h */, 34B4A5060C05987F00CDD0D1 /* GMemStream.cpp */, 344AF38F08E04707004ED88C /* GVariant.cpp */, 344AF38308E045C5004ED88C /* GStream.cpp */, ); name = Stream; sourceTree = ""; }; 344AF39F08E0489D004ED88C /* Process */ = { isa = PBXGroup; children = ( 344AF3A008E048C2004ED88C /* GProcess.cpp */, ); name = Process; sourceTree = ""; }; 344AF3CA08E04B4A004ED88C /* Libraries */ = { isa = PBXGroup; children = ( 344AF3D608E04BE0004ED88C /* GLibrary.h */, 344AF3CB08E04B63004ED88C /* GLibrary.cpp */, ); name = Libraries; sourceTree = ""; }; 344B736A08D83F0700D49457 /* Core */ = { isa = PBXGroup; children = ( 341BE43D123ED1CE009BF203 /* Hashing */, 34E9BF35121AA21800C1F0FA /* Exceptions */, 344D1B5208F4A52200228075 /* D'n'd */, 344AF36408E0328B004ED88C /* Date/Time */, 344B738508D840BB00D49457 /* File */, 344AF3CA08E04B4A004ED88C /* Libraries */, 344B738408D840A800D49457 /* Memory */, 34983BE408F4A5680054868C /* Menus */, 344AF39F08E0489D004ED88C /* Process */, 344D1B0B08F4A2C300228075 /* Resources */, 344AF38208E045A6004ED88C /* Stream */, 345F9C4108F0FAA9007DAFE2 /* Threads */, 344AF39508E0476A004ED88C /* GApp.cpp */, 34983C1808F548620054868C /* GClipBoard.cpp */, 344B736B08D83F1800D49457 /* GGeneral.cpp */, 344B738C08D8414400D49457 /* GGuiUtils.cpp */, 344AF3DC08E04C75004ED88C /* GObject.cpp */, 3443CBFD0C16BA64008F7B02 /* GOptionsFile.cpp */, 34B4A4FE0C05962100CDD0D1 /* GPrinter.cpp */, 34983C2208F548DF0054868C /* GTrayIcon.cpp */, 345F9C2208F0F622007DAFE2 /* GView.cpp */, 349330490F60CE440092EAE8 /* GViewCommon.cpp */, 34D2CCAB08F1183F0009968C /* GWindow.cpp */, 344B737A08D8401600D49457 /* Lgi.cpp */, 34983C2308F548DF0054868C /* LgiRand.cpp */, 3493304B0F60CE690092EAE8 /* GViewPriv.h */, ); name = Core; sourceTree = ""; }; 344B738208D8408500D49457 /* Font */ = { isa = PBXGroup; children = ( 34A3ABF80EF5AA1A009A5E95 /* GDisplayString.h */, 34A3ABF60EF5AA0A009A5E95 /* GDisplayString.cpp */, 34D2CC7208F115AD0009968C /* GFont.h */, 34D2CC6208F0FCA00009968C /* GFont.cpp */, 34D2CCA308F117A20009968C /* GFont_A.cpp */, 34D2CCA408F117A20009968C /* GFont_W.cpp */, 34D2CC6008F0FC7F0009968C /* GFontSystem.cpp */, 34CDDAEC08C5DFCF005EAAC7 /* GFontCodePages.cpp */, ); name = Font; sourceTree = ""; }; 344B738308D8409900D49457 /* Text */ = { isa = PBXGroup; children = ( 34661C7813C7407000B4C2A7 /* GUtf8.h */, 3413BBC11349EC6900AE15B0 /* GXmlTree.h */, 34B4A52F0C059A2100CDD0D1 /* GUtf8.cpp */, 34B9545C0939DB5A00477A2D /* GString.h */, 344AF35E08E0322F004ED88C /* GToken.cpp */, 344AF35F08E0322F004ED88C /* GXmlTree.cpp */, 34CDDAEA08C5DFB1005EAAC7 /* GString.cpp */, ); name = Text; sourceTree = ""; }; 344B738408D840A800D49457 /* Memory */ = { isa = PBXGroup; children = ( 34D4D55A1250AF98000DA1FD /* GHashTable.h */, 34ADC9E00F4CC395009C6B75 /* GAutoPtr.h */, 340BFC49096A9D4600A11AE6 /* GArray.h */, 3465BDD808C5DEC100B4C217 /* GContainers.cpp */, 34A671960F3725860073A86C /* GContainers.h */, 34B4A50A0C0598B600CDD0D1 /* GMem.cpp */, 34B4A50E0C0598E900CDD0D1 /* GMem.h */, 344AF3C808E04B32004ED88C /* GProperties.cpp */, ); name = Memory; sourceTree = ""; }; 344B738508D840BB00D49457 /* File */ = { isa = PBXGroup; children = ( 34766827093F207D00623A44 /* GFile.h */, 344B738608D840CF00D49457 /* GFile.cpp */, 344AC3E21915AC25003FFE7E /* GFileCommon.cpp */, ); name = File; sourceTree = ""; }; 344D1B0B08F4A2C300228075 /* Resources */ = { isa = PBXGroup; children = ( 342CE46111FDAB57000B1F3C /* LgiRes.h */, 344D1B0C08F4A2DB00228075 /* LgiRes.cpp */, 344D1B0D08F4A2DB00228075 /* Res.cpp */, 34BC1E1E134DC748005451EE /* Res.h */, ); name = Resources; sourceTree = ""; }; 344D1B1108F4A2F900228075 /* Filters */ = { isa = PBXGroup; children = ( 344D1B1208F4A30D00228075 /* GFilter.cpp */, ); name = Filters; sourceTree = ""; }; 344D1B5208F4A52200228075 /* D'n'd */ = { isa = PBXGroup; children = ( 34F96DA90DB9B82B009C64B8 /* GDragAndDrop.h */, 34983BE208F4A54C0054868C /* GDragAndDrop.cpp */, ); name = "D'n'd"; sourceTree = ""; }; 345F9C4108F0FAA9007DAFE2 /* Threads */ = { isa = PBXGroup; children = ( 344E922C19602E1B000074D2 /* GThreadEvent.h */, 343E950C1751C6090085611D /* GThreadEvent.cpp */, 34A11A7D167534A500FCC5D7 /* GMutex.h */, 34A11A7B1675349900FCC5D7 /* GMutex.cpp */, 34A11A791675347500FCC5D7 /* GThreadCommon.cpp */, 34766831093F20EE00623A44 /* GThread.h */, 34D2CC8B08F116A80009968C /* GThread.cpp */, ); name = Threads; sourceTree = ""; }; 34983BE408F4A5680054868C /* Menus */ = { isa = PBXGroup; children = ( 343BF8410B58A110008AFE75 /* GMenu.h */, 34983BE508F4A5790054868C /* GMenu.cpp */, ); name = Menus; sourceTree = ""; }; 34B28AEE143FA6860023662F /* Path */ = { isa = PBXGroup; children = ( 34B28AF1143FA6AF0023662F /* GPath.h */, 34B28AEF143FA69B0023662F /* GPath.cpp */, ); name = Path; sourceTree = ""; }; 34B5EAE20DD5B374005A24D0 /* Mac Native */ = { isa = PBXGroup; children = ( 342D52FA0F0CBE0A002A1C7C /* GFileSelect.h */, 34B5EAE30DD5B39F005A24D0 /* GFileSelect.cpp */, ); name = "Mac Native"; sourceTree = ""; }; 34B954810939DCA400477A2D /* Network */ = { isa = PBXGroup; children = ( 34B4A5000C05966000CDD0D1 /* Base64.cpp */, 34B954860939DCDD00477A2D /* INet.h */, 34B954820939DCC400477A2D /* INet.cpp */, 34B954870939DCDD00477A2D /* INetTools.h */, 34B954830939DCC400477A2D /* INetTools.cpp */, ); name = Network; sourceTree = ""; }; 34CDDADF08C5DF4A005EAAC7 /* Headers */ = { isa = PBXGroup; children = ( 3427C3BD11FC02AE002AC215 /* LgiInc.h */, 345C1BF20B3F4AFF00E80FF1 /* LgiClass.h */, 340BFC14096A0E0100A11AE6 /* LgiCommon.h */, 3476680E093F1FD400623A44 /* LgiInterfaces.h */, 344AF3C208E04A94004ED88C /* LgiDefs.h */, 344B737708D83F6C00D49457 /* LgiClasses.h */, 344B736308D83E8300D49457 /* Lgi.h */, 34CDDAE008C5DF5B005EAAC7 /* LgiMac.h */, 34CDDAE108C5DF5B005EAAC7 /* LgiOsClasses.h */, 34CDDAE208C5DF5B005EAAC7 /* LgiOsDefs.h */, ); name = Headers; sourceTree = ""; }; 34D2CC5008F0FB510009968C /* Widgets */ = { isa = PBXGroup; children = ( 3429212A1087D55900578ECC /* Css */, 344D1B1608F4A36300228075 /* GBitmap.cpp */, 346BF43A193AAD02000C2030 /* GBox.cpp */, 344D1B1708F4A36300228075 /* GButton.cpp */, 344D1B1808F4A36300228075 /* GCheckBox.cpp */, 341B7C481956D3AA00AAA225 /* GCheckBox.h */, 344D1B1908F4A36300228075 /* GCombo.cpp */, 34CEBFE60DDC5EF800DE0E0B /* GCombo.h */, 34983C1208F5482D0054868C /* GDocView.cpp */, 34372ACF0C46E0290090CDC9 /* GDocView.h */, 344D1B1A08F4A36300228075 /* GEdit.cpp */, 3478B20912E6F87200936EFA /* GEdit.h */, 34D979D01150F0E100CE462B /* GLayout.cpp */, 344D1B1B08F4A36300228075 /* GList.cpp */, 34E51DAF0D2EFCCB0021AA08 /* GList.h */, 344D1B1C08F4A36300228075 /* GPanel.cpp */, 34D2CC4E08F0FB490009968C /* GPopup.cpp */, 34A8A3BC1303408000CAA8DF /* GPopup.h */, 344D1B1D08F4A36300228075 /* GProgress.cpp */, 344D1B1E08F4A36300228075 /* GProgressDlg.cpp */, 344D1B1408F4A33400228075 /* GRadioGroup.cpp */, 341B7C4A1956E08500AAA225 /* GRadioGroup.h */, 34DA5CB60DE0DE930050C7E4 /* GScrollBar.cpp */, 345F4B9E0F058D4F0015A7EE /* GScrollBar.h */, 344D1B0508F4A26300228075 /* GSlider.h */, 344D1B1F08F4A36300228075 /* GSplitter.cpp */, 344D1B2008F4A36300228075 /* GStatusBar.cpp */, 344D1B2108F4A36300228075 /* GTableLayout.cpp */, 347CB5FF172A97D600AC3EA6 /* GTableLayout.h */, 344D1B2208F4A36300228075 /* GTabView.cpp */, 344D1B2308F4A36300228075 /* GTextLabel.cpp */, 34983C1308F5482D0054868C /* GTextView3.cpp */, 34463F2411FBE25E009BB91F /* GTextView3.h */, 3444A36012275BDD004ADADE /* GToolBar.cpp */, 340FEA9D096E375600E534D5 /* GToolTabBar.h */, 34983C1608F5484C0054868C /* GToolTip.cpp */, 344D1B2508F4A36300228075 /* GTree.cpp */, 34F2E6590E1849D300E8DA6A /* GTree.h */, 34D2CCEC08F11BEF0009968C /* GWidgets.cpp */, 345C1EC80B46017000E80FF1 /* LgiWidgets.h */, 34DA5C2C0DE0339E0050C7E4 /* Mac Native */, ); name = Widgets; sourceTree = ""; }; 34D2CCA808F118020009968C /* Dialogs */ = { isa = PBXGroup; children = ( 34B5EAE20DD5B374005A24D0 /* Mac Native */, 34983C1D08F548DF0054868C /* GAlert.cpp */, 34983C1E08F548DF0054868C /* GDataDlg.cpp */, 34983C1F08F548DF0054868C /* GFindReplace.cpp */, 34D2CCA908F1181C0009968C /* GFontSelect.cpp */, 34983C2008F548DF0054868C /* GInput.cpp */, 34983C2108F548DF0054868C /* GMru.cpp */, 3489C3E90DD1C4DB0095F0E1 /* GMru.h */, 34983C2D08F5492E0054868C /* GPassword.cpp */, 344B738908D8410B00D49457 /* LgiMsg.cpp */, ); name = Dialogs; sourceTree = ""; }; 34DA5C2C0DE0339E0050C7E4 /* Mac Native */ = { isa = PBXGroup; children = ( 340FEA9C096E375600E534D5 /* GToolBar.h */, ); name = "Mac Native"; sourceTree = ""; }; 34E9BF35121AA21800C1F0FA /* Exceptions */ = { isa = PBXGroup; children = ( 34B423810EBE762000D370A7 /* GSymLookup.h */, ); name = Exceptions; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 8DC2EF500486A6940098B216 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 34CDDAE308C5DF5B005EAAC7 /* LgiMac.h in Headers */, 34CDDAE408C5DF5B005EAAC7 /* LgiOsClasses.h in Headers */, 34CDDAE508C5DF5B005EAAC7 /* LgiOsDefs.h in Headers */, 3446E2D008D0E5C2005024EB /* Gdc2.h in Headers */, 344B736408D83E8300D49457 /* Lgi.h in Headers */, 344B737808D83F6C00D49457 /* LgiClasses.h in Headers */, 344AF3C308E04A94004ED88C /* LgiDefs.h in Headers */, 344AF3D708E04BE0004ED88C /* GLibrary.h in Headers */, 34D2CC7308F115AD0009968C /* GFont.h in Headers */, 344D1B0608F4A26300228075 /* GSlider.h in Headers */, 34B9545D0939DB5A00477A2D /* GString.h in Headers */, 34B954880939DCDD00477A2D /* INet.h in Headers */, 34B954890939DCDD00477A2D /* INetTools.h in Headers */, 3476680F093F1FD400623A44 /* LgiInterfaces.h in Headers */, 34766828093F207D00623A44 /* GFile.h in Headers */, 34766832093F20EE00623A44 /* GThread.h in Headers */, 3416C27B096775AF00DD79DC /* GRect.h in Headers */, 340BFC15096A0E0100A11AE6 /* LgiCommon.h in Headers */, 340BFC4A096A9D4600A11AE6 /* GArray.h in Headers */, 340FEA9E096E375600E534D5 /* GToolBar.h in Headers */, 340FEA9F096E375600E534D5 /* GToolTabBar.h in Headers */, 345C1BF30B3F4AFF00E80FF1 /* LgiClass.h in Headers */, 345C1EC90B46017000E80FF1 /* LgiWidgets.h in Headers */, 343BF8420B58A110008AFE75 /* GMenu.h in Headers */, 34B4A50F0C0598E900CDD0D1 /* GMem.h in Headers */, 34372AD00C46E0290090CDC9 /* GDocView.h in Headers */, 34E51DB00D2EFCCB0021AA08 /* GList.h in Headers */, 34F96DAA0DB9B82B009C64B8 /* GDragAndDrop.h in Headers */, 3489C3EA0DD1C4DB0095F0E1 /* GMru.h in Headers */, 34CEBFE70DDC5EF800DE0E0B /* GCombo.h in Headers */, 34F2E65A0E1849D300E8DA6A /* GTree.h in Headers */, 34B423820EBE762000D370A7 /* GSymLookup.h in Headers */, 34A3ABF90EF5AA1A009A5E95 /* GDisplayString.h in Headers */, 345F4B9F0F058D4F0015A7EE /* GScrollBar.h in Headers */, 342D52FB0F0CBE0A002A1C7C /* GFileSelect.h in Headers */, 34A671970F3725860073A86C /* GContainers.h in Headers */, 34ADC9E10F4CC395009C6B75 /* GAutoPtr.h in Headers */, 3493304C0F60CE690092EAE8 /* GViewPriv.h in Headers */, 34637EBA0F876EB1005A9B80 /* GDateTime.h in Headers */, 3429212E1087D58100578ECC /* GCss.h in Headers */, 342D78F111FAD1AF005BADBD /* GStream.h in Headers */, 34463F2511FBE25E009BB91F /* GTextView3.h in Headers */, 3427C3BE11FC02AE002AC215 /* LgiInc.h in Headers */, 342CE46211FDAB57000B1F3C /* LgiRes.h in Headers */, 341BE43F123ED1E6009BF203 /* md5.h in Headers */, 341BE443123ED1F1009BF203 /* sha1.h in Headers */, 34D4D55B1250AF98000DA1FD /* GHashTable.h in Headers */, 3478B20A12E6F87200936EFA /* GEdit.h in Headers */, 34A8A3BD1303408000CAA8DF /* GPopup.h in Headers */, 3413BBC21349EC6900AE15B0 /* GXmlTree.h in Headers */, 34BC1E1F134DC748005451EE /* Res.h in Headers */, 34661C7913C7407000B4C2A7 /* GUtf8.h in Headers */, 34B28AF2143FA6AF0023662F /* GPath.h in Headers */, 34A11A7E167534A500FCC5D7 /* GMutex.h in Headers */, 347CB600172A97D600AC3EA6 /* GTableLayout.h in Headers */, 34F45B9E18C161E40040FD99 /* GPixelRops.h in Headers */, 3433784B19178B09007A4DC5 /* GColourSpace.h in Headers */, 341B7C491956D3AA00AAA225 /* GCheckBox.h in Headers */, 341B7C4B1956E08500AAA225 /* GRadioGroup.h in Headers */, 344E922D19602E1B000074D2 /* GThreadEvent.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 8DC2EF4F0486A6940098B216 /* Lgi */ = { isa = PBXNativeTarget; buildConfigurationList = 34BA94D70B33ADB400493CD3 /* Build configuration list for PBXNativeTarget "Lgi" */; buildPhases = ( 8DC2EF500486A6940098B216 /* Headers */, 8DC2EF520486A6940098B216 /* Resources */, 8DC2EF540486A6940098B216 /* Sources */, 8DC2EF560486A6940098B216 /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = Lgi; productInstallPath = "$(HOME)/Library/Frameworks"; productName = Lgi; productReference = 8DC2EF5B0486A6940098B216 /* Lgi.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0510; }; buildConfigurationList = 34BA94DB0B33ADB400493CD3 /* Build configuration list for PBXProject "LgiCarbon" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( English, Japanese, French, German, ); mainGroup = 0867D691FE84028FC02AAC07 /* Lgi */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 8DC2EF4F0486A6940098B216 /* Lgi */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 8DC2EF520486A6940098B216 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 8DC2EF540486A6940098B216 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 3465BDD908C5DEC100B4C217 /* GContainers.cpp in Sources */, 34CDDAEB08C5DFB1005EAAC7 /* GString.cpp in Sources */, 34CDDAED08C5DFCF005EAAC7 /* GFontCodePages.cpp in Sources */, 3446E2B908D0E4AF005024EB /* Gdc2.cpp in Sources */, 3446E2BA08D0E4AF005024EB /* GMemDC.cpp in Sources */, 3446E2BB08D0E4AF005024EB /* GPrintDC.cpp in Sources */, 3446E2BC08D0E4AF005024EB /* GScreenDC.cpp in Sources */, 3446E32508D0E9D6005024EB /* 8Bit.cpp in Sources */, 3446E32608D0E9D6005024EB /* 15Bit.cpp in Sources */, 3446E32708D0E9D6005024EB /* 16Bit.cpp in Sources */, 3446E32808D0E9D6005024EB /* 24Bit.cpp in Sources */, 3446E32908D0E9D6005024EB /* 32Bit.cpp in Sources */, 3446E32B08D0E9E4005024EB /* Alpha.cpp in Sources */, 344B736C08D83F1800D49457 /* GGeneral.cpp in Sources */, 344B737B08D8401600D49457 /* Lgi.cpp in Sources */, 344B738108D8406900D49457 /* GdcCommon.cpp in Sources */, 344B738708D840CF00D49457 /* GFile.cpp in Sources */, 344B738A08D8410B00D49457 /* LgiMsg.cpp in Sources */, 344B738D08D8414400D49457 /* GGuiUtils.cpp in Sources */, 344AF36008E0322F004ED88C /* GToken.cpp in Sources */, 344AF36108E0322F004ED88C /* GXmlTree.cpp in Sources */, 344AF36308E03284004ED88C /* GDateTime.cpp in Sources */, 344AF36808E04156004ED88C /* GSurface.cpp in Sources */, 344AF38408E045C5004ED88C /* GStream.cpp in Sources */, 344AF38708E045F2004ED88C /* GRect.cpp in Sources */, 344AF39008E04707004ED88C /* GVariant.cpp in Sources */, 344AF39608E0476A004ED88C /* GApp.cpp in Sources */, 344AF3A108E048C2004ED88C /* GProcess.cpp in Sources */, 344AF3C908E04B32004ED88C /* GProperties.cpp in Sources */, 344AF3CC08E04B63004ED88C /* GLibrary.cpp in Sources */, 344AF3DD08E04C75004ED88C /* GObject.cpp in Sources */, 345F9C2308F0F622007DAFE2 /* GView.cpp in Sources */, 34D2CC4F08F0FB490009968C /* GPopup.cpp in Sources */, 34D2CC6108F0FC7F0009968C /* GFontSystem.cpp in Sources */, 34D2CC6308F0FCA00009968C /* GFont.cpp in Sources */, 34D2CC8C08F116A80009968C /* GThread.cpp in Sources */, 34D2CCA508F117A20009968C /* GFont_A.cpp in Sources */, 34D2CCA608F117A20009968C /* GFont_W.cpp in Sources */, 34D2CCAA08F1181C0009968C /* GFontSelect.cpp in Sources */, 34D2CCAC08F1183F0009968C /* GWindow.cpp in Sources */, 34D2CCED08F11BEF0009968C /* GWidgets.cpp in Sources */, 344D1B0E08F4A2DB00228075 /* LgiRes.cpp in Sources */, 344D1B0F08F4A2DB00228075 /* Res.cpp in Sources */, 344D1B1308F4A30D00228075 /* GFilter.cpp in Sources */, 344D1B1508F4A33400228075 /* GRadioGroup.cpp in Sources */, 344D1B2608F4A36300228075 /* GBitmap.cpp in Sources */, 344D1B2708F4A36300228075 /* GButton.cpp in Sources */, 344D1B2808F4A36300228075 /* GCheckBox.cpp in Sources */, 344D1B2908F4A36300228075 /* GCombo.cpp in Sources */, 344D1B2A08F4A36300228075 /* GEdit.cpp in Sources */, 344D1B2B08F4A36300228075 /* GList.cpp in Sources */, 344D1B2C08F4A36300228075 /* GPanel.cpp in Sources */, 344D1B2D08F4A36300228075 /* GProgress.cpp in Sources */, 344D1B2E08F4A36300228075 /* GProgressDlg.cpp in Sources */, 344D1B2F08F4A36300228075 /* GSplitter.cpp in Sources */, 344D1B3008F4A36300228075 /* GStatusBar.cpp in Sources */, 344D1B3108F4A36300228075 /* GTableLayout.cpp in Sources */, 344D1B3208F4A36300228075 /* GTabView.cpp in Sources */, 344D1B3308F4A36300228075 /* GTextLabel.cpp in Sources */, 344D1B3508F4A36300228075 /* GTree.cpp in Sources */, 34983BE308F4A54C0054868C /* GDragAndDrop.cpp in Sources */, 34983BE608F4A5790054868C /* GMenu.cpp in Sources */, 34983C1408F5482D0054868C /* GDocView.cpp in Sources */, 34983C1508F5482D0054868C /* GTextView3.cpp in Sources */, 34983C1708F5484C0054868C /* GToolTip.cpp in Sources */, 34983C1908F548620054868C /* GClipBoard.cpp in Sources */, 34983C2408F548DF0054868C /* GAlert.cpp in Sources */, 34983C2508F548DF0054868C /* GDataDlg.cpp in Sources */, 34983C2608F548DF0054868C /* GFindReplace.cpp in Sources */, 34983C2708F548DF0054868C /* GInput.cpp in Sources */, 34983C2808F548DF0054868C /* GMru.cpp in Sources */, 34983C2908F548DF0054868C /* GTrayIcon.cpp in Sources */, 34983C2A08F548DF0054868C /* LgiRand.cpp in Sources */, 34983C2E08F5492E0054868C /* GPassword.cpp in Sources */, 34B954840939DCC400477A2D /* INet.cpp in Sources */, 34B954850939DCC400477A2D /* INetTools.cpp in Sources */, 34B4A4FF0C05962100CDD0D1 /* GPrinter.cpp in Sources */, 34B4A5010C05966000CDD0D1 /* Base64.cpp in Sources */, 34B4A5070C05987F00CDD0D1 /* GMemStream.cpp in Sources */, 34B4A50B0C0598B600CDD0D1 /* GMem.cpp in Sources */, 34B4A5300C059A2100CDD0D1 /* GUtf8.cpp in Sources */, 3443CBFE0C16BA64008F7B02 /* GOptionsFile.cpp in Sources */, 34B5EAE40DD5B39F005A24D0 /* GFileSelect.cpp in Sources */, 34DA5CB70DE0DE930050C7E4 /* GScrollBar.cpp in Sources */, 34A3ABF70EF5AA0A009A5E95 /* GDisplayString.cpp in Sources */, 3493304A0F60CE440092EAE8 /* GViewCommon.cpp in Sources */, 347677640FE5BB2800E2E445 /* md5.c in Sources */, 3429212C1087D57200578ECC /* GCss.cpp in Sources */, 34D979D11150F0E100CE462B /* GLayout.cpp in Sources */, 3444A36112275BDD004ADADE /* GToolBar.cpp in Sources */, 341BE442123ED1F1009BF203 /* sha1.c in Sources */, 34B28AF0143FA69B0023662F /* GPath.cpp in Sources */, 34A11A7A1675347500FCC5D7 /* GThreadCommon.cpp in Sources */, 34A11A7C1675349900FCC5D7 /* GMutex.cpp in Sources */, 343E950D1751C6090085611D /* GThreadEvent.cpp in Sources */, 344CD2D4176C75B9008A716C /* GCssTools.cpp in Sources */, 3476333318E2D12300766FC4 /* GColour.cpp in Sources */, 344AC3E31915AC25003FFE7E /* GFileCommon.cpp in Sources */, 346BF43B193AAD02000C2030 /* GBox.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, ); name = InfoPlist.strings; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 34BA94D80B33ADB400493CD3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", ); FRAMEWORK_VERSION = A; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Lgi_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = MAC; + GCC_VERSION = ""; HEADER_SEARCH_PATHS = ( include/mac, include/common, ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; MACH_O_TYPE = mh_dylib; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = Lgi; - SDKROOT = macosx10.7; + SDKROOT = macosx; SYMROOT = build; WRAPPER_EXTENSION = framework; }; name = Debug; }; 34BA94D90B33ADB400493CD3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", ); FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Lgi_Prefix.pch; GCC_PREPROCESSOR_DEFINITIONS = MAC; + GCC_VERSION = ""; HEADER_SEARCH_PATHS = ( include/mac, include/common, ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; MACH_O_TYPE = mh_dylib; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = Lgi; - SDKROOT = macosx10.7; + SDKROOT = macosx; STRIP_INSTALLED_PRODUCT = YES; SYMROOT = build; WRAPPER_EXTENSION = framework; }; name = Release; }; 34BA94DC0B33ADB400493CD3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_OPTIMIZATION_LEVEL = 0; GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ( "-D_DEBUG", "-DMAC", "-DLGI_LIBRARY", ); - SDKROOT = macosx10.7; + SDKROOT = macosx; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = ./build; USER_HEADER_SEARCH_PATHS = "../../../include/common ../../../include/mac/carbon ../../../include/posix"; VALID_ARCHS = i386; }; name = Debug; }; 34BA94DD0B33ADB400493CD3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_BIT)"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_OPTIMIZATION_LEVEL = s; GCC_VERSION = com.apple.compilers.llvmgcc42; GCC_WARN_64_TO_32_BIT_CONVERSION = NO; INSTALL_PATH = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; OTHER_CFLAGS = ( "-DMAC", "-DLGI_LIBRARY", ); - SDKROOT = macosx10.7; + SDKROOT = macosx; SYMROOT = ./build; USER_HEADER_SEARCH_PATHS = "../../../include/common ../../../include/mac/carbon ../../../include/posix"; VALID_ARCHS = i386; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 34BA94D70B33ADB400493CD3 /* Build configuration list for PBXNativeTarget "Lgi" */ = { isa = XCConfigurationList; buildConfigurations = ( 34BA94D80B33ADB400493CD3 /* Debug */, 34BA94D90B33ADB400493CD3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; 34BA94DB0B33ADB400493CD3 /* Build configuration list for PBXProject "LgiCarbon" */ = { isa = XCConfigurationList; buildConfigurations = ( 34BA94DC0B33ADB400493CD3 /* Debug */, 34BA94DD0B33ADB400493CD3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; rootObject = 0867D690FE84028FC02AAC07 /* Project object */; }