From 8a496e93ab9f4b9f48f96426f20232720d1027f7 Mon Sep 17 00:00:00 2001 From: Sanjeev BA Date: Fri, 24 Feb 2012 02:26:03 +0000 Subject: [PATCH] Fix elm_photocam API and cnp documentation. Signed-off-by: Sanjeev BA SVN revision: 68373 --- .../elementary/src/examples/photocam_example_01.c | 2 +- legacy/elementary/src/lib/elm_cnp.h | 15 ++++++++------- legacy/elementary/src/lib/elm_deprecated.h | 13 +++++++++++++ legacy/elementary/src/lib/elm_photocam.c | 8 +++++++- legacy/elementary/src/lib/elm_photocam.h | 2 +- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/legacy/elementary/src/examples/photocam_example_01.c b/legacy/elementary/src/examples/photocam_example_01.c index f3336f62c6..a2ba742494 100644 --- a/legacy/elementary/src/examples/photocam_example_01.c +++ b/legacy/elementary/src/examples/photocam_example_01.c @@ -74,7 +74,7 @@ static void _fit(void *data, Evas_Object *obj, void *event_info) { int x, y, w, h; - elm_photocam_region_get(data, &x, &y, &w, &h); + elm_photocam_image_region_get(data, &x, &y, &w, &h); printf("region: {%d, %d, %d, %d}\n", x, y, w, h); elm_photocam_zoom_mode_set(data, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT); } diff --git a/legacy/elementary/src/lib/elm_cnp.h b/legacy/elementary/src/lib/elm_cnp.h index 828028089a..9cbe88eb8c 100644 --- a/legacy/elementary/src/lib/elm_cnp.h +++ b/legacy/elementary/src/lib/elm_cnp.h @@ -1,14 +1,15 @@ /** - * @defgroup CopyPaste + * @defgroup CopyPaste CopyPaste * - * Implement the copy and paste + clipboard functionality, in order to - * share data across application windows. + * Implement the following functionality + * a. select, copy/cut and paste + * b. clipboard + * c. drag and drop + * in order to share data across application windows. * * Contains functions to select a portion of text, stick it to a clipboard * and to paste the selection to an appropriate place. * - * - * * @{ */ @@ -42,7 +43,7 @@ typedef enum ELM_SEL_FORMAT_IMAGE = 0x04, /** Vcards */ ELM_SEL_FORMAT_VCARD = 0x08, - /** Raw HTML-like things for widgets that want that stuff (hello webkit!) */ + /** Raw HTML-like data (ex., webkit) */ ELM_SEL_FORMAT_HTML = 0x10, } Elm_Sel_Format; @@ -72,7 +73,7 @@ typedef Eina_Bool (*Elm_Drop_Cb)(void *d, Evas_Object *o, Elm_Selection_Data *da * @brief Set copy and paste data to a widget. * * XXX: need to be rewritten. - * Append the given callback to the list. This functions will be called. + * Append the given callback to the list. * * @param selection Selection type for copying and pasting * @param obj The source widget pointer diff --git a/legacy/elementary/src/lib/elm_deprecated.h b/legacy/elementary/src/lib/elm_deprecated.h index dac87e0d4c..78732c6b68 100644 --- a/legacy/elementary/src/lib/elm_deprecated.h +++ b/legacy/elementary/src/lib/elm_deprecated.h @@ -4550,6 +4550,19 @@ EINA_DEPRECATED EAPI void elm_all_flush(void); */ EINA_DEPRECATED EAPI void elm_video_uri_set(Evas_Object *video, const char *uri); +/** + * @brief Get the region of the image that is currently shown + * + * @param obj + * @param x A pointer to the X-coordinate of region + * @param y A pointer to the Y-coordinate of region + * @param w A pointer to the width + * @param h A pointer to the height + * + * @deprecated Use elm_photocam_image_region_get() instead. + */ +EINA_DEPRECATED EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); + /** * @} */ diff --git a/legacy/elementary/src/lib/elm_photocam.c b/legacy/elementary/src/lib/elm_photocam.c index e2469734cb..67f884d6f3 100644 --- a/legacy/elementary/src/lib/elm_photocam.c +++ b/legacy/elementary/src/lib/elm_photocam.c @@ -1468,8 +1468,14 @@ elm_photocam_image_size_get(const Evas_Object *obj, int *w, int *h) if (h) *h = wd->size.imh; } -EAPI void +EINA_DEPRECATED EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) +{ + return elm_photocam_image_region_get(obj, x, y, w, h); +} + +EAPI void +elm_photocam_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); diff --git a/legacy/elementary/src/lib/elm_photocam.h b/legacy/elementary/src/lib/elm_photocam.h index 883b137be7..0d5c817659 100644 --- a/legacy/elementary/src/lib/elm_photocam.h +++ b/legacy/elementary/src/lib/elm_photocam.h @@ -169,7 +169,7 @@ EAPI void elm_photocam_image_size_get(const Evas_Object *obj, * @see elm_photocam_image_region_show() * @see elm_photocam_image_region_bring_in() */ -EAPI void elm_photocam_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); +EAPI void elm_photocam_image_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h); /** * @brief Set the viewed region of the image