Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_embed.c ewl_embed.h ewl_engines.c ewl_engines.h ewl_text.c
ewl_window.c ewl_window.h
Log Message:
Convert the selection API to an embed rather than a window and update supporting
engines. Please test specific engines.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -3 -r1.132 -r1.133
--- ewl_embed.c 5 Dec 2007 16:44:53 -0000 1.132
+++ ewl_embed.c 6 Dec 2007 07:07:12 -0000 1.133
@@ -2033,6 +2033,26 @@
}
/**
+ * @param win: The window to set the selection on
+ * @param txt: The text to set into the selection
+ * @return Returns no value.
+ *
+ ' @brief This will set the given @a txt as the selection text on the window
+ * or clear the text if @a txt is NULL
+ */
+void
+ewl_embed_selection_text_set(Ewl_Embed *emb, const char *txt)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR(emb);
+ DCHECK_TYPE(emb, EWL_EMBED_TYPE);
+
+ ewl_engine_embed_selection_text_set(emb, txt);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
* @param emb: The embed to work with
* @return Returns no value
* @brief This will destroy the object cache associated with the embed object
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_embed.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewl_embed.h 5 Dec 2007 16:48:00 -0000 1.49
+++ ewl_embed.h 6 Dec 2007 07:07:12 -0000 1.50
@@ -173,6 +173,8 @@
void ewl_embed_dnd_aware_set(Ewl_Embed *embed);
void ewl_embed_dnd_aware_remove(Ewl_Embed *embed);
+void ewl_embed_selection_text_set(Ewl_Embed *emb, const char *txt);
+
void ewl_embed_cache_cleanup(Ewl_Embed *emb);
/*
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- ewl_engines.c 29 Nov 2007 07:34:40 -0000 1.54
+++ ewl_engines.c 6 Dec 2007 07:07:12 -0000 1.55
@@ -750,29 +750,29 @@
}
/**
- * @param win: the window to work with
+ * @param emb: the embed to work with
* @param txt: The text to set as the selection
* @return Returns no value
- * @brief Sets the window selection text
+ * @brief Sets the embed selection text
*/
void
-ewl_engine_window_selection_text_set(Ewl_Window *win, const char *txt)
+ewl_engine_embed_selection_text_set(Ewl_Embed *emb, const char *txt)
{
- Ewl_Engine_Cb_Window_Selection_Text_Set window_selection_text_set;
+ Ewl_Engine_Cb_Window_Selection_Text_Set embed_selection_text_set;
DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR(win);
+ DCHECK_PARAM_PTR(emb);
DCHECK_PARAM_PTR(txt);
- DCHECK_TYPE(win, EWL_WINDOW_TYPE);
+ DCHECK_TYPE(emb, EWL_EMBED_TYPE);
- if (!REALIZED(win))
+ if (!REALIZED(emb))
DRETURN(DLEVEL_STABLE);
- window_selection_text_set = ewl_engine_hook_get(EWL_EMBED(win),
+ embed_selection_text_set = ewl_engine_hook_get(EWL_EMBED(emb),
EWL_ENGINE_HOOK_TYPE_WINDOW,
EWL_ENGINE_WINDOW_SELECTION_TEXT_SET);
- if (window_selection_text_set)
- window_selection_text_set(win, txt);
+ if (embed_selection_text_set)
+ embed_selection_text_set(emb, txt);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_engines.h 29 Nov 2007 07:34:40 -0000 1.31
+++ ewl_engines.h 6 Dec 2007 07:07:12 -0000 1.32
@@ -191,10 +191,10 @@
int ewl_engine_pointer_grab(Ewl_Window *win);
void ewl_engine_pointer_ungrab(Ewl_Window *win);
-void ewl_engine_window_selection_text_set(Ewl_Window *win,
- const char *txt);
void ewl_engine_window_geometry_get(Ewl_Window *win, int root,
int *width, int *height);
+void ewl_engine_embed_selection_text_set(Ewl_Embed *emb,
+ const char *txt);
void ewl_engine_embed_dnd_aware_set(Ewl_Embed *embed);
void ewl_engine_embed_dnd_drag_types_set(Ewl_Embed *embed,
char **types,
@@ -260,7 +260,7 @@
ungrab */
typedef int (*Ewl_Engine_Cb_Pointer_Grab)(Ewl_Window *win); /**< Set the
pointer grab */
typedef void (*Ewl_Engine_Cb_Pointer_Ungrab)(Ewl_Window *win); /**< Set the
pointer ungrab */
-typedef void (*Ewl_Engine_Cb_Window_Selection_Text_Set)(Ewl_Window *win,
+typedef void (*Ewl_Engine_Cb_Window_Selection_Text_Set)(Ewl_Embed *emb,
const char *txt); /**<
Set the
selection text */
typedef void (*Ewl_Engine_Cb_Window_Geometry_Get)(Ewl_Window *win,
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -3 -r1.188 -r1.189
--- ewl_text.c 5 Dec 2007 16:37:51 -0000 1.188
+++ ewl_text.c 6 Dec 2007 07:07:12 -0000 1.189
@@ -3530,12 +3530,9 @@
if (txt)
{
Ewl_Embed *emb;
- Ewl_Window *win;
emb = ewl_embed_widget_find(EWL_WIDGET(s->text_parent));
- win = ewl_window_window_find(emb->canvas_window);
-
- ewl_window_selection_text_set(win, txt);
+ ewl_embed_selection_text_set(emb, txt);
FREE(txt);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -3 -r1.85 -r1.86
--- ewl_window.c 12 Nov 2007 22:42:22 -0000 1.85
+++ ewl_window.c 6 Dec 2007 07:07:12 -0000 1.86
@@ -917,26 +917,6 @@
}
/**
- * @param win: The window to set the selection on
- * @param txt: The text to set into the selection
- * @return Returns no value.
- *
- ' @brief This will set the given @a txt as the selection text on the window
- * or clear the text if @a txt is NULL
- */
-void
-ewl_window_selection_text_set(Ewl_Window *win, const char *txt)
-{
- DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR(win);
- DCHECK_TYPE(win, EWL_WINDOW_TYPE);
-
- ewl_engine_window_selection_text_set(win, txt);
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
* @internal
* @param w: The widget to work with
* @param ev_data: UNUSED
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- ewl_window.h 11 Nov 2007 06:07:46 -0000 1.39
+++ ewl_window.h 6 Dec 2007 07:07:12 -0000 1.40
@@ -116,7 +116,6 @@
int ewl_window_pointer_grab_get(Ewl_Window *win);
void ewl_window_override_set(Ewl_Window *win, int override);
int ewl_window_override_get(Ewl_Window *win);
-void ewl_window_selection_text_set(Ewl_Window *win, const char
*txt);
/*
* Internally used callbacks, override at your own risk.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs