Author: bonefish Date: 2010-11-15 13:37:52 +0100 (Mon, 15 Nov 2010) New Revision: 39435 Changeset: http://dev.haiku-os.org/changeset/39435 Added: haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/IconBuild.h Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/CanvasView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/MainWindow.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/Util.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.cpp haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/GradientControl.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/IconView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/PathListView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/ShapeListView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleListView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/TransformerListView.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Exporter.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Importer.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/flat_icon/FlatIconExporter.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/message/MessageExporter.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/DocumentBuilder.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGExporter.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGGradients.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddPathsCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddShapesCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddTransformersCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/FreezeTransformationCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MovePathsCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveShapesCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveTransformersCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/PathCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/RemovePathsCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/RemoveShapesCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/RemoveTransformersCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/TransformPointsCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/UnassignPathCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/style/AddStylesCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/style/AssignStyleCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/style/MoveStylesCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/style/RemoveStylesCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/style/SetColorCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/style/SetGradientCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/transformable/ResetTransformationCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/transformable/TransformGradientBox.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/transformable/TransformGradientCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/transformable/TransformPointsBox.h haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/transformable/TransformShapesBox.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/Icon.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/IconRenderer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/IconUtils.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/flat_icon/FlatIconFormat.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/flat_icon/FlatIconFormat.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/flat_icon/FlatIconImporter.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/flat_icon/LittleEndianBuffer.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/flat_icon/LittleEndianBuffer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/flat_icon/PathCommandQueue.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/message/Defines.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/message/Defines.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/message/MessageImporter.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/shape/PathContainer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/shape/Shape.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/shape/ShapeContainer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/shape/VectorPath.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/style/GradientTransformable.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/style/Style.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/style/StyleContainer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformable/Transformable.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/AffineTransformer.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/AffineTransformer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/ContourTransformer.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/ContourTransformer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/PathSource.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/PerspectiveTransformer.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/PerspectiveTransformer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/StrokeTransformer.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/StrokeTransformer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/Transformer.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/Transformer.h haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/TransformerFactory.cpp haiku/branches/developer/bonefish/weak-symbols/src/libs/icon/transformer/TransformerFactory.h Log: Moved the libicon classes into a different namespace when compiling them for Icon-O-Matic. Since they have different implementations (which is rather hacky BTW) Icon-O-Matic would crash with symbol preemption enabled. Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/CanvasView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/CanvasView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/CanvasView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -16,13 +16,13 @@ class BBitmap; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class IconRenderer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + enum { SNAPPING_OFF = 0, SNAPPING_64, Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/MainWindow.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/MainWindow.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/MainWindow.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -12,8 +12,10 @@ #include <Entry.h> #include <Window.h> +#include "IconBuild.h" #include "Observer.h" + class BMenu; class BMenuBar; class BMenuItem; @@ -29,13 +31,13 @@ class SwatchGroup; class TransformerListView; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Icon; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class MultipleManipulatorState; enum { Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/Util.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/Util.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/Util.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -11,21 +11,22 @@ #include <GraphicsDefs.h> +#include "IconBuild.h" + class AddPathsCommand; class AddStylesCommand; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class PathContainer; class Style; class StyleContainer; class VectorPath; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + void new_style(rgb_color color, StyleContainer* container, Style** style, AddStylesCommand** command); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.cpp =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.cpp 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.cpp 2010-11-15 12:37:52 UTC (rev 39435) @@ -24,13 +24,13 @@ using std::nothrow; -using namespace BPrivate::Icon; +_USING_ICON_NAMESPACE // constructor Document::Document(const char* name) : RWLocker("document rw lock"), - fIcon(new (nothrow) BPrivate::Icon::Icon()), + fIcon(new (nothrow) _ICON_NAMESPACE Icon()), fCommandStack(new (nothrow) ::CommandStack()), fSelection(new (nothrow) ::Selection()), @@ -87,7 +87,7 @@ // SetIcon void -Document::SetIcon(BPrivate::Icon::Icon* icon) +Document::SetIcon(_ICON_NAMESPACE Icon* icon) { if (fIcon == icon) return; @@ -121,6 +121,6 @@ { return fIcon->Styles()->CountStyles() == 0 && fIcon->Paths()->CountPaths() == 0 - && fIcon->Shapes()->CountShapes() == 0; + && fIcon->Shapes()->CountShapes() == 0; } Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/document/Document.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -9,21 +9,19 @@ #define DOCUMENT_H +#include "IconBuild.h" #include "Observable.h" #include "RWLocker.h" #include <String.h> + struct entry_ref; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE + class Icon; +_END_ICON_NAMESPACE -class Icon; - -} // namespace Icon -} // namespace BPrivate - class CommandStack; class DocumentSaver; class Selection; @@ -51,8 +49,8 @@ inline ::DocumentSaver* ExportSaver() const { return fExportSaver; } - void SetIcon(BPrivate::Icon::Icon* icon); - inline BPrivate::Icon::Icon* Icon() const + void SetIcon(_ICON_NAMESPACE Icon* icon); + inline _ICON_NAMESPACE Icon* Icon() const { return fIcon; } void MakeEmpty(bool includingSavers = true); @@ -60,7 +58,7 @@ bool IsEmpty() const; private: - BPrivate::Icon::Icon* fIcon; + _ICON_NAMESPACE Icon* fIcon; ::CommandStack* fCommandStack; ::Selection* fSelection; Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/GradientControl.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/GradientControl.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/GradientControl.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -11,24 +11,23 @@ #include <View.h> - #if LIB_LAYOUT # include <layout.h> #endif -namespace BPrivate { -namespace Icon { +#include "IconBuild.h" -class Gradient; -} // namespace Icon -} // namespace BPrivate +_BEGIN_ICON_NAMESPACE + class Gradient; +_END_ICON_NAMESPACE + enum { MSG_GRADIENT_CONTROL_FOCUS_CHANGED = 'gcfc', }; -class GradientControl : +class GradientControl : #if LIB_LAYOUT public MView, #endif @@ -61,9 +60,9 @@ virtual void FrameResized(float width, float height); // GradientControl - void SetGradient(const BPrivate::Icon::Gradient* + void SetGradient(const _ICON_NAMESPACE Gradient* gradient); - BPrivate::Icon::Gradient* Gradient() const + _ICON_NAMESPACE Gradient* Gradient() const { return fGradient; } void SetCurrentStop(const rgb_color& color); @@ -81,7 +80,7 @@ float _OffsetFor(BPoint where) const; void _UpdateCurrentColor() const; - BPrivate::Icon::Gradient* fGradient; + _ICON_NAMESPACE Gradient* fGradient; BBitmap* fGradientBitmap; int32 fDraggingStepIndex; int32 fCurrentStepIndex; Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/IconView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/IconView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/IconView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -16,13 +16,12 @@ class BBitmap; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class IconRenderer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + class IconView : public BView, public IconListener { public: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/PathListView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/PathListView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/PathListView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -12,24 +12,25 @@ #include "ListViews.h" #include "PathContainer.h" + class BMenu; class BMenuItem; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class VectorPath; class Shape; class ShapeContainer; -} -} +_END_ICON_NAMESPACE class CommandStack; class PathListItem; class Selection; class ShapePathListener; -using namespace BPrivate::Icon; +_USING_ICON_NAMESPACE + + class PathListView : public SimpleListView, public PathContainerListener { public: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/ShapeListView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/ShapeListView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/ShapeListView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -19,13 +19,13 @@ class ShapeListItem; class Selection; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Shape; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + enum { MSG_ADD_SHAPE = 'adsh', }; Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleListView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleListView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleListView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -20,16 +20,16 @@ class ShapeStyleListener; class StyleListItem; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Shape; class ShapeContainer; class ShapeListener; class Style; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class StyleListView : public SimpleListView, public StyleContainerListener { public: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/StyleView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -9,6 +9,7 @@ #define STYLE_VIEW_H +#include "IconBuild.h" #include "Observer.h" #include <View.h> @@ -20,14 +21,14 @@ class CurrentColor; class GradientControl; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Gradient; class Style; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + // TODO: write lock the document when changing something... enum { Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/TransformerListView.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/TransformerListView.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/gui/TransformerListView.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -18,12 +18,11 @@ class TransformerItem; class Selection; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Transformer; -} -} +_END_ICON_NAMESPACE + class TransformerListView : public SimpleListView, public ShapeListener { public: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Exporter.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Exporter.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Exporter.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -12,18 +12,19 @@ #include <Entry.h> #include <OS.h> +#include "IconBuild.h" + + class BPositionIO; class Document; -namespace BPrivate { -namespace Icon { -class Icon; +_BEGIN_ICON_NAMESPACE + class Icon; +_END_ICON_NAMESPACE -} // namespace Icon -} // namespace BPrivate +_USING_ICON_NAMESPACE -using namespace BPrivate::Icon; class Exporter { public: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Importer.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Importer.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/Importer.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -11,16 +11,15 @@ #include <SupportDefs.h> +#include "IconBuild.h" -namespace BPrivate { -namespace Icon { -class Icon; +_BEGIN_ICON_NAMESPACE + class Icon; +_END_ICON_NAMESPACE -} // namespace Icon -} // namespace BPrivate +_USING_ICON_NAMESPACE -using namespace BPrivate::Icon; class Importer { public: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/flat_icon/FlatIconExporter.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/flat_icon/FlatIconExporter.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/flat_icon/FlatIconExporter.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -16,19 +16,16 @@ class BNode; class BPositionIO; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE + class Gradient; + class LittleEndianBuffer; + class PathContainer; + class ShapeContainer; + class StyleContainer; + class VectorPath; +_END_ICON_NAMESPACE -class Gradient; -class LittleEndianBuffer; -class PathContainer; -class ShapeContainer; -class StyleContainer; -class VectorPath; -} // namespace Icon -} // namespace BPrivate - #define PRINT_STATISTICS 1 #if PRINT_STATISTICS @@ -86,7 +83,7 @@ int32& straightCount, int32& lineCount, int32& curveCount); - + #if PRINT_STATISTICS int32 fStyleSectionSize; int32 fGradientSize; Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/message/MessageExporter.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/message/MessageExporter.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/message/MessageExporter.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -14,8 +14,7 @@ class BMessage; class BPositionIO; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Icon; class PathContainer; class Shape; @@ -23,9 +22,9 @@ class StyleContainer; class Transformer; class VectorPath; -} -} +_END_ICON_NAMESPACE + class MessageExporter : public Exporter { public: MessageExporter(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -17,16 +17,14 @@ struct text_run; struct text_run_array; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Icon; class Style; class VectorPath; class PathContainer; class ShapeContainer; class StyleContainer; -} -} +_END_ICON_NAMESPACE struct style_map { text_run *run; @@ -44,7 +42,7 @@ const entry_ref* ref); private: - status_t _Import(Icon* icon, const char *text, + status_t _Import(Icon* icon, const char *text, text_run_array *runs); status_t _AddStyle(Icon *icon, text_run *run); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/DocumentBuilder.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/DocumentBuilder.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/DocumentBuilder.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,8 +10,8 @@ // Anti-Grain Geometry - Version 2.2 // Copyright (C) 2002-2004 Maxim Shemanarev (http://www.antigrain.com) // -// Permission to copy, use, modify, sell and distribute this software -// is granted provided this copyright notice appears in all copies. +// Permission to copy, use, modify, sell and distribute this software +// is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // @@ -39,18 +39,19 @@ #include <agg_path_storage.h> #include <agg_rasterizer_scanline_aa.h> +#include "IconBuild.h" #include "PathTokenizer.h" + class SVGImporter; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Icon; class Transformable; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + namespace agg { namespace svg { @@ -159,7 +160,7 @@ double x, double y, bool rel = false); void curve3(double x, double y, bool rel = false); // T, t void curve4(double x1, double y1, // C, c - double x2, double y2, + double x2, double y2, double x, double y, bool rel = false); void curve4(double x2, double y2, // S, s double x, double y, bool rel = false); @@ -181,12 +182,12 @@ void SetTitle(const char* title); void SetDimensions(uint32 width, uint32 height, BRect viewBox); - + // Call these functions on <g> tag (start_element, end_element respectively) void push_attr(); void pop_attr(); - + // Attribute setting functions. void fill(const rgba8& f); void stroke(const rgba8& s); @@ -203,7 +204,7 @@ void line_cap(line_cap_e cap); void miter_limit(double ml); trans_affine& transform(); - + /* // Make all polygons CCW-oriented void arrange_orientations() { Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGExporter.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGExporter.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGExporter.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -14,16 +14,16 @@ #include <String.h> -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Gradient; class Shape; class Style; class Transformable; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class SVGExporter : public Exporter { public: SVGExporter(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGGradients.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGGradients.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/import_export/svg/SVGGradients.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -15,11 +15,12 @@ #include <Message.h> #include <String.h> -namespace BPrivate { -namespace Icon { +#include "IconBuild.h" + + +_BEGIN_ICON_NAMESPACE class Gradient; -} -} +_END_ICON_NAMESPACE namespace agg { namespace svg { Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddPathsCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddPathsCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddPathsCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,16 +10,17 @@ #include "Command.h" +#include "IconBuild.h" -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class VectorPath; class PathContainer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class AddPathsCommand : public Command { public: AddPathsCommand( @@ -29,7 +30,7 @@ bool ownsPaths, int32 index); virtual ~AddPathsCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddShapesCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddShapesCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddShapesCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,18 +10,19 @@ #include "Command.h" +#include "IconBuild.h" class Selection; -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Shape; class ShapeContainer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class AddShapesCommand : public Command { public: AddShapesCommand( @@ -31,7 +32,7 @@ int32 index, Selection* selection); virtual ~AddShapesCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddTransformersCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddTransformersCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/AddTransformersCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,16 +10,17 @@ #include "Command.h" +#include "IconBuild.h" -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Shape; class Transformer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + // TODO: make a templated "add items" command? class AddTransformersCommand : public Command { @@ -30,7 +31,7 @@ int32 count, int32 index); virtual ~AddTransformersCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/FreezeTransformationCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/FreezeTransformationCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/FreezeTransformationCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,23 +10,24 @@ #include "Command.h" +#include "IconBuild.h" -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Shape; class Transformable; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class FreezeTransformationCommand : public Command { public: FreezeTransformationCommand( Shape** const shapes, int32 count); virtual ~FreezeTransformationCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MovePathsCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MovePathsCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MovePathsCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,17 +10,19 @@ #include "Command.h" +#include "IconBuild.h" + // TODO: make a templated "move items" command? -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class VectorPath; class PathContainer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class MovePathsCommand : public Command { public: MovePathsCommand( @@ -29,7 +31,7 @@ int32 count, int32 toIndex); virtual ~MovePathsCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveShapesCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveShapesCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveShapesCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,18 +10,19 @@ #include "Command.h" +#include "IconBuild.h" // TODO: make a templated "move items" command? -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class Shape; class ShapeContainer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class MoveShapesCommand : public Command { public: MoveShapesCommand( @@ -30,7 +31,7 @@ int32 count, int32 toIndex); virtual ~MoveShapesCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveTransformersCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveTransformersCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/MoveTransformersCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,17 +10,20 @@ #include "Command.h" +#include "IconBuild.h" + // TODO: make a templated "move items" command? -namespace BPrivate { -namespace Icon { + +_BEGIN_ICON_NAMESPACE class Shape; class Transformer; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class MoveTransformersCommand : public Command { public: MoveTransformersCommand( @@ -29,7 +32,7 @@ int32 count, int32 toIndex); virtual ~MoveTransformersCommand(); - + virtual status_t InitCheck(); virtual status_t Perform(); Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/NudgePointsCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -9,19 +9,20 @@ #define NUDGE_POINTS_ACTION_H +#include "IconBuild.h" #include "TransformCommand.h" #include <String.h> -namespace BPrivate { -namespace Icon { +_BEGIN_ICON_NAMESPACE class VectorPath; struct control_point; -} -} -using namespace BPrivate::Icon; +_END_ICON_NAMESPACE +_USING_ICON_NAMESPACE + + class NudgePointsCommand : public TransformCommand { public: NudgePointsCommand(VectorPath* path, @@ -31,7 +32,7 @@ int32 count); virtual ~NudgePointsCommand(); - + virtual status_t InitCheck(); protected: Modified: haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/PathCommand.h =================================================================== --- haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/PathCommand.h 2010-11-15 12:30:29 UTC (rev 39434) +++ haiku/branches/developer/bonefish/weak-symbols/src/apps/icon-o-matic/shape/commands/PathCommand.h 2010-11-15 12:37:52 UTC (rev 39435) @@ -10,20 +10,21 @@ [... truncated: 1714 lines follow ...]