mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
testsuite: Use #pragma once consistently
This commit is contained in:
parent
9f068866e2
commit
cfa9dc6162
120
testsuite/gsk/gtkrendernodeattach.h
Normal file
120
testsuite/gsk/gtkrendernodeattach.h
Normal file
@ -0,0 +1,120 @@
|
||||
#pragma once
|
||||
|
||||
#include "gskrendernode.h"
|
||||
#include "gskoffloadprivate.h"
|
||||
#include <cairo.h>
|
||||
|
||||
#include "gdk/gdkmemoryformatprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GskRenderNodeClass GskRenderNodeClass;
|
||||
|
||||
/* Keep this in sync with the GskRenderNodeType enumeration.
|
||||
*
|
||||
* We don't add an "n-types" value to avoid having to handle
|
||||
* it in every single switch.
|
||||
*/
|
||||
#define GSK_RENDER_NODE_TYPE_N_TYPES (GSK_SUBSURFACE_NODE + 1)
|
||||
|
||||
extern GType gsk_render_node_types[];
|
||||
|
||||
#define GSK_IS_RENDER_NODE_TYPE(node,type) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((node), GSK_TYPE_RENDER_NODE, GskRenderNodeClass)->node_type == (type))
|
||||
|
||||
#define GSK_RENDER_NODE_TYPE(node) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((node), GSK_TYPE_RENDER_NODE, GskRenderNodeClass)->node_type)
|
||||
|
||||
struct _GskRenderNode
|
||||
{
|
||||
GTypeInstance parent_instance;
|
||||
|
||||
gatomicrefcount ref_count;
|
||||
|
||||
graphene_rect_t bounds;
|
||||
|
||||
guint preferred_depth : 2;
|
||||
guint offscreen_for_opacity : 1;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cairo_region_t *region;
|
||||
GskOffload *offload;
|
||||
} GskDiffData;
|
||||
|
||||
struct _GskRenderNodeClass
|
||||
{
|
||||
GTypeClass parent_class;
|
||||
|
||||
GskRenderNodeType node_type;
|
||||
|
||||
void (* finalize) (GskRenderNode *node);
|
||||
void (* draw) (GskRenderNode *node,
|
||||
cairo_t *cr);
|
||||
gboolean (* can_diff) (const GskRenderNode *node1,
|
||||
const GskRenderNode *node2);
|
||||
void (* diff) (GskRenderNode *node1,
|
||||
GskRenderNode *node2,
|
||||
GskDiffData *data);
|
||||
};
|
||||
|
||||
void gsk_render_node_init_types (void);
|
||||
|
||||
GType gsk_render_node_type_register_static (const char *node_name,
|
||||
gsize instance_size,
|
||||
GClassInitFunc class_init);
|
||||
|
||||
gpointer gsk_render_node_alloc (GskRenderNodeType node_type);
|
||||
|
||||
void _gsk_render_node_unref (GskRenderNode *node);
|
||||
|
||||
gboolean gsk_render_node_can_diff (const GskRenderNode *node1,
|
||||
const GskRenderNode *node2) G_GNUC_PURE;
|
||||
void gsk_render_node_diff (GskRenderNode *node1,
|
||||
GskRenderNode *node2,
|
||||
cairo_region_t *region,
|
||||
GskOffload *offload);
|
||||
void gsk_render_node_data_diff (GskRenderNode *node1,
|
||||
GskRenderNode *node2,
|
||||
GskDiffData *data);
|
||||
void gsk_render_node_diff_impossible (GskRenderNode *node1,
|
||||
GskRenderNode *node2,
|
||||
GskDiffData *data);
|
||||
void gsk_container_node_diff_with (GskRenderNode *container,
|
||||
GskRenderNode *other,
|
||||
GskDiffData *data);
|
||||
|
||||
bool gsk_border_node_get_uniform (const GskRenderNode *self);
|
||||
bool gsk_border_node_get_uniform_color (const GskRenderNode *self);
|
||||
|
||||
void gsk_text_node_serialize_glyphs (GskRenderNode *self,
|
||||
GString *str);
|
||||
|
||||
GskRenderNode ** gsk_container_node_get_children (const GskRenderNode *node,
|
||||
guint *n_children);
|
||||
|
||||
void gsk_transform_node_get_translate (const GskRenderNode *node,
|
||||
float *dx,
|
||||
float *dy);
|
||||
GdkMemoryDepth gsk_render_node_get_preferred_depth (const GskRenderNode *node);
|
||||
|
||||
gboolean gsk_container_node_is_disjoint (const GskRenderNode *node);
|
||||
|
||||
gboolean gsk_render_node_use_offscreen_for_opacity (const GskRenderNode *node);
|
||||
|
||||
GskRenderNode * gsk_render_node_attach (const GskRenderNode *node,
|
||||
GdkSurface *surface);
|
||||
|
||||
#define gsk_render_node_ref(node) _gsk_render_node_ref(node)
|
||||
#define gsk_render_node_unref(node) _gsk_render_node_unref(node)
|
||||
|
||||
static inline GskRenderNode *
|
||||
_gsk_render_node_ref (GskRenderNode *node)
|
||||
{
|
||||
g_atomic_ref_count_inc (&node->ref_count);
|
||||
return node;
|
||||
}
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -15,8 +15,7 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_TREE_MODEL_REF_COUNT_H__
|
||||
#define __GTK_TREE_MODEL_REF_COUNT_H__
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@ -127,6 +126,3 @@ assert_node_ref_count (GtkTreeModelRefCount *ref_model,
|
||||
{
|
||||
gtk_tree_model_ref_count_check_node (ref_model, iter, ref_count, TRUE);
|
||||
}
|
||||
|
||||
|
||||
#endif /* __GTK_TREE_MODEL_REF_COUNT_H__ */
|
||||
|
@ -15,8 +15,7 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_REFTEST_H__
|
||||
#define __GTK_REFTEST_H__
|
||||
#pragma once
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -27,5 +26,3 @@ G_MODULE_EXPORT
|
||||
extern void reftest_uninhibit_snapshot (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_REFTEST_H__ */
|
||||
|
@ -15,8 +15,7 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __REFTEST_COMPARE_H__
|
||||
#define __REFTEST_COMPARE_H__
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@ -27,5 +26,3 @@ GdkTexture * reftest_compare_textures (GdkTexture
|
||||
GdkTexture *texture2);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __REFTEST_COMPARE_H__ */
|
||||
|
@ -15,8 +15,7 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __REFTEST_MODULE_H__
|
||||
#define __REFTEST_MODULE_H__
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@ -40,5 +39,3 @@ GCallback reftest_module_lookup (ReftestModule *module,
|
||||
const char *function_name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __REFTEST_MODULE_H__ */
|
||||
|
@ -15,8 +15,7 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __REFTEST_SNAPSHOT_H__
|
||||
#define __REFTEST_SNAPSHOT_H__
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@ -26,5 +25,3 @@ G_MODULE_EXPORT
|
||||
GdkTexture * reftest_snapshot_ui_file (const char *ui_file);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __REFTEST_SNAPSHOT_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user