Files
gtk/gdk/gdkcairocontextprivate.h
Benjamin Otte 0a551b9b2a gdk: Add GDK_DECLARE_EXPORTED_TYPE()
This is like G_DECLARE_FINAL_TYPE(), except it doesn't make the class
struct public, so internally all the subclassing in the world can
happen.

Some subtle differences:
- It marks the get_type() function as G_GNUC_CONST
- It doesn't require the parent type
- It uses G_DEFINE_AUTOPTR_CLEANUP_FUNC() instead of the private glib
  chainup method.

Port a bunch of GDK and the whole event controller + gesture machinery
to provew that it works.

As a side effect, we gained a bunch of missing autocleanups.
2019-12-15 21:10:27 +01:00

47 lines
1.2 KiB
C

/* GDK - The GIMP Drawing Kit
*
* gdkcairocontextprivate.h: specific Cairo wrappers
*
* Copyright © 2018 Benjamin Otte
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_CAIRO_CONTEXT_PRIVATE__
#define __GDK_CAIRO_CONTEXT_PRIVATE__
#include "gdkcairocontext.h"
#include "gdkdrawcontextprivate.h"
#include <cairo.h>
G_BEGIN_DECLS
struct _GdkCairoContext
{
GdkDrawContext parent_instance;
};
struct _GdkCairoContextClass
{
GdkDrawContextClass parent_class;
cairo_t * (* cairo_create) (GdkCairoContext *self);
};
G_END_DECLS
#endif /* __GDK__CAIRO_CONTEXT_PRIVATE__ */