Commit c8204a90 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

surface: Add a private struct

Adding a random member to it resulted in a lot of header surgery as a
side effect.
parent 032eb150
......@@ -32,10 +32,6 @@ PangoDirection gdk_unichar_direction (gunichar ch) G_GNUC_CONST;
PangoDirection gdk_find_base_dir (const char *text,
int len);
void gdk_surface_set_widget (GdkSurface *surface,
gpointer widget);
gpointer gdk_surface_get_widget (GdkSurface *surface);
typedef struct
{
const char *key;
......
......@@ -46,8 +46,6 @@
#include <math.h>
#include <epoxy/gl.h>
/**
* GdkSurface:
*
......@@ -62,6 +60,13 @@
* types exist, but you will rarely interact with them directly.
*/
typedef struct _GdkSurfacePrivate GdkSurfacePrivate;
struct _GdkSurfacePrivate
{
gpointer widget;
};
enum {
LAYOUT,
RENDER,
......@@ -109,7 +114,7 @@ static void gdk_surface_queue_set_is_mapped (GdkSurface *surface,
static guint signals[LAST_SIGNAL] = { 0 };
static GParamSpec *properties[LAST_PROP] = { NULL, };
G_DEFINE_ABSTRACT_TYPE (GdkSurface, gdk_surface, G_TYPE_OBJECT)
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GdkSurface, gdk_surface, G_TYPE_OBJECT)
static gboolean
gdk_surface_real_beep (GdkSurface *surface)
......@@ -994,16 +999,20 @@ gdk_surface_destroy (GdkSurface *surface)
}
void
gdk_surface_set_widget (GdkSurface *surface,
gdk_surface_set_widget (GdkSurface *self,
gpointer widget)
{
surface->widget = widget;
GdkSurfacePrivate *priv = gdk_surface_get_instance_private (self);
priv->widget = widget;
}
gpointer
gdk_surface_get_widget (GdkSurface *surface)
gdk_surface_get_widget (GdkSurface *self)
{
return surface->widget;
GdkSurfacePrivate *priv = gdk_surface_get_instance_private (self);
return priv->widget;
}
/**
......
......@@ -48,8 +48,6 @@ struct _GdkSurface
gboolean pending_is_mapped;
gboolean is_mapped;
gpointer widget;
int x;
int y;
......@@ -294,8 +292,12 @@ void gdk_surface_get_geometry (GdkSurface *surface,
int *width,
int *height);
void gdk_surface_freeze_updates (GdkSurface *surface);
void gdk_surface_thaw_updates (GdkSurface *surface);
void gdk_surface_set_widget (GdkSurface *self,
gpointer widget);
gpointer gdk_surface_get_widget (GdkSurface *self);
void gdk_surface_freeze_updates (GdkSurface *surface);
void gdk_surface_thaw_updates (GdkSurface *surface);
typedef enum
......
......@@ -19,7 +19,6 @@
#include "gtkdragicon.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkwidgetprivate.h"
#include "gtkcssstyleprivate.h"
......@@ -29,6 +28,8 @@
#include "gtkcssboxesimplprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gdk/gdksurfaceprivate.h"
/* for the drag icons */
#include "gtkcolorswatchprivate.h"
#include "gtkimage.h"
......
......@@ -21,11 +21,11 @@
#include "gtknativeprivate.h"
#include "gtkwidgetprivate.h"
#include "gdk/gdk-private.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkcssnodeprivate.h"
#include "gdk/gdksurfaceprivate.h"
typedef struct _GtkNativePrivate
{
gulong update_handler_id;
......
......@@ -17,21 +17,22 @@
#include "config.h"
#include "gtkbinlayout.h"
#include "gtkgizmoprivate.h"
#include "gtkprivatetypebuiltins.h"
#include "gtktexthandleprivate.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkwindowprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkrendericonprivate.h"
#include "gtkbinlayout.h"
#include "gtkcssboxesimplprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtknativeprivate.h"
#include "gtkgesturedrag.h"
#include "gtkgizmoprivate.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtknativeprivate.h"
#include "gtkprivatetypebuiltins.h"
#include "gtkrendericonprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkwindowprivate.h"
#include <gtk/gtk.h>
#include "gdk/gdksurfaceprivate.h"
enum {
DRAG_STARTED,
......
......@@ -26,13 +26,11 @@
#include "gtktooltipwindowprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkbox.h"
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkprivate.h"
#include "gtksettings.h"
#include "gtksizerequest.h"
#include "gtkwindowprivate.h"
......@@ -40,6 +38,8 @@
#include "gtknativeprivate.h"
#include "gtkcssboxesimplprivate.h"
#include "gdk/gdksurfaceprivate.h"
struct _GtkTooltipWindow
{
GtkWidget parent_instance;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment