From abe24d3871e95e67a3a984d0d44d22482d4d13e2 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 5 Mar 2012 08:34:56 +0000 Subject: [PATCH] and move bitfileds around and name enum typedefs better git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@68681 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elc_scrolled_entry.c | 2 +- src/lib/elm_entry.c | 8 ++++---- src/lib/elm_entry.h | 22 +++++++++++----------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/lib/elc_scrolled_entry.c b/src/lib/elc_scrolled_entry.c index 80bcc84..cbba45e 100644 --- a/src/lib/elc_scrolled_entry.c +++ b/src/lib/elc_scrolled_entry.c @@ -187,7 +187,7 @@ elm_scrolled_entry_autosave_get(const Evas_Object *obj) {return elm_entry_autosave_get(obj);} EINA_DEPRECATED EAPI void elm_scrolled_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) -{Elm_CNP_Mode cnp_mode = ELM_CNP_MODE_MARKUP;if (textonly) cnp_mode = ELM_CNP_MODE_NO_IMAGE;elm_entry_cnp_mode_set(obj, cnp_mode);} +{Elm_Cnp_Mode cnp_mode = ELM_CNP_MODE_MARKUP; if (textonly) cnp_mode = ELM_CNP_MODE_NO_IMAGE; elm_entry_cnp_mode_set(obj, cnp_mode);} EINA_DEPRECATED EAPI Eina_Bool elm_scrolled_entry_cnp_textonly_get(Evas_Object *obj) {return elm_entry_cnp_mode_get(obj) != ELM_CNP_MODE_MARKUP;} diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 30d8e02..3605e9a 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -67,7 +67,6 @@ struct _Widget_Data Eina_Bool drag_selection_asked : 1; Eina_Bool can_write : 1; Eina_Bool autosave : 1; - Elm_CNP_Mode cnp_mode : 2; Eina_Bool usedown : 1; Eina_Bool scroll : 1; Eina_Bool h_bounce : 1; @@ -76,6 +75,7 @@ struct _Widget_Data Eina_Bool prediction_allow : 1; Eina_Bool input_panel_return_key_disabled : 1; Eina_Bool autoreturnkey : 1; + Elm_Cnp_Mode cnp_mode : 2; }; struct _Elm_Entry_Context_Menu_Item @@ -3375,7 +3375,7 @@ EINA_DEPRECATED EAPI void elm_entry_cnp_textonly_set(Evas_Object *obj, Eina_Bool textonly) { ELM_CHECK_WIDTYPE(obj, widtype); - Elm_CNP_Mode cnp_mode = ELM_CNP_MODE_MARKUP; + Elm_Cnp_Mode cnp_mode = ELM_CNP_MODE_MARKUP; if (textonly) cnp_mode = ELM_CNP_MODE_NO_IMAGE; elm_entry_cnp_mode_set(obj, cnp_mode); @@ -3389,7 +3389,7 @@ elm_entry_cnp_textonly_get(const Evas_Object *obj) } EAPI void -elm_entry_cnp_mode_set(Evas_Object *obj, Elm_CNP_Mode cnp_mode) +elm_entry_cnp_mode_set(Evas_Object *obj, Elm_Cnp_Mode cnp_mode) { Elm_Sel_Format format = ELM_SEL_FORMAT_MARKUP; ELM_CHECK_WIDTYPE(obj, widtype); @@ -3405,7 +3405,7 @@ elm_entry_cnp_mode_set(Evas_Object *obj, Elm_CNP_Mode cnp_mode) #endif } -EAPI Elm_CNP_Mode +EAPI Elm_Cnp_Mode elm_entry_cnp_mode_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) ELM_CNP_MODE_MARKUP; diff --git a/src/lib/elm_entry.h b/src/lib/elm_entry.h index dc095b6..261ee98 100644 --- a/src/lib/elm_entry.h +++ b/src/lib/elm_entry.h @@ -1384,18 +1384,18 @@ EAPI void elm_entry_filter_accept_set(void *data, Evas_Object EAPI void *elm_entry_imf_context_get(Evas_Object *obj); /** - * @enum _Elm_CNP_Mode - * @typedef Elm_CNP_Mode + * @enum _Elm_Cnp_Mode + * @typedef Elm_Cnp_Mode * Enum of entry's copy & paste policy. * * @see elm_entry_cnp_mode_set() * @see elm_entry_cnp_mode_get() */ -typedef enum _Elm_CNP_Mode { - ELM_CNP_MODE_MARKUP = 0, /**< copy & paste text with markup tag */ - ELM_CNP_MODE_NO_IMAGE = 1, /**< copy & paste text without item(image) tag */ - ELM_CNP_MODE_PLAINTEXT = 2 /**< copy & paste text without markup tag */ -} Elm_CNP_Mode; +typedef enum _Elm_Cnp_Mode { + ELM_CNP_MODE_MARKUP, /**< copy & paste text with markup tag */ + ELM_CNP_MODE_NO_IMAGE, /**< copy & paste text without item(image) tag */ + ELM_CNP_MODE_PLAINTEXT /**< copy & paste text without markup tag */ +} Elm_Cnp_Mode; /** * Control pasting of text and images for the widget. @@ -1407,10 +1407,10 @@ typedef enum _Elm_CNP_Mode { * @note this only changes the behaviour of text. * * @param obj The entry object - * @param mode One of #Elm_CNP_Mode: #ELM_CNP_MODE_MARKUP, + * @param mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP, * #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT. */ -EAPI void elm_entry_cnp_mode_set(Evas_Object *obj, Elm_CNP_Mode cnp_mode); +EAPI void elm_entry_cnp_mode_set(Evas_Object *obj, Elm_Cnp_Mode cnp_mode); /** * Getting elm_entry text paste/drop mode. @@ -1419,10 +1419,10 @@ EAPI void elm_entry_cnp_mode_set(Evas_Object *obj, Elm_CNP_Mode cnp_mode * This gets the copy & paste mode of the entry. * * @param obj The entry object - * @return mode One of #Elm_CNP_Mode: #ELM_CNP_MODE_MARKUP, + * @return mode One of #Elm_Cnp_Mode: #ELM_CNP_MODE_MARKUP, * #ELM_CNP_MODE_NO_IMAGE, #ELM_CNP_MODE_PLAINTEXT. */ -EAPI Elm_CNP_Mode elm_entry_cnp_mode_get(const Evas_Object *obj); +EAPI Elm_Cnp_Mode elm_entry_cnp_mode_get(const Evas_Object *obj); /** -- 2.7.4