I encourage you to add deprecated apis into elm_deprecated.h and edit ElementaryChanges wiki page. Without them, many people will waste their time on tracing down the changes. http://trac.enlightenment.org/e/wiki/ElementaryChanges We need to talk about that :)
Daniel Juyung Seo (SeoZ) On Thu, Feb 23, 2012 at 11:52 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > Fix a few more review comments for cnp. > > Signed-off-by: Sanjeev BA <eflel...@gmail.com> > > Author: sanjeev > Date: 2012-02-22 18:52:11 -0800 (Wed, 22 Feb 2012) > New Revision: 68292 > Trac: http://trac.enlightenment.org/e/changeset/68292 > > Modified: > trunk/elementary/src/bin/test_cnp.c trunk/elementary/src/lib/elm_cnp.c > trunk/elementary/src/lib/elm_cnp.h trunk/elementary/src/lib/elm_entry.c > > Modified: trunk/elementary/src/bin/test_cnp.c > =================================================================== > --- trunk/elementary/src/bin/test_cnp.c 2012-02-23 02:52:07 UTC (rev 68291) > +++ trunk/elementary/src/bin/test_cnp.c 2012-02-23 02:52:11 UTC (rev 68292) > @@ -32,7 +32,7 @@ > Evas_Object *en = (Evas_Object*)(data); > > elm_object_text_set(glb, ""); > - elm_cnp_selection_clear(ELM_SEL_TYPE_CLIPBOARD, > elm_object_parent_widget_get(en)); > + elm_object_cnp_selection_clear(elm_object_parent_widget_get(en), > ELM_SEL_TYPE_CLIPBOARD); > } > > void > > Modified: trunk/elementary/src/lib/elm_cnp.c > =================================================================== > --- trunk/elementary/src/lib/elm_cnp.c 2012-02-23 02:52:07 UTC (rev 68291) > +++ trunk/elementary/src/lib/elm_cnp.c 2012-02-23 02:52:11 UTC (rev 68292) > @@ -404,7 +404,7 @@ > return EINA_FALSE; > if (!_elm_cnp_init_count) _elm_cnp_init(); > if ((!selbuf) && (format != ELM_SEL_FORMAT_IMAGE)) > - return elm_cnp_selection_clear(selection, obj); > + return elm_object_cnp_selection_clear(obj, selection); > > sel = selections + selection; > > @@ -433,7 +433,7 @@ > } > > EAPI Eina_Bool > -elm_cnp_selection_clear(Elm_Sel_Type selection, Evas_Object *obj) > +elm_object_cnp_selection_clear(Evas_Object *obj, Elm_Sel_Type selection) > { > #ifdef HAVE_ELEMENTARY_X > Cnp_Selection *sel; > > Modified: trunk/elementary/src/lib/elm_cnp.h > =================================================================== > --- trunk/elementary/src/lib/elm_cnp.h 2012-02-23 02:52:07 UTC (rev 68291) > +++ trunk/elementary/src/lib/elm_cnp.h 2012-02-23 02:52:11 UTC (rev 68292) > @@ -11,8 +11,6 @@ > * > * @{ > */ > -typedef struct _Elm_Selection_Data Elm_Selection_Data; > -typedef Eina_Bool (*Elm_Drop_Cb)(void *d, Evas_Object *o, > Elm_Selection_Data *data); > > /** > * Defines the types of selection property names. > @@ -21,12 +19,15 @@ > */ > typedef enum > { > - ELM_SEL_TYPE_PRIMARY, //primary text selection > + ELM_SEL_TYPE_PRIMARY, // refers to primary text selection > ELM_SEL_TYPE_SECONDARY, // used when primary selection is in use. > - ELM_SEL_TYPE_XDND, //drag and drop > - ELM_SEL_TYPE_CLIPBOARD, // highlighted text > + ELM_SEL_TYPE_XDND, // drag and drop > + ELM_SEL_TYPE_CLIPBOARD, // selected text > } Elm_Sel_Type; > > +/** > + * Defines the types of target. > + */ > typedef enum > { > /** Targets: for matching every atom requesting */ > @@ -45,15 +46,29 @@ > ELM_SEL_FORMAT_HTML = 0x10, > } Elm_Sel_Format; > > +/** > + * Structure holding the info about selected data. > + */ > struct _Elm_Selection_Data > { > - int x, y; > + Evas_Coord x, y; > Elm_Sel_Format format; > void *data; > size_t len; > }; > +typedef struct _Elm_Selection_Data Elm_Selection_Data; > > /** > + * Callback invoked in when the selected data is 'dropped' at its > destination. > + * > + * @param d Application specific data > + * @param o The evas object where selected data is 'dropped'. > + * @param data struct holding information about selected data > + */ > +typedef Eina_Bool (*Elm_Drop_Cb)(void *d, Evas_Object *o, Elm_Selection_Data > *data); > + > + > +/** > * @brief Set copy and paste data to a widget. > * > * XXX: need to be rewritten. > @@ -108,23 +123,19 @@ > Elm_Drop_Cb datacb, void *udata); > > /** > - * @brief Clear the copy and paste data in the widget. > + * @brief Clear the selected/copied data in the widget. > * > - * Clear the data in the widget. Normally this function isn't need to call. > - * > * @see also elm_cnp_selection_set() > * > + * @param obj The source widget pointer > * @param selection Selection type for copying and pasting > - * @param obj The source widget pointer > * @return If EINA_TRUE, clearing data is success. > * > * @ingroup CopyPaste > * > */ > -// XXX: EAPI void elm_object_cnp_selection_clear(Evas_Object *obj, > -// Elm_Sel_Type selection); > -EAPI Eina_Bool elm_cnp_selection_clear(Elm_Sel_Type selection, > - Evas_Object *obj); > +EAPI Eina_Bool elm_object_cnp_selection_clear(Evas_Object *obj, > + Elm_Sel_Type selection); > > /** > * @} > > Modified: trunk/elementary/src/lib/elm_entry.c > =================================================================== > --- trunk/elementary/src/lib/elm_entry.c 2012-02-23 02:52:07 UTC (rev > 68291) > +++ trunk/elementary/src/lib/elm_entry.c 2012-02-23 02:52:11 UTC (rev > 68292) > @@ -1633,7 +1633,7 @@ > > top = elm_widget_top_get(data); > if ((top) && (elm_win_xwindow_get(top))) > - elm_cnp_selection_clear(ELM_SEL_TYPE_PRIMARY, data); > + elm_object_cnp_selection_clear(data, ELM_SEL_TYPE_PRIMARY); > #endif > } > } > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel