On Wed, 13 Jun 2012 15:17:15 +0200 Vincent Torri <vincent.to...@gmail.com> said:

> On Wed, Jun 13, 2012 at 12:31 PM, Carsten Haitzler <ras...@rasterman.com>
> wrote:
> > On Wed, 13 Jun 2012 10:55:52 +0900 Carsten Haitzler (The Rasterman)
> > <ras...@rasterman.com> said:
> >
> > here are some notes in email on what textgrid in evas needs to be like (may
> > miss some things but it gives the general direction) - missong const's for
> > getters that dont change obj etc:
> >
> > typedef enum
> > {
> >   EVAS_PALETTE_NONE,
> >   EVAS_PALETTE_STANDARD,
> >   EVAS_PALETTE_EXTENDED,
> >   EVAS_PALETTE_LAST
> > } Evas_Palette;
> >
> > typedef enum
> > {
> >   EVAS_FONT_STYLE_NORMAL = (1 << 0),
> >   EVAS_FONT_STYLE_BOLD   = (1 << 1),
> >   EVAS_FONT_STYLE_ITALIC = (1 << 2)
> > ) Evas_Font_Style;
> 
> I can eventually add underline and strikethrough in the enum above
> (they appear in Evas_Text_Cell below). Or should I crete another enum
> as it's not really a  font style ?

not a font style. its in the bitfields. reasoning for fontstyle flags ios that
they can affect cell size (eg bold is wider than not bold). if you dont ever
plan on supporting bold flags, then no point making cells bigger.

> > typedef struct _Evas_Text_Cell
> > {
> >   int            glyph;
> >   unsigned char  fg, bg;
> >   unsigned short bold          : 1;
> >   unsigned short italic        : 1;
> >   unsigned short underline     : 1;
> >   unsigned short strikethrough : 1;
> >   unsigned short fg_extended   : 1;
> >   unsigned short bg_extended   : 1;
> > } Evas_Text_Cell;
> 
> hmmm, Glyph is what ? In my previous Textgrid object, I used an
> Eina_Unicode, which is a wchar_t (32 bits on unix, 16 bits on windows)
> if wchar_t is available, and un unsigned int (or uint32_t) otherwise.

no - need int. wchar_t (16bit) is not enough for unicode. use int.

> No text_props here ?

no. this is at the api level. this is an internal thing/

> Btw, why exposing such structure ? On can access its values with methods.

because the overhead of access (1 fn call per char in the grid per update).

> Vincent
> 
> > EAPI Evas_Object *
> > evas_object_textgrid_add(Evas *e);
> > EAPI void
> > evas_object_textgrid_size_set(Evas_Object *o, int w, int h);
> > EAPI void
> > evas_object_textgrid_size_get(Evas_Object *o, int *w, int *h);
> > EAPI void
> > evas_object_textgrid_palett_set(Evas_Object *o, Evas_Palette pal, int n,
> > int r, int g, int b, int a);
> > EAPI void
> > evas_object_textgrid_palett_get(Evas_Object *o, Evas_Palette pal, int n, int
> > *r, int *g, int *b, int *a);
> > EAPI void
> > evas_object_textgrid_cellrow_set(Evas_Object *o, int y, Evas_Text_Cell
> > *row); EAPI Evas_Text_Cell *
> > evas_object_textgrid_cellrow_get(Evas_Object *o, int y);
> > EAPI void
> > evas_object_textgrid_update_add(Evas_Object *o, int x, int y, int w, int h);
> > EAPI void
> > evas_object_textgrid_font_source_set(Evas_Object *o, const char *font);
> > EAPI const char *
> > evas_object_textgrid_font_source_get(Evas_Object *o);
> > EAPI void
> > evas_object_textgrid_font_set(Evas_Object *o, const char *font,
> > Evas_Font_Size size);
> > EAPI void
> > evas_object_textgrid_font_get(Evas_Object *o, const char **font,
> > Evas_Font_Size *size);
> > EAPI void
> > evas_object_textgrid_cell_size_get(Evas_Object *o, int *w, int *h);
> > EAPI Evas_Font_Style
> > evas_object_textgrid_supported_font_styles_get(Evas_Object *o);
> > EAPI void
> > evas_object_textgrid_supported_font_styles_set(Evas_Object *o,
> > Evas_Font_Style fstyles);
> >
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to