Compare commits
1 Commits
fix-pathba
...
fix-5685
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4625b3c8a2 |
147
NEWS
147
NEWS
@@ -1,151 +1,6 @@
|
||||
Overview of Changes in 4.11.2, xx-xx-xxxx
|
||||
Overview of Changes in 4.11.1, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
* GtkGLArea:
|
||||
- Add an allowed-apis property
|
||||
|
||||
* GtkListBox:
|
||||
- Fix a problem with gtk_list_box_remove_all
|
||||
|
||||
* GtkCenterBox:
|
||||
- Add a shrink-center-last property
|
||||
|
||||
* GtkButton, GtkMenuButton:
|
||||
- Add a can-shrink property
|
||||
|
||||
* GtkPopover:
|
||||
- Fix problems with grabs
|
||||
|
||||
* GtkFileChooser:
|
||||
- Fix a problem with removing files
|
||||
- Make the date, time and location columns work
|
||||
- Fix filtering in the save entry popup
|
||||
- A few memory leak fixes
|
||||
- Handle webdav in the pathbar
|
||||
|
||||
* Dialogs:
|
||||
- Destroy windows promptly when the async callback finishes
|
||||
- Detect absence of the OpenURI portal and fall back
|
||||
|
||||
* Theme:
|
||||
- Add explicit style classes to a number of widgets
|
||||
- Fix some contrast issues in the dark theme
|
||||
|
||||
* Accessibility:
|
||||
- Fix alert dialogs in the a11y tree
|
||||
|
||||
* Layout:
|
||||
- Some fixes to baseline alignment
|
||||
|
||||
* GL:
|
||||
- Add GdkGLTextureBuilder, a more flexible api for creating textures
|
||||
- Ensure that we work with GLES 2
|
||||
|
||||
* Vulkan:
|
||||
- More fixes to the experimental Vulkan renderer
|
||||
- Rework glyph caching
|
||||
|
||||
* Wayland:
|
||||
- Don't destroy wl_surfaces on hide
|
||||
- Plug leaks of compositor-side resources
|
||||
|
||||
* Inspector:
|
||||
- Improve the action list
|
||||
- Fix a crash
|
||||
|
||||
* Tools:
|
||||
- gtk4-node-editor: Improve scaling
|
||||
- gtk4-node-editor: Preserve aspect ratio of textures
|
||||
- gtk4-demo: Make the stylus demo work with mice
|
||||
|
||||
* Translation updates
|
||||
Bulgarian
|
||||
Chinese (China)
|
||||
Galician
|
||||
Hebrew
|
||||
Polish
|
||||
Portuguese
|
||||
Russian
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in 4.11.1, 03-04-2023
|
||||
=========================================
|
||||
|
||||
* GtkLabel, GtkLinkButton:
|
||||
- Make file:// uris work again
|
||||
|
||||
* GtkListView/GtkColumnView/GtkGridView:
|
||||
- Fix clipping issues
|
||||
- Handle focus movement better
|
||||
- Introduce ::tab-behavior properties
|
||||
- Introduce GtkListItem::focusable
|
||||
- Introduce GtkColumnViewCell
|
||||
- Introduce row factories in GtkColumnView
|
||||
- Make list grid and column views inert when not rendering
|
||||
|
||||
* Drag-and-Drop:
|
||||
- Support resizing drag surfaces, using the new
|
||||
GdkDragSurface::compute-size signal
|
||||
|
||||
* Theme:
|
||||
- Port .boxed-list style from Adwaita
|
||||
- Make insensitive pictures appear grayed out
|
||||
|
||||
* Accessibility:
|
||||
- Fix memory leaks
|
||||
- Fix a crash
|
||||
|
||||
* GDK:
|
||||
- Add gdk_surface_get_scale to get the fractional scale
|
||||
- Use fractional scales on Wayland with cairo
|
||||
- Use fractional scales on Wayland with GL if GDK_DEBUG=gl-fractional
|
||||
is set. This support is still experimental
|
||||
|
||||
* GSK:
|
||||
- Allow limiting texture sizes with GSK_MAX_TEXTURE_SIZE
|
||||
- Use samplers for GL texture filtering
|
||||
- Fix problems with texture slicing
|
||||
- Avoid re-uploading textures when possible
|
||||
- Use mipmaps when it is beneficial
|
||||
|
||||
* Wayland:
|
||||
- Fix handling of Drag hotspots
|
||||
- Fix a crash with cursor size 0
|
||||
- Support absolute paths in WAYLAND_DISPLAY
|
||||
- Use the fractional scale protocol
|
||||
- Use a viewporter to set buffer scale
|
||||
|
||||
* Windows:
|
||||
- Fix problems with WGL
|
||||
|
||||
* Vulkan:
|
||||
- Some fixes to the experimental Vulkan renderer
|
||||
- Support fractional scaling
|
||||
|
||||
* Debugging:
|
||||
- Show more Wayland-specific information in the inspector
|
||||
|
||||
* Deprecations:
|
||||
- gtk_widget_translate_coordinates
|
||||
- gdk_surface_create_similar_surface
|
||||
|
||||
* Documentation:
|
||||
- Add a section on coordinate systems
|
||||
|
||||
* Build:
|
||||
- Require wayland-protocols 1.31
|
||||
|
||||
* Translation updates
|
||||
- British English
|
||||
- Bulgarian
|
||||
- Chinese (China)
|
||||
- Dutch
|
||||
- French
|
||||
- Persian
|
||||
- Russian
|
||||
|
||||
|
||||
Overview of Changes in 4.10.1, 14-03-2023
|
||||
=========================================
|
||||
|
||||
|
||||
17
README.md
17
README.md
@@ -116,12 +116,19 @@ docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or [online](https://docs.gtk.org/gtk4/building.html)
|
||||
|
||||
Building from git
|
||||
-----------------
|
||||
Default branch renamed to `main`
|
||||
--------------------------------
|
||||
|
||||
The GTK sources are hosted on [gitlab.gnome.org](http://gitlab.gnome.org). The main
|
||||
development branch is called `main`, and stable branches are named after their minor
|
||||
version, for example `gtk-4-10`.
|
||||
The default development branch of GTK has been renamed to `main`.
|
||||
To update your local checkout, use:
|
||||
```sh
|
||||
git checkout master
|
||||
git branch -m master main
|
||||
git fetch
|
||||
git branch --unset-upstream
|
||||
git branch -u origin/main
|
||||
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
|
||||
```
|
||||
|
||||
How to report bugs
|
||||
------------------
|
||||
|
||||
@@ -297,13 +297,12 @@ blur_overlay_snapshot (GtkWidget *widget,
|
||||
GtkWidget *main_widget;
|
||||
GskRenderNode *main_widget_node = NULL;
|
||||
GtkWidget *child;
|
||||
int width, height;
|
||||
GtkAllocation main_alloc;
|
||||
cairo_region_t *clip = NULL;
|
||||
int i;
|
||||
|
||||
main_widget = BLUR_OVERLAY (widget)->main_widget;
|
||||
width = gtk_widget_get_width (widget);
|
||||
height = gtk_widget_get_height (widget);
|
||||
gtk_widget_get_allocation (widget, &main_alloc);
|
||||
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
@@ -316,7 +315,7 @@ blur_overlay_snapshot (GtkWidget *widget,
|
||||
|
||||
if (blur > 0)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
GtkAllocation alloc;
|
||||
graphene_rect_t bounds;
|
||||
|
||||
if (main_widget_node == NULL)
|
||||
@@ -328,8 +327,8 @@ blur_overlay_snapshot (GtkWidget *widget,
|
||||
main_widget_node = gtk_snapshot_free_to_node (child_snapshot);
|
||||
}
|
||||
|
||||
if (!gtk_widget_compute_bounds (child, gtk_widget_get_parent (child), &bounds))
|
||||
graphene_rect_init (&bounds, 0, 0, 0, 0);
|
||||
gtk_widget_get_allocation (child, &alloc);
|
||||
graphene_rect_init (&bounds, alloc.x, alloc.y, alloc.width, alloc.height);
|
||||
gtk_snapshot_push_blur (snapshot, blur);
|
||||
gtk_snapshot_push_clip (snapshot, &bounds);
|
||||
gtk_snapshot_append_node (snapshot, main_widget_node);
|
||||
@@ -338,17 +337,13 @@ blur_overlay_snapshot (GtkWidget *widget,
|
||||
|
||||
if (clip == NULL)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
rect.x = rect.y = 0;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
rect.width = main_alloc.width;
|
||||
rect.height = main_alloc.height;
|
||||
clip = cairo_region_create_rectangle (&rect);
|
||||
}
|
||||
|
||||
rect.x = floor (bounds.origin.x);
|
||||
rect.y = floor (bounds.origin.y);
|
||||
rect.width = ceil (bounds.origin.x + bounds.size.width - rect.x);
|
||||
rect.height = ceil (bounds.origin.y + bounds.size.height - rect.y);
|
||||
cairo_region_subtract_rectangle (clip, &rect);
|
||||
cairo_region_subtract_rectangle (clip, (cairo_rectangle_int_t *)&alloc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<file>cssview.css</file>
|
||||
<file>reset.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/listview_selections">
|
||||
<gresource prefix="/dropdown">
|
||||
<file>suggestionentry.h</file>
|
||||
<file>suggestionentry.c</file>
|
||||
<file>suggestionentry.css</file>
|
||||
@@ -274,6 +274,7 @@
|
||||
<file>cursors.c</file>
|
||||
<file>dialog.c</file>
|
||||
<file>drawingarea.c</file>
|
||||
<file>dropdown.c</file>
|
||||
<file>dnd.c</file>
|
||||
<file>editable_cells.c</file>
|
||||
<file>entry_completion.c</file>
|
||||
@@ -297,7 +298,6 @@
|
||||
<file>iconscroll.c</file>
|
||||
<file>iconview.c</file>
|
||||
<file>iconview_edit.c</file>
|
||||
<file>image_scaling.c</file>
|
||||
<file>images.c</file>
|
||||
<file>infobar.c</file>
|
||||
<file>layoutmanager.c</file>
|
||||
@@ -310,7 +310,6 @@
|
||||
<file>listview_clocks.c</file>
|
||||
<file>listview_filebrowser.c</file>
|
||||
<file>listview_minesweeper.c</file>
|
||||
<file>listview_selections.c</file>
|
||||
<file>listview_settings.c</file>
|
||||
<file>listview_ucd.c</file>
|
||||
<file>listview_weather.c</file>
|
||||
@@ -319,6 +318,7 @@
|
||||
<file>main.c</file>
|
||||
<file>markup.c</file>
|
||||
<file>mask.c</file>
|
||||
<file>menu.c</file>
|
||||
<file>overlay.c</file>
|
||||
<file>overlay_decorative.c</file>
|
||||
<file>paint.c</file>
|
||||
|
||||
@@ -109,21 +109,15 @@ static void
|
||||
apply_transform (CanvasItem *item)
|
||||
{
|
||||
GskTransform *transform;
|
||||
graphene_rect_t bounds;
|
||||
double x, y;
|
||||
|
||||
/* Add css padding and margin */
|
||||
if (!gtk_widget_compute_bounds (item->label, item->label, &bounds))
|
||||
return;
|
||||
|
||||
x = bounds.size.width / 2.;
|
||||
y = bounds.size.height / 2.;
|
||||
|
||||
item->r = sqrt (x * x + y * y);
|
||||
x = gtk_widget_get_allocated_width (item->label) / 2.0;
|
||||
y = gtk_widget_get_allocated_height (item->label) / 2.0;
|
||||
item->r = sqrt (x*x + y*y);
|
||||
|
||||
transform = gsk_transform_translate (NULL, &(graphene_point_t) { item->r, item->r });
|
||||
transform = gsk_transform_rotate (transform, item->angle + item->delta);
|
||||
transform = gsk_transform_translate (transform, &GRAPHENE_POINT_INIT (-x, -y));
|
||||
transform = gsk_transform_translate (transform, &(graphene_point_t) { -x, -y });
|
||||
|
||||
gtk_fixed_set_child_transform (GTK_FIXED (item->fixed), item->label, transform);
|
||||
gsk_transform_unref (transform);
|
||||
@@ -330,7 +324,7 @@ canvas_item_start_editing (CanvasItem *item)
|
||||
GtkWidget *canvas = gtk_widget_get_parent (GTK_WIDGET (item));
|
||||
GtkWidget *entry;
|
||||
GtkWidget *scale;
|
||||
graphene_point_t p;
|
||||
double x, y;
|
||||
|
||||
if (item->editor)
|
||||
return;
|
||||
@@ -356,9 +350,8 @@ canvas_item_start_editing (CanvasItem *item)
|
||||
|
||||
gtk_box_append (GTK_BOX (item->editor), scale);
|
||||
|
||||
if (!gtk_widget_compute_point (GTK_WIDGET (item), canvas, &GRAPHENE_POINT_INIT (0, 0), &p))
|
||||
graphene_point_init (&p, 0, 0);
|
||||
gtk_fixed_put (GTK_FIXED (canvas), item->editor, p.x, p.y + 2 * item->r);
|
||||
gtk_widget_translate_coordinates (GTK_WIDGET (item), canvas, 0, 0, &x, &y);
|
||||
gtk_fixed_put (GTK_FIXED (canvas), item->editor, x, y + 2 * item->r);
|
||||
gtk_widget_grab_focus (entry);
|
||||
|
||||
}
|
||||
@@ -375,7 +368,6 @@ prepare (GtkDragSource *source,
|
||||
GtkWidget *canvas;
|
||||
GtkWidget *item;
|
||||
Hotspot *hotspot;
|
||||
graphene_point_t p;
|
||||
|
||||
canvas = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (source));
|
||||
item = gtk_widget_pick (canvas, x, y, GTK_PICK_DEFAULT);
|
||||
@@ -387,10 +379,7 @@ prepare (GtkDragSource *source,
|
||||
g_object_set_data (G_OBJECT (canvas), "dragged-item", item);
|
||||
|
||||
hotspot = g_new (Hotspot, 1);
|
||||
if (!gtk_widget_compute_point (canvas, item, &GRAPHENE_POINT_INIT (x, y), &p))
|
||||
graphene_point_init (&p, x, y);
|
||||
hotspot->x = p.x;
|
||||
hotspot->y = p.y;
|
||||
gtk_widget_translate_coordinates (canvas, item, x, y, &hotspot->x, &hotspot->y);
|
||||
g_object_set_data_full (G_OBJECT (canvas), "hotspot", hotspot, g_free);
|
||||
|
||||
return gdk_content_provider_new_typed (GTK_TYPE_WIDGET, item);
|
||||
|
||||
@@ -369,7 +369,7 @@ match_func (MatchObject *obj,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_listview_selections (GtkWidget *do_widget)
|
||||
do_dropdown (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *button, *box, *spin, *check, *hbox, *label, *entry;
|
||||
@@ -42,8 +42,8 @@ val_to_xy (GtkFontPlane *plane,
|
||||
double u, v;
|
||||
int width, height;
|
||||
|
||||
width = gtk_widget_get_width (GTK_WIDGET (plane));
|
||||
height = gtk_widget_get_height (GTK_WIDGET (plane));
|
||||
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
|
||||
height = gtk_widget_get_allocated_height (GTK_WIDGET (plane));
|
||||
|
||||
u = adjustment_get_normalized_value (plane->width_adj);
|
||||
v = adjustment_get_normalized_value (plane->weight_adj);
|
||||
@@ -62,8 +62,8 @@ plane_snapshot (GtkWidget *widget,
|
||||
cairo_t *cr;
|
||||
|
||||
val_to_xy (plane, &x, &y);
|
||||
width = gtk_widget_get_width (widget);
|
||||
height = gtk_widget_get_height (widget);
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
cr = gtk_snapshot_append_cairo (snapshot,
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
@@ -131,8 +131,8 @@ update_value (GtkFontPlane *plane,
|
||||
GtkWidget *widget = GTK_WIDGET (plane);
|
||||
double u, v;
|
||||
|
||||
u = CLAMP (x * (1.0 / gtk_widget_get_width (widget)), 0, 1);
|
||||
v = CLAMP (1 - y * (1.0 / gtk_widget_get_height (widget)), 0, 1);
|
||||
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
|
||||
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
|
||||
|
||||
adjustment_set_normalized_value (plane->width_adj, u);
|
||||
adjustment_set_normalized_value (plane->weight_adj, v);
|
||||
|
||||
@@ -221,13 +221,16 @@ static void
|
||||
realize (GtkWidget *widget)
|
||||
{
|
||||
const char *vertex_path, *fragment_path;
|
||||
GdkGLContext *context;
|
||||
|
||||
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||
|
||||
if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
|
||||
return;
|
||||
|
||||
if (gtk_gl_area_get_api (GTK_GL_AREA (widget)) == GDK_GL_API_GLES)
|
||||
context = gtk_gl_area_get_context (GTK_GL_AREA (widget));
|
||||
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
{
|
||||
vertex_path = "/glarea/glarea-gles.vs.glsl";
|
||||
fragment_path = "/glarea/glarea-gles.fs.glsl";
|
||||
|
||||
@@ -737,6 +737,7 @@ gtk_gears_realize (GtkWidget *widget)
|
||||
GtkGLArea *glarea = GTK_GL_AREA (widget);
|
||||
GtkGears *gears = GTK_GEARS (widget);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
GdkGLContext *context;
|
||||
GLuint vao, v, f, program;
|
||||
const char *p;
|
||||
char msg[512];
|
||||
@@ -747,6 +748,8 @@ gtk_gears_realize (GtkWidget *widget)
|
||||
if (gtk_gl_area_get_error (glarea) != NULL)
|
||||
return;
|
||||
|
||||
context = gtk_gl_area_get_context (glarea);
|
||||
|
||||
glEnable (GL_CULL_FACE);
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
|
||||
@@ -756,7 +759,7 @@ gtk_gears_realize (GtkWidget *widget)
|
||||
priv->vao = vao;
|
||||
|
||||
/* Compile the vertex shader */
|
||||
if (gtk_gl_area_get_api (glarea) == GDK_GL_API_GLES)
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
p = vertex_shader_gles;
|
||||
else
|
||||
p = vertex_shader_gl;
|
||||
@@ -767,7 +770,7 @@ gtk_gears_realize (GtkWidget *widget)
|
||||
g_debug ("vertex shader info: %s\n", msg);
|
||||
|
||||
/* Compile the fragment shader */
|
||||
if (gtk_gl_area_get_api (glarea) == GDK_GL_API_GLES)
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
p = fragment_shader_gles;
|
||||
else
|
||||
p = fragment_shader_gl;
|
||||
|
||||
@@ -64,8 +64,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="short_time_label">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="label" translatable="yes">38m</property>
|
||||
<style>
|
||||
|
||||
@@ -148,9 +148,9 @@ settings_key_new (GSettings *settings,
|
||||
}
|
||||
|
||||
static void
|
||||
item_value_changed (GtkEditableLabel *label,
|
||||
GParamSpec *pspec,
|
||||
GtkColumnViewCell *cell)
|
||||
item_value_changed (GtkEditableLabel *label,
|
||||
GParamSpec *pspec,
|
||||
GtkListItem *item)
|
||||
{
|
||||
SettingsKey *self;
|
||||
const char *text;
|
||||
@@ -162,7 +162,8 @@ item_value_changed (GtkEditableLabel *label,
|
||||
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (label));
|
||||
|
||||
self = gtk_column_view_cell_get_item (cell);
|
||||
g_object_get (item, "item", &self, NULL);
|
||||
g_object_unref (self);
|
||||
|
||||
type = g_settings_schema_key_get_value_type (self->key);
|
||||
name = g_settings_schema_key_get_name (self->key);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<object class="GtkScrolledWindow">
|
||||
<child>
|
||||
<object class="GtkListView" id="listview">
|
||||
<property name="tab-behavior">item</property>
|
||||
<style>
|
||||
<class name="navigation-sidebar"/>
|
||||
</style>
|
||||
@@ -77,7 +76,6 @@
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkColumnView" id="columnview">
|
||||
<property name="tab-behavior">cell</property>
|
||||
<style>
|
||||
<class name="data-table"/>
|
||||
</style>
|
||||
@@ -90,13 +88,13 @@
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkColumnViewCell">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0</property>
|
||||
<binding name="label">
|
||||
<lookup name="name" type="SettingsKey">
|
||||
<lookup name="item">GtkColumnViewCell</lookup>
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
@@ -118,12 +116,12 @@
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkColumnViewCell">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkEditableLabel">
|
||||
<binding name="text">
|
||||
<lookup name="value" type="SettingsKey">
|
||||
<lookup name="item">GtkColumnViewCell</lookup>
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
<signal name="notify::label" handler="item_value_changed"/>
|
||||
@@ -146,13 +144,13 @@
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkColumnViewCell">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0</property>
|
||||
<binding name="label">
|
||||
<lookup name="type" type="SettingsKey">
|
||||
<lookup name="item">GtkColumnViewCell</lookup>
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
@@ -175,13 +173,13 @@
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkColumnViewCell">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0</property>
|
||||
<binding name="label">
|
||||
<lookup name="default-value" type="SettingsKey">
|
||||
<lookup name="item">GtkColumnViewCell</lookup>
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
@@ -205,14 +203,14 @@
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkColumnViewCell">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0</property>
|
||||
<property name="wrap">1</property>
|
||||
<binding name="label">
|
||||
<lookup name="summary" type="SettingsKey">
|
||||
<lookup name="item">GtkColumnViewCell</lookup>
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
@@ -236,14 +234,14 @@
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkColumnViewCell">
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0</property>
|
||||
<property name="wrap">1</property>
|
||||
<binding name="label">
|
||||
<lookup name="description" type="SettingsKey">
|
||||
<lookup name="item">GtkColumnViewCell</lookup>
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkListItem">
|
||||
<property name="focusable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkTreeExpander" id="expander">
|
||||
<binding name="list-row">
|
||||
|
||||
@@ -117,7 +117,7 @@ transform_from (GBinding *binding,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_image_scaling (GtkWidget *do_widget)
|
||||
do_menu (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -39,7 +39,6 @@ demos = files([
|
||||
'iconscroll.c',
|
||||
'iconview.c',
|
||||
'iconview_edit.c',
|
||||
'image_scaling.c',
|
||||
'images.c',
|
||||
'infobar.c',
|
||||
'layoutmanager.c',
|
||||
@@ -48,6 +47,7 @@ demos = files([
|
||||
'listbox.c',
|
||||
'listbox_controls.c',
|
||||
'mask.c',
|
||||
'menu.c',
|
||||
'flowbox.c',
|
||||
'list_store.c',
|
||||
'listview_applauncher.c',
|
||||
@@ -55,7 +55,7 @@ demos = files([
|
||||
'listview_colors.c',
|
||||
'listview_filebrowser.c',
|
||||
'listview_minesweeper.c',
|
||||
'listview_selections.c',
|
||||
'dropdown.c',
|
||||
'listview_settings.c',
|
||||
'listview_ucd.c',
|
||||
'listview_weather.c',
|
||||
|
||||
@@ -24,7 +24,6 @@ typedef struct
|
||||
GdkRGBA draw_color;
|
||||
GtkPadController *pad_controller;
|
||||
double brush_size;
|
||||
GtkGesture *gesture;
|
||||
} DrawingArea;
|
||||
|
||||
typedef struct
|
||||
@@ -104,11 +103,13 @@ drawing_area_size_allocate (GtkWidget *widget,
|
||||
static void
|
||||
drawing_area_map (GtkWidget *widget)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
|
||||
GTK_WIDGET_CLASS (drawing_area_parent_class)->map (widget);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
drawing_area_ensure_surface ((DrawingArea *) widget,
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
allocation.width, allocation.height);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -261,7 +262,7 @@ drawing_area_apply_stroke (DrawingArea *area,
|
||||
double y,
|
||||
double pressure)
|
||||
{
|
||||
if (tool && gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
|
||||
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
|
||||
{
|
||||
cairo_set_line_width (area->cr, 10 * pressure * area->brush_size);
|
||||
cairo_set_operator (area->cr, CAIRO_OPERATOR_DEST_OUT);
|
||||
@@ -312,9 +313,7 @@ stylus_gesture_motion (GtkGestureStylus *gesture,
|
||||
drawing_area_apply_stroke (area, tool,
|
||||
backlog[i].axes[GDK_AXIS_X],
|
||||
backlog[i].axes[GDK_AXIS_Y],
|
||||
backlog[i].flags & GDK_AXIS_FLAG_PRESSURE
|
||||
? backlog[i].axes[GDK_AXIS_PRESSURE]
|
||||
: 1);
|
||||
backlog[i].axes[GDK_AXIS_PRESSURE]);
|
||||
}
|
||||
|
||||
g_free (backlog);
|
||||
@@ -344,8 +343,6 @@ drawing_area_init (DrawingArea *area)
|
||||
|
||||
area->draw_color = (GdkRGBA) { 0, 0, 0, 1 };
|
||||
area->brush_size = 1;
|
||||
|
||||
area->gesture = gesture;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
@@ -384,12 +381,6 @@ drawing_area_color_set (DrawingArea *area,
|
||||
gtk_color_dialog_button_set_rgba (button, color);
|
||||
}
|
||||
|
||||
static GtkGesture *
|
||||
drawing_area_get_gesture (DrawingArea *area)
|
||||
{
|
||||
return area->gesture;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_paint (GtkWidget *toplevel)
|
||||
{
|
||||
@@ -397,7 +388,7 @@ do_paint (GtkWidget *toplevel)
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *draw_area, *headerbar, *button;
|
||||
GtkWidget *draw_area, *headerbar, *colorbutton;
|
||||
|
||||
window = gtk_window_new ();
|
||||
|
||||
@@ -406,22 +397,15 @@ do_paint (GtkWidget *toplevel)
|
||||
|
||||
headerbar = gtk_header_bar_new ();
|
||||
|
||||
button = gtk_color_dialog_button_new (gtk_color_dialog_new ());
|
||||
g_signal_connect (button, "notify::rgba",
|
||||
colorbutton = gtk_color_dialog_button_new (gtk_color_dialog_new ());
|
||||
g_signal_connect (colorbutton, "notify::rgba",
|
||||
G_CALLBACK (color_button_color_set), draw_area);
|
||||
g_signal_connect (draw_area, "color-set",
|
||||
G_CALLBACK (drawing_area_color_set), button);
|
||||
gtk_color_dialog_button_set_rgba (GTK_COLOR_DIALOG_BUTTON (button),
|
||||
G_CALLBACK (drawing_area_color_set), colorbutton);
|
||||
gtk_color_dialog_button_set_rgba (GTK_COLOR_DIALOG_BUTTON (colorbutton),
|
||||
&(GdkRGBA) { 0, 0, 0, 1 });
|
||||
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), button);
|
||||
|
||||
button = gtk_check_button_new_with_label ("Stylus only");
|
||||
g_object_bind_property (button, "active",
|
||||
drawing_area_get_gesture ((DrawingArea *)draw_area), "stylus-only",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), button);
|
||||
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), colorbutton);
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Paint");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
@@ -471,7 +471,7 @@ suggestion_entry_size_allocate (GtkWidget *widget,
|
||||
&(GtkAllocation) { width - arrow_nat, 0, arrow_nat, height },
|
||||
baseline);
|
||||
|
||||
gtk_widget_set_size_request (self->popup, gtk_widget_get_width (GTK_WIDGET (self)), -1);
|
||||
gtk_widget_set_size_request (self->popup, gtk_widget_get_allocated_width (GTK_WIDGET (self)), -1);
|
||||
gtk_widget_queue_resize (self->popup);
|
||||
|
||||
gtk_popover_present (GTK_POPOVER (self->popup));
|
||||
@@ -849,7 +849,7 @@ suggestion_entry_init (SuggestionEntry *self)
|
||||
GtkCssProvider *provider;
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/listview_selections/suggestionentry.css");
|
||||
gtk_css_provider_load_from_resource (provider, "/dropdown/suggestionentry.css");
|
||||
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
800);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Overlay/Transparency
|
||||
* #Keywords: GtkOverlay, GtkSnapshot, blur
|
||||
* #Keywords: GtkOverlay, GtkSnapshot
|
||||
*
|
||||
* Blur the background behind an overlay.
|
||||
*/
|
||||
|
||||
@@ -78,8 +78,6 @@ gtk_renderer_paintable_paintable_snapshot (GdkPaintable *paintable,
|
||||
|
||||
gdk_paintable_snapshot (GDK_PAINTABLE (texture), snapshot, width, height);
|
||||
g_object_unref (texture);
|
||||
|
||||
gsk_render_node_unref (node);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -174,7 +174,6 @@ text_changed (GtkTextBuffer *buffer,
|
||||
GtkTextIter iter;
|
||||
GtkTextIter start, end;
|
||||
float scale;
|
||||
GskRenderNode *big_node;
|
||||
|
||||
g_array_remove_range (self->errors, 0, self->errors->len);
|
||||
text = get_current_text (self->text_buffer);
|
||||
@@ -187,18 +186,13 @@ text_changed (GtkTextBuffer *buffer,
|
||||
self->node = gsk_render_node_deserialize (bytes, deserialize_error_func, self);
|
||||
|
||||
scale = gtk_scale_button_get_value (GTK_SCALE_BUTTON (self->scale_scale));
|
||||
if (self->node && scale != 0.)
|
||||
if (self->node && scale != 1.0)
|
||||
{
|
||||
scale = pow (2., scale);
|
||||
big_node = gsk_transform_node_new (self->node, gsk_transform_scale (NULL, scale, scale));
|
||||
}
|
||||
else if (self->node)
|
||||
{
|
||||
big_node = gsk_render_node_ref (self->node);
|
||||
}
|
||||
else
|
||||
{
|
||||
big_node = NULL;
|
||||
GskRenderNode *node;
|
||||
|
||||
node = gsk_transform_node_new (self->node, gsk_transform_scale (NULL, scale, scale));
|
||||
gsk_render_node_unref (self->node);
|
||||
self->node = node;
|
||||
}
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
@@ -210,27 +204,18 @@ text_changed (GtkTextBuffer *buffer,
|
||||
graphene_rect_t bounds;
|
||||
guint i;
|
||||
|
||||
snapshot = gtk_snapshot_new ();
|
||||
gsk_render_node_get_bounds (big_node, &bounds);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (- bounds.origin.x, - bounds.origin.y));
|
||||
gtk_snapshot_append_node (snapshot, big_node);
|
||||
paintable = gtk_snapshot_free_to_paintable (snapshot, &bounds.size);
|
||||
gtk_picture_set_paintable (GTK_PICTURE (self->picture), paintable);
|
||||
g_clear_object (&paintable);
|
||||
|
||||
snapshot = gtk_snapshot_new ();
|
||||
gsk_render_node_get_bounds (self->node, &bounds);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (- bounds.origin.x, - bounds.origin.y));
|
||||
gtk_snapshot_append_node (snapshot, self->node);
|
||||
paintable = gtk_snapshot_free_to_paintable (snapshot, &bounds.size);
|
||||
|
||||
gtk_picture_set_paintable (GTK_PICTURE (self->picture), paintable);
|
||||
for (i = 0; i < g_list_model_get_n_items (G_LIST_MODEL (self->renderers)); i++)
|
||||
{
|
||||
gpointer item = g_list_model_get_item (G_LIST_MODEL (self->renderers), i);
|
||||
gtk_renderer_paintable_set_paintable (item, paintable);
|
||||
g_object_unref (item);
|
||||
}
|
||||
|
||||
g_clear_object (&paintable);
|
||||
}
|
||||
else
|
||||
@@ -238,8 +223,6 @@ text_changed (GtkTextBuffer *buffer,
|
||||
gtk_picture_set_paintable (GTK_PICTURE (self->picture), NULL);
|
||||
}
|
||||
|
||||
g_clear_pointer (&big_node, gsk_render_node_unref);
|
||||
|
||||
gtk_text_buffer_get_start_iter (self->text_buffer, &iter);
|
||||
|
||||
while (!gtk_text_iter_is_end (&iter))
|
||||
|
||||
@@ -163,9 +163,9 @@
|
||||
<property name="valign">center</property>
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment">
|
||||
<property name="lower">-4</property>
|
||||
<property name="value">0</property>
|
||||
<property name="upper">4</property>
|
||||
<property name="lower">1</property>
|
||||
<property name="value">1</property>
|
||||
<property name="upper">10</property>
|
||||
<property name="step-increment">0.1</property>
|
||||
<property name="page-increment">0.5</property>
|
||||
</object>
|
||||
|
||||
@@ -2,29 +2,19 @@
|
||||
|
||||
GSK render nodes can be serialized and deserialized using APIs such as `gsk_render_node_serialize()` and `gsk_render_node_deserialize()`. The intended use for this is development - primarily the development of GTK - by allowing things such as creating testsuites and benchmarks, exchanging nodes in bug reports. GTK includes the `gtk4-node-editor` application for creating such test files.
|
||||
|
||||
The format is a text format that follows the [CSS syntax rules](https://drafts.csswg.org/css-syntax-3/). In particular, this means that every array of bytes will produce a render node when parsed, as there is a defined error recovery method. For more details on error handling, please refer to the documentation of the parsing APIs.
|
||||
The format is a text format that follows the [CSS syntax rules](https://drafts.csswg.org/css-syntax-3/). In particular, this means that every array of bytes will produce a render node when parsed, as there is a defined error recovery method. For more details on error handling, please refer to the documentation of the aprsing APIs.
|
||||
|
||||
The grammar of a node text representation using [the CSS value definition syntax](https://drafts.csswg.org/css-values-3/#value-defs) looks like this:
|
||||
**document**: `<node>\*`
|
||||
**node**: container [ "name" ] { <document> } | `<node-type> [ "name" ] { <property>* }` | "name"
|
||||
**node**: container { <document> } | `<node-name> { <property>* }`
|
||||
**property**: `<property-name>: <node> | <value> ;`
|
||||
|
||||
Each node has its own `<node-type>` and supports a custom set of properties, each with their own `<property-name>` and syntax. The following paragraphs document each of the nodes and their properties.
|
||||
Each node has its own `<node-name>` and supports a custom set of properties, each with their own `<property-name>` and syntax. The following paragraphs document each of the nodes and their properties.
|
||||
|
||||
When serializing and the value of a property equals the default value, this value will not be serialized. Serialization aims to produce an output as small as possible.
|
||||
|
||||
To embed newlines in strings, use \A. To break a long string into multiple lines, escape the newline with a \.
|
||||
|
||||
# Names
|
||||
|
||||
### Nodes
|
||||
|
||||
Nodes can be given a name by adding a string after the `<node-type>` in their definition. That same node can then be used further down in the document by specifying just the name identifying the node.
|
||||
|
||||
### Textures
|
||||
|
||||
Just like nodes, textures can be referenced by name. When defining a named texture, the name has to be placed in front of the URL.
|
||||
|
||||
# Nodes
|
||||
|
||||
### container
|
||||
|
||||
@@ -500,9 +500,8 @@ Public headers should never be included directly:
|
||||
Private headers should include the public header first, if one exists:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
/* gtkfooprivate.h */
|
||||
#ifndef __GTK_FOO_PRIVATE_H__
|
||||
#define __GTK_FOO_PRIVATE_H__
|
||||
|
||||
#include "gtkfoo.h"
|
||||
|
||||
@@ -511,8 +510,18 @@ Private headers should include the public header first, if one exists:
|
||||
#endif /* __GTK_FOO_PRIVATE_H__ */
|
||||
```
|
||||
|
||||
All headers should use the `once` pragma to prevent multiple inclusion,
|
||||
instead of the classic pre-processor guards:
|
||||
All headers should have inclusion guards:
|
||||
|
||||
```c
|
||||
#ifndef __GTK_FOO_H__
|
||||
#define __GTK_FOO_H__
|
||||
|
||||
...
|
||||
|
||||
#endif /* __GTK_FOO_H__ */
|
||||
```
|
||||
|
||||
You can also use the `once` pragma instead of the classic pre-processor guard:
|
||||
|
||||
```c
|
||||
#pragma once
|
||||
@@ -544,8 +553,6 @@ the source file, either the public installed header, or the private header, if
|
||||
it exists.
|
||||
|
||||
```c
|
||||
/* gtkfoo.c */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkfoo.h"
|
||||
@@ -587,8 +594,8 @@ Finally, source files should include the system headers last:
|
||||
#include <string.h>
|
||||
```
|
||||
|
||||
Cyclic dependencies should be avoided if at all possible;
|
||||
for instance, you could use additional headers to break cycles.
|
||||
Cyclic dependencies should be avoided if at all possible; for instance, you
|
||||
could use additional headers to break cycles.
|
||||
|
||||
### GObject
|
||||
|
||||
@@ -629,8 +636,7 @@ Instance structures should only contain the parent type:
|
||||
```
|
||||
|
||||
You should use the `G_DECLARE_DERIVABLE_TYPE()` and `G_DECLARE_FINAL_TYPE()`
|
||||
macros in newly written headers. There is also a `GDK_DECLARE_INTERNAL_TYPE()`
|
||||
for declaring types that can be derived inside GTK, but not in 3rd party code.
|
||||
macros in newly written headers.
|
||||
|
||||
Inside your source file, always use the `G_DEFINE_TYPE()`,
|
||||
`G_DEFINE_TYPE_WITH_PRIVATE()`, and `G_DEFINE_TYPE_WITH_CODE()` macros, or their
|
||||
@@ -670,20 +676,12 @@ Interfaces must have the following macros:
|
||||
| `GTK_IS_<iface_name>` | `G_TYPE_CHECK_INSTANCE_TYPE` |
|
||||
| `GTK_<iface_name>_GET_IFACE` | `G_TYPE_INSTANCE_GET_INTERFACE` |
|
||||
|
||||
The `G_DECLARE` macros define these as static inline functions instead.
|
||||
|
||||
### Memory allocation
|
||||
|
||||
When dynamically allocating data on the heap use `g_new()`.
|
||||
|
||||
Public structure types should always be returned after being zero-ed,
|
||||
either explicitly for each member, or by using `g_new0()`. Do not use
|
||||
`g_slice` in new code.
|
||||
|
||||
Memory that is only needed within the scope of a function can be
|
||||
stack-allocated using `g_newa()` or `g_alloca()`. But limit the amount
|
||||
of stack memory that you consume this way, in particular in recursive
|
||||
functions.
|
||||
either explicitly for each member, or by using `g_new0()`.
|
||||
|
||||
### Macros
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
Title: Coordinate systems
|
||||
Slug: gtk-coordinates
|
||||
|
||||
## Coordinate systems in GTK
|
||||
|
||||
All coordinate systems in GTK have the origin at the top left, with the X axis
|
||||
pointing right, and the Y axis pointing down. This matches the convention used
|
||||
in X11, Wayland and cairo, but differs from OpenGL and PostScript, where the origin
|
||||
is in the lower left, and the Y axis is pointing up.
|
||||
|
||||
Every widget in a window has its own coordinate system that it uses to place its
|
||||
child widgets and to interpret events. Most of the time, this fact can be safely
|
||||
ignored. The section will explain the details for the few cases when it is important.
|
||||
|
||||
## The box model
|
||||
|
||||
When it comes to rendering, GTK follows the CSS box model as far as practical.
|
||||
|
||||
<picture>
|
||||
<source srcset="box-model-dark.png" media="(prefers-color-scheme: dark)">
|
||||
<img alt="Box Model" src="box-model-light.png">
|
||||
</picture>
|
||||
|
||||
The CSS stylesheet that is in use determines the sizes (and appearance) of the
|
||||
margin, border and padding areas for each widget. The size of the content area
|
||||
is determined by GTKs layout algorithm using each widgets [vfunc@Gtk.Widget.measure]
|
||||
and [vfunc@Gtk.Widget.size_allocate] vfuncs.
|
||||
|
||||
You can learn more about the CSS box model by reading the
|
||||
[CSS specification](https://www.w3.org/TR/css-box-3/#box-model) or the
|
||||
Mozilla [documentation](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model).
|
||||
|
||||
To learn more about where GTK CSS differs from CSS on the web, see the
|
||||
[CSS overview](css-overview.html).
|
||||
|
||||
## Widgets
|
||||
|
||||
The content area in the CSS box model is the region that the widget considers its own.
|
||||
|
||||
The origin of the widgets coordinate system is the top left corner of the content area,
|
||||
and its size is the widgets size. The size can be queried with [method@Gtk.Widget.get_width]
|
||||
and [method@Gtk.Widget.get_height]. GTK allows general 3D transformations to position
|
||||
widgets (although most of the time, the transformation will be a simple 2D translation).
|
||||
The transform to go from one widgets coordinate system to another one can be obtained
|
||||
with [method@Gtk.Widget.compute_transform].
|
||||
|
||||
In addition to a size, widgets can optionally have a **_baseline_** to position text on.
|
||||
Containers such as [class@Gtk.Box] may position their children to match up their baselines.
|
||||
[method@Gtk.Widget.get_baseline] returns the y position of the baseline in widget coordinates.
|
||||
|
||||
When widget APIs expect positions or areas, they need to be expressed in this coordinate
|
||||
system, typically called **_widget coordinates_**. GTK provides a number of APIs to translate
|
||||
between different widgets' coordinate systems, such as [method@Gtk.Widget.compute_point]
|
||||
or [method@Gtk.Widget.compute_bounds]. These methods can fail (either because the widgets
|
||||
don't share a common ancestor, or because of a singular transformation), and callers need
|
||||
to handle this eventuality.
|
||||
|
||||
Another area that is occasionally relevant are the widgets **_bounds_**, which is the area
|
||||
that a widgets rendering is typically confined to (technically, widgets can draw outside
|
||||
of this area, unless clipping is enforced via the [property@Gtk.Widget:overflow] property).
|
||||
In CSS terms, the bounds of a widget correspond to the border area.
|
||||
|
||||
During GTK's layout algorithm, a parent widget needs to measure each visible child and
|
||||
allocate them at least as much size as measured. These functions take care of respecting
|
||||
the CSS box model and widget properties such as align and margin. This happens in the
|
||||
parent's coordinate system.
|
||||
|
||||
Note that the **_text direction_** of a widget does not influence its coordinate
|
||||
system, but simply determines whether text flows in the direction of increasing
|
||||
or decreasing X coordinates.
|
||||
|
||||
## Events
|
||||
|
||||
Event controllers and gestures report positions in the coordinate system of the widget
|
||||
they are attached to.
|
||||
|
||||
If you are dealing with raw events in the form of [class@Gdk.Event] that have positions
|
||||
associated with them (e.g. the pointer position), such positions are expressed in
|
||||
**_surface coordinates_**, which have their origin at the top left corner of the
|
||||
[class@Gdk.Surface].
|
||||
|
||||
To translate from surface to widget coordinates, you have to apply the offset from the
|
||||
top left corner of the surface to the top left corner of the topmost widget, which can
|
||||
be obtained with [method@Gtk.Native.get_surface_transform].
|
||||
@@ -68,7 +68,6 @@ content_files = [
|
||||
"input-handling.md",
|
||||
"drag-and-drop.md",
|
||||
"drawing-model.md",
|
||||
"coordinates.md",
|
||||
"css-overview.md",
|
||||
"css-properties.md",
|
||||
"section-accessibility.md",
|
||||
@@ -242,7 +241,5 @@ content_images = [
|
||||
"images/rich-list.png",
|
||||
"images/data-table.png",
|
||||
"images/navigation-sidebar.png",
|
||||
"images/box-model-light.png",
|
||||
"images/box-model-dark.png",
|
||||
]
|
||||
urlmap_file = "urlmap.js"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB |
@@ -1,193 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
sodipodi:docname="box-model.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.84096521"
|
||||
inkscape:cx="265.76605"
|
||||
inkscape:cy="312.14133"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1123"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow2"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Arrow2"
|
||||
markerWidth="7.6999998"
|
||||
markerHeight="5.5999999"
|
||||
viewBox="0 0 7.7 5.6"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.7)"
|
||||
d="M -2,-4 9,0 -2,4 c 2,-2.33 2,-5.66 0,-8 z"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
||||
id="arrow2L" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow2-4"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Arrow2"
|
||||
markerWidth="7.6999998"
|
||||
markerHeight="5.5999999"
|
||||
viewBox="0 0 7.7 5.6"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.7)"
|
||||
d="M -2,-4 9,0 -2,4 c 2,-2.33 2,-5.66 0,-8 z"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
||||
id="arrow2L-7" />
|
||||
</marker>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:10.58333333;stroke-dasharray:none"
|
||||
id="rect234-0"
|
||||
width="112.51476"
|
||||
height="70.089249"
|
||||
x="38.634876"
|
||||
y="49.512993" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:0.487868;stroke-dasharray:none"
|
||||
id="rect234"
|
||||
width="146.21118"
|
||||
height="103.37679"
|
||||
x="21.283342"
|
||||
y="33.173706" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:0.54387;stroke-dasharray:none"
|
||||
id="rect234-3"
|
||||
width="79.543648"
|
||||
height="37.520485"
|
||||
x="55.724121"
|
||||
y="65.367287" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5834px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none"
|
||||
x="76.878265"
|
||||
y="100.819"
|
||||
id="text3935"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3933"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5834px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke-width:0.264583"
|
||||
x="76.878265"
|
||||
y="100.819">content</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5834px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none"
|
||||
x="77.072464"
|
||||
y="111.58885"
|
||||
id="text4767"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4765"
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.264583"
|
||||
x="77.072464"
|
||||
y="111.58885">padding</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:0.264583"
|
||||
x="77.072464"
|
||||
y="124.8181"
|
||||
id="tspan4769" /></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5834px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none"
|
||||
x="77.337868"
|
||||
y="133.01045"
|
||||
id="text4767-1"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan8053"
|
||||
x="77.337868"
|
||||
y="133.01045">margin</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan8055"
|
||||
x="77.337868"
|
||||
y="146.2397"></tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5834px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="77.311295"
|
||||
y="123.22021"
|
||||
id="text7028"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan7026"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="77.311295"
|
||||
y="123.22021">border</tspan></text>
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2)"
|
||||
d="M 58.115912,67.846321 71.79645,67.813301"
|
||||
id="path9563" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2-4)"
|
||||
d="m 58.054931,67.806272 -0.03031,13.680545"
|
||||
id="path9563-6"
|
||||
inkscape:transform-center-x="0.99122989"
|
||||
inkscape:transform-center-y="-10.282891" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52785px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="74.660751"
|
||||
y="69.01046"
|
||||
id="text10129"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan10127"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52785px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.264583"
|
||||
x="74.660751"
|
||||
y="69.01046">X</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52785px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1"
|
||||
x="56.974892"
|
||||
y="86.498825"
|
||||
id="text10133"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan10131"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52785px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.264583"
|
||||
x="56.974892"
|
||||
y="86.498825">Y</tspan></text>
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path10187"
|
||||
cx="58.076889"
|
||||
cy="67.895195"
|
||||
r="0.2" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 8.8 KiB |
@@ -103,14 +103,14 @@ fields, but e.g. buttons can take the focus too.
|
||||
|
||||
Input widgets can be given the focus by clicking on them, but focus
|
||||
can also be moved around with certain key events (this is known as
|
||||
“keyboard navigation”). GTK reserves the <kbd>Tab</kbd> key to move the focus
|
||||
to the next location, and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move it back to the previous
|
||||
“keyboard navigation”). GTK reserves the Tab key to move the focus
|
||||
to the next location, and Shift-Tab to move it back to the previous
|
||||
one. In addition many containers allow “directional navigation” with
|
||||
the arrow keys.
|
||||
|
||||
Many widgets can be “activated” to trigger and action. E.g., you can
|
||||
activate a button or switch by clicking on them, but you can also
|
||||
activate them with the keyboard, by using the <kbd>Enter</kbd> or <kbd>␣</kbd> keys.
|
||||
activate them with the keyboard, by using the Enter or Space keys.
|
||||
|
||||
Apart from keyboard navigation, activation and directly typing into
|
||||
entries or text views, GTK widgets can use key events for activating
|
||||
|
||||
@@ -17,7 +17,6 @@ expand_content_md_files = [
|
||||
'actions.md',
|
||||
'input-handling.md',
|
||||
'drawing-model.md',
|
||||
'coordinates.md',
|
||||
'css-overview.md',
|
||||
'css-properties.md',
|
||||
'section-accessibility.md',
|
||||
|
||||
@@ -258,7 +258,7 @@ Instead of implementing GtkWidget.destroy, you can implement GObject.dispose.
|
||||
GTK 4 removes `gtk_container_add()` and `gtk_container_remove()`. While there
|
||||
is not always a replacement for `gtk_container_remove()` in GTK 3, you can
|
||||
replace many uses of `gtk_container_add()` with equivalent container-specific
|
||||
APIs such as `gtk_grid_attach()`, and thereby reduce
|
||||
APIs such as `gtk_box_pack_start()` or `gtk_grid_attach()`, and thereby reduce
|
||||
the amount of work you have to do at the time of the switch.
|
||||
|
||||
### Review your use of icon resources
|
||||
@@ -402,9 +402,9 @@ is open, use the [property@Gtk.Window:modal] property of the dialog.
|
||||
|
||||
### Adapt to coordinate API changes
|
||||
|
||||
A number of coordinate APIs in GTK 3 had variants taking `int` arguments:
|
||||
A number of coordinate APIs in GTK 3 had `double` variants:
|
||||
`gdk_device_get_surface_at_position()`, `gdk_surface_get_device_position()`.
|
||||
These have been changed to use `double` arguments, and the `int` variants
|
||||
These have been changed to use doubles, and the `double` variants
|
||||
have been removed. Update your code accordingly.
|
||||
|
||||
Any APIs that deal with global (or root) coordinates have been
|
||||
@@ -875,10 +875,10 @@ reference.
|
||||
### Adapt to coordinate API changes
|
||||
|
||||
A number of APIs that are accepting or returning coordinates have
|
||||
been changed from `int`s to `double`s: `gtk_widget_translate_coordinates()`,
|
||||
been changed from ints to doubles: `gtk_widget_translate_coordinates()`,
|
||||
`gtk_fixed_put()`, `gtk_fixed_move()`. This change is mostly transparent,
|
||||
except for cases where out parameters are involved: you need to
|
||||
pass `double*` now, instead of `int*`.
|
||||
pass double* now, instead of int*.
|
||||
|
||||
### Adapt to GtkStyleContext API changes
|
||||
|
||||
|
||||
@@ -119,17 +119,3 @@ it no longer has a resize handle for the window.
|
||||
|
||||
These are very specialized widgets that should better live with the application
|
||||
where they are used.
|
||||
|
||||
## Widget size api changes
|
||||
|
||||
The functions gtk_widget_get_allocated_width() and gtk_widget_get_allocated_height()
|
||||
are going away. In most cases, [method@Gtk.Widget.get_width] and [method@Gtk.Widget.get_height]
|
||||
are suitable replacements. Note that the semantics are slightly different though:
|
||||
the old functions return the size of the CSS border area, while the new functions return
|
||||
the size of the widgets content area. In places where this difference matters, you can
|
||||
use `gtk_widget_compute_bounds (widget, widget, &bounds)` instead.
|
||||
|
||||
The function gtk_widget_get_allocation() is also going away. It does not have a direct
|
||||
replacement, but the previously mentioned alternatives can be used for it too.
|
||||
|
||||
The function gtk_widget_get_allocated_baseline() has been renamed to [method@Gtk.Widget.get_baseline].
|
||||
|
||||
@@ -263,13 +263,10 @@ the question you have, this list is a good place to start.
|
||||
* How do I load an image or animation from a file?
|
||||
|
||||
To load an image file straight into a display widget, use
|
||||
[ctor@Gtk.Picture.new_for_file] or [ctor@Gtk.Picture.new_for_filename].
|
||||
[ctor@Gtk.Picture.new_for_file] or [ctor@GTk.Picture.new_for_filename].
|
||||
To load an image for another purpose, use [ctor@Gdk.Texture.new_from_file].
|
||||
To load a video from a file, use [ctor@Gtk.MediaFile.new_for_file].
|
||||
|
||||
Note that [class@Gtk.Image] is meant for fixed-size icons. For arbitrary
|
||||
image files, you should use [class@Gtk.Picture].
|
||||
|
||||
* How do I draw text?
|
||||
|
||||
If you just want to put text into your user interface somewhere, it is
|
||||
@@ -286,8 +283,8 @@ the question you have, this list is a good place to start.
|
||||
pango_font_description_free (fontdesc);
|
||||
g_object_unref (layout);
|
||||
|
||||
See also the [Cairo Rendering](https://docs.gtk.org/PangoCairo/pango_cairo.html)
|
||||
section of the [Pango documentation](https://docs.gtk.org/Pango/).
|
||||
See also the [Cairo Rendering](https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html)
|
||||
section of the [Pango documentation](https://developer.gnome.org/pango/stable/).
|
||||
|
||||
To draw a piece of text in a widget [vfunc@Gtk.Widget.snapshot] implementation,
|
||||
use [method@Gtk.Snapshot.append_layout].
|
||||
@@ -304,8 +301,8 @@ the question you have, this list is a good place to start.
|
||||
pango_font_description_free (fontdesc);
|
||||
g_object_unref (layout);
|
||||
|
||||
See also the [Layout Objects](https://docs.gtk.org/Pango/class.Layout.html)
|
||||
section of the [Pango documentation](https://docs.gtk.org/Pango/).
|
||||
See also the [Layout Objects](https://developer.gnome.org/pango/stable/pango-Layout-Objects.html)
|
||||
section of the [Pango documentation](https://developer.gnome.org/pango/stable/).
|
||||
|
||||
* Why are types not registered if I use their `GTK_TYPE_BLAH` macro?
|
||||
|
||||
|
||||
@@ -211,9 +211,6 @@ A number of options affect behavior instead of logging:
|
||||
`gl-disable`
|
||||
: Disable OpenGL support
|
||||
|
||||
`gl-fractional`
|
||||
: Enable fractional scaling for OpenGL. This is experimental
|
||||
|
||||
`gl-legacy`
|
||||
: Use a legacy OpenGL context
|
||||
|
||||
@@ -371,13 +368,6 @@ to rememdy this on the GTK side; the best bet before trying the above
|
||||
workarounds is to try to update your graphics drivers and Nahimic
|
||||
installation.
|
||||
|
||||
### `GSK_MAX_TEXTURE_SIZE`
|
||||
|
||||
Limit texture size to the minimum of this value and the OpenGL limit
|
||||
for texture sizes. This can be used to debug issues with texture slicing
|
||||
on systems where the OpenGL texture size limit would otherwise make
|
||||
texture slicing difficult to test.
|
||||
|
||||
### `GTK_CSD`
|
||||
|
||||
The default value of this environment variable is `1`. If changed
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Title: Using GTK with X11
|
||||
Title: GTK for the X Window System
|
||||
Slug: gtk-x11
|
||||
|
||||
On UNIX, the X backend is enabled by default, so you don't need to do anything
|
||||
|
||||
@@ -31,9 +31,10 @@ resize_cb (GtkWidget *widget,
|
||||
|
||||
if (gtk_native_get_surface (gtk_widget_get_native (widget)))
|
||||
{
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
surface = gdk_surface_create_similar_surface (gtk_native_get_surface (gtk_widget_get_native (widget)),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
gtk_widget_get_width (widget),
|
||||
gtk_widget_get_height (widget));
|
||||
|
||||
/* Initialize the surface to white */
|
||||
clear_surface ();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef __BROADWAY_H__
|
||||
#define __BROADWAY_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
@@ -73,3 +74,4 @@ void broadway_output_pong (BroadwayOutput *output);
|
||||
void broadway_output_set_show_keyboard (BroadwayOutput *output,
|
||||
gboolean show);
|
||||
|
||||
#endif /* __BROADWAY_H__ */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef __BROADWAY_PROTOCOL_H__
|
||||
#define __BROADWAY_PROTOCOL_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
@@ -369,3 +370,4 @@ typedef union {
|
||||
BroadwayReplyUngrabPointer ungrab_pointer;
|
||||
} BroadwayReply;
|
||||
|
||||
#endif /* __BROADWAY_PROTOCOL_H__ */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef __BROADWAY_SERVER__
|
||||
#define __BROADWAY_SERVER__
|
||||
|
||||
#include "broadway-protocol.h"
|
||||
#include <glib-object.h>
|
||||
@@ -135,3 +136,4 @@ void broadway_server_surface_set_modal_hint (BroadwayServer *s
|
||||
gboolean modal_hint);
|
||||
|
||||
|
||||
#endif /* __BROADWAY_SERVER__ */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_SERVER__
|
||||
#define __GDK_BROADWAY_SERVER__
|
||||
|
||||
#include <gdk/gdktypes.h>
|
||||
|
||||
@@ -81,3 +82,4 @@ void _gdk_broadway_server_surface_set_modal_hint (GdkBroadwaySer
|
||||
int id,
|
||||
gboolean modal_hint);
|
||||
|
||||
#endif /* __GDK_BROADWAY_SERVER__ */
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_H__
|
||||
#define __GDK_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
@@ -35,3 +36,4 @@
|
||||
|
||||
#undef __GDKBROADWAY_H_INSIDE__
|
||||
|
||||
#endif /* __GDK_BROADWAY_H__ */
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_CURSOR_H__
|
||||
#define __GDK_BROADWAY_CURSOR_H__
|
||||
|
||||
#if !defined (__GDKBROADWAY_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/broadway/gdkbroadway.h> can be included directly."
|
||||
@@ -51,3 +52,4 @@ GType gdk_broadway_cursor_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_CURSOR_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_DISPLAY_H__
|
||||
#define __GDK_BROADWAY_DISPLAY_H__
|
||||
|
||||
#if !defined (__GDKBROADWAY_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/broadway/gdkbroadway.h> can be included directly."
|
||||
@@ -55,3 +56,4 @@ void gdk_broadway_display_set_surface_scale (GdkDisplay *di
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DISPLAY_H__ */
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_DISPLAY_MANAGER_H__
|
||||
#define __GDK_BROADWAY_DISPLAY_MANAGER_H__
|
||||
|
||||
#if !defined(__GDKBROADWAY_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/broadway/gdkbroadway.h> can be included directly."
|
||||
@@ -42,3 +43,4 @@ GType gdk_broadway_display_manager_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DISPLAY_MANAGER_H__ */
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_MONITOR_H__
|
||||
#define __GDK_BROADWAY_MONITOR_H__
|
||||
|
||||
#if !defined (__GDKBROADWAY_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/broadway/gdkbroadway.h> can be included directly."
|
||||
@@ -41,4 +42,5 @@ GType gdk_broadway_monitor_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_MONITOR_H__ */
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_SURFACE_H__
|
||||
#define __GDK_BROADWAY_SURFACE_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
@@ -47,3 +48,4 @@ GType gdk_broadway_surface_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_SURFACE_H__ */
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_CAIRO_CONTEXT__
|
||||
#define __GDK_BROADWAY_CAIRO_CONTEXT__
|
||||
|
||||
#include "gdkconfig.h"
|
||||
|
||||
@@ -51,3 +52,4 @@ GType gdk_broadway_cairo_context_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_CAIRO_CONTEXT__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_BROADWAY_H__
|
||||
#define __GDK_DEVICE_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdkdeviceprivate.h>
|
||||
|
||||
@@ -52,3 +53,4 @@ void gdk_broadway_device_query_state (GdkDevice *device,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_BROADWAY_H__ */
|
||||
|
||||
@@ -477,8 +477,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
|
||||
object_class->dispose = gdk_broadway_display_dispose;
|
||||
object_class->finalize = gdk_broadway_display_finalize;
|
||||
|
||||
display_class->toplevel_type = GDK_TYPE_BROADWAY_TOPLEVEL;
|
||||
display_class->popup_type = GDK_TYPE_BROADWAY_POPUP;
|
||||
display_class->cairo_context_type = GDK_TYPE_BROADWAY_CAIRO_CONTEXT;
|
||||
|
||||
display_class->get_name = gdk_broadway_display_get_name;
|
||||
@@ -490,6 +488,7 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
|
||||
|
||||
display_class->get_next_serial = gdk_broadway_display_get_next_serial;
|
||||
display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
|
||||
display_class->create_surface = _gdk_broadway_display_create_surface;
|
||||
display_class->get_keymap = _gdk_broadway_display_get_keymap;
|
||||
|
||||
display_class->get_monitors = gdk_broadway_display_get_monitors;
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_DISPLAY__
|
||||
#define __GDK_BROADWAY_DISPLAY__
|
||||
|
||||
#include "gdkbroadwaydisplay.h"
|
||||
|
||||
@@ -69,3 +70,4 @@ struct _GdkBroadwayDisplayClass
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DISPLAY__ */
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_DRAW_CONTEXT__
|
||||
#define __GDK_BROADWAY_DRAW_CONTEXT__
|
||||
|
||||
#include "gdkconfig.h"
|
||||
|
||||
@@ -54,3 +55,4 @@ GdkBroadwayDrawContext *gdk_broadway_draw_context_context (GdkSurface *surface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DRAW_CONTEXT__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_EVENT_SOURCE_H__
|
||||
#define __GDK_BROADWAY_EVENT_SOURCE_H__
|
||||
|
||||
#include "gdkprivate-broadway.h"
|
||||
|
||||
@@ -28,3 +29,4 @@ GSource * _gdk_broadway_event_source_new (GdkDisplay *display);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_EVENT_SOURCE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_BROADWAY_MONITOR_PRIVATE_H__
|
||||
#define __GDK_BROADWAY_MONITOR_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <gio/gio.h>
|
||||
@@ -34,3 +35,4 @@ struct _GdkBroadwayMonitorClass {
|
||||
GdkMonitorClass parent_class;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
* Private uninstalled header defining things local to X windowing code
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_PRIVATE_BROADWAY_H__
|
||||
#define __GDK_PRIVATE_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdkcursor.h>
|
||||
#include "gdksurface-broadway.h"
|
||||
@@ -103,6 +104,13 @@ void _gdk_broadway_display_get_default_cursor_size (GdkDisplay *display,
|
||||
void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height);
|
||||
GdkSurface * _gdk_broadway_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
GdkKeymap* _gdk_broadway_display_get_keymap (GdkDisplay *display);
|
||||
void _gdk_broadway_display_consume_all_input (GdkDisplay *display);
|
||||
BroadwayInputMsg * _gdk_broadway_display_block_for_input (GdkDisplay *display,
|
||||
@@ -116,3 +124,4 @@ void _gdk_broadway_surface_resize_surface (GdkSurface *surface);
|
||||
void _gdk_broadway_cursor_update_theme (GdkCursor *cursor);
|
||||
void _gdk_broadway_cursor_display_finalize (GdkDisplay *display);
|
||||
|
||||
#endif /* __GDK_PRIVATE_BROADWAY_H__ */
|
||||
|
||||
@@ -47,8 +47,19 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Forward declarations */
|
||||
static void gdk_broadway_surface_finalize (GObject *object);
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwaySurface, gdk_broadway_surface, GDK_TYPE_SURFACE)
|
||||
|
||||
GType gdk_broadway_toplevel_get_type (void) G_GNUC_CONST;
|
||||
GType gdk_broadway_popup_get_type (void) G_GNUC_CONST;
|
||||
GType gdk_broadway_drag_surface_get_type (void) G_GNUC_CONST;
|
||||
|
||||
#define GDK_TYPE_BROADWAY_TOPLEVEL (gdk_broadway_toplevel_get_type ())
|
||||
#define GDK_TYPE_BROADWAY_POPUP (gdk_broadway_popup_get_type ())
|
||||
#define GDK_TYPE_BROADWAY_DRAG_SURFACE (gdk_broadway_drag_surface_get_type ())
|
||||
|
||||
/* We need to flush in an idle rather than AFTER_PAINT, as the clock
|
||||
is frozen during e.g. surface resizes so the paint will not happen
|
||||
and the surface resize request is never flushed. */
|
||||
@@ -63,93 +74,6 @@ gdk_broadway_surface_init (GdkBroadwaySurface *impl)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
GdkSurface *surface)
|
||||
{
|
||||
GdkDisplay *display = gdk_surface_get_display (surface);
|
||||
GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface);
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
|
||||
impl->pending_frame_counter = gdk_frame_clock_get_frame_counter (clock);
|
||||
gdk_surface_freeze_updates (surface);
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
_gdk_broadway_server_roundtrip (broadway_display->server, impl->id, _gdk_display_get_next_serial (display));
|
||||
|
||||
gdk_display_flush (display);
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_before_paint (GdkFrameClock *clock,
|
||||
GdkSurface *surface)
|
||||
{
|
||||
GdkFrameTimings *timings = gdk_frame_clock_get_current_timings (clock);
|
||||
gint64 presentation_time;
|
||||
gint64 refresh_interval;
|
||||
|
||||
if (surface->update_freeze_count > 0)
|
||||
return;
|
||||
|
||||
gdk_frame_clock_get_refresh_info (clock,
|
||||
timings->frame_time,
|
||||
&refresh_interval, &presentation_time);
|
||||
if (presentation_time != 0)
|
||||
{
|
||||
timings->predicted_presentation_time = presentation_time + refresh_interval;
|
||||
}
|
||||
else
|
||||
{
|
||||
timings->predicted_presentation_time = timings->frame_time + refresh_interval / 2 + refresh_interval;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
connect_frame_clock (GdkSurface *surface)
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (surface);
|
||||
|
||||
g_signal_connect (frame_clock, "before-paint",
|
||||
G_CALLBACK (on_frame_clock_before_paint), surface);
|
||||
g_signal_connect (frame_clock, "after-paint",
|
||||
G_CALLBACK (on_frame_clock_after_paint), surface);
|
||||
}
|
||||
|
||||
static void
|
||||
disconnect_frame_clock (GdkSurface *surface)
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (surface);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (frame_clock,
|
||||
on_frame_clock_before_paint, surface);
|
||||
g_signal_handlers_disconnect_by_func (frame_clock,
|
||||
on_frame_clock_after_paint, surface);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_constructed (GObject *object)
|
||||
{
|
||||
GdkBroadwaySurface *self = GDK_BROADWAY_SURFACE (object);
|
||||
GdkSurface *surface = GDK_SURFACE (object);
|
||||
GdkBroadwayDisplay *broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
|
||||
|
||||
if (!surface->parent)
|
||||
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, self);
|
||||
|
||||
self->id = _gdk_broadway_server_new_surface (broadway_display->server,
|
||||
self->root_x,
|
||||
self->root_y,
|
||||
1, 1);
|
||||
g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER (self->id), surface);
|
||||
|
||||
g_object_ref (self);
|
||||
|
||||
G_OBJECT_CLASS (gdk_broadway_surface_parent_class)->constructed (object);
|
||||
|
||||
connect_frame_clock (surface);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_finalize (GObject *object)
|
||||
{
|
||||
@@ -219,6 +143,164 @@ _gdk_broadway_roundtrip_notify (GdkSurface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
GdkSurface *surface)
|
||||
{
|
||||
GdkDisplay *display = gdk_surface_get_display (surface);
|
||||
GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface);
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
|
||||
impl->pending_frame_counter = gdk_frame_clock_get_frame_counter (clock);
|
||||
gdk_surface_freeze_updates (surface);
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
_gdk_broadway_server_roundtrip (broadway_display->server, impl->id, _gdk_display_get_next_serial (display));
|
||||
|
||||
gdk_display_flush (display);
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_before_paint (GdkFrameClock *clock,
|
||||
GdkSurface *surface)
|
||||
{
|
||||
GdkFrameTimings *timings = gdk_frame_clock_get_current_timings (clock);
|
||||
gint64 presentation_time;
|
||||
gint64 refresh_interval;
|
||||
|
||||
if (surface->update_freeze_count > 0)
|
||||
return;
|
||||
|
||||
gdk_frame_clock_get_refresh_info (clock,
|
||||
timings->frame_time,
|
||||
&refresh_interval, &presentation_time);
|
||||
if (presentation_time != 0)
|
||||
{
|
||||
timings->predicted_presentation_time = presentation_time + refresh_interval;
|
||||
}
|
||||
else
|
||||
{
|
||||
timings->predicted_presentation_time = timings->frame_time + refresh_interval / 2 + refresh_interval;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
connect_frame_clock (GdkSurface *surface)
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (surface);
|
||||
|
||||
g_signal_connect (frame_clock, "before-paint",
|
||||
G_CALLBACK (on_frame_clock_before_paint), surface);
|
||||
g_signal_connect (frame_clock, "after-paint",
|
||||
G_CALLBACK (on_frame_clock_after_paint), surface);
|
||||
}
|
||||
|
||||
static void
|
||||
disconnect_frame_clock (GdkSurface *surface)
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_surface_get_frame_clock (surface);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (frame_clock,
|
||||
on_frame_clock_before_paint, surface);
|
||||
g_signal_handlers_disconnect_by_func (frame_clock,
|
||||
on_frame_clock_after_paint, surface);
|
||||
}
|
||||
|
||||
GdkSurface *
|
||||
_gdk_broadway_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
GdkFrameClock *frame_clock;
|
||||
GdkSurface *surface;
|
||||
GdkBroadwaySurface *impl;
|
||||
GType type;
|
||||
|
||||
if (parent)
|
||||
frame_clock = g_object_ref (gdk_surface_get_frame_clock (parent));
|
||||
else
|
||||
frame_clock = _gdk_frame_clock_idle_new ();
|
||||
|
||||
switch (surface_type)
|
||||
{
|
||||
case GDK_SURFACE_TOPLEVEL:
|
||||
type = GDK_TYPE_BROADWAY_TOPLEVEL;
|
||||
break;
|
||||
case GDK_SURFACE_POPUP:
|
||||
type = GDK_TYPE_BROADWAY_POPUP;
|
||||
break;
|
||||
case GDK_SURFACE_DRAG:
|
||||
type = GDK_TYPE_BROADWAY_DRAG_SURFACE;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
surface = g_object_new (type,
|
||||
"display", display,
|
||||
"frame-clock", frame_clock,
|
||||
NULL);
|
||||
|
||||
g_object_unref (frame_clock);
|
||||
|
||||
surface->parent = parent;
|
||||
surface->x = x;
|
||||
surface->y = y;
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
impl = GDK_BROADWAY_SURFACE (surface);
|
||||
impl->root_x = x;
|
||||
impl->root_y = y;
|
||||
if (parent)
|
||||
{
|
||||
impl->root_x += GDK_BROADWAY_SURFACE (parent)->root_x;
|
||||
impl->root_y += GDK_BROADWAY_SURFACE (parent)->root_y;
|
||||
}
|
||||
|
||||
impl->id = _gdk_broadway_server_new_surface (broadway_display->server,
|
||||
impl->root_x,
|
||||
impl->root_y,
|
||||
surface->width,
|
||||
surface->height);
|
||||
g_hash_table_insert (broadway_display->id_ht, GINT_TO_POINTER(impl->id), surface);
|
||||
|
||||
g_object_ref (surface);
|
||||
|
||||
if (!surface->parent)
|
||||
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
|
||||
|
||||
connect_frame_clock (surface);
|
||||
|
||||
/* We treat the real parent as a default transient for to get stacking right */
|
||||
if (parent)
|
||||
{
|
||||
impl->transient_for = GDK_BROADWAY_SURFACE (parent)->id;
|
||||
_gdk_broadway_server_surface_set_transient_for (broadway_display->server, impl->id, impl->transient_for);
|
||||
}
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
gdk_broadway_surface_ref_cairo_surface (GdkSurface *surface)
|
||||
{
|
||||
if (GDK_IS_BROADWAY_SURFACE (surface) &&
|
||||
GDK_SURFACE_DESTROYED (surface))
|
||||
return NULL;
|
||||
|
||||
return cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
_gdk_broadway_surface_destroy (GdkSurface *surface,
|
||||
gboolean foreign_destroy)
|
||||
@@ -325,10 +407,17 @@ gdk_broadway_surface_hide (GdkSurface *surface)
|
||||
_gdk_surface_clear_update_area (surface);
|
||||
}
|
||||
|
||||
static double
|
||||
gdk_broadway_surface_get_scale (GdkSurface *surface)
|
||||
static int
|
||||
gdk_broadway_surface_get_scale_factor (GdkSurface *surface)
|
||||
{
|
||||
return GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface))->scale_factor;
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (surface))
|
||||
return 1;
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
|
||||
|
||||
return broadway_display->scale_factor;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1025,14 +1114,6 @@ _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GdkSurface *
|
||||
gdk_broadway_drag_surface_new (GdkDisplay *display)
|
||||
{
|
||||
return g_object_new (GDK_TYPE_BROADWAY_DRAG_SURFACE,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
create_moveresize_surface (MoveResizeData *mv_resize,
|
||||
guint32 timestamp)
|
||||
@@ -1044,9 +1125,11 @@ create_moveresize_surface (MoveResizeData *mv_resize,
|
||||
g_assert (mv_resize->moveresize_emulation_surface == NULL);
|
||||
|
||||
mv_resize->moveresize_emulation_surface =
|
||||
gdk_broadway_drag_surface_new (mv_resize->display);
|
||||
_gdk_broadway_display_create_surface (mv_resize->display,
|
||||
GDK_SURFACE_DRAG,
|
||||
NULL,
|
||||
-100, -100, 1, 1);
|
||||
|
||||
gdk_broadway_surface_move_resize_internal (mv_resize->moveresize_emulation_surface, TRUE, -100, -100, 1, 1);
|
||||
gdk_broadway_surface_show (mv_resize->moveresize_emulation_surface, FALSE);
|
||||
|
||||
seat = gdk_display_get_default_seat (mv_resize->display);
|
||||
@@ -1176,9 +1259,9 @@ gdk_broadway_surface_class_init (GdkBroadwaySurfaceClass *klass)
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GdkSurfaceClass *impl_class = GDK_SURFACE_CLASS (klass);
|
||||
|
||||
object_class->constructed = gdk_broadway_surface_constructed;
|
||||
object_class->finalize = gdk_broadway_surface_finalize;
|
||||
|
||||
impl_class->ref_cairo_surface = gdk_broadway_surface_ref_cairo_surface;
|
||||
impl_class->hide = gdk_broadway_surface_hide;
|
||||
impl_class->get_geometry = gdk_broadway_surface_get_geometry;
|
||||
impl_class->get_root_coords = gdk_broadway_surface_get_root_coords;
|
||||
@@ -1188,7 +1271,7 @@ gdk_broadway_surface_class_init (GdkBroadwaySurfaceClass *klass)
|
||||
impl_class->beep = gdk_broadway_surface_beep;
|
||||
impl_class->destroy_notify = gdk_broadway_surface_destroy_notify;
|
||||
impl_class->drag_begin = _gdk_broadway_surface_drag_begin;
|
||||
impl_class->get_scale = gdk_broadway_surface_get_scale;
|
||||
impl_class->get_scale_factor = gdk_broadway_surface_get_scale_factor;
|
||||
}
|
||||
|
||||
#define LAST_PROP 1
|
||||
@@ -1214,25 +1297,6 @@ gdk_broadway_popup_init (GdkBroadwayPopup *popup)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_popup_constructed (GObject *object)
|
||||
{
|
||||
GdkBroadwaySurface *self = GDK_BROADWAY_SURFACE (object);
|
||||
GdkSurface *surface = GDK_SURFACE (self);
|
||||
GdkBroadwayDisplay *broadway_display = GDK_BROADWAY_DISPLAY (gdk_surface_get_display (surface));
|
||||
|
||||
self->root_x = GDK_BROADWAY_SURFACE (surface->parent)->root_x;
|
||||
self->root_y = GDK_BROADWAY_SURFACE (surface->parent)->root_y;
|
||||
|
||||
gdk_surface_set_frame_clock (surface, gdk_surface_get_frame_clock (surface->parent));
|
||||
|
||||
G_OBJECT_CLASS (gdk_broadway_popup_parent_class)->constructed (object);
|
||||
|
||||
/* We treat the real parent as a default transient for to get stacking right */
|
||||
self->transient_for = GDK_BROADWAY_SURFACE (surface->parent)->id;
|
||||
_gdk_broadway_server_surface_set_transient_for (broadway_display->server, self->id, self->transient_for);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_popup_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
@@ -1288,7 +1352,6 @@ gdk_broadway_popup_class_init (GdkBroadwayPopupClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->constructed = gdk_broadway_popup_constructed;
|
||||
object_class->get_property = gdk_broadway_popup_get_property;
|
||||
object_class->set_property = gdk_broadway_popup_set_property;
|
||||
|
||||
@@ -1359,19 +1422,6 @@ gdk_broadway_toplevel_init (GdkBroadwayToplevel *toplevel)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_toplevel_constructed (GObject *object)
|
||||
{
|
||||
GdkSurface *surface = GDK_SURFACE (object);
|
||||
GdkFrameClock *frame_clock;
|
||||
|
||||
frame_clock = _gdk_frame_clock_idle_new ();
|
||||
gdk_surface_set_frame_clock (surface, frame_clock);
|
||||
g_object_unref (frame_clock);
|
||||
|
||||
G_OBJECT_CLASS (gdk_broadway_toplevel_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_toplevel_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
@@ -1475,7 +1525,6 @@ gdk_broadway_toplevel_class_init (GdkBroadwayToplevelClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->constructed = gdk_broadway_toplevel_constructed;
|
||||
object_class->get_property = gdk_broadway_toplevel_get_property;
|
||||
object_class->set_property = gdk_broadway_toplevel_set_property;
|
||||
|
||||
@@ -1636,25 +1685,9 @@ gdk_broadway_drag_surface_init (GdkBroadwayDragSurface *surface)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_drag_surface_constructed (GObject *object)
|
||||
{
|
||||
GdkSurface *surface = GDK_SURFACE (object);
|
||||
GdkFrameClock *frame_clock;
|
||||
|
||||
frame_clock = _gdk_frame_clock_idle_new ();
|
||||
gdk_surface_set_frame_clock (surface, frame_clock);
|
||||
g_object_unref (frame_clock);
|
||||
|
||||
G_OBJECT_CLASS (gdk_broadway_drag_surface_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_drag_surface_class_init (GdkBroadwayDragSurfaceClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->constructed = gdk_broadway_drag_surface_constructed;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_SURFACE_BROADWAY_H__
|
||||
#define __GDK_SURFACE_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdksurfaceprivate.h>
|
||||
#include "gdkbroadwaysurface.h"
|
||||
@@ -32,14 +33,6 @@ G_BEGIN_DECLS
|
||||
/* Surface implementation for Broadway
|
||||
*/
|
||||
|
||||
GType gdk_broadway_toplevel_get_type (void) G_GNUC_CONST;
|
||||
GType gdk_broadway_popup_get_type (void) G_GNUC_CONST;
|
||||
GType gdk_broadway_drag_surface_get_type (void) G_GNUC_CONST;
|
||||
|
||||
#define GDK_TYPE_BROADWAY_TOPLEVEL (gdk_broadway_toplevel_get_type ())
|
||||
#define GDK_TYPE_BROADWAY_POPUP (gdk_broadway_popup_get_type ())
|
||||
#define GDK_TYPE_BROADWAY_DRAG_SURFACE (gdk_broadway_drag_surface_get_type ())
|
||||
|
||||
struct _GdkBroadwaySurface
|
||||
{
|
||||
GdkSurface parent_instance;
|
||||
@@ -87,3 +80,4 @@ GType gdk_surface_broadway_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_SURFACE_BROADWAY_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __FILE_TRANSFER_PROTOCOL_H__
|
||||
#define __FILE_TRANSFER_PROTOCOL_H__
|
||||
|
||||
|
||||
void file_transfer_portal_register (void);
|
||||
@@ -36,3 +37,4 @@ gboolean file_transfer_portal_retrieve_files_finish (GAsyncResult *resu
|
||||
GError **error);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -121,7 +121,6 @@ static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "portals", GDK_DEBUG_PORTALS, "Force use of portals", TRUE },
|
||||
{ "no-portals", GDK_DEBUG_NO_PORTALS, "Disable use of portals", TRUE },
|
||||
{ "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support", TRUE },
|
||||
{ "gl-fractional", GDK_DEBUG_GL_FRACTIONAL, "Enable fractional scaling for OpenGL (experimental)", TRUE },
|
||||
{ "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL", TRUE },
|
||||
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context", TRUE },
|
||||
{ "gl-gles", GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API", TRUE },
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_H__
|
||||
#define __GDK_H__
|
||||
|
||||
#define __GDK_H_INSIDE__
|
||||
|
||||
@@ -54,7 +55,6 @@
|
||||
#include <gdk/gdkframetimings.h>
|
||||
#include <gdk/gdkglcontext.h>
|
||||
#include <gdk/gdkgltexture.h>
|
||||
#include <gdk/gdkgltexturebuilder.h>
|
||||
#include <gdk/gdkkeys.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include <gdk/gdkmemorytexture.h>
|
||||
@@ -80,3 +80,4 @@
|
||||
|
||||
#undef __GDK_H_INSIDE__
|
||||
|
||||
#endif /* __GDK_H__ */
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
* Author: Alexander Larsson <alexl@redhat.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_APP_LAUNCH_CONTEXT_H__
|
||||
#define __GDK_APP_LAUNCH_CONTEXT_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -57,3 +58,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkAppLaunchContext, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_APP_LAUNCH_CONTEXT_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_APP_LAUNCH_CONTEXT_PRIVATE_H__
|
||||
#define __GDK_APP_LAUNCH_CONTEXT_PRIVATE_H__
|
||||
|
||||
#include "gdkapplaunchcontext.h"
|
||||
#include "gdktypes.h"
|
||||
@@ -42,3 +43,4 @@ struct _GdkAppLaunchContext
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CAIRO_H__
|
||||
#define __GDK_CAIRO_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -62,3 +63,4 @@ void gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CAIRO_H__ */
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CAIRO_CONTEXT__
|
||||
#define __GDK_CAIRO_CONTEXT__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -45,3 +46,4 @@ cairo_t * gdk_cairo_context_cairo_create (GdkCair
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CAIRO_CONTEXT__ */
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CAIRO_CONTEXT_PRIVATE__
|
||||
#define __GDK_CAIRO_CONTEXT_PRIVATE__
|
||||
|
||||
#include "gdkcairocontext.h"
|
||||
|
||||
@@ -48,3 +49,4 @@ struct _GdkCairoContextClass
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK__CAIRO_CONTEXT_PRIVATE__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CAIRO_PRIVATE_H__
|
||||
#define __GDK_CAIRO_PRIVATE_H__
|
||||
|
||||
#include "gdkcairo.h"
|
||||
|
||||
@@ -35,3 +36,4 @@ cairo_region_t *gdk_cairo_region_from_clip (cairo_t *cr);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CAIRO_PRIVATE_H__ */
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CLIPBOARD_H__
|
||||
#define __GDK_CLIPBOARD_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -123,3 +124,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkClipboard, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CLIPBOARD_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CLIPBOARD_PRIVATE_H__
|
||||
#define __GDK_CLIPBOARD_PRIVATE_H__
|
||||
|
||||
#include <gdk/gdkclipboard.h>
|
||||
|
||||
@@ -81,3 +82,4 @@ gboolean gdk_clipboard_write_finish (GdkClipboard
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CLIPBOARD_PRIVATE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GTK_CONTENT_DESERIALIZER_H__
|
||||
#define __GTK_CONTENT_DESERIALIZER_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -102,3 +103,4 @@ gboolean gdk_content_deserialize_finish (GAsyncR
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CONTENT_DESERIALIZER_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GTK_CONTENT_FORMATS_H__
|
||||
#define __GTK_CONTENT_FORMATS_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -131,3 +132,4 @@ GdkFileList * gdk_file_list_new_from_array (GFile **files,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CONTENT_FORMATS_H__ */
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
#ifndef __GTK_CONTENT_FORMATS_PRIVATE_H__
|
||||
#define __GTK_CONTENT_FORMATS_PRIVATE_H__
|
||||
|
||||
#include "gdkcontentformats.h"
|
||||
|
||||
@@ -28,3 +29,4 @@ G_BEGIN_DECLS
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CONTENT_FORMATS_PRIVATE_H__ */
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CONTENT_PROVIDER_H__
|
||||
#define __GDK_CONTENT_PROVIDER_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -115,3 +116,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkContentProvider, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CONTENT_PROVIDER_H__ */
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CONTENT_PROVIDER_IMPL_H__
|
||||
#define __GDK_CONTENT_PROVIDER_IMPL_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -43,3 +44,4 @@ GdkContentProvider * gdk_content_provider_new_for_bytes (const c
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CONTENT_PROVIDER_IMPL_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CONTENT_PROVIDER_PRIVATE_H__
|
||||
#define __GDK_CONTENT_PROVIDER_PRIVATE_H__
|
||||
|
||||
#include <gdk/gdkcontentprovider.h>
|
||||
|
||||
@@ -29,3 +30,4 @@ void gdk_content_provider_detach_clipboard (GdkContentProvi
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CONTENT_PROVIDER_PRIVATE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GTK_CONTENT_SERIALIZER_H__
|
||||
#define __GTK_CONTENT_SERIALIZER_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -101,3 +102,4 @@ gboolean gdk_content_serialize_finish (GAsyncR
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CONTENT_SERIALIZER_H__ */
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CURSOR_H__
|
||||
#define __GDK_CURSOR_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -67,3 +68,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkCursor, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CURSOR_H__ */
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_CURSOR_PRIVATE_H__
|
||||
#define __GDK_CURSOR_PRIVATE_H__
|
||||
|
||||
#include <gdk/gdkcursor.h>
|
||||
|
||||
@@ -57,3 +58,4 @@ gboolean gdk_cursor_equal (gconstpointer
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CURSOR_PRIVATE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEBUG_PRIVATE_H__
|
||||
#define __GDK_DEBUG_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
@@ -41,7 +42,6 @@ typedef enum {
|
||||
GDK_DEBUG_PORTALS = 1 << 12,
|
||||
GDK_DEBUG_NO_PORTALS = 1 << 13,
|
||||
GDK_DEBUG_GL_DISABLE = 1 << 14,
|
||||
GDK_DEBUG_GL_FRACTIONAL = 1 << 15,
|
||||
GDK_DEBUG_GL_LEGACY = 1 << 16,
|
||||
GDK_DEBUG_GL_GLES = 1 << 17,
|
||||
GDK_DEBUG_GL_DEBUG = 1 << 18,
|
||||
@@ -60,11 +60,7 @@ GdkDebugFlags gdk_display_get_debug_flags (GdkDisplay *display);
|
||||
void gdk_display_set_debug_flags (GdkDisplay *display,
|
||||
GdkDebugFlags flags);
|
||||
|
||||
#ifdef GLIB_USING_SYSTEM_PRINTF
|
||||
#define gdk_debug_message(format, ...) fprintf (stderr, format "\n", ##__VA_ARGS__)
|
||||
#else
|
||||
#define gdk_debug_message(format, ...) g_fprintf (stderr, format "\n", ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
||||
@@ -99,3 +95,4 @@ guint gdk_parse_debug_var (const char *variable,
|
||||
const GdkDebugKey *keys,
|
||||
guint nkeys);
|
||||
|
||||
#endif /* __GDK_DEBUG_PRIVATE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_H__
|
||||
#define __GDK_DEVICE_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -130,3 +131,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDevice, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_H__ */
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_PAD_H__
|
||||
#define __GDK_DEVICE_PAD_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -70,3 +71,4 @@ int gdk_device_pad_get_feature_group (GdkDevicePad *pad,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_PAD_H__ */
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* Author: Carlos Garnacho <carlosg@gnome.org>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_PAD_PRIVATE_H__
|
||||
#define __GDK_DEVICE_PAD_PRIVATE_H__
|
||||
|
||||
#include "gdkdevicepad.h"
|
||||
|
||||
@@ -41,3 +42,4 @@ struct _GdkDevicePadInterface {
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_PAD_PRIVATE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_PRIVATE_H__
|
||||
#define __GDK_DEVICE_PRIVATE_H__
|
||||
|
||||
#include "gdkdevice.h"
|
||||
#include "gdkdevicetool.h"
|
||||
@@ -200,3 +201,4 @@ gboolean gdk_device_grab_info (GdkDisplay *display,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_PRIVATE_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_TOOL_H__
|
||||
#define __GDK_DEVICE_TOOL_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -76,3 +77,4 @@ GdkAxisFlags gdk_device_tool_get_axes (GdkDeviceTool *tool);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_TOOL_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DEVICE_TOOL_PRIVATE_H__
|
||||
#define __GDK_DEVICE_TOOL_PRIVATE_H__
|
||||
|
||||
#include "gdkdevicetool.h"
|
||||
|
||||
@@ -44,3 +45,4 @@ GdkDeviceTool *gdk_device_tool_new (guint64 serial,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_TOOL_PRIVATE_H__ */
|
||||
|
||||
@@ -1196,6 +1196,21 @@ _gdk_display_unpause_events (GdkDisplay *display)
|
||||
display->event_pause_count--;
|
||||
}
|
||||
|
||||
GdkSurface *
|
||||
gdk_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
return GDK_DISPLAY_GET_CLASS (display)->create_surface (display,
|
||||
surface_type,
|
||||
parent,
|
||||
x, y, width, height);
|
||||
}
|
||||
|
||||
/*< private >
|
||||
* gdk_display_get_keymap:
|
||||
* @display: the `GdkDisplay`
|
||||
@@ -1708,6 +1723,8 @@ gdk_display_init_egl (GdkDisplay *self,
|
||||
epoxy_has_egl_extension (priv->egl_display, "EGL_KHR_no_config_context");
|
||||
self->have_egl_pixel_format_float =
|
||||
epoxy_has_egl_extension (priv->egl_display, "EGL_EXT_pixel_format_float");
|
||||
self->have_egl_win32_libangle =
|
||||
epoxy_has_egl_extension (priv->egl_display, "EGL_ANGLE_d3d_share_handle_client_buffer");
|
||||
|
||||
if (self->have_egl_no_config_context)
|
||||
priv->egl_config_high_depth = gdk_display_create_egl_config (self,
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DISPLAY_H__
|
||||
#define __GDK_DISPLAY_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -139,3 +140,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDisplay, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DISPLAY_H__ */
|
||||
|
||||
@@ -369,7 +369,7 @@ gdk_display_manager_list_displays (GdkDisplayManager *manager)
|
||||
/**
|
||||
* gdk_display_manager_open_display:
|
||||
* @manager: a `GdkDisplayManager`
|
||||
* @name: (nullable): the name of the display to open
|
||||
* @name: the name of the display to open
|
||||
*
|
||||
* Opens a display.
|
||||
*
|
||||
@@ -410,19 +410,12 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
|
||||
{
|
||||
const char *backend = backends[i];
|
||||
gboolean any = g_str_equal (backend, "*");
|
||||
gboolean found = FALSE;
|
||||
|
||||
if (!allow_any && !any && !strstr (allowed_backends, backend))
|
||||
{
|
||||
GDK_DEBUG (MISC, "Skipping %s backend", backend);
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
|
||||
for (j = 0; gdk_backends[j].name != NULL; j++)
|
||||
{
|
||||
if (g_str_equal (backend, gdk_backends[j].name))
|
||||
found = TRUE;
|
||||
|
||||
if ((any && allow_any) ||
|
||||
(any && strstr (allowed_backends, gdk_backends[j].name)) ||
|
||||
g_str_equal (backend, gdk_backends[j].name))
|
||||
@@ -430,15 +423,9 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
|
||||
GDK_DEBUG (MISC, "Trying %s backend", gdk_backends[j].name);
|
||||
display = gdk_backends[j].open_display (name);
|
||||
if (display)
|
||||
{
|
||||
GDK_DEBUG (MISC, "Using %s display %s", gdk_backends[j].name, gdk_display_get_name (display));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found && !any && !display)
|
||||
g_warning ("No such backend: %s", backend);
|
||||
}
|
||||
|
||||
g_strfreev (backends);
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DISPLAY_MANAGER_H__
|
||||
#define __GDK_DISPLAY_MANAGER_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -60,3 +61,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDisplayManager, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DISPLAY_MANAGER_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DISPLAY_MANAGER_PRIVATE_H__
|
||||
#define __GDK_DISPLAY_MANAGER_PRIVATE_H__
|
||||
|
||||
#include "gdkdisplaymanager.h"
|
||||
|
||||
@@ -52,3 +53,4 @@ void _gdk_display_manager_remove_display (GdkDisplayManager
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DISPLAY_PRIVATE_H__
|
||||
#define __GDK_DISPLAY_PRIVATE_H__
|
||||
|
||||
#include "gdkdisplay.h"
|
||||
#include "gdksurface.h"
|
||||
@@ -108,14 +109,13 @@ struct _GdkDisplay
|
||||
guint have_egl_buffer_age : 1;
|
||||
guint have_egl_no_config_context : 1;
|
||||
guint have_egl_pixel_format_float : 1;
|
||||
guint have_egl_win32_libangle : 1;
|
||||
};
|
||||
|
||||
struct _GdkDisplayClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
GType toplevel_type; /* Type for GdkToplevel, must be set */
|
||||
GType popup_type; /* Type for GdkPopup, must be set */
|
||||
GType cairo_context_type; /* type for GdkCairoContext, must be set */
|
||||
GType vk_context_type; /* type for GdkVulkanContext, must be set if vk_extension_name != NULL */
|
||||
const char *vk_extension_name; /* Name of required windowing vulkan extension or %NULL (default) if Vulkan isn't supported */
|
||||
@@ -136,7 +136,15 @@ struct _GdkDisplayClass
|
||||
const char *startup_id);
|
||||
const char * (*get_startup_notification_id) (GdkDisplay *display);
|
||||
|
||||
GdkKeymap * (*get_keymap) (GdkDisplay *display);
|
||||
GdkSurface * (*create_surface) (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
GdkKeymap * (*get_keymap) (GdkDisplay *display);
|
||||
|
||||
GdkGLContext * (* init_gl) (GdkDisplay *display,
|
||||
GError **error);
|
||||
@@ -201,6 +209,13 @@ void _gdk_display_pointer_info_foreach (GdkDisplay *display
|
||||
gulong _gdk_display_get_next_serial (GdkDisplay *display);
|
||||
void _gdk_display_pause_events (GdkDisplay *display);
|
||||
void _gdk_display_unpause_events (GdkDisplay *display);
|
||||
GdkSurface * gdk_display_create_surface (GdkDisplay *display,
|
||||
GdkSurfaceType surface_type,
|
||||
GdkSurface *parent,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
GdkGLContext * gdk_display_get_gl_context (GdkDisplay *display);
|
||||
|
||||
@@ -255,3 +270,4 @@ void gdk_display_set_cursor_theme (GdkDisplay *display,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DISPLAY_PRIVATE_H__ */
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DND_H__
|
||||
#define __GDK_DND_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -102,3 +103,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDrag, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DND_H__ */
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DND_PRIVATE_H__
|
||||
#define __GDK_DND_PRIVATE_H__
|
||||
|
||||
#include "gdkdrag.h"
|
||||
|
||||
@@ -82,3 +83,4 @@ gboolean gdk_drag_write_finish (GdkDrag *drag,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -69,21 +69,19 @@ gdk_drag_surface_default_init (GdkDragSurfaceInterface *iface)
|
||||
/**
|
||||
* GdkDragSurface::compute-size:
|
||||
* @surface: a `GdkDragSurface`
|
||||
* @size: (type Gdk.DragSurfaceSize): the size of the drag surface
|
||||
* @size: (type Gdk.DragSurfaceSize) (out caller-allocates): a
|
||||
* `GdkDragSurfaceSize`
|
||||
*
|
||||
* Emitted when the size for the surface needs to be computed, when it is
|
||||
* present.
|
||||
*
|
||||
* This signal will normally be emitted during the native surface layout
|
||||
* cycle when the surface size needs to be recomputed.
|
||||
* It will normally be emitted during the native surface layout cycle when the
|
||||
* surface size needs to be recomputed.
|
||||
*
|
||||
* It is the responsibility of the drag surface user to handle this signal
|
||||
* and compute the desired size of the surface, storing the computed size
|
||||
* in the [struct@Gdk.DragSurfaceSize] object that is passed to the signal
|
||||
* handler, using [method@Gdk.DragSurfaceSize.set_size].
|
||||
*
|
||||
* Failing to set a size so will result in an arbitrary size being used as
|
||||
* a result.
|
||||
* It is the responsibility of the drag surface user to handle this signal and
|
||||
* compute the desired size of the surface, storing the computed size in the
|
||||
* [struct@Gdk.DragSurfaceSize] object. Failing to do so will result in an
|
||||
* arbitrary size being used as a result.
|
||||
*
|
||||
* Since: 4.12
|
||||
*/
|
||||
@@ -110,8 +108,8 @@ gdk_drag_surface_default_init (GdkDragSurfaceInterface *iface)
|
||||
*/
|
||||
gboolean
|
||||
gdk_drag_surface_present (GdkDragSurface *drag_surface,
|
||||
int width,
|
||||
int height)
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DRAG_SURFACE (drag_surface), FALSE);
|
||||
g_return_val_if_fail (width > 0, FALSE);
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* Authors: Matthias Clasen <mclasen@redhat.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DRAG_SURFACE_H__
|
||||
#define __GDK_DRAG_SURFACE_H__
|
||||
|
||||
#if !defined(__GDK_H_INSIDE__) && !defined(GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -39,3 +40,4 @@ gboolean gdk_drag_surface_present (GdkDragSurface *drag_surface,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DRAG_SURFACE_H__ */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef __GDK_DRAG_SURFACE_PRIVATE_H__
|
||||
#define __GDK_DRAG_SURFACE_PRIVATE_H__
|
||||
|
||||
#include "gdkdragsurface.h"
|
||||
#include "gdkdragsurfacesize.h"
|
||||
@@ -20,3 +21,4 @@ void gdk_drag_surface_notify_compute_size (GdkDragSurface *surface,
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DRAG_SURFACE_PRIVATE_H__ */
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DRAW_CONTEXT__
|
||||
#define __GDK_DRAW_CONTEXT__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -55,3 +56,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDrawContext, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DRAW_CONTEXT__ */
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DRAW_CONTEXT_PRIVATE__
|
||||
#define __GDK_DRAW_CONTEXT_PRIVATE__
|
||||
|
||||
#include "gdkdrawcontext.h"
|
||||
|
||||
@@ -54,3 +55,4 @@ void gdk_draw_context_begin_frame_full (GdkDrawContext
|
||||
const cairo_region_t *region);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK__DRAW_CONTEXT_PRIVATE__ */
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DROP_H__
|
||||
#define __GDK_DROP_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -86,3 +87,4 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDrop, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DROP_H__ */
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
* Authors: Benjamin Otte <otte@gnome.org>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_DROP_PRIVATE_H__
|
||||
#define __GDK_DROP_PRIVATE_H__
|
||||
|
||||
#include "gdkdrop.h"
|
||||
|
||||
@@ -80,3 +81,4 @@ void gdk_drop_emit_drop_event (GdkDrop
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef __GDK_ENUMS_H__
|
||||
#define __GDK_ENUMS_H__
|
||||
|
||||
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gdk/gdk.h> can be included directly."
|
||||
@@ -32,20 +33,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GdkGLAPI:
|
||||
* @GDK_GL_API_GL: The OpenGL API
|
||||
* @GDK_GL_API_GLES: The OpenGL ES API
|
||||
*
|
||||
* The list of the different APIs that GdkGLContext can potentially support.
|
||||
*
|
||||
* Since: 4.6
|
||||
*/
|
||||
typedef enum { /*< underscore_name=GDK_GL_API >*/
|
||||
GDK_GL_API_GL = 1 << 0,
|
||||
GDK_GL_API_GLES = 1 << 1
|
||||
} GdkGLAPI;
|
||||
|
||||
/* Currently, these are the same values numerically as in the
|
||||
* X protocol. If you change that, gdksurface-x11.c/gdk_surface_set_geometry_hints()
|
||||
* will need fixing.
|
||||
@@ -346,3 +333,4 @@ typedef enum {
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_ENUMS_H__ */
|
||||
|
||||
@@ -1371,8 +1371,6 @@ gdk_event_get_modifier_state (GdkEvent *event)
|
||||
* @y: (out): location to put event surface y coordinate
|
||||
*
|
||||
* Extract the event surface relative x/y coordinates from an event.
|
||||
*
|
||||
* This position is in [surface coordinates](coordinates.html).
|
||||
*/
|
||||
gboolean
|
||||
gdk_event_get_position (GdkEvent *event,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user