2005-05-13 16:47:18 -04:00
/* $Id$ */
/* Copyright 2002 The gtkmm Development Team
*
* This library is free software ; you can redistribute it and / or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation ; either
* version 2 of the License , or ( at your option ) any later version .
*
* This library is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* Library General Public License for more details .
*
* You should have received a copy of the GNU Library General Public
* License along with this library ; if not , write to the Free
* Software Foundation , Inc . , 675 Mass Ave , Cambridge , MA 0213 9 , USA .
*/
# ifndef _GDKMM_GENERAL_H
# define _GDKMM_GENERAL_H
2007-11-12 18:44:49 -05:00
# include <gdkmm/pixbuf.h>
# include <cairomm/context.h>
2005-05-13 16:47:18 -04:00
namespace Gdk
{
int screen_width ( ) ;
int screen_height ( ) ;
int screen_width_mm ( ) ;
int screen_height_mm ( ) ;
void flush ( ) ;
2007-11-12 18:44:49 -05:00
namespace Cairo
{
2007-12-18 01:05:55 -05:00
# ifndef GDKMM_DISABLE_DEPRECATED
2007-11-12 18:44:49 -05:00
/** Sets the specified Gdk::Color as the source color of the Cairo context.
* @ param @ context The cairo context .
* @ param color The color to use as the source color .
*
2007-12-18 01:05:55 -05:00
* @ deprecated Use the overloaded function that takes a const RefPtr
* reference .
*
2007-11-12 18:44:49 -05:00
* @ newin2p10
*/
void set_source_color ( : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Gdk : : Color & color ) ;
2007-12-18 01:05:55 -05:00
# endif
/** Sets the specified Gdk::Color as the source color of the Cairo context.
* @ param @ context The cairo context .
* @ param color The color to use as the source color .
*
* @ newin2p12
*/
void set_source_color ( const : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Gdk : : Color & color ) ;
2007-11-12 18:44:49 -05:00
2007-12-18 01:05:55 -05:00
# ifndef GDKMM_DISABLE_DEPRECATED
2007-11-12 18:44:49 -05:00
/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.
* @ param @ context The cairo context .
* @ param pixbuf A Gdk : : Pixbuf
* @ param pixbuf_x X coordinate of location to place upper left corner of pixbuf .
* @ param pixbuf_y Y coordinate of location to place upper left corner of pixbuf .
*
2007-12-18 01:05:55 -05:00
* @ deprecated Use the overloaded function that takes a const RefPtr
* reference .
*
2007-11-12 18:44:49 -05:00
* @ newin2p10
*/
void set_source_pixbuf ( : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Glib : : RefPtr < Gdk : : Pixbuf > & pixbuf , double pixbuf_x , double pixbuf_y ) ;
2007-12-18 01:05:55 -05:00
# endif
/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.
* @ param @ context The cairo context .
* @ param pixbuf A Gdk : : Pixbuf
* @ param pixbuf_x X coordinate of location to place upper left corner of pixbuf .
* @ param pixbuf_y Y coordinate of location to place upper left corner of pixbuf .
*
* @ newin2p12
*/
void set_source_pixbuf ( const : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Glib : : RefPtr < Gdk : : Pixbuf > & pixbuf , double pixbuf_x , double pixbuf_y ) ;
2007-11-12 18:44:49 -05:00
2007-12-18 01:05:55 -05:00
# ifndef GDKMM_DISABLE_DEPRECATED
2007-11-12 18:44:49 -05:00
/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixmap_x, pixmap_y.
* @ param @ context The cairo context .
* @ param pixmap A Gdk : : Pixmap
* @ param pixmap_x X coordinate of location to place upper left corner of pixmap .
* @ param pixmap_y Y coordinate of location to place upper left corner of pixmap .
*
2007-12-18 01:05:55 -05:00
* @ deprecated Use the overloaded function that takes a const RefPtr
* reference .
*
2007-11-12 18:44:49 -05:00
* @ newin2p10
*/
void set_source_pixmap ( : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Glib : : RefPtr < Gdk : : Pixmap > & pixmap , double pixmap_x , double pixmap_y ) ;
2007-12-18 01:05:55 -05:00
# endif
2007-11-12 18:44:49 -05:00
2007-12-18 01:05:55 -05:00
/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixmap_x, pixmap_y.
* @ param @ context The cairo context .
* @ param pixmap A Gdk : : Pixmap
* @ param pixmap_x X coordinate of location to place upper left corner of pixmap .
* @ param pixmap_y Y coordinate of location to place upper left corner of pixmap .
*
* @ newin2p12
*/
void set_source_pixmap ( const : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Glib : : RefPtr < Gdk : : Pixmap > & pixmap , double pixmap_x , double pixmap_y ) ;
2007-11-12 18:44:49 -05:00
2007-12-18 01:05:55 -05:00
# ifndef GDKMM_DISABLE_DEPRECATED
2007-11-12 18:44:49 -05:00
/** Adds the given rectangle to the current path of the context.
*
* @ param context A cairo context .
* @ param rectangle A rectangle to add to the path of the context .
*
2007-12-18 01:05:55 -05:00
* @ deprecated Use add_rectangle_to_path ( ) instead
* reference .
*
2007-11-12 18:44:49 -05:00
* @ newin2p10
*/
void rectangle ( : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Gdk : : Rectangle & rectangle ) ;
2007-12-18 01:05:55 -05:00
# endif
/** Adds the given rectangle to the current path of the context.
*
* @ param context A cairo context .
* @ param rectangle A rectangle to add to the path of the context .
*
* @ newin2p12
*/
void add_rectangle_to_path ( const : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Gdk : : Rectangle & rectangle ) ;
2007-11-12 18:44:49 -05:00
2007-12-18 01:05:55 -05:00
# ifndef GDKMM_DISABLE_DEPRECATED
2007-11-12 18:44:49 -05:00
/** Adds the given region to the current path of the context.
*
* @ param context A cairo context .
* @ param region A region to add to the path of the context .
*
2007-12-18 01:05:55 -05:00
* @ deprecated Use add_region_to_path ( ) instead
*
2007-11-12 18:44:49 -05:00
* @ newin2p10
*/
void region ( : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Gdk : : Region & region ) ;
2007-12-18 01:05:55 -05:00
# endif
/** Adds the given region to the current path of the context.
*
* @ param context A cairo context .
* @ param region A region to add to the path of the context .
*
* @ newin2p12
*/
void add_region_to_path ( const : : Cairo : : RefPtr < : : Cairo : : Context > & context , const Gdk : : Region & region ) ;
2007-11-12 18:44:49 -05:00
} //namespace Cairo
2005-05-13 16:47:18 -04:00
} //namespace Gdk
# endif //_GDKMM_GENERAL_H