| 1 |
// { dg-lto-do link } |
| 2 |
// { dg-require-effective-target lto_incremental } |
| 3 |
// { dg-lto-options { { -flto -O2 -Wno-return-type } } } |
| 4 |
// { dg-extra-ld-options "-r -nostdlib -O0" } |
| 5 |
|
| 6 |
class CstringStorageReference { |
| 7 |
public: |
| 8 |
~CstringStorageReference (); |
| 9 |
}; |
| 10 |
class Cstring { |
| 11 |
CstringStorageReference m_stringRef; |
| 12 |
public: |
| 13 |
Cstring (const char *str, int l = 0); |
| 14 |
unsigned int getLength () const; |
| 15 |
}; |
| 16 |
class ZEvent_Component { }; |
| 17 |
class ZEvent_Data { }; |
| 18 |
class ZEvent_Interrupt { }; |
| 19 |
class ZEvent_Mouse { }; |
| 20 |
class ZEvent_Key { }; |
| 21 |
class ZEventHandler { |
| 22 |
virtual void HandleEvent (const ZEvent_Component & event); |
| 23 |
virtual void HandleEvent (const ZEvent_Mouse & event); |
| 24 |
virtual void HandleEvent (const ZEvent_Key & event); |
| 25 |
virtual void HandleEvent (const ZEvent_Interrupt & event); |
| 26 |
virtual void HandleEvent (const ZEvent_Data & event); |
| 27 |
}; |
| 28 |
enum ZHorizontalAlignment { HA_Left }; |
| 29 |
enum ZVerticalAlignment { VA_Baseline }; |
| 30 |
struct ZDevicePointStruct { }; |
| 31 |
struct ZDeviceRectangleStruct { }; |
| 32 |
struct ZDeviceCircleStruct { }; |
| 33 |
class ZOutputDevice; |
| 34 |
class Foo; |
| 35 |
class ZRubberBand { |
| 36 |
public: |
| 37 |
ZOutputDevice * getOutputDevice (); |
| 38 |
}; |
| 39 |
class ZRubberBand2P : public ZRubberBand { |
| 40 |
virtual void Init (); |
| 41 |
Foo *mp_graphicContext; |
| 42 |
int m_textAscent; |
| 43 |
int m_OkButtonWidth; |
| 44 |
int m_OkButtonHeight; |
| 45 |
}; |
| 46 |
class ZColor { }; |
| 47 |
class ZViewPort2D { }; |
| 48 |
class ZCursor; |
| 49 |
class ZPixmap; |
| 50 |
class ZOutputDevice:public ZEventHandler { |
| 51 |
public: |
| 52 |
typedef ZHorizontalAlignment THorizontalAlignment; |
| 53 |
typedef ZVerticalAlignment TVerticalAlignment; |
| 54 |
virtual const char *MyName () const { return ""; } |
| 55 |
virtual ~ ZOutputDevice (); |
| 56 |
virtual Cstring getTitle () const; |
| 57 |
virtual void setTitle (const Cstring &) { } |
| 58 |
virtual void Init (); |
| 59 |
virtual void shutdown (); |
| 60 |
virtual void minimize (); |
| 61 |
virtual void normalize (); |
| 62 |
virtual void raiseToTop (); |
| 63 |
virtual ZViewPort2D GetViewPort () const; |
| 64 |
virtual void setBackgroundColor (const ZColor & color) = 0; |
| 65 |
virtual void Clear () = 0; |
| 66 |
virtual void Flush (int forced) = 0; |
| 67 |
virtual void dismissCache () { } |
| 68 |
virtual int GetDeviceWidth () const = 0; |
| 69 |
virtual int GetDeviceHeight () const = 0; |
| 70 |
virtual Foo *CreateGraphicContext () = 0; |
| 71 |
virtual ZCursor *createCursor (const ZPixmap &, int, int) { return __null; } |
| 72 |
virtual void DrawLine (const Foo & gc, int x1, int y1, int x2, int y2) = 0; |
| 73 |
virtual void DrawLines (const Foo & gc, const ZDevicePointStruct * points, unsigned int count) = 0; |
| 74 |
virtual void FillPolygon (const Foo & gc, const ZDevicePointStruct * points, unsigned int count) = 0; |
| 75 |
virtual void DrawPoint (const Foo & gc, int x1, int y1) = 0; |
| 76 |
virtual void DrawPoints (const Foo & gc, const ZDevicePointStruct * points, unsigned int count) = 0; |
| 77 |
virtual void DrawRectangle (const Foo & gc, int x, int y, int width, int height) = 0; |
| 78 |
virtual void DrawRectangles (const Foo & gc, const ZDeviceRectangleStruct * rectangles, unsigned int count) = 0; |
| 79 |
virtual void FillRectangle (const Foo & gc, int x, int y, int width, int height) = 0; |
| 80 |
virtual void FillRectangles (const Foo & gc, const ZDeviceRectangleStruct * rectangles, unsigned int count) = 0; |
| 81 |
virtual void DrawCircle (const Foo & gc, int x, int y, int radius) = 0; |
| 82 |
virtual void DrawCircles (const Foo & gc, const ZDeviceCircleStruct * circle, unsigned int count) = 0; |
| 83 |
virtual void FillCircle (const Foo & gc, int x, int y, int radius) = 0; |
| 84 |
virtual void FillCircles (const Foo & gc, const ZDeviceCircleStruct * circle, unsigned int count) = 0; |
| 85 |
virtual void DrawString (const Foo & gc, int xx, int yy, const Cstring & theString, THorizontalAlignment horAlign = HA_Left, TVerticalAlignment verAlign = VA_Baseline) = 0; |
| 86 |
virtual void getStringBounds (const Foo & gc, const Cstring & theString, int & width, int & height, int & ascent) const; |
| 87 |
}; |
| 88 |
template < class T > class EMaskContentVector |
| 89 |
{ |
| 90 |
signed m_freelist_idx:32; |
| 91 |
EMaskContentVector (const EMaskContentVector < T > &, void *buf); |
| 92 |
}; |
| 93 |
template < class T > EMaskContentVector < |
| 94 |
T >::EMaskContentVector (const EMaskContentVector < T > &elem, void *buf): |
| 95 |
m_freelist_idx (-1) |
| 96 |
{ |
| 97 |
} |
| 98 |
void ZRubberBand2P::Init () { |
| 99 |
getOutputDevice ()->getStringBounds (*mp_graphicContext, Cstring ("Ok"), m_OkButtonWidth, m_OkButtonHeight, m_textAscent); |
| 100 |
} |