Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_entry.c ewl_entry.h
Log Message:
Some further work on the entry and some of the test apps.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -3 -r1.115 -r1.116
--- ewl_entry.c 13 Oct 2004 14:24:45 -0000 1.115
+++ ewl_entry.c 26 Oct 2004 14:00:00 -0000 1.116
@@ -468,16 +468,51 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("e", e, NULL);
- op = ewl_entry_op_relevant_find(e, EWL_ENTRY_OP_TYPE_FONT_SET);
- opf = (Ewl_Entry_Op_Font *)op;
- if (opf && opf->font) {
- font = strdup(opf->font);
+ if (REALIZED(e)) {
+ int size;
+ font = etox_context_get_font(e->context, &size);
+ }
+ else {
+ op = ewl_entry_op_relevant_find(e, EWL_ENTRY_OP_TYPE_FONT_SET);
+ opf = (Ewl_Entry_Op_Font *)op;
+ if (opf && opf->font)
+ font = strdup(opf->font);
}
DRETURN_PTR(font, DLEVEL_STABLE);
}
/**
+ * @param e: the entry widget to retrieve the current font size
+ * @brief Retrieve the size of the currently used font.
+ * @return Returns the currently used size of the font.
+ */
+int ewl_entry_font_size_get(Ewl_Entry *e)
+{
+ Ewl_Entry_Op *op;
+ Ewl_Entry_Op_Font *opf;
+ int size = 1;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("e", e, NULL);
+
+ if (REALIZED(e)) {
+ char *font = NULL;
+ font = etox_context_get_font(e->context, &size);
+ if (font)
+ FREE(font);
+ }
+ else {
+ op = ewl_entry_op_relevant_find(e, EWL_ENTRY_OP_TYPE_FONT_SET);
+ opf = (Ewl_Entry_Op_Font *)op;
+ if (opf)
+ size = opf->size;
+ }
+
+ DRETURN_INT(size, DLEVEL_STABLE);
+}
+
+/**
* @param e: the entry widget to change style
* @param style: the name of the style
* @brief Changes the currently applied style of the text to specified values
@@ -638,7 +673,7 @@
void ewl_entry_configure_cb(Ewl_Widget * w, void *ev_data, void *user_data)
{
Ewl_Entry *e;
- int xx, yy, ww, hh;
+ int xx, yy, ww, hh;
int c_pos = 0, pos, l;
int cx = 0, cy = 0;
unsigned int cw = 0, ch = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- ewl_entry.h 12 Oct 2004 17:49:30 -0000 1.44
+++ ewl_entry.h 26 Oct 2004 14:00:01 -0000 1.45
@@ -41,7 +41,6 @@
Ecore_DList *applied; /**< Applied set of operations */
Ewl_Widget *cursor; /**< Cursor widget */
- Ecore_List *selections; /**< List of selections for display */
int offset; /**< Starting position of scrolling */
int editable; /**< Flag indicating user can edit text */
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs