summaryrefslogtreecommitdiff
path: root/gdk/gdkcairo.h
Commit message (Collapse)AuthorAgeFilesLines
* Drop gdk_cairo_surface_upload_to_gl() helperAlexander Larsson2020-09-251-7/+0
| | | | | | There is nothing really special about this code, its just a helper for uploading pixel data to opengl, and we're not really in the business of doing opengl-specific helper functions.
* Replace "gdouble" with "double"Benjamin Otte2020-07-251-2/+2
|
* gdk: Remove gdk_cairo_get_clip_rectangle()Benjamin Otte2020-02-131-4/+0
| | | | | | | | | | | | | The function is fundamentally broken for unbounded surfaces. If a surface is unbounded, we cannot represent this as a cairo_rectangle_int_t, and using the return value doesn't work because it's already used for something else. In GTK3, unbounded surfaces aren't a problem, but GTK4 uses recording surfaces. So better remove that function before we keep using it and using it wrong.
* Revert "Break out cairo color matrix recoloring to ↵Benjamin Otte2020-02-041-6/+0
| | | | | | | | | | | gdk_cairo_image_surface_recolor()" We're not in the business of adding Cairo APIs. That's Cairo's job. Also, we don't need this API anywhere like the original commit claimed, so there's no need to make it available in any way. This reverts commit afa6cc23692f83f0d38de24c9cf58a7a494c01d2.
* indentation: fix various alignment issuesAlexander Larsson2020-01-301-2/+2
| | | | Most of these stem from the GtkIconInfo -> GtkIcon rename
* Break out cairo color matrix recoloring to gdk_cairo_image_surface_recolor()Alexander Larsson2020-01-291-0/+6
| | | | This is useful in some parts of the icon theme APIs.
* Use a single compilation symbolEmmanuele Bassi2019-11-271-1/+1
| | | | | | | | | | | | We use a compilation symbol in our build to allow the inclusion of specific headers while building GTK, to avoid the need to include only the global header. Each namespace has its own compilation symbol because we used to have different libraries, and strict symbol visibility between libraries; now that we have a single library, and we can use private symbols across namespaces while building GTK, we should have a single compilation symbol, and simplify the build rules.
* gdk: Get rid of GdkDrawingContextBenjamin Otte2018-04-241-1/+0
| | | | All information is kept in GdkDrawContext these days, so use that one.
* gdk: Remove gdk_cairo_surface_create_from_pixbuf()Benjamin Otte2018-04-121-4/+0
| | | | It's unused and people should use textures and snapshots anyway.
* gdk: Remove gdk_cairo_get_drawing_context()Benjamin Otte2018-04-121-3/+0
| | | | It's unused.
* GdkSurface: Rename lots of stuff from window->surfaceAlexander Larsson2018-03-201-1/+1
| | | | | Mostly these are internal things, but the major public change is that event.window is now event.surface.
* GdkSurface: Rename various functions and variablesAlexander Larsson2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an automatic rename of various things related to the window->surface rename. Public symbols changed by this is: GDK_MODE_WINDOW gdk_device_get_window_at_position gdk_device_get_window_at_position_double gdk_device_get_last_event_window gdk_display_get_monitor_at_window gdk_drag_context_get_source_window gdk_drag_context_get_dest_window gdk_drag_context_get_drag_window gdk_draw_context_get_window gdk_drawing_context_get_window gdk_gl_context_get_window gdk_synthesize_window_state gdk_surface_get_window_type gdk_x11_display_set_window_scale gsk_renderer_new_for_window gsk_renderer_get_window gtk_text_view_buffer_to_window_coords gtk_tree_view_convert_widget_to_bin_window_coords gtk_tree_view_convert_tree_to_bin_window_coords The commands that generated this are: git sed -f g "GDK window" "GDK surface" git sed -f g window_impl surface_impl (cd gdk; git sed -f g impl_window impl_surface) git sed -f g WINDOW_IMPL SURFACE_IMPL git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface git sed -f g gsk_renderer_get_window gsk_renderer_get_surface git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface (cd gdk; git sed -f g window_type surface_type) git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type git sed -f g window_at_position surface_at_position git sed -f g event_window event_surface git sed -f g window_coord surface_coord git sed -f g window_state surface_state git sed -f g window_cursor surface_cursor git sed -f g window_scale surface_scale git sed -f g window_events surface_events git sed -f g monitor_at_window monitor_at_surface git sed -f g window_under_pointer surface_under_pointer (cd gdk; git sed -f g for_window for_surface) git sed -f g window_anchor surface_anchor git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL git sed -f g native_window native_surface git sed -f g source_window source_surface git sed -f g dest_window dest_surface git sed -f g drag_window drag_surface git sed -f g input_window input_surface git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
* GdkWindow -> GdkSurface initial type renameAlexander Larsson2018-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This renames the GdkWindow class and related classes (impl, backend subclasses) to surface. Additionally it renames related types: GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType, GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge This is an automatic conversion using the below commands: git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass git sed -f g GdkWindow GdkSurface git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2" git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE" git sed -f g "broadway_window" "broadway_surface" git sed -f g "BroadwayWindow" "BroadwaySurface" git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE" git sed -f g "wayland_window" "wayland_surface" git sed -f g "WaylandWindow" "WaylandSurface" git sed -f g "X11_WINDOW" "X11_SURFACE" git sed -f g "x11_window" "x11_surface" git sed -f g "X11Window" "X11Surface" git sed -f g "WIN32_WINDOW" "WIN32_SURFACE" git sed -f g "win32_window" "win32_surface" git sed -f g "Win32Window" "Win32Surface" git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE" git sed -f g "quartz_window" "quartz_surface" git sed -f g "QuartzWindow" "QuartzSurface" git checkout NEWS* po-properties
* The big versioning cleanupMatthias Clasen2018-02-061-4/+4
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* API: gdk: Remove ability to render window contentsBenjamin Otte2016-11-201-5/+0
| | | | | | | | | | | | | The functions gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window() are unreliable and depend on the windowing system (they work great on X11 and Win32, less so on Quartz and Wayland). With the switch to new drawing API and OpenGL, we can definitely no longer support a generic way to snapshot windows. People should either write windowsystem-specific code or draw their widgets directly - like with gtk_widget_draw() - if they need to get a rendering.
* Drop GdkColorMatthias Clasen2016-11-011-1/+0
| | | | It is deprecated and no longer used.
* gdk: Remove deprecated gdk_cairo_set_source_colorRico Tzschichholz2016-10-241-4/+0
|
* gdk: Add utility for uploading Cairo surfaces to GLEmmanuele Bassi2016-10-181-0/+7
| | | | | | | The surface-to-GL upload logic has become more complicated with the addition of the GLES code paths; it's more logical to have a public utility function that can be called from GDK users, instead of copy pasting the whole thing multiple times.
* gdk: Remove old code to create drawing contextBenjamin Otte2016-10-161-3/+0
| | | | You now have to use a GdkDrawingContext
* gdk: Deprecate gdk_cairo_create()Emmanuele Bassi2016-06-091-1/+1
| | | | | | | We have GdkDrawingContext, now, which is in charge of creating Cairo contexts for drawing on a GdkWindow. https://bugzilla.gnome.org/show_bug.cgi?id=766675
* Associate the drawing context to the Cairo contextEmmanuele Bassi2016-06-091-2/+4
| | | | | | | | | | | Instead of associating the GdkWindow that created the GdkDrawingContext we can directly bind the Cairo context to the GDK drawing context. Cairo contexts created via gdk_cairo_create() go back to not having a GdkWindow associated to them, like they did before we introduced the gdk_window_begin_draw_frame() API. https://bugzilla.gnome.org/show_bug.cgi?id=766675
* Add frame drawing API to GdkWindowEmmanuele Bassi2016-06-091-0/+2
| | | | | | | | | | | | | | | | | Existing code drawing on a GDK window has to handle the direct drawing and the buffered drawing by itself, by checking the window type and whether or not the window is backed by a native windowing surface. After that, the calling code has to create a Cairo context from the window and keep an association between the context and the window itself. This is completely unnecessary: GDK can determine whether or not it should use a backing store to draw on a GdkWindow as well as create a Cairo context, and keep track of it. This allows to simplify the calling code, and enforce some of the drawing behavior we want to guarantee to users. https://bugzilla.gnome.org/show_bug.cgi?id=766675
* gdk: Add support for OpenGLAlexander Larsson2014-10-131-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the new type GdkGLContext that wraps an OpenGL context for a particular native window. It also adds support for the gdk paint machinery to use OpenGL to draw everything. As soon as anyone creates a GL context for a native window we create a "paint context" for that GdkWindow and switch to using GL for painting it. This commit contains only an implementation for X11 (using GLX). The way painting works is that all client gl contexts draw into offscreen buffers rather than directly to the back buffer, and the way something gets onto the window is by using gdk_cairo_draw_from_gl() to draw part of that buffer onto the draw cairo context. As a fallback (if we're doing redirected drawing or some effect like a cairo_push_group()) we read back the gl buffer into memory and composite using cairo. This means that GL rendering works in all cases, including rendering to a PDF. However, this is not particularly fast. In the *typical* case, where we're drawing directly to the window in the regular paint loop we hit the fast path. The fast path uses opengl to draw the buffer to the window back buffer, either by blitting or texturing. Then we track the region that was drawn, and when the draw ends we paint the normal cairo surface to the window (using texture-from-pixmap in the X11 case, or texture from cairo image otherwise) in the regions where there is no gl painted. There are some complexities wrt layering of gl and cairo areas though: * We track via gdk_window_mark_paint_from_clip() whenever gtk is painting over a region we previously rendered with opengl (flushed_region). This area (needs_blend_region) is blended rather than copied at the end of the frame. * If we're drawing a gl texture with alpha we first copy the current cairo_surface inside the target region to the back buffer before we blend over it. These two operations allow us full stacking of transparent gl and cairo regions.
* Deprecate GdkColorMatthias Clasen2014-05-221-1/+1
| | | | | It has been replaced by GdkRGBA. Time to make it official. http://bugzilla.gnome.org/show_bug.cgi?id=636695
* gdk: Add gdk_cairo_surface_create_from_pixbufAlexander Larsson2013-07-031-0/+5
|
* Add GDK_AVAILABLE_IN_ALL annotations in gdkMatthias Clasen2013-05-051-0/+8
| | | | | This is in preparation to modernizing our handing of exported symbols.
* Move single-include guards inside include guardsMatthias Clasen2012-12-281-3/+3
| | | | | | gcc has optimizations for include guards that only work if they are outermost in the the header. https://bugzilla.gnome.org/show_bug.cgi?id=689810
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* gdk: Use versioned deprecationsMatthias Clasen2012-02-271-1/+2
| | | | | | | This patch changes all uses of GDK_DEPRECATED(_FOR) in gdk headers by the versioned variants, GDK_DEPRECATED_IN_3_x(_FOR). At the same time, we add GDK_AVAILABLE_IN_3_x annotations for all API additions in 3.2 and 3.4.
* Deprecate all the public API that is using GdkColor structJavier Jardón2011-12-221-2/+4
|
* Revert "Clean up includes"Matthias Clasen2011-11-221-1/+1
| | | | This reverts commit c5e4af761c9db702b9bbf0740404c204e5b086d2.
* Clean up includesMatthias Clasen2011-11-221-1/+1
| | | | | There's no sign of Pango in this header, so no need to include pangocairo.h
* More GDK documentation tweaksMatthias Clasen2011-02-091-23/+23
|
* Use cairo gobject support instead of a new boxed type.Benjamin Berg2010-12-041-3/+0
|
* Add a boxed type for cairo_pattern_t.Carlos Garnacho2010-12-041-0/+3
|
* API: Make gdk_cairo_create() take a GdkWindowBenjamin Otte2010-12-021-1/+1
| | | | | | | | | This is not strictly an API change as GdkDrawable is typedeffed to GdkWindow, but it changes the header, so I'm marking it as such. gdk_cairo_create() can only be used with windows these days, so it makes sense to pass a window. With that, we can alseo remove the set_cairo_clip() vfunc from GdkDrawable and implement it inside gdkwindow.c.
* API: Remove gdk_cairo_reset_clip()Benjamin Otte2010-12-021-2/+0
| | | | | | You should not ever ever ever call cairo_reset_clip(). If you do, your code is broken and you deserve everything you get. And we should definitely not support this insanity.
* Add GdkRGBA struct to supersede GdkColorCarlos Garnacho2010-10-221-0/+3
| | | | | | | | | GdkRGBA is a boxed struct similar to GdkColor, with the difference that it stores alpha information as well, and colors are stored in [0..1] doubles, in the cairo spirit. gdk_cairo_set_source_rgba() has been also added to allow easier handling of this new type.
* API: add gdk_cairo_get_clip_rectangle() convenience APIBenjamin Otte2010-09-261-0/+2
|
* API: Rename gdk_set_source_pixmap() to gdk_set_source_window()Benjamin Otte2010-09-261-4/+4
| | | | That's what it's used for now.
* API: Add gdk_cairo_region_create_from_surface()Benjamin Otte2010-09-261-0/+4
| | | | | | | | The function converts the given surface into an alpha bitmap mask. This is mostly useful for setting shape regions. Also adds a new internal function _gdk_cairo_surface_extents() that computes a surface's extents.
* s/GdkRegion/cairo_region_t/ in all of gtkBenjamin Otte2010-06-291-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=613284
* Remove all traces of GDK_PIXBUF/GTK_DISABLE_SINGLE_INCLUDESMichael Natterer2010-05-031-1/+1
| | | | ...and disallow inclusion of individual files unconditionally.
* Fix a typoMatthias Clasen2009-09-041-1/+1
|
* Add gdk_cairo_reset_clipAlexander Larsson2009-09-011-0/+2
| | | | | This is required to get back the original drawable clip due to non-native windows on a cairo_t.
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 2008-06-30 Cody Russell <bratsche@gnome.org> * Practically everything changed. Change all references of GIMP Toolkit (and variations of it) to GTK+ Toolkit, showing no mercy at all to our beloved ancestry. (#540529) svn path=/trunk/; revision=20709
* define __GDK_H_INSIDE__ around including all other headers.Michael Natterer2008-05-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 2008-05-28 Michael Natterer <mitch@imendio.com> * gdk/gdk.h: define __GDK_H_INSIDE__ around including all other headers. * gdk/gdkenumtypes.h.template * gdk/gdk*.h: add single-include guards that #error out if GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is included individually. Also removed some redundant includes and did some tiny trailing whitespace removal that's not worth to commit separately. * gdk/gdkprivate.h: include <gdk/gdk.h> instead of individual files. * gdk/win32/gdkwin32.h * gdk/x11/gdkx.h: only include <gdk/gdkprivate.h> and remove all other includes. svn path=/trunk/; revision=20217
* gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.hMichael Natterer2008-01-141-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-14 Michael Natterer <mitch@imendio.com> * gdk/gdk.h * gdk/gdkcairo.h * gdk/gdkcolor.h * gdk/gdkgc.h * gdk/gdkinternals.h * gdk/gdkregion.h * gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor* parameters const. * gdk/gdkcairo.c * gdk/gdkgc.c * gdk/gdkwindow.c * gdk/gdkrectangle.c * gdk/gdkpolyreg-generic.c * gdk/gdkregion-generic.c * gdk/directfb/gdkcolor-directfb.c * gdk/directfb/gdkgc-directfb.c * gdk/directfb/gdkgeometry-directfb.c * gdk/directfb/gdkwindow-directfb.c * gdk/quartz/gdkcolor-quartz.c * gdk/quartz/gdkgc-quartz.c * gdk/quartz/gdkgeometry-quartz.c * gdk/quartz/gdkwindow-quartz.c * gdk/win32/gdkcolor-win32.c * gdk/win32/gdkgc-win32.c * gdk/win32/gdkgeometry-win32.c * gdk/win32/gdkprivate-win32.h * gdk/win32/gdkwindow-win32.c * gdk/x11/gdkcolor-x11.c * gdk/x11/gdkgc-x11.c * gdk/x11/gdkgeometry-x11.c * gdk/x11/gdkmain-x11.c * gdk/x11/gdkprivate-x11.h * gdk/x11/gdkwindow-x11.c: changed accordingly. * gdk/gdkpolyreg-generic.c: uncruftify to have proper function headers. svn path=/trunk/; revision=19365
* Add gdk_cairo_set_source_pixmap. (#318805, Alexander Larsson)Matthias Clasen2005-12-301-0/+4
| | | | | | | | | 2005-12-30 Matthias Clasen <mclasen@redhat.com> * gdk/gdk.symbols: * gdk/gdkcairo.h: * gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap. (#318805, Alexander Larsson)