- removed Notepad in elementaryxx - removed various wrappers not longer existing functions - removed Evas Transform - removed Evas Gradient - added #define for compiling Edje_Edit wrapper SVN revision: 54656master
parent
dfd5b32987
commit
01e49e85dd
22 changed files with 16 additions and 514 deletions
@ -1,28 +0,0 @@ |
||||
#ifndef ELMXX_NOTEPAD_H |
||||
#define ELMXX_NOTEPAD_H |
||||
|
||||
/* STL */ |
||||
#include <string> |
||||
|
||||
/* ELFxx */ |
||||
#include "Object.h" |
||||
|
||||
namespace Elmxx { |
||||
|
||||
class Notepad : public Object |
||||
{ |
||||
public: |
||||
static Notepad *factory (Evasxx::Object &parent); |
||||
|
||||
void setFile (const std::string &file, Elm_Text_Format format); |
||||
|
||||
private: |
||||
Notepad (); // forbid standard constructor
|
||||
Notepad (const Notepad&); // forbid copy constructor
|
||||
Notepad (Evasxx::Object &parent); // private construction -> use factory ()
|
||||
~Notepad (); // forbid direct delete -> use Object::destroy()
|
||||
}; |
||||
|
||||
} // end namespace Elmxx
|
||||
|
||||
#endif // ELMXX_NOTEPAD_H
|
@ -1,30 +0,0 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
#include <config.h> |
||||
#endif |
||||
|
||||
#include "../include/elementaryxx/Notepad.h" |
||||
|
||||
using namespace std; |
||||
|
||||
namespace Elmxx { |
||||
|
||||
Notepad::Notepad (Evasxx::Object &parent) |
||||
{ |
||||
o = elm_notepad_add (parent.obj ()); |
||||
|
||||
elmInit (); |
||||
} |
||||
|
||||
Notepad::~Notepad () {} |
||||
|
||||
Notepad *Notepad::factory (Evasxx::Object &parent) |
||||
{ |
||||
return new Notepad (parent); |
||||
} |
||||
|
||||
void Notepad::setFile (const std::string &file, Elm_Text_Format format) |
||||
{ |
||||
elm_notepad_file_set (o, file.c_str (), format); |
||||
} |
||||
|
||||
} // end namespace Elmxx
|
@ -1,191 +0,0 @@ |
||||
#ifndef EVASGRADIENT_H |
||||
#define EVASGRADIENT_H |
||||
|
||||
#include "Object.h" |
||||
|
||||
namespace Evasxx { |
||||
|
||||
/* Forward declarations */ |
||||
class Canvas; |
||||
|
||||
/*
|
||||
* Wraps an Evas Gradient Object |
||||
*/ |
||||
class Gradient : public Object |
||||
{ |
||||
public: |
||||
Gradient( Canvas &canvas ); |
||||
Gradient( Canvas &canvas, const Eflxx::Rect &rect ); |
||||
|
||||
virtual ~Gradient(); |
||||
|
||||
/*!
|
||||
* Adds a color stop to the given evas gradient object. |
||||
* |
||||
* The @p delta parameter determines the proportion of the gradient |
||||
* object that is to be set to the color. For instance, if red is |
||||
* added with @p delta set to 2, and green is added with @p |
||||
* delta set to 1, two-thirds will be red or reddish and one-third |
||||
* will be green or greenish. |
||||
* |
||||
* Colors are added from the top downwards. |
||||
* |
||||
* @param color The color. |
||||
* @param delta Proportion of the gradient object that is this color. |
||||
*/ |
||||
void addColorStop( const Eflxx::Color &c, int delta ); |
||||
|
||||
/*!
|
||||
* Adds an alpha stop to the given evas gradient object. |
||||
* |
||||
* The @p delta parameter determines the proportion of the gradient |
||||
* object that is to be set to the alpha value. |
||||
* |
||||
* Alphas are added from the top downwards. |
||||
* |
||||
* @param alpha Alpha value. |
||||
* @param delta Proportion of the gradient object that is this alpha. |
||||
*/ |
||||
void addAlphaStop (int alpha, int delta); |
||||
|
||||
/*!
|
||||
* Sets color data for the given evas gradient object. |
||||
* |
||||
* If data is so set, any existing gradient stops will be deleted, |
||||
* The data is not copied, so if it was allocated, do not free it while it's set. |
||||
* |
||||
* @param color_data The color data to be set. Should be in argb32 pixel format. |
||||
* @param len The length of the data pointer - multiple of the pixel size. |
||||
* @param has_alpha A flag indicating if the data has alpha or not. |
||||
*/ |
||||
void setColorData (void *color_data, int len, bool has_alpha); |
||||
|
||||
/*!
|
||||
* Sets alpha data for the given evas gradient object. |
||||
* |
||||
* If alpha data is so set, any existing gradient stops will be cleared, |
||||
* The data is not copied, so if it was allocated, do not free it while it's set. |
||||
* |
||||
* @param alpha_data The alpha data to be set, in a8 format. |
||||
* @param len The length of the data pointer - multiple of the pixel size. |
||||
*/ |
||||
void setAlphaData (void *alpha_data, int len); |
||||
|
||||
/*!
|
||||
* Deletes all stops set for the given evas gradient object or any set data. |
||||
*/ |
||||
void clear(); |
||||
|
||||
// TODO
|
||||
//EAPI void evas_object_gradient_type_set (Evas_Object *obj, const char *type, const char *instance_params) EINA_ARG_NONNULL(1, 2);
|
||||
//EAPI void evas_object_gradient_type_get (const Evas_Object *obj, char **type, char **instance_params) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/*!
|
||||
* Sets the rectangle on the gradient object that the gradient will be |
||||
* drawn to. |
||||
* |
||||
* Note that the gradient may be tiled around this one rectangle, |
||||
* according to its spread value - restrict, repeat, or reflect. To have |
||||
* only one 'cycle' of the gradient drawn, the spread value must be set |
||||
* to restrict, or x and y must be 0 and width and height need to be |
||||
* the width and height of the gradient object respectively. |
||||
* |
||||
* The default values for the fill parameters is x = 0, y = 0, |
||||
* width = 32 and height = 32. |
||||
* |
||||
* @param rect The coordinate Rect. |
||||
*/ |
||||
void setFill (const Eflxx::Rect &rect); |
||||
|
||||
/*!
|
||||
* Retrieves the dimensions of the rectangle on the gradient object that |
||||
* the gradient will use as its fill rect. |
||||
* |
||||
* See @ref setFill for more details. |
||||
* |
||||
* @return The coordinate Rect. |
||||
*/ |
||||
const Eflxx::Rect getFill (); |
||||
|
||||
/*!
|
||||
* Sets the angle at which the given evas gradient object's fill sits clockwise |
||||
* from vertical. |
||||
* |
||||
* @param angle Angle in degrees. Can be negative. |
||||
*/ |
||||
void setFillAngle (Evas_Angle angle); |
||||
|
||||
/*!
|
||||
* Retrieves the angle at which the given evas gradient object's fill sits |
||||
* clockwise from the vertical. |
||||
* |
||||
* @return The current angle if successful. @c 0.0 otherwise. |
||||
*/ |
||||
Evas_Angle getFillAngle (); |
||||
|
||||
/*!
|
||||
* Sets the tiling mode for the given evas gradient object's fill. |
||||
* |
||||
* @param spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT, |
||||
* EVAS_TEXTURE_RESTRICT, EVAS_TEXTURE_RESTRICT_REFLECT, EVAS_TEXTURE_RESTRICT_REPEAT, |
||||
* or EVAS_TEXTURE_PAD. |
||||
*/ |
||||
void setFillSpread (int tile_mode); |
||||
|
||||
/*!
|
||||
* Retrieves the spread (tiling mode) for the given gradient object's fill. |
||||
*
|
||||
* @return The current spread mode of the gradient object. |
||||
*/ |
||||
int getFillSpread (); |
||||
|
||||
/*!
|
||||
* Sets the angle at which the given evas gradient sits, |
||||
* relative to whatever intrinsic orientation of the grad type. |
||||
* Used mostly by 'linear' kinds of gradients. |
||||
* |
||||
* @param angle Angle in degrees. Can be negative. |
||||
*/ |
||||
void setAngle (Evas_Angle angle); |
||||
|
||||
/*!
|
||||
* Retrieves the angle at which the given evas gradient object sits |
||||
* rel to its intrinsic orientation. |
||||
* |
||||
* @return The current angle if successful. @c 0.0 otherwise. |
||||
*/ |
||||
Evas_Angle getAngle (); |
||||
|
||||
/*!
|
||||
* Sets the direction of the given evas gradient object's spectrum. |
||||
*
|
||||
* @param direction Values are either 1 (the default) or -1. |
||||
*/ |
||||
void setDirection (int direction); |
||||
|
||||
/*!
|
||||
* Retrieves the evas gradient object's spectrum direction |
||||
* |
||||
* @return The current gradient direction if successful. @c 1 otherwise. |
||||
*/ |
||||
int getDirection (); |
||||
|
||||
/*!
|
||||
* Sets the offset of the given evas gradient object's spectrum. |
||||
* |
||||
* @param offset Values can be negative. |
||||
*/ |
||||
void setOffset (float offset); |
||||
|
||||
/*!
|
||||
* Retrieves the spectrum's offset |
||||
* |
||||
* @return The current gradient offset if successful. @c 0.0 otherwise. |
||||
*/ |
||||
float getOffset (); |
||||
}; |
||||
|
||||
} // end namespace Evasxx
|
||||
|
||||
#endif // EVAS_GRADIENT_H
|
||||
|
@ -1,39 +0,0 @@ |
||||
#ifndef EVAS_TRANSFORM_H |
||||
#define EVAS_TRANSFORM_H |
||||
|
||||
/* EFL */ |
||||
#include <Evas.h> |
||||
|
||||
namespace Evasxx { |
||||
|
||||
class Transform |
||||
{ |
||||
friend class Image; |
||||
|
||||
public: |
||||
/* Set t to the identity */ |
||||
void setIdentity(); |
||||
|
||||
/* Left-multiply t by an xy rotation defined by the given angle (in degrees) */ |
||||
void rotate (double angle); |
||||
|
||||
/* Left-multiply t by an xy translation defined by the given dx, dy values */ |
||||
void translate (float dx, float dy); |
||||
|
||||
/* Left-multiply t by an xy scaling defined by the given sx, sy factors */ |
||||
void scale (float sx, float sy); |
||||
|
||||
/* Left-multiply t by an xy shearing defined by the given sh, sv values */ |
||||
void shear (float sh, float sv); |
||||
|
||||
/* Left-multiply t by the given transform l */ |
||||
// TODO: const? why not?
|
||||
void compose (Transform &l, Transform &t); |
||||
|
||||
private: |
||||
Evas_Transform t; |
||||
}; |
||||
|
||||
} // end namespace Evasxx
|
||||
|
||||
#endif // EVAS_TRANSFORM_H
|
@ -1,121 +0,0 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
#include <config.h> |
||||
#endif |
||||
|
||||
#include "../include/evasxx/Canvas.h" |
||||
#include "../include/evasxx/Gradient.h" |
||||
|
||||
using namespace Eflxx; |
||||
|
||||
namespace Evasxx { |
||||
|
||||
Gradient::Gradient( Canvas &canvas ) |
||||
{ |
||||
o = evas_object_gradient_add( canvas.obj() ); |
||||
init(); |
||||
} |
||||
|
||||
Gradient::Gradient( Canvas &canvas, const Rect &rect ) |
||||
{ |
||||
o = evas_object_gradient_add( canvas.obj() ); |
||||
init(); |
||||
|
||||
setGeometry( rect ); |
||||
} |
||||
|
||||
Gradient::~Gradient() |
||||
{ |
||||
evas_object_del( o ); |
||||
} |
||||
|
||||
void Gradient::addColorStop( const Color &c, int delta ) |
||||
{ |
||||
evas_object_gradient_color_stop_add( o, c.red (), c.green (), c.blue (), c.alpha (), delta ); |
||||
} |
||||
|
||||
void Gradient::addAlphaStop (int alpha, int delta) |
||||
{ |
||||
evas_object_gradient_alpha_stop_add (o, alpha, delta); |
||||
} |
||||
|
||||
void Gradient::setColorData (void *color_data, int len, bool has_alpha) |
||||
{ |
||||
evas_object_gradient_color_data_set (o, color_data, len, has_alpha); |
||||
} |
||||
|
||||
void Gradient::setAlphaData (void *alpha_data, int len) |
||||
{ |
||||
evas_object_gradient_alpha_data_set (o, alpha_data, len); |
||||
} |
||||
|
||||
void Gradient::clear() |
||||
{ |
||||
evas_object_gradient_clear( o ); |
||||
} |
||||
|
||||
void Gradient::setFill (const Rect &rect) |
||||
{ |
||||
evas_object_gradient_fill_set (o, rect.x (), rect.y (), rect.width (), rect.height ()); |
||||
} |
||||
|
||||
const Rect Gradient::getFill () |
||||
{ |
||||
Evas_Coord x, y, w, h; |
||||
evas_object_gradient_fill_get (o, &x, &y, &w, &h); |
||||
Rect rect (x, y, w, h); |
||||
return rect; |
||||
} |
||||
|
||||
void Gradient::setFillAngle (Evas_Angle angle) |
||||
{ |
||||
evas_object_gradient_fill_angle_set (o, angle); |
||||
} |
||||
|
||||
Evas_Angle Gradient::getFillAngle () |
||||
{ |
||||
return evas_object_gradient_fill_angle_get (o); |
||||
} |
||||
|
||||
void Gradient::setFillSpread (int tile_mode) |
||||
{ |
||||
evas_object_gradient_fill_spread_set (o, tile_mode); |
||||
|
||||
} |
||||
|
||||
int Gradient::getFillSpread () |
||||
{ |
||||
return evas_object_gradient_fill_spread_get (o); |
||||
} |
||||
|
||||
void Gradient::setAngle( Evas_Angle angle ) |
||||
{ |
||||
evas_object_gradient_angle_set( o, angle ); |
||||
} |
||||
|
||||
Evas_Angle Gradient::getAngle() |
||||
{ |
||||
return evas_object_gradient_angle_get( o ); |
||||
} |
||||
|
||||
void Gradient::setDirection (int direction) |
||||
{ |
||||
evas_object_gradient_direction_set (o, direction); |
||||
} |
||||
|
||||
int Gradient::getDirection () |
||||
{ |
||||
return evas_object_gradient_direction_get (o); |
||||
} |
||||
|
||||
void Gradient::setOffset (float offset) |
||||
{ |
||||
evas_object_gradient_offset_set (o, offset); |
||||
} |
||||
|
||||
float Gradient::getOffset () |
||||
{ |
||||
return evas_object_gradient_offset_get (o); |
||||
} |
||||
|
||||
} // end namespace Evasxx
|
||||
|
@ -1,38 +0,0 @@ |
||||
#ifdef HAVE_CONFIG_H |
||||
#include <config.h> |
||||
#endif |
||||
#include "../include/evasxx/Transform.h" |
||||
|
||||
namespace Evasxx { |
||||
|
||||
void Transform::setIdentity() |
||||
{ |
||||
evas_transform_identity_set (&t); |
||||
} |
||||
|
||||
void Transform::rotate (double angle) |
||||
{ |
||||
evas_transform_rotate (angle, &t); |
||||
} |
||||
|
||||
void Transform::translate (float dx, float dy) |
||||
{ |
||||
evas_transform_translate (dx, dy, &t); |
||||
} |
||||
|
||||
void Transform::scale (float sx, float sy) |
||||
{ |
||||
evas_transform_scale (sx, sy, &t); |
||||
} |
||||
|
||||
void Transform::shear (float sh, float sv) |
||||
{ |
||||
evas_transform_shear (sh, sv, &t); |
||||
} |
||||
|
||||
void Transform::compose (Transform &l, Transform &t) |
||||
{ |
||||
evas_transform_compose (&l.t, &t.t); |
||||
} |
||||
|
||||
} // end namespoace efl
|
Loading…
Reference in new issue