[gtkmm/gdk-move-enums: 2/2] Gdk: move enums from Surface to Toplevel
- From: Andreas Persson <andreasp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gdk-move-enums: 2/2] Gdk: move enums from Surface to Toplevel
- Date: Fri, 11 Sep 2020 16:57:50 +0000 (UTC)
commit 4e5465c3bdec5d3b5e15096f965066a91ebe083a
Author: Andreas Persson <andreasp56 outlook com>
Date: Fri Sep 11 18:55:33 2020 +0200
Gdk: move enums from Surface to Toplevel
Make the same changes as in latest Gtk.
gdk/src/gdk_docs_override.xml | 4 ++--
gdk/src/surface.ccg | 1 -
gdk/src/surface.hg | 8 --------
gdk/src/toplevel.ccg | 2 ++
gdk/src/toplevel.hg | 12 ++++++++++--
tools/m4/convert_gdk.m4 | 2 +-
6 files changed, 15 insertions(+), 14 deletions(-)
---
diff --git a/gdk/src/gdk_docs_override.xml b/gdk/src/gdk_docs_override.xml
index 1f29865b..5ea596c2 100644
--- a/gdk/src/gdk_docs_override.xml
+++ b/gdk/src/gdk_docs_override.xml
@@ -12,9 +12,9 @@
<substitute_type_name from="GdkPixbufRotation" to="Gdk::Pixbuf::Rotation" />
<substitute_type_name from="GdkSeatCapabilities" to="Gdk::Seat::Capabilities" />
<substitute_type_name from="GdkSurfaceType" to="Gdk::Surface::Type" />
-<substitute_type_name from="GdkSurfaceState" to="Gdk::Surface::State" />
<substitute_type_name from="GdkSurfaceHints" to="Gdk::Surface::Hints" />
<substitute_type_name from="GdkSurfaceTypeHint" to="Gdk::Surface::TypeHint" />
+<substitute_type_name from="GdkToplevelState" to="Gdk::Toplevel::State" />
<substitute_type_name from="GdkVisualType" to="Gdk::Visual::Type" />
<substitute_enumerator_name from_prefix="CAIRO_FORMAT_" to_prefix="Cairo::Surface::Format::" />
@@ -24,9 +24,9 @@
<substitute_enumerator_name from_prefix="GDK_DEVICE_TOOL_TYPE_" to_prefix="Gdk::DeviceTool::Type::" />
<substitute_enumerator_name from_prefix="GDK_ACTION_" to_prefix="Gdk::DragAction::" />
<substitute_enumerator_name from_prefix="GDK_SURFACE_" to_prefix="Gdk::Surface::Type::" />
-<substitute_enumerator_name from_prefix="GDK_SURFACE_STATE_" to_prefix="Gdk::Surface::State::" />
<substitute_enumerator_name from_prefix="GDK_SURFACE_TYPE_HINT_" to_prefix="Gdk::Surface::TypeHint::" />
<substitute_enumerator_name from_prefix="GDK_SURFACE_EDGE_" to_prefix="Gdk::SurfaceEdge::" />
+<substitute_enumerator_name from_prefix="GDK_TOPLEVEL_STATE_" to_prefix="Gdk::Toplevel::State::" />
<substitute_enumerator_name from_prefix="GDK_PIXBUF_ALPHA_" to_prefix="Gdk::PixbufAlphaMode::" />
<substitute_enumerator_name from_prefix="G_IO_ERROR_" to_prefix="Gio::Error::" />
<substitute_enumerator_name from_prefix="GDK_INTERP_" to_prefix="Gdk::InterpType::" />
diff --git a/gdk/src/surface.ccg b/gdk/src/surface.ccg
index f40a1b28..30e1ea29 100644
--- a/gdk/src/surface.ccg
+++ b/gdk/src/surface.ccg
@@ -29,7 +29,6 @@
#include <gdkmm/popupsurfaceimpl.h>
#include <gdkmm/toplevelsurfaceimpl.h>
-using State = Gdk::Surface::State;
using CairoRegion = cairo_region_t;
namespace Gdk
diff --git a/gdk/src/surface.hg b/gdk/src/surface.hg
index abb9a3c9..326c678e 100644
--- a/gdk/src/surface.hg
+++ b/gdk/src/surface.hg
@@ -34,12 +34,6 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gdk
{
-_WRAP_ENUM(SurfaceEdge, GdkSurfaceEdge, decl_prefix GDKMM_API)
-_WRAP_ENUM(FullscreenMode, GdkFullscreenMode,
- s#^CURRENT_MONITOR$#ON_CURRENT_MONITOR#,
- s#^ALL_MONITORS$#ON_ALL_MONITORS#,
- decl_prefix GDKMM_API)
-
class GDKMM_API ContentProvider;
class GDKMM_API Cursor;
class GDKMM_API CairoContext;
@@ -61,8 +55,6 @@ class GDKMM_API Surface : public Glib::Object
_IGNORE(gdk_surface_destroy, gdk_surface_is_destroyed)
public:
- _WRAP_ENUM(State, GdkSurfaceState, decl_prefix GDKMM_API)
-
// _WRAP_CREATE() would not be very useful here.
// The gdk_surface_new_*() functions do more than call g_object_new().
diff --git a/gdk/src/toplevel.ccg b/gdk/src/toplevel.ccg
index 70676caf..387981ef 100644
--- a/gdk/src/toplevel.ccg
+++ b/gdk/src/toplevel.ccg
@@ -16,6 +16,8 @@
#include <gdk/gdk.h>
+using State = Gdk::Toplevel::State;
+
namespace
{
// Hand-coded because the slot can't be called with a non-const temporary ToplevelSize.
diff --git a/gdk/src/toplevel.hg b/gdk/src/toplevel.hg
index 8098a9ad..8ba5aa1a 100644
--- a/gdk/src/toplevel.hg
+++ b/gdk/src/toplevel.hg
@@ -35,6 +35,12 @@ typedef struct _GdkToplevelInterface GdkToplevelInterface;
namespace Gdk
{
+_WRAP_ENUM(SurfaceEdge, GdkSurfaceEdge, decl_prefix GDKMM_API)
+_WRAP_ENUM(FullscreenMode, GdkFullscreenMode,
+ s#^CURRENT_MONITOR$#ON_CURRENT_MONITOR#,
+ s#^ALL_MONITORS$#ON_ALL_MONITORS#,
+ decl_prefix GDKMM_API)
+
/** Interface for toplevel surfaces.
*
* A %Gdk::Toplevel is a freestanding toplevel surface.
@@ -46,12 +52,14 @@ class GDKMM_API Toplevel : public Glib::Interface
_CLASS_INTERFACE(Toplevel, GdkToplevel, GDK_TOPLEVEL, GdkToplevelInterface, , , GDKMM_API)
public:
+ _WRAP_ENUM(State, GdkToplevelState, decl_prefix GDKMM_API)
+
_WRAP_METHOD(bool present(const Glib::RefPtr<ToplevelLayout>& layout),
gdk_toplevel_present)
_WRAP_METHOD(bool minimize(), gdk_toplevel_minimize)
_WRAP_METHOD(bool lower(), gdk_toplevel_lower)
_WRAP_METHOD(void focus(guint32 timestamp), gdk_toplevel_focus)
- _WRAP_METHOD(Surface::State get_state() const, gdk_toplevel_get_state)
+ _WRAP_METHOD(State get_state() const, gdk_toplevel_get_state)
_WRAP_METHOD(void set_title(const Glib::ustring& title), gdk_toplevel_set_title)
_WRAP_METHOD(void set_startup_id(const Glib::ustring& startup_id), gdk_toplevel_set_startup_id)
_WRAP_METHOD(void set_transient_for(const Glib::RefPtr<Surface>& parent),
@@ -80,7 +88,7 @@ public:
_WRAP_SIGNAL(void compute_size(ToplevelSize& size), "compute-size",
no_default_handler, custom_c_callback)
- _WRAP_PROPERTY("state", Surface::State)
+ _WRAP_PROPERTY("state", State)
_WRAP_PROPERTY("title", Glib::ustring)
_WRAP_PROPERTY("startup-id", Glib::ustring)
_WRAP_PROPERTY("transient-for", Glib::RefPtr<Surface>)
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 538cf659..b5fa7d21 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -62,7 +62,7 @@ _CONV_ENUM(Gdk,SettingAction)
_CONV_ENUM(Gdk,Status)
_CONV_ENUM(Gdk,SubpixelLayout)
_CONV_ENUM(Gdk,SurfaceEdge)
-_CONV_INCLASS_ENUM(Gdk,Surface,State)
+_CONV_INCLASS_ENUM(Gdk,Toplevel,State)
_CONV_ENUM(Gdk,TouchpadGesturePhase)
_CONV_INCLASS_ENUM(Gdk,Pixbuf,AlphaMode)
_CONV_INCLASS_ENUM(Gdk,Pixbuf,Rotation)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]