Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_icon.c ewl_icon.h ewl_image.c ewl_image.h
Log Message:
- add in ewl_image_constrain_get, ewl_icon_constrain_set/_get
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_icon.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_icon.c 31 Dec 2005 17:56:09 -0000 1.2
+++ ewl_icon.c 2 Jan 2006 18:58:02 -0000 1.3
@@ -336,6 +336,40 @@
DRETURN_PTR(icon->extended, DLEVEL_STABLE);
}
+/**
+ * @param icon: The Ewl_Icon to constrain
+ * @param val: The val to constrain too
+ */
+void
+ewl_icon_constrain_set(Ewl_Icon *icon, unsigned int val)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("icon", icon);
+ DCHECK_TYPE("icon", icon, "icon");
+
+ ewl_image_constrain_set(EWL_IMAGE(icon->preview), val);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param icon: The icon to get the constrain from
+ * @return Returns the current constrain value of the icon
+ */
+unsigned int
+ewl_icon_constrain_get(Ewl_Icon *icon)
+{
+ unsigned int constrain;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("icon", icon, 0);
+ DCHECK_TYPE_RET("icon", icon, "icon", 0);
+
+ constrain = ewl_image_constrain_get(EWL_IMAGE(icon->preview));
+
+ DRETURN_INT(constrain, DLEVEL_STABLE);
+}
+
static void
ewl_icon_cb_label_mouse_down(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__,
void *data)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_icon.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_icon.h 30 Dec 2005 05:39:28 -0000 1.1
+++ ewl_icon.h 2 Jan 2006 18:58:02 -0000 1.2
@@ -44,6 +44,9 @@
void ewl_icon_menu_set(Ewl_Icon *icon, Ewl_Widget *menu);
Ewl_Widget *ewl_icon_menu_get(Ewl_Icon *icon);
+void ewl_icon_constrain_set(Ewl_Icon *icon, unsigned int val);
+unsigned int ewl_icon_constrain_get(Ewl_Icon *icon);
+
/**
* @}
*/
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_image.c 29 Dec 2005 19:37:43 -0000 1.21
+++ ewl_image.c 2 Jan 2006 18:58:02 -0000 1.22
@@ -161,7 +161,8 @@
*
* Sets a size to scale to proportionally if the image exceeds this size
*/
-void ewl_image_constrain_set(Ewl_Image* i, int size)
+void
+ewl_image_constrain_set(Ewl_Image *i, unsigned int size)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("i", i);
@@ -172,6 +173,19 @@
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
+/**
+ * @param i: The Ewl_Image to get the consrain size from
+ * @return Returns the current constrain size on the image
+ */
+unsigned int
+ewl_image_constrain_get(Ewl_Image *i)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("i", i, 0);
+ DCHECK_TYPE_RET("i", i, "image", 0);
+
+ DRETURN_INT(i->cs, DLEVEL_STABLE);
+}
/**
* @param i: the image to change proportional setting
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_image.h 30 Dec 2005 04:40:36 -0000 1.11
+++ ewl_image.h 2 Jan 2006 18:58:02 -0000 1.12
@@ -58,7 +58,8 @@
void ewl_image_scale_to(Ewl_Image *i, int w, int h);
void ewl_image_tile_set(Ewl_Image *i, int x, int y,
int w, int h);
-void ewl_image_constrain_set(Ewl_Image* i, int size);
+void ewl_image_constrain_set(Ewl_Image *i, unsigned int size);
+unsigned int ewl_image_constrain_get(Ewl_Image *i);
/*
* Internally used callbacks, override at your own risk.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs