Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_enums.h ewl_window.c ewl_window.h Log Message: - put in fullscreen functions. Don't use them as they don't work right at the moment. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -3 -r1.45 -r1.46 --- ewl_enums.h 25 May 2006 18:27:18 -0000 1.45 +++ ewl_enums.h 5 Jun 2006 04:12:30 -0000 1.46 @@ -256,7 +256,8 @@ EWL_WINDOW_USER_CONFIGURE = 0x2, /**< User configure */ EWL_WINDOW_GRAB_POINTER = 0x4, /**< Window grabs pointer */ EWL_WINDOW_GRAB_KEYBOARD = 0x8, /**< Window grabs keyboard */ - EWL_WINDOW_OVERRIDE = 0x10 /**< Window override setting */ + EWL_WINDOW_OVERRIDE = 0x10, /**< Window override setting */ + EWL_WINDOW_FULLSCREEN = 0x20 /**< Window is fullscreen */ }; /** =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -3 -r1.45 -r1.46 --- ewl_window.c 26 May 2006 19:01:56 -0000 1.45 +++ ewl_window.c 5 Jun 2006 04:12:30 -0000 1.46 @@ -283,6 +283,54 @@ } /** + * @param win: The window to work with + * @param fullscreen: The fullscreen setting to use + * @return Returns no value + * @brief Sets the fullscreen setting for the window + */ +void +ewl_window_fullscreen_set(Ewl_Window *win, unsigned int fullscreen) +{ + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR("win", win); + DCHECK_TYPE("win", win, EWL_WINDOW_TYPE); + + /* do nothing if already set */ + if (fullscreen == ewl_window_fullscreen_get(win)) + DRETURN(DLEVEL_STABLE); + + if (fullscreen) + win->flags |= EWL_WINDOW_FULLSCREEN; + else + win->flags &= ~EWL_WINDOW_FULLSCREEN; + +#ifdef ENABLE_EWL_SOFTWARE_X11 + if (REALIZED(win) && strstr(win->render, "x11")) { + ecore_x_netwm_state_request_send((Ecore_X_Window)win->window, + NULL, ECORE_X_WINDOW_STATE_FULLSCREEN, + ECORE_X_WINDOW_STATE_UNKNOWN, TRUE); + } +#endif + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** + * @params win: The window to work with + * @return Returns TRUE if the window is fullscreen, FALSE otherwise + * @brief Retrieve the fullscreen setting for the window + */ +unsigned int +ewl_window_fullscreen_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_FULLSCREEN)), DLEVEL_STABLE); +} + +/** * @param win: the window to move * @param x: the x coordinate of the new position * @param y: the y coordinate of the new position @@ -696,6 +744,14 @@ if (window->flags & EWL_WINDOW_BORDERLESS) ecore_x_mwm_borderless_set(xwin, 1); + + if (window->flags & EWL_WINDOW_FULLSCREEN) + { + Ecore_X_Window_State states[] = + {ECORE_X_WINDOW_STATE_FULLSCREEN}; + + ecore_x_netwm_window_state_set(xwin, states, 1); + } 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.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- ewl_window.h 12 Apr 2006 06:41:55 -0000 1.15 +++ ewl_window.h 5 Jun 2006 04:12:30 -0000 1.16 @@ -66,6 +66,9 @@ void ewl_window_class_set(Ewl_Window *win, const char *classname); char *ewl_window_class_get(Ewl_Window *win); void ewl_window_borderless_set(Ewl_Window *win); +void ewl_window_fullscreen_set(Ewl_Window *win, + unsigned int fullscreen); +unsigned int ewl_window_fullscreen_get(Ewl_Window *win); void ewl_window_move(Ewl_Window *win, int x, int y); void ewl_window_raise(Ewl_Window *win); void ewl_window_lower(Ewl_Window *win); @@ -76,8 +79,8 @@ 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_dnd_aware_set(Ewl_Window *win); -void ewl_window_selection_text_set(Ewl_Window *win, const char *txt); +void ewl_window_dnd_aware_set(Ewl_Window *win); +void ewl_window_selection_text_set(Ewl_Window *win, const char *txt); /* * Internally used callbacks, override at your own risk. _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs