Commit Graph

21 Commits

Author SHA1 Message Date
Bilal Elmoussaoui
57518a2bb4 gdk: drop removed method from the header 2021-12-09 20:29:17 +00:00
Benjamin Otte
b271a94f92 texture: Rework error enum
1. Change INSUFFICIENT_MEMORY to TOO_LARGE
   GTK crashes on insufficient memory, we don't emit GErrors.

2. Split UNSUPPORTED into UNSUPPORTED_CONTENT and UNSUPPORTED_FORMAT
   So we know if you need to find an RPM with a loader or curse and
   the weird file.

3. Translate error messages, they are meant for end users.
2021-09-17 03:25:35 +02:00
Benjamin Otte
b1bb7c3258 texture: Add gdk_texture_save_to_tiff_bytes() 2021-09-17 00:25:22 +02:00
Matthias Clasen
d30a029689 Add gdk_texture_save_to_tiff
This is a companion to gdk_texture_save_to_png, using
the tiff format, which will let us avoid lossy conversion
of HDR data, since we can store floating point data.
2021-09-17 00:25:22 +02:00
Matthias Clasen
d7c8f92733 Add gdk_texture_save_to_png_bytes
Just expose what we already have available
internally, so e.g. tests can use it without
static linking.
2021-09-17 00:25:22 +02:00
Matthias Clasen
66031fd00b texture: Add error enum 2021-09-17 00:25:22 +02:00
Benjamin Otte
75dfb4d63b API: Add gdk_texture_new_from_filename()
There are quite a few places where we can make use of it, in particular
in the testsuite and icontheme.
2021-09-16 23:59:37 +02:00
Matthias Clasen
1230bce133 Add gdk_texture_new_from_bytes
Add this new api, and make gdk_texture_new_from_file
a wrapper around it.
2021-09-15 22:00:09 -04:00
Benjamin Otte
53275481a5 texture: Add gdk_texture_download_float() 2021-09-12 05:54:37 +02:00
Timm Bäder
77e0d360ed Add pure and const annotations to various functions 2020-01-26 18:21:07 +01:00
Emmanuele Bassi
def700739d Use a single compilation symbol
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.
2019-11-27 13:33:43 +00:00
Benjamin Otte
770866f265 texture: Add gdk_texture_save_to_png()
It's needed for debugging Timm's code, so better have it here than
hidden in my random-patch vault.
2018-04-12 14:02:59 +02:00
Benjamin Otte
ee8e42f19b gdk: Remove gdk_texture_new_from_data()
Use gdk_memory_texture_new() instead.
2018-03-18 05:57:07 +01:00
Benjamin Otte
160e6ad6f6 gdk: Split out GL texture
Put GdkGLTexture into its own file and rename the API to
gdk_gl_texture_foo() instead of gdk_texture_foo_for_gl().

Apart from naming, no actual code changes.
2018-03-07 16:17:15 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
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.
2018-02-06 01:16:32 -05:00
Benjamin Otte
df0b4d6684 texture: Make the texture id a guint
Texture IDs are unsigned, so treat them like that.
2018-02-02 14:59:23 +01:00
Matthias Clasen
5e302ae2cc Add a way to release GL resources
The inspector may hold on to render nodes and textures
beyond the lifetime of the widget (and thus the GL
resources). To handle this situation, allow the widget
to explicitly release the GL resources, and make
the texture available on the clent-side as a cairo
surface. This lets the recorder still show the content
after the widget is gone.
2018-01-17 20:15:45 -05:00
Matthias Clasen
b366ea84a7 gdk: Add a gl texture implementation
This will be used to pass a GL textures from the application
(or rather, GtkGLArea) down to the GSK GL renderer.
2018-01-17 11:56:47 -05:00
Matthias Clasen
65a7557fc1 Fix some typos
Correct function names in the docs, etc.
2017-11-04 23:51:25 -04:00
Benjamin Otte
4c2bae3a1a texture: Add gdk_texture_new_from_file()
and gdk_texture_new_from_resource().

While doing set, turn all GDK_AVAILABLE_IN_3_90 into
GDK_AVAILABLE_IN_3_94 because that's now true after the renaming.
2017-11-04 15:22:25 +01:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00