Replaced manual type macros with G_DECLARE_DERIVABLE_TYPE in GtkXText, CustomList, SexySpellEntry, and RemoteObject declarations while aligning parent instance naming.

Switched GtkXText and CustomList implementations to G_DEFINE_TYPE/G_DEFINE_TYPE_WITH_CODE and preserved parent chaining behavior
Added GTK3/GTK2 conditional type declarations for GtkXText while restoring the legacy macro block for GTK2 builds.
Restored GTK2-friendly typedefs/macros and parent field naming for CustomList alongside GTK3 G_DECLARE_DERIVABLE_TYPE usage.
Restored GTK2-friendly typedefs/macros and parent field naming for SexySpellEntry while keeping GTK3 declarations intact.
Restored legacy RemoteObject typedefs and GType macros in the D-Bus plugin to keep GTK2 builds from seeing incomplete types or missing fields/macros.
This commit is contained in:
2026-01-31 10:45:22 -07:00
parent e1b4e18153
commit 9e46407e89
6 changed files with 58 additions and 127 deletions

View File

@@ -18,11 +18,17 @@
#ifndef _SEXY_SPELL_ENTRY_H_
#define _SEXY_SPELL_ENTRY_H_
#include <gtk/gtk.h>
G_BEGIN_DECLS
#if HAVE_GTK3
G_DECLARE_DERIVABLE_TYPE (SexySpellEntry, sexy_spell_entry, SEXY, SPELL_ENTRY, GtkEntry)
#else
typedef struct _SexySpellEntry SexySpellEntry;
typedef struct _SexySpellEntryClass SexySpellEntryClass;
typedef struct _SexySpellEntryPriv SexySpellEntryPriv;
#include <gtk/gtk.h>
GType sexy_spell_entry_get_type(void);
#define SEXY_TYPE_SPELL_ENTRY (sexy_spell_entry_get_type())
#define SEXY_SPELL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SEXY_TYPE_SPELL_ENTRY, SexySpellEntry))
@@ -30,6 +36,9 @@ typedef struct _SexySpellEntryPriv SexySpellEntryPriv;
#define SEXY_IS_SPELL_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SEXY_TYPE_SPELL_ENTRY))
#define SEXY_IS_SPELL_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SEXY_TYPE_SPELL_ENTRY))
#define SEXY_SPELL_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SEXY_TYPE_SPELL_ENTRY, SexySpellEntryClass))
#endif
typedef struct _SexySpellEntryPriv SexySpellEntryPriv;
#define SEXY_SPELL_ERROR (sexy_spell_error_quark())
@@ -39,7 +48,11 @@ typedef enum {
struct _SexySpellEntry
{
#if HAVE_GTK3
GtkEntry parent_instance;
#else
GtkEntry parent_object;
#endif
SexySpellEntryPriv *priv;
@@ -62,9 +75,6 @@ struct _SexySpellEntryClass
void (*gtk_reserved4)(void);
};
G_BEGIN_DECLS
GType sexy_spell_entry_get_type(void);
GtkWidget *sexy_spell_entry_new(void);
GQuark sexy_spell_error_quark(void);