Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_window.c ewl_window.h
Log Message:
API break for modal windows, change it to a flag rather than require a transient
target.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- ewl_window.c 7 Feb 2007 04:03:27 -0000 1.71
+++ ewl_window.c 7 Feb 2007 23:29:23 -0000 1.72
@@ -471,21 +471,33 @@
/**
* @param win: The window to work with
- * @param forwin: The window to go modal for
+ * @return Returns a boolean indicating if the window is modal.
+ * @brief Gets the boolean flag indicating if @a win is modal
+ */
+int
+ewl_window_modal_get(Ewl_Window *win)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("win", win, FALSE);
+ DCHECK_TYPE_RET("win", win, EWL_WINDOW_TYPE, FALSE);
+
+ DRETURN_INT(!!(win->flags & EWL_WINDOW_MODAL), DLEVEL_STABLE);
+}
+
+/**
+ * @param win: The window to work with
+ * @param modal: Boolean to indicate if this window is modal
* @return Returns no value
- * @brief Sets the window to modal for @a forwin
+ * @brief Sets the window to modal or non-modal based on @a modal
*/
void
-ewl_window_modal_for(Ewl_Window *win, Ewl_Window *forwin)
+ewl_window_modal_set(Ewl_Window *win, int modal)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("win", win);
DCHECK_TYPE("win", win, EWL_WINDOW_TYPE);
- /* make sure the modal window is transient */
- ewl_window_transient_for(win, forwin);
-
- if (forwin)
+ if (modal)
win->flags |= EWL_WINDOW_MODAL;
else
win->flags &= ~EWL_WINDOW_MODAL;
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- ewl_window.h 7 Feb 2007 04:03:27 -0000 1.28
+++ ewl_window.h 7 Feb 2007 23:29:23 -0000 1.29
@@ -78,7 +78,8 @@
void ewl_window_transient_for(Ewl_Window *win, Ewl_Window *forwin);
void ewl_window_transient_for_foreign(Ewl_Window *win,
Ewl_Embed_Window *forwin);
-void ewl_window_modal_for(Ewl_Window *win, Ewl_Window *forwin);
+int ewl_window_modal_get(Ewl_Window *win);
+void ewl_window_modal_set(Ewl_Window *win, int modal);
void ewl_window_keyboard_grab_set(Ewl_Window *win, int grab);
int ewl_window_keyboard_grab_get(Ewl_Window *win);
void ewl_window_pointer_grab_set(Ewl_Window *win, int grab);
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs