Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_engines.c ewl_engines.h ewl_enums.h ewl_window.c
ewl_window.h
Log Message:
- condense all of the netwm state options down into a single engine call.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- ewl_engines.c 15 Mar 2007 22:49:03 -0000 1.41
+++ ewl_engines.c 16 Mar 2007 01:54:20 -0000 1.42
@@ -488,12 +488,12 @@
/**
* @param win: the window to work with
* @return Returns no value
- * @brief Sets the window fullscreen
+ * @brief Sets the window state values
*/
void
-ewl_engine_window_fullscreen_set(Ewl_Window *win)
+ewl_engine_window_states_set(Ewl_Window *win)
{
- Ewl_Engine_Cb_Window_Fullscreen_Set window_fullscreen_set;
+ Ewl_Engine_Cb_Window_States_Set window_states_set;
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("win", win);
@@ -502,63 +502,11 @@
if (!(win->window))
DRETURN(DLEVEL_STABLE);
- window_fullscreen_set = ewl_engine_hook_get(EWL_EMBED(win),
+ window_states_set = ewl_engine_hook_get(EWL_EMBED(win),
EWL_ENGINE_HOOK_TYPE_WINDOW,
- EWL_ENGINE_WINDOW_FULLSCREEN_SET);
- if (window_fullscreen_set)
- window_fullscreen_set(win);
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * @param win: the window to work with
- * @return Returns no value
- * @brief Skips the taskbar
- */
-void
-ewl_engine_window_skip_taskbar_set(Ewl_Window *win)
-{
- Ewl_Engine_Cb_Window_Skip_Taskbar_Set window_skip_taskbar_set;
-
- DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR("win", win);
- DCHECK_TYPE("win", win, EWL_WINDOW_TYPE);
-
- if (!(win->window))
- DRETURN(DLEVEL_STABLE);
-
- window_skip_taskbar_set = ewl_engine_hook_get(EWL_EMBED(win),
- EWL_ENGINE_HOOK_TYPE_WINDOW,
- EWL_ENGINE_WINDOW_SKIP_TASKBAR_SET);
- if (window_skip_taskbar_set)
- window_skip_taskbar_set(win);
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * @param win: the window to work with
- * @return Returns no value
- * @brief Skips the pager
- */
-void
-ewl_engine_window_skip_pager_set(Ewl_Window *win)
-{
- Ewl_Engine_Cb_Window_Skip_Pager_Set window_skip_pager_set;
-
- DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR("win", win);
- DCHECK_TYPE("win", win, EWL_WINDOW_TYPE);
-
- if (!(win->window))
- DRETURN(DLEVEL_STABLE);
-
- window_skip_pager_set = ewl_engine_hook_get(EWL_EMBED(win),
- EWL_ENGINE_HOOK_TYPE_WINDOW,
- EWL_ENGINE_WINDOW_SKIP_PAGER_SET);
- if (window_skip_pager_set)
- window_skip_pager_set(win);
+ EWL_ENGINE_WINDOW_STATES_SET);
+ if (window_states_set)
+ window_states_set(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -585,58 +533,6 @@
EWL_ENGINE_WINDOW_TRANSIENT_FOR);
if (window_transient_for)
window_transient_for(win);
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * @param win: the window to work with
- * @return Returns no value
- * @brief Sets the window modal
- */
-void
-ewl_engine_window_modal_set(Ewl_Window *win)
-{
- Ewl_Engine_Cb_Window_Modal_Set window_modal_set;
-
- DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR("win", win);
- DCHECK_TYPE("win", win, EWL_WINDOW_TYPE);
-
- if (!(win->window))
- DRETURN(DLEVEL_STABLE);
-
- window_modal_set = ewl_engine_hook_get(EWL_EMBED(win),
- EWL_ENGINE_HOOK_TYPE_WINDOW,
- EWL_ENGINE_WINDOW_MODAL_SET);
- if (window_modal_set)
- window_modal_set(win);
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * @param win: the window to work with
- * @return Returns no value
- * @brief Sets the window transient
- */
-void
-ewl_engine_window_attention_demand(Ewl_Window *win)
-{
- Ewl_Engine_Cb_Window_Attention_Demand window_attention_demand;
-
- DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR("win", win);
- DCHECK_TYPE("win", win, EWL_WINDOW_TYPE);
-
- if (!(win->window))
- DRETURN(DLEVEL_STABLE);
-
- window_attention_demand = ewl_engine_hook_get(EWL_EMBED(win),
- EWL_ENGINE_HOOK_TYPE_WINDOW,
- EWL_ENGINE_WINDOW_ATTENTION_DEMAND);
- if (window_attention_demand)
- window_attention_demand(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ewl_engines.h 15 Mar 2007 22:49:03 -0000 1.25
+++ ewl_engines.h 16 Mar 2007 01:54:20 -0000 1.26
@@ -20,16 +20,8 @@
EWL_ENGINE_WINDOW_BORDERLESS_SET, /**< Set the borderless
state of the window */
EWL_ENGINE_WINDOW_DIALOG_SET, /**< Set the dialog setting of the
window */
- EWL_ENGINE_WINDOW_FULLSCREEN_SET, /**< Set the fullscreen
- setting of the window */
- EWL_ENGINE_WINDOW_SKIP_TASKBAR_SET, /**< Set the skip taskbar
- setting of the window */
- EWL_ENGINE_WINDOW_SKIP_PAGER_SET, /**< Set the skip pager
- setting of the window */
+ EWL_ENGINE_WINDOW_STATES_SET, /**< Set the window state flags */
EWL_ENGINE_WINDOW_TRANSIENT_FOR, /**< Set the window transient */
- EWL_ENGINE_WINDOW_MODAL_SET, /**< Set the window modal */
- EWL_ENGINE_WINDOW_ATTENTION_DEMAND, /**< Demand attention
- for the window */
EWL_ENGINE_WINDOW_RAISE, /**< Raise the window */
EWL_ENGINE_WINDOW_LOWER, /**< Lower the window */
@@ -183,12 +175,8 @@
void ewl_engine_window_borderless_set(Ewl_Window *win);
void ewl_engine_window_dialog_set(Ewl_Window *win);
-void ewl_engine_window_fullscreen_set(Ewl_Window *win);
-void ewl_engine_window_skip_taskbar_set(Ewl_Window *win);
-void ewl_engine_window_skip_pager_set(Ewl_Window *win);
+void ewl_engine_window_states_set(Ewl_Window *win);
void ewl_engine_window_transient_for(Ewl_Window *win);
-void ewl_engine_window_modal_set(Ewl_Window *win);
-void ewl_engine_window_attention_demand(Ewl_Window *win);
void ewl_engine_window_raise(Ewl_Window *win);
void ewl_engine_window_lower(Ewl_Window *win);
@@ -250,16 +238,9 @@
state of the window */
typedef void (*Ewl_Engine_Cb_Window_Dialog_Set)(Ewl_Window *win); /**<
Set the dialog
setting
of the window */
-typedef void (*Ewl_Engine_Cb_Window_Fullscreen_Set)(Ewl_Window *win); /**<
Set the fullscreen
- setting of the window */
-typedef void (*Ewl_Engine_Cb_Window_Skip_Taskbar_Set)(Ewl_Window *win);
/**< Set the fullscreen
- setting of the window */
-typedef void (*Ewl_Engine_Cb_Window_Skip_Pager_Set)(Ewl_Window *win); /**<
Set the fullscreen
- setting of the window */
typedef void (*Ewl_Engine_Cb_Window_Transient_For)(Ewl_Window *win); /**<
Set the window
transient */
-typedef void (*Ewl_Engine_Cb_Window_Modal_Set)(Ewl_Window *win); /**< Set the
window modal */
-typedef void (*Ewl_Engine_Cb_Window_Attention_Demand)(Ewl_Window *win); /**<
Set the window modal */
+typedef void (*Ewl_Engine_Cb_Window_States_Set)(Ewl_Window *win); /**< Set the
window modal */
typedef void (*Ewl_Engine_Cb_Window_Raise)(Ewl_Window *win); /**< Raise the
window */
typedef void (*Ewl_Engine_Cb_Window_Lower)(Ewl_Window *win); /**< Lower the
window */
typedef int (*Ewl_Engine_Cb_Keyboard_Grab)(Ewl_Window *win); /**< Set the
keyboard grab */
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- ewl_enums.h 15 Mar 2007 22:49:03 -0000 1.74
+++ ewl_enums.h 16 Mar 2007 01:54:20 -0000 1.75
@@ -258,7 +258,8 @@
EWL_WINDOW_TRANSIENT = 0x100, /**< Window is transient for */
EWL_WINDOW_TRANSIENT_FOREIGN = 0x200, /**< Window is transient for */
EWL_WINDOW_SKIP_TASKBAR = 0x400, /**< Window skips taskbar */
- EWL_WINDOW_SKIP_PAGER = 0x800 /**< Window skips pager */
+ EWL_WINDOW_SKIP_PAGER = 0x800, /**< Window skips pager */
+ EWL_WINDOW_DEMANDS_ATTENTION = 0x1000 /**< Window requires attention
*/
};
/**
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -3 -r1.75 -r1.76
--- ewl_window.c 15 Mar 2007 22:49:03 -0000 1.75
+++ ewl_window.c 16 Mar 2007 01:54:20 -0000 1.76
@@ -322,7 +322,7 @@
else
win->flags &= ~EWL_WINDOW_FULLSCREEN;
- ewl_engine_window_fullscreen_set(win);
+ ewl_engine_window_states_set(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -364,7 +364,7 @@
else
win->flags &= ~EWL_WINDOW_SKIP_TASKBAR;
- ewl_engine_window_skip_taskbar_set(win);
+ ewl_engine_window_states_set(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -407,7 +407,7 @@
else
win->flags &= ~EWL_WINDOW_SKIP_PAGER;
- ewl_engine_window_skip_pager_set(win);
+ ewl_engine_window_states_set(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -505,7 +505,7 @@
DCHECK_PARAM_PTR("win", win);
DCHECK_TYPE("win", win, EWL_WINDOW_TYPE);
- ewl_engine_window_attention_demand(win);
+ ewl_engine_window_states_set(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -606,7 +606,7 @@
else
win->flags &= ~EWL_WINDOW_MODAL;
- ewl_engine_window_modal_set(win);
+ ewl_engine_window_states_set(win);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -792,10 +792,7 @@
ewl_engine_window_title_set(window);
ewl_engine_window_borderless_set(window);
ewl_engine_window_dialog_set(window);
- ewl_engine_window_fullscreen_set(window);
- ewl_engine_window_skip_taskbar_set(window);
- ewl_engine_window_skip_pager_set(window);
- ewl_engine_window_modal_set(window);
+ ewl_engine_window_states_set(window);
width = ewl_object_maximum_w_get(EWL_OBJECT(window));
height = ewl_object_maximum_h_get(EWL_OBJECT(window));
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_window.h 15 Mar 2007 22:49:03 -0000 1.32
+++ ewl_window.h 16 Mar 2007 01:54:20 -0000 1.33
@@ -61,6 +61,7 @@
char *classname; /**< Current class on the provided window */
Ewl_Window_Flags flags; /**< Flags indicating window properties */
+ Ewl_Window_Flags old_flags; /**< Flags used on our last state set call
*/
};
Ewl_Widget *ewl_window_new(void);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs