mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-09-24 00:04:33 -04:00
Removed
* src/glade-types.h, src/glade-plugin.h: Removed * src/Makefile.am src/glade-app.h src/glade-builtins.h src/glade-catalog.h src/glade-clipboard.h src/glade-command.c src/glade-command.h src/glade-cursor.h src/glade-editor.c src/glade-editor.h src/glade-gtk.c src/glade-palette.h src/glade-parameter.h src/glade-parser.h src/glade-placeholder.c src/glade-placeholder.h src/glade-project-view.h src/glade-project-window.h src/glade-project.c src/glade-project.h src/glade-property-class.c src/glade-property-class.h src/glade-property.c src/glade-property.h src/glade-signal-editor.c src/glade-signal-editor.h src/glade-signal.h src/glade-utils.h src/glade-widget-class.c src/glade-widget-class.h src/glade-widget.c src/glade-widget.h src/glade-xml-utils.h src/glade.h: Now "glade.h" is the libgladeui API include for both the plugin and the application side (Fixed sources in consequence to a few broken types).
This commit is contained in:
parent
81ed86529d
commit
eacde773b8
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
2005-07-31 Tristan Van Berkom <tvb@gnome.org>
|
||||
|
||||
* src/glade-types.h, src/glade-plugin.h: Removed
|
||||
|
||||
* src/Makefile.am src/glade-app.h src/glade-builtins.h
|
||||
src/glade-catalog.h src/glade-clipboard.h src/glade-command.c
|
||||
src/glade-command.h src/glade-cursor.h src/glade-editor.c
|
||||
src/glade-editor.h src/glade-gtk.c src/glade-palette.h
|
||||
src/glade-parameter.h src/glade-parser.h
|
||||
src/glade-placeholder.c src/glade-placeholder.h
|
||||
src/glade-project-view.h src/glade-project-window.h
|
||||
src/glade-project.c src/glade-project.h
|
||||
src/glade-property-class.c src/glade-property-class.h
|
||||
src/glade-property.c src/glade-property.h
|
||||
src/glade-signal-editor.c src/glade-signal-editor.h
|
||||
src/glade-signal.h src/glade-utils.h src/glade-widget-class.c
|
||||
src/glade-widget-class.h src/glade-widget.c src/glade-widget.h
|
||||
src/glade-xml-utils.h src/glade.h:
|
||||
Now "glade.h" is the libgladeui API include for both the plugin and
|
||||
the application side (Fixed sources in consequence to a few broken types).
|
||||
|
||||
|
||||
2005-07-31 Tristan Van Berkom <tvb@gnome.org>
|
||||
|
||||
* src/glade-editor.c: Cleared up property->class references, Added comments,
|
||||
|
@ -77,7 +77,6 @@ libgladeuiinclude_HEADERS = \
|
||||
glade-signal-editor.h \
|
||||
glade-palette.h \
|
||||
glade-cursor.h \
|
||||
glade-types.h \
|
||||
glade-widget.h \
|
||||
glade-widget-class.h \
|
||||
glade-property.h \
|
||||
@ -96,7 +95,6 @@ libgladeuiinclude_HEADERS = \
|
||||
glade-marshallers.h \
|
||||
glade-parser.h \
|
||||
glade-app.h \
|
||||
glade-plugin.h \
|
||||
glade-builtins.c \
|
||||
fixed_bg.xpm
|
||||
|
||||
|
@ -22,6 +22,11 @@
|
||||
#ifndef __GLADE_APP_H__
|
||||
#define __GLADE_APP_H__
|
||||
|
||||
#include "glade-editor.h"
|
||||
#include "glade-palette.h"
|
||||
#include "glade-clipboard.h"
|
||||
#include "glade-project-view.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLADE_CONFIG_FILENAME "glade-3.conf"
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include <glib-object.h>
|
||||
#include "glade.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLADE_TYPE_STOCK (glade_standard_stock_get_type())
|
||||
|
||||
LIBGLADEUI_API GType glade_standard_stock_get_type (void);
|
||||
@ -15,4 +17,6 @@ LIBGLADEUI_API GParamSpec *glade_standard_int_spec (void);
|
||||
LIBGLADEUI_API GParamSpec *glade_standard_string_spec (void);
|
||||
LIBGLADEUI_API GParamSpec *glade_standard_float_spec (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GLADE_BUILTINS_H__ */
|
||||
|
@ -28,6 +28,10 @@ G_BEGIN_DECLS
|
||||
|
||||
#define GLADE_WIDGET_GROUP(x) ((GladeWidgetGroup *) x)
|
||||
|
||||
typedef struct _GladeCatalog GladeCatalog;
|
||||
typedef struct _GladeWidgetGroup GladeWidgetGroup;
|
||||
|
||||
|
||||
GList * glade_catalog_load_all (void);
|
||||
|
||||
const gchar * glade_catalog_get_name (GladeCatalog *catalog);
|
||||
|
@ -8,6 +8,7 @@ G_BEGIN_DECLS
|
||||
#define GLADE_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_CLIPBOARD, GladeClipboard))
|
||||
#define GLADE_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_CLIPBOARD))
|
||||
|
||||
typedef struct _GladeClipboard GladeClipboard;
|
||||
typedef struct _GladeClipboardClass GladeClipboardClass;
|
||||
|
||||
struct _GladeClipboard {
|
||||
|
@ -390,7 +390,7 @@ glade_command_set_property (GladeProperty *property, const GValue* pvalue)
|
||||
me = (GladeCommandSetProperty*) g_object_new (GLADE_COMMAND_SET_PROPERTY_TYPE, NULL);
|
||||
cmd = (GladeCommand*) me;
|
||||
|
||||
gwidget = property->widget;
|
||||
gwidget = GLADE_WIDGET (property->widget);
|
||||
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
|
||||
|
||||
me->property = property;
|
||||
@ -416,7 +416,7 @@ glade_command_set_property (GladeProperty *property, const GValue* pvalue)
|
||||
|
||||
/* Push onto undo stack only if it executes successfully. */
|
||||
if (glade_command_set_property_execute (GLADE_COMMAND (me)))
|
||||
glade_command_push_undo (gwidget->project, GLADE_COMMAND (me));
|
||||
glade_command_push_undo (GLADE_PROJECT (gwidget->project), GLADE_COMMAND (me));
|
||||
else
|
||||
/* No leaks on my shift! */
|
||||
g_object_unref (G_OBJECT (me));
|
||||
@ -546,7 +546,7 @@ glade_command_set_name (GladeWidget *widget, const gchar* name)
|
||||
return;
|
||||
|
||||
if (glade_command_set_name_execute (GLADE_COMMAND (me)))
|
||||
glade_command_push_undo (widget->project, GLADE_COMMAND (me));
|
||||
glade_command_push_undo (GLADE_PROJECT (widget->project), GLADE_COMMAND (me));
|
||||
else
|
||||
g_object_unref (G_OBJECT (me));
|
||||
}
|
||||
@ -615,7 +615,7 @@ glade_command_create_execute (GladeCommandCreateDelete *me)
|
||||
else
|
||||
{
|
||||
glade_project_add_object
|
||||
(cdata->widget->project,
|
||||
(GLADE_PROJECT (cdata->widget->project),
|
||||
cdata->widget->object);
|
||||
glade_default_app_selection_add
|
||||
(cdata->widget->object, TRUE);
|
||||
@ -665,8 +665,8 @@ glade_command_delete_execute (GladeCommandCreateDelete *me)
|
||||
}
|
||||
else
|
||||
{
|
||||
glade_project_remove_object (cdata->widget->project,
|
||||
cdata->widget->object);
|
||||
glade_project_remove_object
|
||||
(GLADE_PROJECT (cdata->widget->project), cdata->widget->object);
|
||||
}
|
||||
|
||||
if (GTK_IS_WIDGET (cdata->widget->object))
|
||||
@ -805,7 +805,8 @@ glade_command_delete (GList *widgets)
|
||||
g_strdup_printf (_("Delete multiple"));
|
||||
|
||||
if (glade_command_create_delete_execute (GLADE_COMMAND (me)))
|
||||
glade_command_push_undo (widget->project, GLADE_COMMAND (me));
|
||||
glade_command_push_undo (GLADE_PROJECT (widget->project),
|
||||
GLADE_COMMAND (me));
|
||||
else
|
||||
g_object_unref (G_OBJECT (me));
|
||||
}
|
||||
@ -847,7 +848,7 @@ glade_command_create (GladeWidgetClass *class,
|
||||
me->widgets = g_list_append (me->widgets, cdata);
|
||||
|
||||
/* widget may be null, e.g. the user clicked cancel on a query */
|
||||
if ((widget = glade_widget_new (parent, class, project)) == NULL)
|
||||
if ((widget = glade_widget_new (parent, class, (gpointer)project)) == NULL)
|
||||
{
|
||||
g_object_unref (G_OBJECT (me));
|
||||
return NULL;
|
||||
@ -939,7 +940,7 @@ glade_command_paste_execute (GladeCommandCutCopyPaste *me)
|
||||
(project, cdata->widget->object);
|
||||
else
|
||||
glade_project_add_object
|
||||
(me->project,
|
||||
(GLADE_PROJECT (me->project),
|
||||
cdata->widget->object);
|
||||
|
||||
glade_default_app_selection_add
|
||||
@ -988,7 +989,8 @@ glade_command_cut_execute (GladeCommandCutCopyPaste *me)
|
||||
if (GTK_IS_WIDGET (cdata->widget->object))
|
||||
gtk_widget_hide (GTK_WIDGET (cdata->widget->object));
|
||||
|
||||
glade_project_remove_object (cdata->widget->project, cdata->widget->object);
|
||||
glade_project_remove_object (GLADE_PROJECT (cdata->widget->project),
|
||||
cdata->widget->object);
|
||||
|
||||
}
|
||||
|
||||
@ -1428,7 +1430,7 @@ glade_command_add_remove_change_signal (GladeWidget *glade_widget,
|
||||
signal->handler);
|
||||
|
||||
if (glade_command_add_signal_execute (cmd))
|
||||
glade_command_push_undo (glade_widget->project, cmd);
|
||||
glade_command_push_undo (GLADE_PROJECT (glade_widget->project), cmd);
|
||||
else
|
||||
g_object_unref (G_OBJECT (me));
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
#define __GLADE_COMMAND_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
#include "glade-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -10,13 +10,14 @@ G_BEGIN_DECLS
|
||||
* with it's enumed value to set the window cursor.
|
||||
*/
|
||||
|
||||
|
||||
/* Has a pointer to the loaded GdkCursors. It is loaded when _init
|
||||
* is called
|
||||
*/
|
||||
struct _GladeCursor {
|
||||
typedef struct _GladeCursor {
|
||||
GdkCursor *selector;
|
||||
GdkCursor *add_widget;
|
||||
};
|
||||
} GladeCursor;
|
||||
|
||||
/* Enumed values for each of the cursors for GladeCursor. For every
|
||||
* GdkCursor above there should be a enum here
|
||||
|
@ -217,7 +217,7 @@ glade_editor_property_changed_text (GtkWidget *entry,
|
||||
|
||||
g_free (text);
|
||||
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -256,7 +256,7 @@ glade_editor_text_view_focus_out (GtkTextView *view,
|
||||
|
||||
g_free (text);
|
||||
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ glade_editor_property_changed_enum (GtkWidget *menu_item,
|
||||
|
||||
g_value_unset (&val);
|
||||
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -378,7 +378,7 @@ glade_editor_property_changed_numeric (GtkWidget *spin,
|
||||
|
||||
g_value_unset (&val);
|
||||
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -409,7 +409,7 @@ glade_editor_property_changed_boolean (GtkWidget *button,
|
||||
|
||||
g_value_unset (&val);
|
||||
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -442,7 +442,7 @@ glade_editor_property_changed_unichar (GtkWidget *entry,
|
||||
glade_command_set_property (property->property, &val);
|
||||
|
||||
g_value_unset (&val);
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property, GLADE_WIDGET (property->property->widget));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -798,7 +798,8 @@ glade_editor_property_show_i18n_dialog (GtkWidget *entry,
|
||||
|
||||
g_free (str);
|
||||
|
||||
glade_editor_property_load (property, property->property->widget);
|
||||
glade_editor_property_load (property,
|
||||
GLADE_WIDGET (property->property->widget));
|
||||
|
||||
/* Comment */
|
||||
gtk_text_buffer_get_bounds (comment_buffer, &start, &end);
|
||||
@ -1266,7 +1267,7 @@ glade_editor_table_append_items (GladeEditorTable *table,
|
||||
{
|
||||
property_class = (GladePropertyClass *) list->data;
|
||||
|
||||
if (!glade_property_class_is_visible (property_class, class))
|
||||
if (!glade_property_class_is_visible (property_class))
|
||||
continue;
|
||||
if (type == TABLE_TYPE_QUERY && !property_class->query)
|
||||
continue;
|
||||
@ -1298,7 +1299,7 @@ glade_editor_on_edit_menu_click (GtkButton *button, GladeEditor *editor)
|
||||
menubar = GTK_WIDGET(editor->loaded_widget->object);
|
||||
g_return_if_fail (GTK_IS_MENU_BAR (menubar));
|
||||
|
||||
project = editor->loaded_widget->project;
|
||||
project = GLADE_PROJECT (editor->loaded_widget->project);
|
||||
g_return_if_fail (project != NULL);
|
||||
|
||||
menu_editor = glade_menu_editor_new (project, GTK_MENU_SHELL (menubar));
|
||||
@ -1470,7 +1471,7 @@ static void
|
||||
glade_editor_load_signal_page (GladeEditor *editor, GladeWidgetClass *class)
|
||||
{
|
||||
if (editor->signal_editor == NULL) {
|
||||
editor->signal_editor = glade_signal_editor_new (editor);
|
||||
editor->signal_editor = glade_signal_editor_new ((gpointer) editor);
|
||||
gtk_box_pack_start (GTK_BOX (editor->vbox_signals),
|
||||
glade_signal_editor_get_widget (editor->signal_editor),
|
||||
TRUE, TRUE, 0);
|
||||
|
@ -2,6 +2,8 @@
|
||||
#ifndef __GLADE_EDITOR_H__
|
||||
#define __GLADE_EDITOR_H__
|
||||
|
||||
#include "glade-signal-editor.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
@ -17,6 +19,7 @@ G_BEGIN_DECLS
|
||||
#define GLADE_EDITOR_PROPERTY(p) ((GladeEditorProperty *)p)
|
||||
#define GLADE_IS_EDITOR_PROPERTY(p) (p != NULL)
|
||||
|
||||
typedef struct _GladeEditor GladeEditor;
|
||||
typedef struct _GladeEditorClass GladeEditorClass;
|
||||
typedef struct _GladeEditorTable GladeEditorTable;
|
||||
typedef struct _GladeEditorProperty GladeEditorProperty;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "glade-plugin.h"
|
||||
#include "glade.h"
|
||||
|
||||
#include "fixed_bg.xpm"
|
||||
|
||||
@ -117,8 +117,8 @@ glade_gtk_option_menu_set_items (GObject *object, GValue *value)
|
||||
void GLADEGTK_API
|
||||
glade_gtk_widget_set_tooltip (GObject *object, GValue *value)
|
||||
{
|
||||
GladeWidget *glade_widget = glade_widget_get_from_gobject (GTK_WIDGET (object));
|
||||
GladeProject *project = glade_widget_get_project (glade_widget);
|
||||
GladeWidget *glade_widget = glade_widget_get_from_gobject (GTK_WIDGET (object));
|
||||
GladeProject *project = (GladeProject *)glade_widget_get_project (glade_widget);
|
||||
GtkTooltips *tooltips = glade_project_get_tooltips (project);
|
||||
const char *tooltip;
|
||||
|
||||
@ -674,7 +674,7 @@ glade_gtk_button_ensure_glabel (GtkWidget *button)
|
||||
if (child) gtk_container_remove (GTK_CONTAINER (button), child);
|
||||
gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (glabel->object));
|
||||
|
||||
glade_project_add_object (gbutton->project, glabel->object);
|
||||
glade_project_add_object (GLADE_PROJECT (gbutton->project), glabel->object);
|
||||
gtk_widget_show (GTK_WIDGET (glabel->object));
|
||||
}
|
||||
|
||||
@ -694,7 +694,8 @@ glade_gtk_button_ensure_glabel_idle (gpointer data)
|
||||
button = GTK_WIDGET (gbutton->object);
|
||||
|
||||
glade_gtk_button_ensure_glabel (button);
|
||||
glade_project_selection_set (gbutton->project, G_OBJECT (button), TRUE);
|
||||
glade_project_selection_set (GLADE_PROJECT (gbutton->project),
|
||||
G_OBJECT (button), TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1014,9 +1015,10 @@ glade_gtk_fixed_button_press (GtkWidget *widget,
|
||||
glade_default_app_get_alt_class() != NULL)) &&
|
||||
((gwidget = glade_command_create
|
||||
(glade_default_app_get_add_class() ?
|
||||
glade_default_app_get_add_class() :
|
||||
glade_default_app_get_alt_class(),
|
||||
fixed_gwidget, NULL, fixed_gwidget->project)) != NULL))
|
||||
glade_default_app_get_add_class() :
|
||||
glade_default_app_get_alt_class(),
|
||||
fixed_gwidget, NULL,
|
||||
GLADE_PROJECT (fixed_gwidget->project))) != NULL))
|
||||
{
|
||||
/* reset the palette */
|
||||
glade_palette_unselect_widget (glade_default_app_get_palette());
|
||||
@ -1246,11 +1248,11 @@ glade_gtk_frame_create_idle (gpointer data)
|
||||
g_object_set_data (glabel->object, "special-child-type", "label_item");
|
||||
gtk_frame_set_label_widget (GTK_FRAME (frame), GTK_WIDGET (glabel->object));
|
||||
|
||||
glade_project_add_object (gframe->project, glabel->object);
|
||||
glade_project_add_object (GLADE_PROJECT (gframe->project), glabel->object);
|
||||
gtk_widget_show (GTK_WIDGET (glabel->object));
|
||||
}
|
||||
|
||||
glade_project_selection_set (gframe->project, G_OBJECT (label), TRUE);
|
||||
glade_project_selection_set (GLADE_PROJECT (gframe->project), G_OBJECT (label), TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
#ifndef __GLADE_PALETTE_H__
|
||||
#define __GLADE_PALETTE_H__
|
||||
|
||||
#include "glade-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
@ -14,7 +12,8 @@ G_BEGIN_DECLS
|
||||
#define GLADE_IS_PALETTE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PALETTE))
|
||||
#define GLADE_PALETTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PALETTE, GladePaletteClass))
|
||||
|
||||
typedef struct _GladePaletteClass GladePaletteClass;
|
||||
typedef struct _GladePalette GladePalette;
|
||||
typedef struct _GladePaletteClass GladePaletteClass;
|
||||
|
||||
|
||||
/* The GladePalette is used so that the user can choose a widget to be
|
||||
|
@ -24,6 +24,8 @@ G_BEGIN_DECLS
|
||||
</Property>
|
||||
|
||||
*/
|
||||
typedef struct _GladeParameter GladeParameter;
|
||||
|
||||
struct _GladeParameter {
|
||||
|
||||
gchar *key; /* The name of the parameter */
|
||||
|
@ -28,13 +28,21 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GladePropInfo GladePropInfo;
|
||||
typedef struct _GladePropInfo GladePropInfo;
|
||||
typedef struct _GladeSignalInfo GladeSignalInfo;
|
||||
typedef struct _GladeAtkActionInfo GladeAtkActionInfo;
|
||||
typedef struct _GladeAccelInfo GladeAccelInfo;
|
||||
typedef struct _GladeWidgetInfo GladeWidgetInfo;
|
||||
typedef struct _GladeChildInfo GladeChildInfo;
|
||||
typedef struct _GladeInterface GladeInterface;
|
||||
typedef struct _GladeAtkRelationInfo GladeAtkRelationInfo;
|
||||
typedef struct _GladePackingDefault GladePackingDefault;
|
||||
|
||||
struct _GladePropInfo {
|
||||
gchar *name;
|
||||
gchar *value;
|
||||
};
|
||||
|
||||
typedef struct _GladeSignalInfo GladeSignalInfo;
|
||||
struct _GladeSignalInfo {
|
||||
gchar *name;
|
||||
gchar *handler;
|
||||
@ -44,28 +52,27 @@ struct _GladeSignalInfo {
|
||||
guint lookup : 1;
|
||||
};
|
||||
|
||||
typedef struct _GladeAtkActionInfo GladeAtkActionInfo;
|
||||
struct _GladePackingDefault {
|
||||
gchar *id;
|
||||
gchar *value;
|
||||
};
|
||||
|
||||
struct _GladeAtkActionInfo {
|
||||
gchar *action_name;
|
||||
gchar *description;
|
||||
};
|
||||
|
||||
typedef struct _GladeAtkRelationInfo GladeAtkRelationInfo;
|
||||
struct _GladeAtkRelationInfo {
|
||||
gchar *target;
|
||||
gchar *type;
|
||||
};
|
||||
|
||||
typedef struct _GladeAccelInfo GladeAccelInfo;
|
||||
struct _GladeAccelInfo {
|
||||
guint key;
|
||||
GdkModifierType modifiers;
|
||||
gchar *signal;
|
||||
};
|
||||
|
||||
typedef struct _GladeWidgetInfo GladeWidgetInfo;
|
||||
typedef struct _GladeChildInfo GladeChildInfo;
|
||||
|
||||
struct _GladeWidgetInfo {
|
||||
GladeWidgetInfo *parent;
|
||||
|
||||
@ -102,7 +109,6 @@ struct _GladeChildInfo {
|
||||
gchar *internal_child;
|
||||
};
|
||||
|
||||
typedef struct _GladeInterface GladeInterface;
|
||||
struct _GladeInterface {
|
||||
gchar **requires;
|
||||
guint n_requires;
|
||||
|
@ -253,7 +253,7 @@ glade_placeholder_get_project (GladePlaceholder *placeholder)
|
||||
{
|
||||
GladeWidget *parent;
|
||||
parent = glade_placeholder_get_parent (placeholder);
|
||||
return parent ? parent->project : NULL;
|
||||
return parent ? GLADE_PROJECT (parent->project) : NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -2,14 +2,11 @@
|
||||
#ifndef __GLADE_PLACEHOLDER_H__
|
||||
#define __GLADE_PLACEHOLDER_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkpixmap.h>
|
||||
#include <gtk/gtkwidget.h>
|
||||
#include "glade-types.h"
|
||||
#include <gtk/gtk.h>
|
||||
#include "glade-widget.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define GLADE_TYPE_PLACEHOLDER (glade_placeholder_get_type ())
|
||||
#define GLADE_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PLACEHOLDER, GladePlaceholder))
|
||||
#define GLADE_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_PLACEHOLDER, GladePlaceholderClass))
|
||||
@ -20,6 +17,10 @@ G_BEGIN_DECLS
|
||||
#define GLADE_PLACEHOLDER_WIDTH_REQ 20
|
||||
#define GLADE_PLACEHOLDER_HEIGHT_REQ 20
|
||||
|
||||
typedef struct _GladePlaceholder GladePlaceholder;
|
||||
typedef struct _GladePlaceholderClass GladePlaceholderClass;
|
||||
|
||||
|
||||
struct _GladePlaceholder
|
||||
{
|
||||
GtkWidget widget;
|
||||
|
@ -1,18 +0,0 @@
|
||||
#ifndef GLADE_PLUGIN_H
|
||||
#define GLADE_PLUGIN_H
|
||||
|
||||
#include "glade.h"
|
||||
#include "glade-placeholder.h"
|
||||
#include "glade-widget-class.h"
|
||||
#include "glade-widget.h"
|
||||
#include "glade-project.h"
|
||||
#include "glade-app.h"
|
||||
#include "glade-command.h"
|
||||
#include "glade-editor.h"
|
||||
#include "glade-property.h"
|
||||
#include "glade-property-class.h"
|
||||
#include "glade-types.h"
|
||||
#include "glade-palette.h"
|
||||
#include "glade-builtins.h"
|
||||
|
||||
#endif
|
@ -14,7 +14,7 @@ G_BEGIN_DECLS
|
||||
|
||||
|
||||
/* A view of a GladeProject. */
|
||||
|
||||
typedef struct _GladeProjectView GladeProjectView;
|
||||
typedef struct _GladeProjectViewClass GladeProjectViewClass;
|
||||
|
||||
struct _GladeProjectView
|
||||
|
@ -13,9 +13,9 @@ G_BEGIN_DECLS
|
||||
#define GLADE_IS_PROJECT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROJECT_WINDOW))
|
||||
#define GLADE_PROJECT_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_PROJECT_WINDOW, GladeProjectWindowClass))
|
||||
|
||||
/* typedef struct _GladeProjectWindow GladeProjectWindow; */
|
||||
typedef struct _GladeProjectWindow GladeProjectWindow;
|
||||
typedef struct _GladeProjectWindowClass GladeProjectWindowClass;
|
||||
typedef struct _GladeProjectWindowPriv GladeProjectWindowPriv;
|
||||
typedef struct _GladeProjectWindowPriv GladeProjectWindowPriv;
|
||||
|
||||
/* A GladeProjectWindow specifies a loaded glade application.
|
||||
* it contains pointers to all the components that make up
|
||||
|
@ -306,7 +306,7 @@ glade_project_add_object (GladeProject *project, GObject *object)
|
||||
g_list_free (children);
|
||||
}
|
||||
|
||||
glade_widget_set_project (gwidget, project);
|
||||
glade_widget_set_project (gwidget, (gpointer)project);
|
||||
g_hash_table_insert (project->widget_old_names,
|
||||
gwidget, g_strdup (glade_widget_get_name (gwidget)));
|
||||
|
||||
@ -744,7 +744,7 @@ glade_project_new_from_interface (GladeInterface *interface, const gchar *path)
|
||||
|
||||
for (i = 0; i < interface->n_toplevels; ++i)
|
||||
{
|
||||
widget = glade_widget_read (project, interface->toplevels[i]);
|
||||
widget = glade_widget_read ((gpointer)project, interface->toplevels[i]);
|
||||
if (!widget)
|
||||
{
|
||||
g_warning ("Failed to read a <widget> tag");
|
||||
|
@ -2,8 +2,9 @@
|
||||
#ifndef __GLADE_PROJECT_H__
|
||||
#define __GLADE_PROJECT_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
#include "glade-widget.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GLADE_TYPE_PROJECT (glade_project_get_type ())
|
||||
#define GLADE_PROJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_PROJECT, GladeProject))
|
||||
@ -12,6 +13,7 @@ G_BEGIN_DECLS
|
||||
#define GLADE_IS_PROJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROJECT))
|
||||
#define GLADE_PROJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_PROJECT, GladeProjectClass))
|
||||
|
||||
typedef struct _GladeProject GladeProject;
|
||||
typedef struct _GladeProjectClass GladeProjectClass;
|
||||
|
||||
/* A GladeProject is well... a project nothing more nothing less. It is the
|
||||
|
@ -585,14 +585,13 @@ glade_property_class_new_from_spec (GParamSpec *spec)
|
||||
/**
|
||||
* glade_property_class_is_visible:
|
||||
* @property_class:
|
||||
* @widget_class:
|
||||
*
|
||||
* TODO: write me
|
||||
*
|
||||
* Returns:
|
||||
*/
|
||||
gboolean
|
||||
glade_property_class_is_visible (GladePropertyClass *property_class, GladeWidgetClass *widget_class)
|
||||
glade_property_class_is_visible (GladePropertyClass *property_class)
|
||||
{
|
||||
return property_class->visible;
|
||||
}
|
||||
@ -761,8 +760,9 @@ glade_property_class_make_adjustment (GladePropertyClass *property_class)
|
||||
* has Disabled="TRUE".
|
||||
*/
|
||||
gboolean
|
||||
glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
GladeWidgetClass *widget_class,
|
||||
glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
GModule *module,
|
||||
GType widget_type,
|
||||
GladePropertyClass **property_class)
|
||||
{
|
||||
GladePropertyClass *class;
|
||||
@ -914,19 +914,19 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
{
|
||||
gchar *symbol_name = glade_xml_get_content (child);
|
||||
|
||||
if (!widget_class->module)
|
||||
if (!module)
|
||||
g_warning (_("The property [%s] of the widget's class [%s] "
|
||||
"needs a special \"set\" function, but there is "
|
||||
"no library associated to this widget's class."),
|
||||
class->name, widget_class->name);
|
||||
class->name, g_type_name (widget_type));
|
||||
|
||||
if (!g_module_symbol (widget_class->module, symbol_name, (gpointer *)
|
||||
if (!g_module_symbol (module, symbol_name, (gpointer *)
|
||||
&class->set_function))
|
||||
g_warning (_("Unable to get the \"set\" function [%s] of the "
|
||||
"property [%s] of the widget's class [%s] from "
|
||||
"the module [%s]: %s"),
|
||||
symbol_name, class->name, widget_class->name,
|
||||
g_module_name (widget_class->module), g_module_error ());
|
||||
symbol_name, class->name, g_type_name (widget_type),
|
||||
g_module_name (module), g_module_error ());
|
||||
g_free (symbol_name);
|
||||
}
|
||||
|
||||
@ -938,19 +938,19 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
{
|
||||
gchar *symbol_name = glade_xml_get_content (child);
|
||||
|
||||
if (!widget_class->module)
|
||||
if (!module)
|
||||
g_warning (_("The property [%s] of the widget's class [%s] needs a "
|
||||
"special \"get\" function, but there is no library "
|
||||
"associated to this widget's class."),
|
||||
class->name, widget_class->name);
|
||||
class->name, g_type_name (widget_type));
|
||||
|
||||
if (!g_module_symbol(widget_class->module, symbol_name,
|
||||
if (!g_module_symbol(module, symbol_name,
|
||||
(gpointer *) &class->get_function))
|
||||
g_warning (_("Unable to get the \"get\" function [%s] of the "
|
||||
"property [%s] of the widget's class [%s] from the "
|
||||
"module [%s]: %s"),
|
||||
symbol_name, class->name, widget_class->name,
|
||||
g_module_name (widget_class->module), g_module_error ());
|
||||
symbol_name, class->name, g_type_name (widget_type),
|
||||
g_module_name (module), g_module_error ());
|
||||
g_free (symbol_name);
|
||||
}
|
||||
|
||||
@ -959,19 +959,19 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
{
|
||||
gchar *symbol_name = glade_xml_get_content (child);
|
||||
|
||||
if (!widget_class->module)
|
||||
if (!module)
|
||||
g_warning (_("The property [%s] of the widget's class [%s] needs a "
|
||||
"special \"get\" function, but there is no library "
|
||||
"associated to this widget's class."),
|
||||
class->name, widget_class->name);
|
||||
class->name, g_type_name (widget_type));
|
||||
|
||||
if (!g_module_symbol(widget_class->module, symbol_name,
|
||||
if (!g_module_symbol(module, symbol_name,
|
||||
(gpointer *) &class->verify_function))
|
||||
g_warning (_("Unable to get the \"verify\" function [%s] of the "
|
||||
"property [%s] of the widget's class [%s] from the "
|
||||
"module [%s]: %s"),
|
||||
symbol_name, class->name, widget_class->name,
|
||||
g_module_name (widget_class->module), g_module_error ());
|
||||
symbol_name, class->name, g_type_name (widget_type),
|
||||
g_module_name (module), g_module_error ());
|
||||
g_free (symbol_name);
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,8 @@ G_BEGIN_DECLS
|
||||
#define GLADE_PROPERTY_CLASS(gpc) ((GladePropertyClass *) gpc)
|
||||
#define GLADE_IS_PROPERTY_CLASS(gpc) (gpc != NULL)
|
||||
|
||||
typedef struct _GladePropertyClass GladePropertyClass;
|
||||
|
||||
struct _GladePropertyClass
|
||||
{
|
||||
GParamSpec *pspec; /* The Parameter Specification for this property.
|
||||
@ -188,14 +190,14 @@ LIBGLADEUI_API GladePropertyClass *glade_property_class_new
|
||||
LIBGLADEUI_API GladePropertyClass *glade_property_class_new_from_spec (GParamSpec *spec);
|
||||
LIBGLADEUI_API GladePropertyClass *glade_property_class_clone (GladePropertyClass *property_class);
|
||||
LIBGLADEUI_API void glade_property_class_free (GladePropertyClass *property_class);
|
||||
LIBGLADEUI_API gboolean glade_property_class_is_visible (GladePropertyClass *property_class,
|
||||
GladeWidgetClass *widget_class);
|
||||
LIBGLADEUI_API gboolean glade_property_class_is_visible (GladePropertyClass *property_class);
|
||||
LIBGLADEUI_API GValue *glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class,
|
||||
const gchar *string);
|
||||
LIBGLADEUI_API gchar *glade_property_class_make_string_from_gvalue (GladePropertyClass *property_class,
|
||||
const GValue *value);
|
||||
LIBGLADEUI_API gboolean glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
GladeWidgetClass *widget_class,
|
||||
GModule *module,
|
||||
GType widget_type,
|
||||
GladePropertyClass **property_class);
|
||||
LIBGLADEUI_API gchar *glade_property_class_make_string_from_flags (GladePropertyClass *class,
|
||||
guint fvals,
|
||||
|
@ -66,7 +66,7 @@ static GObjectClass* parent_class = NULL;
|
||||
GladeProperty class methods
|
||||
*******************************************************************************/
|
||||
static GladeProperty *
|
||||
glade_property_dup_impl (GladeProperty *template, GladeWidget *widget)
|
||||
glade_property_dup_impl (GladeProperty *template, gpointer *widget)
|
||||
{
|
||||
GladeProperty *property;
|
||||
|
||||
@ -118,15 +118,15 @@ glade_property_set_property (GladeProperty *property, const GValue *value)
|
||||
{
|
||||
if (property->class->packing)
|
||||
{
|
||||
GladeWidget *parent = glade_widget_get_parent (property->widget);
|
||||
GladeWidget *child = property->widget;
|
||||
GladeWidget *parent = glade_widget_get_parent (GLADE_WIDGET (property->widget));
|
||||
GladeWidget *child = GLADE_WIDGET (property->widget);
|
||||
glade_widget_class_container_set_property
|
||||
(parent->widget_class, parent->object, child->object,
|
||||
property->class->id, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
GObject *gobject = G_OBJECT (glade_widget_get_object (property->widget));
|
||||
GObject *gobject = G_OBJECT (glade_widget_get_object (GLADE_WIDGET (property->widget)));
|
||||
g_object_set_property (gobject, property->class->id, value);
|
||||
}
|
||||
}
|
||||
@ -145,7 +145,7 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
|
||||
|
||||
if (property->class->verify_function)
|
||||
{
|
||||
GObject *object = glade_widget_get_object (property->widget);
|
||||
GObject *object = glade_widget_get_object (GLADE_WIDGET (property->widget));
|
||||
if (property->class->verify_function (object, value) == FALSE)
|
||||
return;
|
||||
}
|
||||
@ -191,7 +191,7 @@ glade_property_sync_impl (GladeProperty *property)
|
||||
if (property->class->set_function)
|
||||
/* if there is a custom set_property, use it */
|
||||
(*property->class->set_function)
|
||||
(glade_widget_get_object (property->widget), property->value);
|
||||
(glade_widget_get_object (GLADE_WIDGET (property->widget)), property->value);
|
||||
else if (property->class->construct_only)
|
||||
{
|
||||
/* In the case of construct_only, the widget must be rebuilt, here we
|
||||
@ -201,38 +201,39 @@ glade_property_sync_impl (GladeProperty *property)
|
||||
GList *selection;
|
||||
gboolean reselect = FALSE;
|
||||
gboolean inproject =
|
||||
property->widget->project ?
|
||||
GLADE_WIDGET (property->widget)->project ?
|
||||
(glade_project_get_widget_by_name
|
||||
(property->widget->project,
|
||||
property->widget->name) ? TRUE : FALSE) : FALSE;
|
||||
(GLADE_PROJECT (GLADE_WIDGET (property->widget)->project),
|
||||
GLADE_WIDGET (property->widget)->name) ? TRUE : FALSE) : FALSE;
|
||||
|
||||
|
||||
if (inproject)
|
||||
{
|
||||
if ((selection =
|
||||
glade_project_selection_get (property->widget->project)) != NULL &&
|
||||
glade_project_selection_get
|
||||
(GLADE_PROJECT (GLADE_WIDGET (property->widget)->project))) != NULL &&
|
||||
g_list_find(selection,
|
||||
glade_widget_get_object (property->widget)) != NULL)
|
||||
glade_widget_get_object (GLADE_WIDGET (property->widget))) != NULL)
|
||||
{
|
||||
reselect = TRUE;
|
||||
glade_project_selection_remove
|
||||
(property->widget->project,
|
||||
glade_widget_get_object (property->widget), FALSE);
|
||||
(GLADE_PROJECT (GLADE_WIDGET (property->widget)->project),
|
||||
glade_widget_get_object (GLADE_WIDGET (property->widget)), FALSE);
|
||||
}
|
||||
glade_project_remove_object (property->widget->project,
|
||||
glade_widget_get_object (property->widget));
|
||||
glade_project_remove_object (GLADE_PROJECT (GLADE_WIDGET (property->widget)->project),
|
||||
glade_widget_get_object (GLADE_WIDGET (property->widget)));
|
||||
}
|
||||
|
||||
glade_widget_rebuild (property->widget);
|
||||
glade_widget_rebuild (GLADE_WIDGET (property->widget));
|
||||
|
||||
if (inproject)
|
||||
{
|
||||
glade_project_add_object (property->widget->project,
|
||||
glade_widget_get_object (property->widget));
|
||||
glade_project_add_object (GLADE_PROJECT (GLADE_WIDGET (property->widget)->project),
|
||||
glade_widget_get_object (GLADE_WIDGET (property->widget)));
|
||||
if (reselect)
|
||||
glade_project_selection_add
|
||||
(property->widget->project,
|
||||
glade_widget_get_object (property->widget), TRUE);
|
||||
(GLADE_PROJECT (GLADE_WIDGET (property->widget)->project),
|
||||
glade_widget_get_object (GLADE_WIDGET (property->widget)), TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -547,7 +548,7 @@ glade_property_get_type (void)
|
||||
*/
|
||||
GladeProperty *
|
||||
glade_property_new (GladePropertyClass *class,
|
||||
GladeWidget *widget,
|
||||
gpointer *widget,
|
||||
GValue *value)
|
||||
{
|
||||
GladeProperty *property;
|
||||
@ -596,7 +597,7 @@ glade_property_new (GladePropertyClass *class,
|
||||
* Returns:
|
||||
*/
|
||||
GladeProperty *
|
||||
glade_property_dup (GladeProperty *template, GladeWidget *widget)
|
||||
glade_property_dup (GladeProperty *template, gpointer *widget)
|
||||
{
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY (template), NULL);
|
||||
return GLADE_PROPERTY_GET_CINFO (template)->dup (template, widget);
|
||||
|
@ -11,6 +11,9 @@ G_BEGIN_DECLS
|
||||
#define GLADE_IS_PROPERTY_CINFO(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_PROPERTY))
|
||||
#define GLADE_PROPERTY_GET_CINFO(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_PROPERTY, GladePropertyCinfo))
|
||||
|
||||
typedef struct _GladeProperty GladeProperty;
|
||||
typedef struct _GladePropertyCinfo GladePropertyCinfo;
|
||||
|
||||
|
||||
/* A GladeProperty is an instance of a GladePropertyClass.
|
||||
* There will be one GladePropertyClass for "GtkLabel->label" but one
|
||||
@ -23,7 +26,7 @@ struct _GladeProperty
|
||||
GladePropertyClass *class; /* A pointer to the GladeProperty that this
|
||||
* setting specifies
|
||||
*/
|
||||
GladeWidget *widget; /* A pointer to the GladeWidget that this
|
||||
gpointer *widget; /* A pointer to the GladeWidget that this
|
||||
* GladeProperty is modifying
|
||||
*/
|
||||
|
||||
@ -53,7 +56,7 @@ struct _GladeProperty
|
||||
|
||||
#if 0
|
||||
/* A GladeProperty of type object has a child */
|
||||
GladeWidget *child;
|
||||
gpointer *child;
|
||||
#endif
|
||||
gboolean loading;
|
||||
};
|
||||
@ -64,7 +67,7 @@ struct _GladePropertyCinfo
|
||||
GObjectClass parent_class;
|
||||
|
||||
/* Class methods */
|
||||
GladeProperty * (* dup) (GladeProperty *, GladeWidget *);
|
||||
GladeProperty * (* dup) (GladeProperty *, gpointer *);
|
||||
void (* reset) (GladeProperty *);
|
||||
gboolean (* def) (GladeProperty *);
|
||||
void (* set_value) (GladeProperty *, const GValue *);
|
||||
@ -80,10 +83,10 @@ struct _GladePropertyCinfo
|
||||
|
||||
LIBGLADEUI_API GType glade_property_get_type (void);
|
||||
LIBGLADEUI_API GladeProperty *glade_property_new (GladePropertyClass *class,
|
||||
GladeWidget *widget,
|
||||
gpointer *widget,
|
||||
GValue *value);
|
||||
LIBGLADEUI_API GladeProperty *glade_property_dup (GladeProperty *template,
|
||||
GladeWidget *widget);
|
||||
gpointer *widget);
|
||||
LIBGLADEUI_API void glade_property_reset (GladeProperty *property);
|
||||
LIBGLADEUI_API gboolean glade_property_default (GladeProperty *property);
|
||||
LIBGLADEUI_API void glade_property_set_value (GladeProperty *property,
|
||||
|
@ -634,7 +634,7 @@ glade_signal_editor_get_widget (GladeSignalEditor *editor)
|
||||
* Returns: a new #GladeSignalEditor associated with @editor
|
||||
*/
|
||||
GladeSignalEditor *
|
||||
glade_signal_editor_new (GladeEditor *editor)
|
||||
glade_signal_editor_new (gpointer *editor)
|
||||
{
|
||||
GladeSignalEditor *signal_editor;
|
||||
|
||||
|
@ -8,6 +8,9 @@ G_BEGIN_DECLS
|
||||
#define GLADE_SIGNAL_EDITOR(e) ((GladeSignalEditor *)e)
|
||||
#define GLADE_IS_SIGNAL_EDITOR(e) (e != NULL)
|
||||
|
||||
typedef struct _GladeSignalEditor GladeSignalEditor;
|
||||
|
||||
|
||||
/* The GladeSignalEditor is used to house the signal editor interface and
|
||||
* associated functionality.
|
||||
*/
|
||||
@ -18,7 +21,7 @@ struct _GladeSignalEditor
|
||||
GladeWidget *widget;
|
||||
GladeWidgetClass *class;
|
||||
|
||||
GladeEditor *editor;
|
||||
gpointer *editor;
|
||||
|
||||
GtkWidget *signals_list;
|
||||
GtkTreeStore *model;
|
||||
@ -28,7 +31,7 @@ struct _GladeSignalEditor
|
||||
|
||||
GtkWidget *glade_signal_editor_get_widget (GladeSignalEditor *editor);
|
||||
|
||||
GladeSignalEditor *glade_signal_editor_new (GladeEditor *editor);
|
||||
GladeSignalEditor *glade_signal_editor_new (gpointer *editor);
|
||||
|
||||
void glade_signal_editor_load_widget (GladeSignalEditor *editor, GladeWidget *widget);
|
||||
|
||||
|
@ -8,6 +8,8 @@ G_BEGIN_DECLS
|
||||
#define GLADE_SIGNAL(s) ((GladeSignal *)s)
|
||||
#define GLADE_IS_SIGNAL(s) (s != NULL)
|
||||
|
||||
typedef struct _GladeSignal GladeSignal;
|
||||
|
||||
struct _GladeSignal
|
||||
{
|
||||
gchar *name; /* Signal name eg "clicked" */
|
||||
|
@ -1,43 +0,0 @@
|
||||
#ifndef __GLADE_TYPES_H__
|
||||
#define __GLADE_TYPES_H__
|
||||
|
||||
|
||||
typedef struct _GladePalette GladePalette;
|
||||
typedef struct _GladeEditor GladeEditor;
|
||||
typedef struct _GladeSignal GladeSignal;
|
||||
typedef struct _GladeSignalEditor GladeSignalEditor;
|
||||
typedef struct _GladeProject GladeProject;
|
||||
typedef struct _GladeClipboard GladeClipboard;
|
||||
|
||||
typedef struct _GladeWidget GladeWidget;
|
||||
typedef struct _GladeWidgetClass GladeWidgetClass;
|
||||
typedef struct _GladeWidgetClassSignal GladeWidgetClassSignal;
|
||||
typedef struct _GladePackagingDefault GladePackingDefault;
|
||||
|
||||
typedef struct _GladeProperty GladeProperty;
|
||||
typedef struct _GladePropertyCinfo GladePropertyCinfo;
|
||||
typedef struct _GladePropertyClass GladePropertyClass;
|
||||
typedef struct _GladePropertyQuery GladePropertyQuery;
|
||||
|
||||
typedef struct _GladeParameter GladeParameter;
|
||||
typedef struct _GladeChoice GladeChoice;
|
||||
|
||||
typedef struct _GladeProjectView GladeProjectView;
|
||||
typedef struct _GladeProjectViewList GladeProjectViewList;
|
||||
typedef struct _GladeProjectViewTree GladeProjectViewTree;
|
||||
typedef struct _GladeProjectWindow GladeProjectWindow;
|
||||
|
||||
typedef struct _GladeCatalog GladeCatalog;
|
||||
typedef struct _GladeWidgetGroup GladeWidgetGroup;
|
||||
typedef struct _GladeCursor GladeCursor;
|
||||
|
||||
typedef struct _GladePlaceholder GladePlaceholder;
|
||||
typedef struct _GladePlaceholderClass GladePlaceholderClass;
|
||||
|
||||
typedef struct _GladeXmlContext GladeXmlContext;
|
||||
typedef struct _GladeXmlNode GladeXmlNode;
|
||||
typedef struct _GladeXmlDoc GladeXmlDoc;
|
||||
|
||||
#include "glade-parser.h"
|
||||
|
||||
#endif /* __GLADE_TYPES_H__ */
|
@ -2,6 +2,7 @@
|
||||
#ifndef __GLADE_UTILS_H__
|
||||
#define __GLADE_UTILS_H__
|
||||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
|
@ -379,7 +379,9 @@ glade_widget_class_update_properties_from_node (GladeXmlNode *node,
|
||||
}
|
||||
|
||||
updated = glade_property_class_update_from_node
|
||||
(child, widget_class, &property_class);
|
||||
(child, widget_class->module,
|
||||
widget_class->type,
|
||||
&property_class);
|
||||
if (!updated)
|
||||
{
|
||||
g_warning ("failed to update %s property of %s from xml",
|
||||
|
@ -4,8 +4,9 @@
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gmodule.h>
|
||||
#include <gtk/gtkwidget.h>
|
||||
#include "glade-types.h"
|
||||
#include <gtk/gtk.h>
|
||||
#include "glade-xml-utils.h"
|
||||
#include "glade-property-class.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -13,7 +14,9 @@ G_BEGIN_DECLS
|
||||
#define GLADE_WIDGET_CLASS(gwc) ((GladeWidgetClass *) gwc)
|
||||
#define GLADE_IS_WIDGET_CLASS(gwc) (gwc != NULL)
|
||||
|
||||
typedef struct _GladeSupportedChild GladeSupportedChild;
|
||||
typedef struct _GladeWidgetClass GladeWidgetClass;
|
||||
typedef struct _GladeSupportedChild GladeSupportedChild;
|
||||
typedef struct _GladeWidgetClassSignal GladeWidgetClassSignal;
|
||||
|
||||
|
||||
typedef void (* GladeChildSetPropertyFunc) (GObject *container,
|
||||
@ -145,15 +148,6 @@ struct _GladeWidgetClassSignal
|
||||
* eg GtkButton */
|
||||
};
|
||||
|
||||
/* Need to go through all properties in catalog file and compare
|
||||
* against parent class.
|
||||
*/
|
||||
struct _GladePackagingDefault
|
||||
{
|
||||
gchar *id;
|
||||
gchar *value;
|
||||
};
|
||||
|
||||
LIBGLADEUI_API GladeWidgetClass *glade_widget_class_new (GladeXmlNode *class_node,
|
||||
const gchar *library);
|
||||
LIBGLADEUI_API void glade_widget_class_free (GladeWidgetClass *widget_class);
|
||||
|
@ -543,7 +543,7 @@ static GladeWidget *
|
||||
glade_widget_internal_new (const gchar *name,
|
||||
GladeWidget *parent,
|
||||
GladeWidgetClass *klass,
|
||||
GladeProject *project,
|
||||
gpointer *project,
|
||||
GladeWidget *template)
|
||||
{
|
||||
GObject *object;
|
||||
@ -576,12 +576,12 @@ glade_widget_internal_new (const gchar *name,
|
||||
* Returns:
|
||||
*/
|
||||
GladeWidget *
|
||||
glade_widget_new (GladeWidget *parent, GladeWidgetClass *klass, GladeProject *project)
|
||||
glade_widget_new (GladeWidget *parent, GladeWidgetClass *klass, gpointer *project)
|
||||
{
|
||||
GladeWidget *widget;
|
||||
gchar *widget_name =
|
||||
glade_project_new_widget_name
|
||||
(project, klass->generic_name);
|
||||
(GLADE_PROJECT (project), klass->generic_name);
|
||||
|
||||
if ((widget = glade_widget_internal_new
|
||||
(widget_name, parent, klass, project, NULL)) != NULL)
|
||||
@ -761,15 +761,15 @@ glade_widget_new_for_internal_child (GladeWidgetClass *klass,
|
||||
GObject *internal_object,
|
||||
const gchar *internal_name)
|
||||
{
|
||||
GladeProject *project = glade_widget_get_project (parent);
|
||||
gchar *widget_name = glade_project_new_widget_name (project, klass->generic_name);
|
||||
GladeWidget *widget = g_object_new (GLADE_TYPE_WIDGET,
|
||||
"parent", parent,
|
||||
"class", klass,
|
||||
"project", project,
|
||||
"name", widget_name,
|
||||
"internal", internal_name,
|
||||
"object", internal_object, NULL);
|
||||
GladeProject *project = GLADE_PROJECT (glade_widget_get_project (parent));
|
||||
gchar *widget_name = glade_project_new_widget_name (project, klass->generic_name);
|
||||
GladeWidget *widget = g_object_new (GLADE_TYPE_WIDGET,
|
||||
"parent", parent,
|
||||
"class", klass,
|
||||
"project", project,
|
||||
"name", widget_name,
|
||||
"internal", internal_name,
|
||||
"object", internal_object, NULL);
|
||||
g_free (widget_name);
|
||||
return widget;
|
||||
}
|
||||
@ -809,7 +809,7 @@ glade_widget_dispose (GObject *object)
|
||||
|
||||
if (widget->project)
|
||||
widget->project =
|
||||
(g_object_unref (widget->project), NULL);
|
||||
(g_object_unref (G_OBJECT (widget->project)), NULL);
|
||||
|
||||
if (widget->object)
|
||||
widget->object =
|
||||
@ -890,8 +890,7 @@ glade_widget_set_real_property (GObject *object,
|
||||
glade_widget_set_object (widget, g_value_get_object (value));
|
||||
break;
|
||||
case PROP_PROJECT:
|
||||
glade_widget_set_project (widget, GLADE_PROJECT
|
||||
(g_value_get_object (value)));
|
||||
glade_widget_set_project (widget, (gpointer)g_value_get_object (value));
|
||||
break;
|
||||
case PROP_CLASS:
|
||||
glade_widget_set_class (widget, GLADE_WIDGET_CLASS
|
||||
@ -931,7 +930,7 @@ glade_widget_get_real_property (GObject *object,
|
||||
g_value_set_pointer (value, widget->widget_class);
|
||||
break;
|
||||
case PROP_PROJECT:
|
||||
g_value_set_object (value, widget->project);
|
||||
g_value_set_object (value, G_OBJECT (widget->project));
|
||||
break;
|
||||
case PROP_OBJECT:
|
||||
g_value_set_object (value, widget->object);
|
||||
@ -1026,7 +1025,7 @@ glade_widget_set_properties (GladeWidget *widget, GList *properties)
|
||||
for (list = properties; list; list = list->next)
|
||||
{
|
||||
GladeProperty *property = list->data;
|
||||
property->widget = widget;
|
||||
property->widget = (gpointer)widget;
|
||||
if (property->class->query)
|
||||
{
|
||||
widget->query_user = TRUE;
|
||||
@ -1054,7 +1053,8 @@ glade_widget_set_class (GladeWidget *widget, GladeWidgetClass *klass)
|
||||
for (list = klass->properties; list; list = list->next)
|
||||
{
|
||||
property_class = GLADE_PROPERTY_CLASS(list->data);
|
||||
property = glade_property_new (property_class, widget, NULL);
|
||||
property = glade_property_new (property_class,
|
||||
(gpointer)widget, NULL);
|
||||
if (!property) {
|
||||
g_warning ("Failed to create [%s] property",
|
||||
property_class->id);
|
||||
@ -1090,7 +1090,7 @@ glade_widget_get_class (GladeWidget *widget)
|
||||
* Makes @widget belong to @project.
|
||||
*/
|
||||
void
|
||||
glade_widget_set_project (GladeWidget *widget, GladeProject *project)
|
||||
glade_widget_set_project (GladeWidget *widget, gpointer *project)
|
||||
{
|
||||
if (widget->project != project) {
|
||||
if (project)
|
||||
@ -1108,7 +1108,7 @@ glade_widget_set_project (GladeWidget *widget, GladeProject *project)
|
||||
*
|
||||
* Returns: the #GladeProject that @widget belongs to
|
||||
*/
|
||||
GladeProject *
|
||||
gpointer
|
||||
glade_widget_get_project (GladeWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
|
||||
@ -1514,7 +1514,7 @@ glade_widget_button_press (GtkWidget *widget,
|
||||
{
|
||||
if (event->state & GDK_CONTROL_MASK)
|
||||
{
|
||||
if (glade_project_is_selected (glade_widget->project,
|
||||
if (glade_project_is_selected (GLADE_PROJECT (glade_widget->project),
|
||||
glade_widget->object))
|
||||
glade_default_app_selection_remove
|
||||
(glade_widget->object, TRUE);
|
||||
@ -1523,7 +1523,7 @@ glade_widget_button_press (GtkWidget *widget,
|
||||
(glade_widget->object, TRUE);
|
||||
handled = TRUE;
|
||||
}
|
||||
else if (glade_project_is_selected (glade_widget->project,
|
||||
else if (glade_project_is_selected (GLADE_PROJECT (glade_widget->project),
|
||||
glade_widget->object) == FALSE)
|
||||
{
|
||||
glade_util_clear_selection ();
|
||||
@ -1897,7 +1897,7 @@ glade_widget_create_packing_properties (GladeWidget *container, GladeWidget *wid
|
||||
for (list = support->properties; list && list->data; list = list->next)
|
||||
{
|
||||
property_class = list->data;
|
||||
property = glade_property_new (property_class, widget, NULL);
|
||||
property = glade_property_new (property_class, (gpointer)widget, NULL);
|
||||
packing_props = g_list_prepend (packing_props, property);
|
||||
}
|
||||
}
|
||||
@ -2266,7 +2266,7 @@ glade_widget_fill_from_widget_info (GladeWidgetInfo *info,
|
||||
for (i = 0; i < info->n_children; ++i)
|
||||
{
|
||||
if (!glade_widget_new_child_from_child_info (info->children + i,
|
||||
widget->project, widget))
|
||||
GLADE_PROJECT (widget->project), widget))
|
||||
{
|
||||
g_warning ("Failed to read child of %s",
|
||||
glade_widget_get_name (widget));
|
||||
@ -2661,12 +2661,12 @@ glade_widget_new_child_from_child_info (GladeChildInfo *info,
|
||||
* Returns: a new #GladeWidget in @project, based off the contents of @node
|
||||
*/
|
||||
GladeWidget *
|
||||
glade_widget_read (GladeProject *project, GladeWidgetInfo *info)
|
||||
glade_widget_read (gpointer *project, GladeWidgetInfo *info)
|
||||
{
|
||||
GladeWidget *widget;
|
||||
|
||||
if ((widget = glade_widget_new_from_widget_info
|
||||
(info, project, NULL)) != NULL)
|
||||
(info, GLADE_PROJECT (project), NULL)) != NULL)
|
||||
{
|
||||
if (glade_verbose)
|
||||
glade_widget_debug (widget);
|
||||
|
@ -4,7 +4,10 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
#include "glade-types.h"
|
||||
|
||||
#include "glade-widget-class.h"
|
||||
#include "glade-signal.h"
|
||||
#include "glade-property.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -15,14 +18,15 @@ G_BEGIN_DECLS
|
||||
#define GLADE_IS_WIDGET_KLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_WIDGET))
|
||||
#define GLADE_WIDGET_GET_KLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_WIDGET, GladeWidgetKlass))
|
||||
|
||||
typedef struct _GladeWidgetKlass GladeWidgetKlass;
|
||||
typedef struct _GladeWidget GladeWidget;
|
||||
typedef struct _GladeWidgetKlass GladeWidgetKlass;
|
||||
|
||||
struct _GladeWidget
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
GladeWidgetClass *widget_class;
|
||||
GladeProject *project; /* A pointer to the project that this widget belongs to. */
|
||||
gpointer *project; /* A pointer to the project that this widget belongs to. */
|
||||
|
||||
GladeWidget *parent; /* A pointer to the parent widget in the heirarchy */
|
||||
|
||||
@ -83,7 +87,7 @@ struct _GladeWidgetKlass
|
||||
LIBGLADEUI_API GType glade_widget_get_type (void);
|
||||
LIBGLADEUI_API GladeWidget * glade_widget_new (GladeWidget *parent,
|
||||
GladeWidgetClass *klass,
|
||||
GladeProject *project);
|
||||
gpointer *project);
|
||||
LIBGLADEUI_API GladeWidget * glade_widget_new_for_internal_child (GladeWidgetClass *klass,
|
||||
GladeWidget *parent,
|
||||
GObject *internal_object,
|
||||
@ -96,12 +100,12 @@ LIBGLADEUI_API void glade_widget_set_internal (GladeWidge
|
||||
LIBGLADEUI_API void glade_widget_set_object (GladeWidget *widget,
|
||||
GObject *new_object);
|
||||
LIBGLADEUI_API void glade_widget_set_project (GladeWidget *widget,
|
||||
GladeProject *project);
|
||||
gpointer *project);
|
||||
|
||||
LIBGLADEUI_API const gchar *glade_widget_get_name (GladeWidget *widget);
|
||||
LIBGLADEUI_API const gchar *glade_widget_get_internal (GladeWidget *widget);
|
||||
LIBGLADEUI_API GladeWidgetClass *glade_widget_get_class (GladeWidget *widget);
|
||||
LIBGLADEUI_API GladeProject *glade_widget_get_project (GladeWidget *widget);
|
||||
LIBGLADEUI_API gpointer glade_widget_get_project (GladeWidget *widget);
|
||||
LIBGLADEUI_API GObject *glade_widget_get_object (GladeWidget *widget);
|
||||
|
||||
|
||||
@ -161,7 +165,7 @@ LIBGLADEUI_API GPtrArray * glade_widget_list_signal_handlers (Glad
|
||||
/* serialization */
|
||||
LIBGLADEUI_API GladeWidgetInfo *glade_widget_write (GladeWidget *widget,
|
||||
GladeInterface *interface);
|
||||
LIBGLADEUI_API GladeWidget *glade_widget_read (GladeProject *project,
|
||||
LIBGLADEUI_API GladeWidget *glade_widget_read (gpointer *project,
|
||||
GladeWidgetInfo *info);
|
||||
|
||||
/* helper functions */
|
||||
|
@ -3,7 +3,7 @@
|
||||
#ifndef __GLADE_XML_UTILS_H__
|
||||
#define __GLADE_XML_UTILS_H__
|
||||
|
||||
#include "glade-types.h"
|
||||
#include "glade-parser.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -11,6 +11,10 @@ G_BEGIN_DECLS
|
||||
#define GLADE_XML_CONTEXT(c) ((GladeXmlContext *)c)
|
||||
#define GLADE_XML_IS_CONTEXT(c) (c != NULL)
|
||||
|
||||
typedef struct _GladeXmlContext GladeXmlContext;
|
||||
typedef struct _GladeXmlNode GladeXmlNode;
|
||||
typedef struct _GladeXmlDoc GladeXmlDoc;
|
||||
|
||||
|
||||
/* search child */
|
||||
GladeXmlNode * glade_xml_search_child (GladeXmlNode * node, const char *name);
|
||||
@ -67,8 +71,8 @@ GladeXmlContext * glade_xml_context_new_from_path (const gchar *full_path,
|
||||
const gchar *root_name);
|
||||
GladeXmlDoc * glade_xml_context_get_doc (GladeXmlContext *context);
|
||||
|
||||
gchar * alloc_string(GladeInterface *interface, const gchar *string);
|
||||
gchar * alloc_propname(GladeInterface *interface, const gchar *string);
|
||||
gchar * alloc_string (GladeInterface *interface, const gchar *string);
|
||||
gchar * alloc_propname (GladeInterface *interface, const gchar *string);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
13
src/glade.h
13
src/glade.h
@ -1,4 +1,3 @@
|
||||
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||
#ifndef __GLADE_H__
|
||||
#define __GLADE_H__
|
||||
@ -23,7 +22,17 @@
|
||||
# define LIBGLADEUI_API extern
|
||||
#endif
|
||||
|
||||
#include "glade-types.h"
|
||||
#include "glade-placeholder.h"
|
||||
#include "glade-widget-class.h"
|
||||
#include "glade-widget.h"
|
||||
#include "glade-project.h"
|
||||
#include "glade-app.h"
|
||||
#include "glade-command.h"
|
||||
#include "glade-editor.h"
|
||||
#include "glade-property.h"
|
||||
#include "glade-property-class.h"
|
||||
#include "glade-palette.h"
|
||||
#include "glade-builtins.h"
|
||||
#include "glade-utils.h"
|
||||
#include "glade-xml-utils.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user