Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_textarea.c ewl_textarea.h
Log Message:
Fill in the alignment API for the textarea.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- ewl_textarea.c 22 May 2004 06:33:26 -0000 1.30
+++ ewl_textarea.c 22 May 2004 19:59:06 -0000 1.31
@@ -275,6 +275,50 @@
DRETURN_PTR(style, DLEVEL_STABLE);
}
+/**
+ * @param ta: the text widget to change alignment
+ * @param align: the new alignment of the text widget
+ * @brief Changes the currently applied alignment of the text to specified value
+ * @return Returns no value.
+ */
+void ewl_text_align_set(Ewl_Text *ta, unsigned int align)
+{
+ Ewl_Text_Op *op;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("ta", ta);
+
+ op = ewl_text_op_align_new(ta, align);
+ ecore_dlist_append(ta->ops, op);
+ if (REALIZED(ta))
+ ewl_text_ops_apply(ta);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param ta: the text widget to get the current alignment
+ * @brief Retrieves the currently used text alignment from a text widget.
+ * @return Returns the currently used text alignment.
+ */
+unsigned int ewl_text_align_get(Ewl_Text *ta)
+{
+ unsigned int align = 0;
+ Ewl_Text_Op *op;
+ Ewl_Text_Op_Align *opa;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("ta", ta, NULL);
+
+ op = ewl_text_op_relevant_find(ta, EWL_TEXT_OP_TYPE_FONT_SET);
+ opa = (Ewl_Text_Op_Align *)op;
+ if (opa) {
+ align = opa->align;
+ }
+
+ DRETURN_INT(align, DLEVEL_STABLE);
+}
+
static Ewl_Text_Op *
ewl_text_op_relevant_find(Ewl_Text *ta, Ewl_Text_Op_Type type)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_textarea.h 22 May 2004 06:20:02 -0000 1.13
+++ ewl_textarea.h 22 May 2004 19:59:06 -0000 1.14
@@ -142,7 +142,7 @@
void ewl_text_color_set(Ewl_Text *ta, int r, int g, int b, int a);
void ewl_text_color_get(Ewl_Text *ta, int *r, int *g, int *b, int *a);
-void ewl_text_align_set(Ewl_Text *ta, int r, int g, int b, int a);
+void ewl_text_align_set(Ewl_Text *ta, unsigned int align);
unsigned int ewl_text_align_get(Ewl_Text *ta);
void ewl_text_index_select(Ewl_Text *ta, int si, int ei);
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs