2012/2/19  <[email protected]>:
> I suppose the xcb is left to me to fix when I run into this...
Yeah, sorry Michael I have to push this onto you. I'm not familiar
with the XCB bindings. It was necessary for stuff in e_randr.
I hope it's not too much effort.
>
> dh
>
>
> ----- Original Message -----
> From: "Enlightenment SVN" <[email protected]>
> To: [email protected]
> Sent: Thursday, February 16, 2012 2:26:30 PM
> Subject: E SVN: leif IN trunk/ecore: . src/lib/ecore_x src/lib/ecore_x/xlib
>
> Log:
> Add mode add/del functions to ecore_x_randr
>
> Author: leif
> Date: 2012-02-16 11:26:30 -0800 (Thu, 16 Feb 2012)
> New Revision: 68031
> Trac: http://trac.enlightenment.org/e/changeset/68031
>
> Modified:
> trunk/ecore/ChangeLog trunk/ecore/src/lib/ecore_x/Ecore_X.h 
> trunk/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c
>
> Modified: trunk/ecore/ChangeLog
> ===================================================================
> --- trunk/ecore/ChangeLog 2012-02-16 18:38:37 UTC (rev 68030)
> +++ trunk/ecore/ChangeLog 2012-02-16 19:26:30 UTC (rev 68031)
> @@ -494,3 +494,9 @@
>
> * Add ecore_imf APIs to set return key type, disable return key.
>
> +2012-02-16 Leif Middelschulte (T_UNIX)
> +
> + * Add ecore_x_randr_mode_add to add a mode to a display
> + * Add ecore_x_randr_mode_del to remove a mode from the display
> + * Add ecore_x_randr_output_mode_add to add a mode to an output
> + * Add ecore_x_randr_output_mode_del to remove a mode from an output
>
> Modified: trunk/ecore/src/lib/ecore_x/Ecore_X.h
> ===================================================================
> --- trunk/ecore/src/lib/ecore_x/Ecore_X.h 2012-02-16 18:38:37 UTC (rev 68030)
> +++ trunk/ecore/src/lib/ecore_x/Ecore_X.h 2012-02-16 19:26:30 UTC (rev 68031)
> @@ -2749,6 +2749,11 @@
> EAPI Ecore_X_Randr_Mode_Info **
> ecore_x_randr_modes_info_get(Ecore_X_Window root,
> int *num);
> +EAPI Ecore_X_Randr_Mode
> +ecore_x_randr_mode_info_add(Ecore_X_Window root,
> + Ecore_X_Randr_Mode_Info *mode_info);
> +EAPI void
> +ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode);
> EAPI Ecore_X_Randr_Mode_Info *
> ecore_x_randr_mode_info_get(Ecore_X_Window root,
> Ecore_X_Randr_Mode mode);
> @@ -2840,6 +2845,12 @@
> Ecore_X_Randr_Crtc crtc_r2,
> Ecore_X_Randr_Output_Policy policy,
> Ecore_X_Randr_Relative_Alignment alignment);
> +EAPI Eina_Bool
> +ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output,
> + Ecore_X_Randr_Mode mode);
> +EAPI void
> +ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output,
> + Ecore_X_Randr_Mode mode);
> EAPI Ecore_X_Randr_Mode *
> ecore_x_randr_output_modes_get(Ecore_X_Window root,
> Ecore_X_Randr_Output output,
>
> Modified: trunk/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c
> ===================================================================
> --- trunk/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c 2012-02-16 18:38:37 
> UTC (rev 68030)
> +++ trunk/ecore/src/lib/ecore_x/xlib/ecore_x_randr_12.c 2012-02-16 19:26:30 
> UTC (rev 68031)
> @@ -380,6 +380,48 @@
> }
>
> /*
> + * @brief add a mode to a display
> + * @param root window to which's screen's ressources are added
> + * @param mode_info
> + * @return Ecore_X_Randr_Mode of the added mode. Ecore_X_Randr_None if mode
> + * adding failed.
> + * @since 1.2.0
> + */
> +EAPI Ecore_X_Randr_Mode
> +ecore_x_randr_mode_info_add(Ecore_X_Window root,
> + Ecore_X_Randr_Mode_Info *mode_info)
> +{
> +#ifdef ECORE_XRANDR
> + RANDR_CHECK_1_2_RET(EINA_FALSE);
> + Ecore_X_Randr_Mode mode = Ecore_X_Randr_None;
> +
> + if (_ecore_x_randr_root_validate(root) && mode_info)
> + mode = XRRCreateMode(_ecore_x_disp, root, (XRRModeInfo*)mode_info);
> +
> + return mode;
> +#else
> + return Ecore_X_Randr_None;
> +#endif
> +}
> +
> +/*
> + * @brief delete a mode from the display
> + * @param mode_info
> + * @since 1.2.0
> + */
> +EAPI void
> +ecore_x_randr_mode_del(Ecore_X_Randr_Mode mode)
> +{
> +#ifdef ECORE_XRANDR
> + RANDR_CHECK_1_2_RET();
> +
> + XRRDestroyMode(_ecore_x_disp, mode);
> +#else
> + return;
> +#endif
> +}
> +
> +/*
> * @brief get detailed information for a given mode id
> * @param root window which's screen's ressources are queried
> * @param mode the XID which identifies the mode of interest
> @@ -1364,6 +1406,54 @@
> #endif
> }
>
> +/*
> + * @brief add given mode to given output
> + * @param output the output the mode is added to
> + * @param mode the mode added to the output
> + * @return EINA_FALSE if output or mode equal Ecore_X_Randr_None, else 
> EINA_TRUE
> + * Additionally, if xcb backend is used, the success of the addition is 
> reported
> + * back directly.
> + * @since 1.2.0
> + */
> +EAPI Eina_Bool
> +ecore_x_randr_output_mode_add(Ecore_X_Randr_Output output,
> + Ecore_X_Randr_Mode mode)
> +{
> +#ifdef ECORE_XRANDR
> + RANDR_CHECK_1_2_RET(EINA_FALSE);
> +
> + if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None))
> + return EINA_FALSE;
> +
> + XRRAddOutputMode(_ecore_x_disp, output, mode);
> + return EINA_TRUE;
> +#else
> + return EINA_FALSE;
> +#endif
> +}
> +
> +/*
> + * @brief delete given mode from given output
> + * @param output the output the mode is removed from
> + * @param mode the mode removed from the output
> + * @since 1.2.0
> + */
> +EAPI void
> +ecore_x_randr_output_mode_del(Ecore_X_Randr_Output output,
> + Ecore_X_Randr_Mode mode)
> +{
> +#ifdef ECORE_XRANDR
> + RANDR_CHECK_1_2_RET();
> +
> + if ((output == Ecore_X_Randr_None) || (mode == Ecore_X_Randr_None))
> + return;
> +
> + XRRDeleteOutputMode(_ecore_x_disp, output, mode);
> +#else
> + return;
> +#endif
> +}
> +
> EAPI Ecore_X_Randr_Mode *
> ecore_x_randr_output_modes_get(Ecore_X_Window root,
> Ecore_X_Randr_Output output,
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-- 
Leif

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to