mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-13 01:00:19 +00:00
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:
@@ -27,6 +27,12 @@
|
||||
#include <cairo.h>
|
||||
#include "xtext-color.h"
|
||||
|
||||
#if HAVE_GTK3
|
||||
G_DECLARE_DERIVABLE_TYPE (GtkXText, gtk_xtext, GTK, XTEXT, GtkWidget)
|
||||
#else
|
||||
typedef struct _GtkXText GtkXText;
|
||||
typedef struct _GtkXTextClass GtkXTextClass;
|
||||
|
||||
#define GTK_TYPE_XTEXT (gtk_xtext_get_type ())
|
||||
#define GTK_XTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_XTEXT, GtkXText))
|
||||
#define GTK_XTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_XTEXT, GtkXTextClass))
|
||||
@@ -34,6 +40,9 @@
|
||||
#define GTK_IS_XTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_XTEXT))
|
||||
#define GTK_XTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_XTEXT, GtkXTextClass))
|
||||
|
||||
GType gtk_xtext_get_type (void);
|
||||
#endif
|
||||
|
||||
#define ATTR_BOLD '\002'
|
||||
#define ATTR_COLOR '\003'
|
||||
#define ATTR_BLINK '\006'
|
||||
@@ -55,9 +64,6 @@
|
||||
#define XTEXT_BG 35
|
||||
#define XTEXT_MARKER 36 /* for marker line */
|
||||
#define XTEXT_MAX_COLOR 41
|
||||
|
||||
typedef struct _GtkXText GtkXText;
|
||||
typedef struct _GtkXTextClass GtkXTextClass;
|
||||
typedef struct textentry textentry;
|
||||
|
||||
/*
|
||||
@@ -300,6 +306,5 @@ xtext_buffer *gtk_xtext_buffer_new (GtkXText *xtext);
|
||||
void gtk_xtext_buffer_free (xtext_buffer *buf);
|
||||
void gtk_xtext_buffer_show (GtkXText *xtext, xtext_buffer *buf, int render);
|
||||
void gtk_xtext_copy_selection (GtkXText *xtext);
|
||||
GType gtk_xtext_get_type (void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user