Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_textarea.c
Log Message:
Fill in some more API calls.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ewl_textarea.c 22 May 2004 06:20:02 -0000 1.29
+++ ewl_textarea.c 22 May 2004 06:33:26 -0000 1.30
@@ -64,6 +64,7 @@
w = EWL_WIDGET(ta);
ewl_widget_init(EWL_WIDGET(w), "text");
+ ewl_object_set_fill_policy(EWL_OBJECT(w), EWL_FLAG_FILL_NONE);
ewl_callback_append(w, EWL_CALLBACK_REALIZE, ewl_text_realize_cb,
NULL);
@@ -230,6 +231,50 @@
DRETURN_PTR(font, DLEVEL_STABLE);
}
+/**
+ * @param ta: the text widget to change style
+ * @param style: the name of the style
+ * @brief Changes the currently applied style of the text to specified values
+ * @return Returns no value.
+ */
+void ewl_text_style_set(Ewl_Text *ta, char *style)
+{
+ Ewl_Text_Op *op;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("ta", ta);
+
+ op = ewl_text_op_style_new(ta, style);
+ 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 style
+ * @brief Retrieves the currently used text style from a text widget.
+ * @return Returns the currently used text style.
+ */
+char *ewl_text_style_get(Ewl_Text *ta)
+{
+ Ewl_Text_Op *op;
+ Ewl_Text_Op_Style *ops;
+ char *style = NULL;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("ta", ta, NULL);
+
+ op = ewl_text_op_relevant_find(ta, EWL_TEXT_OP_TYPE_FONT_SET);
+ ops = (Ewl_Text_Op_Style *)op;
+ if (ops && ops->style) {
+ style = strdup(ops->style);
+ }
+
+ DRETURN_PTR(style, DLEVEL_STABLE);
+}
+
static Ewl_Text_Op *
ewl_text_op_relevant_find(Ewl_Text *ta, Ewl_Text_Op_Type type)
{
@@ -473,13 +518,6 @@
*/
ewl_object_set_preferred_size(EWL_OBJECT(ta), (int)(width),
(int)(height));
-
- /*
- * FIXME: Should we really be doing this? Probably not, test it out
- * more thoroughly.
- */
- ewl_object_set_custom_size(EWL_OBJECT(ta), (int)(width),
- (int)(height));
}
static Ewl_Text_Op *
-------------------------------------------------------
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