pixmaps/Makefile.am, src/Makefile.am, widgets/Makefile.am,

2005-04-02  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	* configure.in:
	  pixmaps/Makefile.am, src/Makefile.am, widgets/Makefile.am,
	  src/glade-app.c, src/glade-widget.c, src/glade-paths.sh.in:
	  Use a more proper way to detect paths.

	* src/glade-app.h, src/glade-command.c, src/glade-command.h,
	  src/glade-debug.h, src/glade-editor.h, src/glade-gtk.c,
	  src/glade-palette.h, src/glade-placeholder.c, src/glade-placeholder.h,
	  src/glade-project-view.h, src/glade-project.h, src/glade-property.h,
	  src/glade-utils.h, src/glade-widget-class.h, src/glade-widget.h,
	  src/glade.h:
	  Introduce LIBGLADEUI_API, remove *.def.

	* src/main.c: some global variables should be freed by libgladeui.
This commit is contained in:
Ivan, Wong Yat Cheung 2005-04-02 17:25:47 +00:00 committed by Ivan Wong Yat Cheung
parent 72879b3862
commit 60cae2e3e3
27 changed files with 431 additions and 374 deletions

View File

@ -10,6 +10,7 @@ config.h.in
stamp-h.in
Makefile.in
configure
configure.lineno
config.log
config.h
config.cache
@ -17,6 +18,7 @@ config.status
intltool-*
glade-3.desktop
stamp-h
stamp-h1
libtool
Makefile
missing

View File

@ -1,3 +1,20 @@
2005-04-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
* configure.in:
pixmaps/Makefile.am, src/Makefile.am, widgets/Makefile.am,
src/glade-app.c, src/glade-widget.c, src/glade-paths.sh.in:
Use a more proper way to detect paths.
* src/glade-app.h, src/glade-command.c, src/glade-command.h,
src/glade-debug.h, src/glade-editor.h, src/glade-gtk.c,
src/glade-palette.h, src/glade-placeholder.c, src/glade-placeholder.h,
src/glade-project-view.h, src/glade-project.h, src/glade-property.h,
src/glade-utils.h, src/glade-widget-class.h, src/glade-widget.h,
src/glade.h:
Introduce LIBGLADEUI_API, remove *.def.
* src/main.c: some global variables should be freed by libgladeui.
2005-04-01 Tristan Van Berkom <tvb@gnome.org>
* src/glade-app.[ch]: Added global selection API which takes multiple

View File

@ -1,10 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT(src/glade-widget.c)
AC_INIT(glade-3, 3.0.0,
http://bugzilla.gnome.org/enter_bug.cgi?product=glade3)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(glade, 2.90.0)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
@ -19,13 +20,25 @@ AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
# If the source code has changed at all, increment GLADE_REVISION
# If any interfaces have been added, removed, or changed, increment GLADE_CURRENT, and set GLADE_REVISION to 0.
# If any interfaces have been added since the last public release, then increment GLADE_AGE.
# If any interfaces have been removed since the last public release, then set GLADE_AGE to 0.
GLADE_REVISION=0
GLADE_CURRENT=1
GLADE_AGE=1
AC_SUBST(GLADE_REVISION)
AC_SUBST(GLADE_CURRENT)
AC_SUBST(GLADE_AGE)
dnl ================================================================
dnl Gettext stuff.
dnl ================================================================
GETTEXT_PACKAGE=glade-3.0
GETTEXT_PACKAGE=glade-3
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the gettext package.])
ALL_LINGUAS="az es ms nn no pl pt ru sv ta tr uk"
@ -43,52 +56,24 @@ AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is require
glade 3.0. You can download the latest version from ftp://people.redhat.com/sopwith/popt/]))
dnl ================================================================
dnl GLADE_DATA_DIR - Sets the location of the data directory, where we install
dnl source files added to projects (such as all the Gnome m4 macros).
dnl This will substitute GLADE_DATA_DIR in config.h (from acconfig.h).
dnl ================================================================
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
glade_data_dir="${ac_default_prefix}/share"
else
glade_data_dir="${prefix}/share"
fi
else
glade_data_dir="${datadir}"
fi
AC_DEFINE_UNQUOTED(GLADE_DATA_DIR, "${glade_data_dir}", [Data directory of Glade-3.])
AC_DEFINE_UNQUOTED(ICONS_DIR, "${glade_data_dir}/pixmaps", [Icons directory of Glade-3.])
AC_DEFINE_UNQUOTED(LOCALE_DIR, "${glade_data_dir}/locale", [Locale directory of Glade-3.])
glade_version="${VERSION}"
glade_datadir='${datadir}/${PACKAGE}'
glade_libdir='${libdir}/${PACKAGE}'
glade_catalogsdir='${glade_libdir}/catalogs'
glade_modulesdir='${glade_libdir}/modules'
glade_pixmapsdir='${glade_datadir}/pixmaps'
glade_icondir='${datadir}/pixmaps'
glade_localedir='${prefix}/${DATADIRNAME}/locale'
dnl ================================================================
dnl PIXMAPS, WIDGETS, CATALOGS
dnl ================================================================
if test "x${prefix}" = "xNONE"; then
tmp="${ac_default_prefix}"
else
tmp="${prefix}"
fi
pixmapsdir="${tmp}/${DATADIRNAME}/${PACKAGE}-${VERSION}/pixmaps"
widgetsdir="${tmp}/${DATADIRNAME}/${PACKAGE}-${VERSION}/widgets"
catalogsdir="${tmp}/${DATADIRNAME}/${PACKAGE}-${VERSION}/catalogs"
AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "$pixmapsdir", [Pixmaps directory of Glade-3.])
AC_DEFINE_UNQUOTED(WIDGETS_DIR, "$widgetsdir", [Widgets directory of Glade-3.])
AC_DEFINE_UNQUOTED(CATALOGS_DIR, "$catalogsdir", [Catalogs directory of Glade-3.])
AC_SUBST(glade_version)
AC_SUBST(glade_datadir)
AC_SUBST(glade_libdir)
AC_SUBST(glade_catalogsdir)
AC_SUBST(glade_modulesdir)
AC_SUBST(glade_pixmapsdir)
AC_SUBST(glade_icondir)
AC_SUBST(glade_localedir)
dnl ================================================================
dnl MODULES
dnl ================================================================
if test "x${libdir}" = "xNONE"; then
modulesdir="${ac_default_libdir}/${PACKAGE}"
else
modulesdir="${libdir}/${PACKAGE}"
fi
AC_SUBST(pixmapsdir)
AC_SUBST(widgetsdir)
AC_SUBST(catalogsdir)
AC_SUBST(modulesdir)
case $host_os in
*mingw* | pw32* | cygwin*)
@ -112,6 +97,7 @@ widgets/Makefile
po/Makefile.in
src/Makefile
src/libgladeui-1.0.pc
src/glade-paths.sh
])
echo "

View File

@ -1,3 +1,5 @@
pixmapsdir = $(glade_pixmapsdir)
pixmaps_DATA = \
accellabel.png \
arrow.png \

View File

@ -6,3 +6,5 @@ Makefile.in
glade-marshallers.c
glade-marshallers.h
libgladeui-1.0.pc
glade-paths.h
glade-paths.sh

View File

@ -2,9 +2,10 @@
SUBDIRS=
bin_PROGRAMS = glade-3
lib_LTLIBRARIES = libgladeui-1.la
gladegtk_LTLIBRARIES = libgladegtk.la libgladeui.la
gladegtkdir = $(modulesdir)
gladegtk_LTLIBRARIES = libgladegtk.la
gladegtkdir = $(glade_modulesdir)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
@ -12,40 +13,30 @@ EXTRA_DIST = \
libgladegtk_la_SOURCES = glade-gtk.c
libgladegtk_la_LDFLAGS = -module -avoid-version
libgladegtk_la_LIBADD = libgladeui-1.la $(GLADE_LIBS)
if WITH_WIN32
glade_3_LDFLAGS = glade_plugin.def
libgladegtk_la_LDFLAGS += -no-undefined -L./ -Wl,$(bin_PROGRAMS).a $(GLADE_LIBS)
libgladegtk_la_DEPENDENCIES = $(bin_PROGRAMS).a
CLEANFILES += $(bin_PROGRAMS).a
endif
INCLUDES = \
AM_CFLAGS = -g -Wall \
-I$(top_srcdir) \
-I$(top_builddir) \
$(GLADE_CFLAGS) \
-DMODULES_DIR=\""@modulesdir@"\"
AM_CFLAGS = -g -Wall
$(GLADE_CFLAGS)
BUILT_SOURCES = \
glade-marshallers.c \
glade-marshallers.h
glade-marshallers.h \
glade-paths.h
glade_3_LDADD = \
libgladeui.la
glade_3_LDADD = libgladeui-1.la
glade_3_SOURCES = \
glade-project-window.c \
glade-project-window.c glade-project-window.h \
main.c
libgladeui_la_SOURCES = \
libgladeui_1_la_SOURCES = \
glade-debug.c \
glade-project.c \
glade-parameter.c \
glade-placeholder.c \
glade-project-view.c \
glade-project-window.c \
glade-widget-class.c \
glade-xml-utils.c \
glade-palette.c \
@ -70,8 +61,9 @@ libgladeui_la_SOURCES = \
glade-parser.c \
glade-app.c
libgladeui_la_LIBADD = \
$(GLADE_LIBS)
libgladeui_1_la_CFLAGS = -DINSIDE_LIBGLADEUI $(AM_CFLAGS)
libgladeui_1_la_LDFLAGS = -version-info $(GLADE_CURRENT):$(GLADE_REVISION):$(GLADE_AGE)
libgladeui_1_la_LIBADD = $(GLADE_LIBS)
libgladeuiincludedir=$(includedir)/libgladeui-1.0/libgladeui
libgladeuiinclude_HEADERS = \
@ -85,7 +77,6 @@ libgladeuiinclude_HEADERS = \
glade-signal-editor.h \
glade-palette.h \
glade-cursor.h \
glade-project-window.h \
glade-types.h \
glade-widget.h \
glade-widget-class.h \
@ -112,16 +103,27 @@ libgladeuiinclude_HEADERS = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgladeui-1.0.pc
$(bin_PROGRAMS).a: $(bin_PROGRAMS)
$(DLLTOOL) -D $(bin_PROGRAMS) -d glade_plugin.def -l $(bin_PROGRAMS).a
if WITH_WIN32
libgladegtk_la_LDFLAGS += -no-undefined
libgladeui_1_la_LDFLAGS += -no-undefined
endif
#
# Marshaller generation
#
glade-marshallers.h: glade-marshallers.list $(GLIB_GENMARSHAL) Makefile.am
glade-marshallers.h: glade-marshallers.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) --prefix=glade_marshal $(srcdir)/glade-marshallers.list --header > glade-marshallers-h.tmp \
&& mv glade-marshallers-h.tmp glade-marshallers.h \
|| ( rm -f glade-marshallers-h.tmp && exit 1)
glade-marshallers.c: glade-marshallers.list $(GLIB_GENMARSHAL) Makefile.am
glade-marshallers.c: glade-marshallers.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) --prefix=glade_marshal $(srcdir)/glade-marshallers.list --body > glade-marshallers-c.tmp \
&& mv glade-marshallers-c.tmp glade-marshallers.c \
|| ( rm -f glade-marshallers-c.tmp && exit 1 )
glade-paths.h: glade-paths.sh
@sh $< > $@.tmp ; \
if cmp -s $@.tmp $@; then \
rm $@.tmp; \
else \
mv $@.tmp $@ ; echo updated glade-paths.h ; \
fi

View File

@ -45,6 +45,7 @@
#include "glade-catalog.h"
#include "glade-transform.h"
#include "glade-app.h"
#include "glade-paths.h"
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkstock.h>
@ -81,17 +82,12 @@ enum
static guint glade_app_signals[LAST_SIGNAL] = { 0 };
gchar *glade_data_dir = GLADE_DATA_DIR;
gchar *glade_pixmaps_dir = PIXMAPS_DIR;
gchar *glade_widgets_dir = WIDGETS_DIR;
gchar *glade_catalogs_dir = CATALOGS_DIR;
#ifdef MODULES_DIR
gchar *glade_modules_dir = MODULES_DIR;
#else
gchar *glade_modules_dir = NULL;
#endif
gchar *glade_locale_dir = LOCALE_DIR;
gchar *glade_icon_dir = ICONS_DIR;
gchar *glade_pixmaps_dir = GLADE_PIXMAPSDIR;
gchar *glade_catalogs_dir = GLADE_CATALOGSDIR;
gchar *glade_modules_dir = GLADE_MODULESDIR;
gchar *glade_locale_dir = GLADE_LOCALEDIR;
gchar *glade_icon_dir = GLADE_ICONDIR;
gboolean glade_verbose = FALSE;
static GObjectClass* parent_class = NULL;
@ -121,6 +117,14 @@ glade_app_dispose (GObject *app)
static void
glade_app_finalize (GObject *app)
{
#ifdef G_OS_WIN32
g_free (glade_pixmaps_dir);
g_free (glade_catalogs_dir);
g_free (glade_modules_dir);
g_free (glade_locale_dir);
g_free (glade_icon_dir);
#endif
g_free (GLADE_APP (app)->priv);
if (parent_class->finalize)
parent_class->finalize (app);
@ -195,12 +199,10 @@ glade_app_init (GladeApp *app)
gchar *prefix;
prefix = g_win32_get_package_installation_directory (NULL, NULL);
glade_data_dir = g_build_filename (prefix, "share", "glade", NULL);
glade_pixmaps_dir = g_build_filename (prefix, "lib", PACKAGE "-" VERSION, "pixmaps", NULL);
glade_widgets_dir = g_build_filename (prefix, "lib", PACKAGE "-" VERSION, "widgets", NULL);
glade_catalogs_dir = g_build_filename (prefix, "lib", PACKAGE "-" VERSION, "catalogs", NULL);
glade_modules_dir = g_build_filename (prefix, "lib", "glade", NULL);
glade_locale_dir = g_build_filename (prefix, "lib", "locale", NULL);
glade_pixmaps_dir = g_build_filename (prefix, "share", PACKAGE, "pixmaps", NULL);
glade_catalogs_dir = g_build_filename (prefix, "lib", PACKAGE, "catalogs", NULL);
glade_modules_dir = g_build_filename (prefix, "lib", PACKAGE, "modules", NULL);
glade_locale_dir = g_build_filename (prefix, "share", "locale", NULL);
glade_icon_dir = g_build_filename (prefix, "share", "pixmaps", NULL);
g_free (prefix);
#endif

View File

@ -50,62 +50,61 @@ struct _GladeAppClass
void (*update_ui_signal) (GladeApp *app);
};
GType glade_app_get_type (void);
LIBGLADEUI_API GType glade_app_get_type (void);
GladeApp* glade_app_new (void);
LIBGLADEUI_API GladeApp* glade_app_new (void);
void glade_app_update_ui (GladeApp* app);
LIBGLADEUI_API void glade_app_update_ui (GladeApp* app);
void glade_app_set_window (GladeApp* app, GtkWidget *window);
GtkWidget* glade_app_get_window (GladeApp* app);
LIBGLADEUI_API void glade_app_set_window (GladeApp* app, GtkWidget *window);
LIBGLADEUI_API GtkWidget* glade_app_get_window (GladeApp* app);
GladeEditor* glade_app_get_editor (GladeApp* app);
GladeWidgetClass* glade_app_get_add_class (GladeApp* app);
GladeWidgetClass* glade_app_get_alt_class (GladeApp* app);
GladePalette* glade_app_get_palette (GladeApp* app);
GladeClipboard* glade_app_get_clipboard (GladeApp* app);
GtkWidget* glade_app_get_clipboard_view (GladeApp* app);
LIBGLADEUI_API GladeEditor* glade_app_get_editor (GladeApp* app);
LIBGLADEUI_API GladeWidgetClass* glade_app_get_add_class (GladeApp* app);
LIBGLADEUI_API GladeWidgetClass* glade_app_get_alt_class (GladeApp* app);
LIBGLADEUI_API GladePalette* glade_app_get_palette (GladeApp* app);
LIBGLADEUI_API GladeClipboard* glade_app_get_clipboard (GladeApp* app);
LIBGLADEUI_API GtkWidget* glade_app_get_clipboard_view (GladeApp* app);
GladeProject* glade_app_get_active_project (GladeApp* app);
void glade_app_set_project (GladeApp *app, GladeProject *project);
void glade_app_add_project (GladeApp *app, GladeProject *project);
void glade_app_remove_project (GladeApp *app, GladeProject *project);
GList* glade_app_get_projects (GladeApp *app);
LIBGLADEUI_API GladeProject* glade_app_get_active_project (GladeApp* app);
LIBGLADEUI_API void glade_app_set_project (GladeApp *app, GladeProject *project);
LIBGLADEUI_API void glade_app_add_project (GladeApp *app, GladeProject *project);
LIBGLADEUI_API void glade_app_remove_project (GladeApp *app, GladeProject *project);
LIBGLADEUI_API GList* glade_app_get_projects (GladeApp *app);
void glade_app_add_project_view (GladeApp *app, GladeProjectView *view);
LIBGLADEUI_API void glade_app_add_project_view (GladeApp *app, GladeProjectView *view);
void glade_app_command_copy (GladeApp *app);
void glade_app_command_cut (GladeApp *app);
void glade_app_command_paste (GladeApp *app);
void glade_app_command_delete (GladeApp *app);
void glade_app_command_undo (GladeApp *app);
void glade_app_command_redo (GladeApp *app);
LIBGLADEUI_API void glade_app_command_copy (GladeApp *app);
LIBGLADEUI_API void glade_app_command_cut (GladeApp *app);
LIBGLADEUI_API void glade_app_command_paste (GladeApp *app);
LIBGLADEUI_API void glade_app_command_delete (GladeApp *app);
LIBGLADEUI_API void glade_app_command_undo (GladeApp *app);
LIBGLADEUI_API void glade_app_command_redo (GladeApp *app);
/* Default glade application */
void glade_default_app_set (GladeApp *app);
GtkWidget* glade_default_app_get_window (void);
GladeEditor* glade_default_app_get_editor (void);
GladeWidgetClass* glade_default_app_get_add_class (void);
GladeWidgetClass* glade_default_app_get_alt_class (void);
GladePalette* glade_default_app_get_palette (void);
GladeClipboard* glade_default_app_get_clipboard (void);
GList* glade_default_app_get_projects (void);
GladeProject* glade_default_app_get_active_project (void);
void glade_default_app_update_ui (void);
GList* glade_default_app_get_selection (void);
LIBGLADEUI_API void glade_default_app_set (GladeApp *app);
LIBGLADEUI_API GtkWidget* glade_default_app_get_window (void);
LIBGLADEUI_API GladeEditor* glade_default_app_get_editor (void);
LIBGLADEUI_API GladeWidgetClass* glade_default_app_get_add_class (void);
LIBGLADEUI_API GladeWidgetClass* glade_default_app_get_alt_class (void);
LIBGLADEUI_API GladePalette* glade_default_app_get_palette (void);
LIBGLADEUI_API GladeClipboard* glade_default_app_get_clipboard (void);
LIBGLADEUI_API GladeProject* glade_default_app_get_active_project (void);
LIBGLADEUI_API void glade_default_app_update_ui (void);
LIBGLADEUI_API GList* glade_default_app_get_selection (void);
/* These handle selection on a global scope and take care
* of multiple project logic.
*/
gboolean glade_default_app_is_selected (GObject *object);
void glade_default_app_selection_set (GObject *object,
gboolean emit_signal);
void glade_default_app_selection_add (GObject *object,
gboolean emit_signal);
void glade_default_app_selection_remove (GObject *object,
gboolean emit_signal);
void glade_default_app_selection_clear (gboolean emit_signal);
void glade_default_app_selection_changed(void);
LIBGLADEUI_API gboolean glade_default_app_is_selected (GObject *object);
LIBGLADEUI_API void glade_default_app_selection_set (GObject *object,
gboolean emit_signal);
LIBGLADEUI_API void glade_default_app_selection_add (GObject *object,
gboolean emit_signal);
LIBGLADEUI_API void glade_default_app_selection_remove (GObject *object,
gboolean emit_signal);
LIBGLADEUI_API void glade_default_app_selection_clear (gboolean emit_signal);
LIBGLADEUI_API void glade_default_app_selection_changed(void);
G_END_DECLS

View File

@ -23,7 +23,7 @@
#include <gtk/gtk.h>
#include <string.h>
#include "glade-types.h"
#include "glade.h"
#include "glade-project.h"
#include "glade-xml-utils.h"
#include "glade-widget.h"
@ -36,7 +36,6 @@
#include "glade-placeholder.h"
#include "glade-clipboard.h"
#include "glade-signal.h"
#include "glade.h"
#include "glade-app.h"
typedef struct {

View File

@ -39,31 +39,31 @@ struct _GladeCommandClass
};
GType glade_command_get_type (void);
LIBGLADEUI_API GType glade_command_get_type (void);
void glade_command_undo (GladeProject *project);
void glade_command_redo (GladeProject *project);
LIBGLADEUI_API void glade_command_undo (GladeProject *project);
LIBGLADEUI_API void glade_command_redo (GladeProject *project);
void glade_command_set_property (GladeProperty *property, const GValue *value);
void glade_command_set_name (GladeWidget *glade_widget, const gchar *name);
LIBGLADEUI_API void glade_command_set_property (GladeProperty *property, const GValue *value);
LIBGLADEUI_API void glade_command_set_name (GladeWidget *glade_widget, const gchar *name);
void glade_command_delete (GList *widgets);
GladeWidget *glade_command_create (GladeWidgetClass *widget_class,
GladeWidget *parent,
GladePlaceholder *placeholder,
GladeProject *project);
LIBGLADEUI_API void glade_command_delete (GList *widgets);
LIBGLADEUI_API GladeWidget *glade_command_create (GladeWidgetClass *widget_class,
GladeWidget *parent,
GladePlaceholder *placeholder,
GladeProject *project);
void glade_command_cut (GList *widgets);
void glade_command_copy (GList *widgets);
void glade_command_paste (GList *widgets,
GladeWidget *parent,
GladePlaceholder *placeholder);
LIBGLADEUI_API void glade_command_cut (GList *widgets);
LIBGLADEUI_API void glade_command_copy (GList *widgets);
LIBGLADEUI_API void glade_command_paste (GList *widgets,
GladeWidget *parent,
GladePlaceholder *placeholder);
void glade_command_add_signal (GladeWidget *glade_widget, const GladeSignal *signal);
void glade_command_remove_signal (GladeWidget *glade_widget, const GladeSignal *signal);
void glade_command_change_signal (GladeWidget *glade_widget,
const GladeSignal *old,
const GladeSignal *new);
LIBGLADEUI_API void glade_command_add_signal (GladeWidget *glade_widget, const GladeSignal *signal);
LIBGLADEUI_API void glade_command_remove_signal (GladeWidget *glade_widget, const GladeSignal *signal);
LIBGLADEUI_API void glade_command_change_signal (GladeWidget *glade_widget,
const GladeSignal *old,
const GladeSignal *new);
G_END_DECLS

View File

@ -2,6 +2,6 @@
#ifndef __GLADE_DEBUG_H__
#define __GLADE_DEBUG_H__
void glade_setup_log_handlers (void);
LIBGLADEUI_API void glade_setup_log_handlers (void);
#endif /* __GLADE-DEBUG_H__ */

View File

@ -183,17 +183,17 @@ struct _GladeEditorProperty
*/
};
GType glade_editor_get_type (void);
LIBGLADEUI_API GType glade_editor_get_type (void);
GladeEditor *glade_editor_new (void);
LIBGLADEUI_API GladeEditor *glade_editor_new (void);
void glade_editor_load_widget (GladeEditor *editor,
GladeWidget *widget);
void glade_editor_refresh (GladeEditor *editor);
void glade_editor_update_widget_name (GladeEditor *editor);
gboolean glade_editor_query_dialog (GladeEditor *editor,
GladeWidget *widget);
gboolean glade_editor_editable_property (GParamSpec *pspec);
LIBGLADEUI_API void glade_editor_load_widget (GladeEditor *editor,
GladeWidget *widget);
LIBGLADEUI_API void glade_editor_refresh (GladeEditor *editor);
LIBGLADEUI_API void glade_editor_update_widget_name (GladeEditor *editor);
LIBGLADEUI_API gboolean glade_editor_query_dialog (GladeEditor *editor,
GladeWidget *widget);
LIBGLADEUI_API gboolean glade_editor_editable_property (GParamSpec *pspec);
G_END_DECLS

View File

@ -24,6 +24,7 @@
#include <stdlib.h>
#include <gtk/gtk.h>
#include "glade.h"
#include "glade-plugin.h"
#include "fixed_bg.xpm"

View File

@ -68,11 +68,11 @@ struct _GladePaletteClass
void (*catalog_change) (GladePalette *palette);
};
GType glade_palette_get_type (void);
LIBGLADEUI_API GType glade_palette_get_type (void);
GladePalette *glade_palette_new (GList *catalogs);
LIBGLADEUI_API GladePalette *glade_palette_new (GList *catalogs);
void glade_palette_unselect_widget (GladePalette *palette);
LIBGLADEUI_API void glade_palette_unselect_widget (GladePalette *palette);
G_END_DECLS

37
src/glade-paths.sh.in Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh -e
prefix="@prefix@"
exec_prefix="@exec_prefix@"
sysconfdir="@sysconfdir@"
datadir="@datadir@"
libdir="@libdir@"
PACKAGE="@PACKAGE@"
DATADIRNAME="@DATADIRNAME@"
glade_version="@glade_version@"
glade_datadir="@glade_datadir@"
glade_libdir="@glade_libdir@"
glade_catalogsdir="@glade_catalogsdir@"
glade_modulesdir="@glade_modulesdir@"
glade_pixmapsdir="@glade_pixmapsdir@"
glade_icondir="@glade_icondir@"
glade_localedir="@glade_localedir@"
cat <<EOF
/* This file has been automatically generated. Do not edit. */
#ifndef GLADE_PATHS_H
#define GLADE_PATHS_H
#define GLADE_VERSION "$glade_version"
#define GLADE_DATADIR "$glade_datadir"
#define GLADE_LIBDIR "$glade_libdir"
#define GLADE_CATALOGSDIR "$glade_catalogsdir"
#define GLADE_MODULESDIR "$glade_modulesdir"
#define GLADE_PIXMAPSDIR "$glade_pixmapsdir"
#define GLADE_ICONDIR "$glade_icondir"
#define GLADE_LOCALEDIR "$glade_localedir"
#endif /* GLADE_PATHS_H */
EOF

View File

@ -21,6 +21,7 @@
*/
#include <gtk/gtk.h>
#include "glade.h"
#include "glade-placeholder.h"
#include "glade-xml-utils.h"
#include "glade-project.h"
@ -29,7 +30,6 @@
#include "glade-popup.h"
#include "glade-cursor.h"
#include "glade-widget.h"
#include "glade-utils.h"
#include "glade-app.h"
static void glade_placeholder_class_init (GladePlaceholderClass *klass);

View File

@ -31,9 +31,9 @@ struct _GladePlaceholderClass
};
GType glade_placeholder_get_type (void) G_GNUC_CONST;
GtkWidget *glade_placeholder_new (void);
GladeWidget *glade_placeholder_get_parent (GladePlaceholder *placeholder);
LIBGLADEUI_API GType glade_placeholder_get_type (void) G_GNUC_CONST;
LIBGLADEUI_API GtkWidget *glade_placeholder_new (void);
LIBGLADEUI_API GladeWidget *glade_placeholder_get_parent (GladePlaceholder *placeholder);
G_END_DECLS

View File

@ -94,16 +94,16 @@ typedef enum {
} GladeProjectViewType;
GType glade_project_view_get_type (void);
LIBGLADEUI_API GType glade_project_view_get_type (void);
GladeProjectView *glade_project_view_new (GladeProjectViewType type);
LIBGLADEUI_API GladeProjectView *glade_project_view_new (GladeProjectViewType type);
GladeProject *glade_project_view_get_project (GladeProjectView *project_view);
LIBGLADEUI_API GladeProject *glade_project_view_get_project (GladeProjectView *project_view);
void glade_project_view_set_project (GladeProjectView *project_view,
GladeProject *project);
LIBGLADEUI_API void glade_project_view_set_project (GladeProjectView *project_view,
GladeProject *project);
void glade_project_view_select_item (GladeProjectView *view, GladeWidget *item);
LIBGLADEUI_API void glade_project_view_select_item (GladeProjectView *view, GladeWidget *item);
G_END_DECLS

View File

@ -64,38 +64,38 @@ struct _GladeProjectClass
void (*selection_changed) (GladeProject *project);
};
GType glade_project_get_type (void);
LIBGLADEUI_API GType glade_project_get_type (void);
GladeProject *glade_project_new (gboolean untitled);
GladeProject *glade_project_open (const gchar *path);
gboolean glade_project_save (GladeProject *project,
const gchar *path,
GError **error);
void glade_project_add_object (GladeProject *project, GObject *object);
void glade_project_remove_object (GladeProject *project, GObject *object);
gboolean glade_project_has_object (GladeProject *project, GObject *object);
GladeWidget *glade_project_get_widget_by_name (GladeProject *project, const char *name);
char *glade_project_new_widget_name (GladeProject *project, const char *base_name);
void glade_project_widget_name_changed (GladeProject *project, GladeWidget *widget,
const char *old_name);
GtkTooltips *glade_project_get_tooltips (GladeProject *project);
LIBGLADEUI_API GladeProject *glade_project_new (gboolean untitled);
LIBGLADEUI_API GladeProject *glade_project_open (const gchar *path);
LIBGLADEUI_API gboolean glade_project_save (GladeProject *project,
const gchar *path,
GError **error);
LIBGLADEUI_API void glade_project_add_object (GladeProject *project, GObject *object);
LIBGLADEUI_API void glade_project_remove_object (GladeProject *project, GObject *object);
LIBGLADEUI_API gboolean glade_project_has_object (GladeProject *project, GObject *object);
LIBGLADEUI_API GladeWidget *glade_project_get_widget_by_name (GladeProject *project, const char *name);
LIBGLADEUI_API char *glade_project_new_widget_name (GladeProject *project, const char *base_name);
LIBGLADEUI_API void glade_project_widget_name_changed (GladeProject *project, GladeWidget *widget,
const char *old_name);
LIBGLADEUI_API GtkTooltips *glade_project_get_tooltips (GladeProject *project);
/* Selection */
gboolean glade_project_is_selected (GladeProject *project,
GObject *object);
void glade_project_selection_set (GladeProject *project,
GObject *object,
gboolean emit_signal);
void glade_project_selection_add (GladeProject *project,
GObject *object,
gboolean emit_signal);
void glade_project_selection_remove (GladeProject *project,
GObject *object,
gboolean emit_signal);
void glade_project_selection_clear (GladeProject *project,
gboolean emit_signal);
void glade_project_selection_changed (GladeProject *project);
GList *glade_project_selection_get (GladeProject *project);
LIBGLADEUI_API gboolean glade_project_is_selected (GladeProject *project,
GObject *object);
LIBGLADEUI_API void glade_project_selection_set (GladeProject *project,
GObject *object,
gboolean emit_signal);
LIBGLADEUI_API void glade_project_selection_add (GladeProject *project,
GObject *object,
gboolean emit_signal);
LIBGLADEUI_API void glade_project_selection_remove (GladeProject *project,
GObject *object,
gboolean emit_signal);
LIBGLADEUI_API void glade_project_selection_clear (GladeProject *project,
gboolean emit_signal);
LIBGLADEUI_API void glade_project_selection_changed (GladeProject *project);
LIBGLADEUI_API GList *glade_project_selection_get (GladeProject *project);
G_END_DECLS

View File

@ -46,32 +46,32 @@ struct _GladeProperty
};
GladeProperty *glade_property_new (GladePropertyClass *class,
GladeWidget *widget,
GValue *value);
LIBGLADEUI_API GladeProperty *glade_property_new (GladePropertyClass *class,
GladeWidget *widget,
GValue *value);
void glade_property_free (GladeProperty *property);
LIBGLADEUI_API void glade_property_free (GladeProperty *property);
void glade_property_set (GladeProperty *property, const GValue *value);
LIBGLADEUI_API void glade_property_set (GladeProperty *property, const GValue *value);
void glade_property_sync (GladeProperty *property);
LIBGLADEUI_API void glade_property_sync (GladeProperty *property);
gboolean glade_property_write (GArray *props, GladeProperty *property,
GladeInterface *interface);
LIBGLADEUI_API gboolean glade_property_write (GArray *props, GladeProperty *property,
GladeInterface *interface);
GladeProperty *glade_property_dup (GladeProperty *template, GladeWidget *widget);
LIBGLADEUI_API GladeProperty *glade_property_dup (GladeProperty *template, GladeWidget *widget);
void glade_property_i18n_set_comment (GladeProperty *property, const gchar *str);
LIBGLADEUI_API void glade_property_i18n_set_comment (GladeProperty *property, const gchar *str);
const gchar *glade_property_i18n_get_comment (GladeProperty *property);
LIBGLADEUI_API const gchar *glade_property_i18n_get_comment (GladeProperty *property);
void glade_property_i18n_set_translatable (GladeProperty *property, gboolean translatable);
LIBGLADEUI_API void glade_property_i18n_set_translatable (GladeProperty *property, gboolean translatable);
gboolean glade_property_i18n_get_translatable (GladeProperty *property);
LIBGLADEUI_API gboolean glade_property_i18n_get_translatable (GladeProperty *property);
void glade_property_i18n_set_has_context (GladeProperty *property, gboolean has_context);
LIBGLADEUI_API void glade_property_i18n_set_has_context (GladeProperty *property, gboolean has_context);
gboolean glade_property_i18n_get_has_context (GladeProperty *property);
LIBGLADEUI_API gboolean glade_property_i18n_get_has_context (GladeProperty *property);
G_END_DECLS

View File

@ -16,58 +16,58 @@ enum _GladeUtilFileDialogType
#define glade_implement_me() g_print ("Implement me : %s %d %s\n", __FILE__, __LINE__, G_GNUC_FUNCTION);
void glade_util_widget_set_tooltip (GtkWidget *widget, const gchar *str);
GType glade_util_get_type_from_name (const gchar *name);
GParamSpec *glade_utils_get_pspec_from_funcname (const gchar *funcname);
void glade_util_ui_warn (GtkWidget *parent, const gchar *warning);
void glade_util_flash_message (GtkWidget *statusbar,
guint context_id,
gchar *format, ...);
LIBGLADEUI_API void glade_util_widget_set_tooltip (GtkWidget *widget, const gchar *str);
LIBGLADEUI_API GType glade_util_get_type_from_name (const gchar *name);
LIBGLADEUI_API GParamSpec *glade_utils_get_pspec_from_funcname (const gchar *funcname);
LIBGLADEUI_API void glade_util_ui_warn (GtkWidget *parent, const gchar *warning);
LIBGLADEUI_API void glade_util_flash_message (GtkWidget *statusbar,
guint context_id,
gchar *format, ...);
/* This is a GCompareFunc for comparing the labels of 2 stock items, ignoring
any '_' characters. It isn't particularly efficient. */
gint glade_util_compare_stock_labels (gconstpointer a, gconstpointer b);
LIBGLADEUI_API gint glade_util_compare_stock_labels (gconstpointer a, gconstpointer b);
void glade_util_hide_window (GtkWindow *window);
gchar *glade_util_gtk_combo_func (gpointer data);
gpointer glade_util_gtk_combo_find (GtkCombo *combo);
LIBGLADEUI_API void glade_util_hide_window (GtkWindow *window);
LIBGLADEUI_API gchar *glade_util_gtk_combo_func (gpointer data);
LIBGLADEUI_API gpointer glade_util_gtk_combo_find (GtkCombo *combo);
GtkWidget *glade_util_file_dialog_new (const gchar *title,
GtkWindow *parent,
GladeUtilFileDialogType action);
void glade_util_replace (char *str, char a, char b);
gchar *glade_util_duplicate_underscores (const char *name);
LIBGLADEUI_API GtkWidget *glade_util_file_dialog_new (const gchar *title,
GtkWindow *parent,
GladeUtilFileDialogType action);
LIBGLADEUI_API void glade_util_replace (char *str, char a, char b);
LIBGLADEUI_API gchar *glade_util_duplicate_underscores (const char *name);
void glade_util_add_selection (GtkWidget *widget);
void glade_util_remove_selection (GtkWidget *widget);
gboolean glade_util_has_selection (GtkWidget *widget);
void glade_util_clear_selection (void);
GList *glade_util_get_selection (void);
void glade_util_queue_draw_nodes (GdkWindow *window);
LIBGLADEUI_API void glade_util_add_selection (GtkWidget *widget);
LIBGLADEUI_API void glade_util_remove_selection (GtkWidget *widget);
LIBGLADEUI_API gboolean glade_util_has_selection (GtkWidget *widget);
LIBGLADEUI_API void glade_util_clear_selection (void);
LIBGLADEUI_API GList *glade_util_get_selection (void);
LIBGLADEUI_API void glade_util_queue_draw_nodes (GdkWindow *window);
GladeWidget *glade_util_get_parent (GtkWidget *w);
GList *glade_util_container_get_all_children (GtkContainer *container);
LIBGLADEUI_API GladeWidget *glade_util_get_parent (GtkWidget *w);
LIBGLADEUI_API GList *glade_util_container_get_all_children (GtkContainer *container);
GList *glade_util_uri_list_parse (const gchar* uri_list);
LIBGLADEUI_API GList *glade_util_uri_list_parse (const gchar* uri_list);
gboolean glade_util_gtkcontainer_relation (GladeWidget *parent,
GladeWidget *widget);
gboolean glade_util_any_gtkcontainer_relation (GladeWidget *parent,
GList *widgets);
LIBGLADEUI_API gboolean glade_util_gtkcontainer_relation (GladeWidget *parent,
GladeWidget *widget);
LIBGLADEUI_API gboolean glade_util_any_gtkcontainer_relation (GladeWidget *parent,
GList *widgets);
gboolean glade_util_widget_pastable (GladeWidget *child,
GladeWidget *parent);
LIBGLADEUI_API gboolean glade_util_widget_pastable (GladeWidget *child,
GladeWidget *parent);
void glade_util_paste_clipboard (GladePlaceholder *placeholder,
GladeWidget *parent);
void glade_util_cut_selection (void);
void glade_util_copy_selection (void);
void glade_util_delete_selection (void);
void glade_util_delete_clipboard (void);
LIBGLADEUI_API void glade_util_paste_clipboard (GladePlaceholder *placeholder,
GladeWidget *parent);
LIBGLADEUI_API void glade_util_cut_selection (void);
LIBGLADEUI_API void glade_util_copy_selection (void);
LIBGLADEUI_API void glade_util_delete_selection (void);
LIBGLADEUI_API void glade_util_delete_clipboard (void);
GtkTreeIter *glade_util_find_iter_by_widget (GtkTreeModel *model,
GladeWidget *findme,
gint column);
LIBGLADEUI_API GtkTreeIter *glade_util_find_iter_by_widget (GtkTreeModel *model,
GladeWidget *findme,
gint column);
G_END_DECLS

View File

@ -149,50 +149,50 @@ struct _GladePackagingDefault
gchar *value;
};
GladeWidgetClass *glade_widget_class_new (GladeXmlNode *class_node,
const gchar *library);
void glade_widget_class_free (GladeWidgetClass *widget_class);
GladeWidgetClass *glade_widget_class_get_by_name (const char *name);
GladeWidgetClass *glade_widget_class_get_by_type (GType type);
GList *glade_widget_class_get_derived_types (GType type);
GType glade_widget_class_get_type (GladeWidgetClass *class);
void glade_widget_class_dump_param_specs (GladeWidgetClass *class);
GladePropertyClass *glade_widget_class_get_property_class (GladeWidgetClass *class,
const gchar *name);
GladeSupportedChild *glade_widget_class_get_child_support (GladeWidgetClass *class,
GType child_type);
LIBGLADEUI_API GladeWidgetClass *glade_widget_class_new (GladeXmlNode *class_node,
const gchar *library);
LIBGLADEUI_API void glade_widget_class_free (GladeWidgetClass *widget_class);
LIBGLADEUI_API GladeWidgetClass *glade_widget_class_get_by_name (const char *name);
LIBGLADEUI_API GladeWidgetClass *glade_widget_class_get_by_type (GType type);
LIBGLADEUI_API GList *glade_widget_class_get_derived_types (GType type);
LIBGLADEUI_API GType glade_widget_class_get_type (GladeWidgetClass *class);
LIBGLADEUI_API void glade_widget_class_dump_param_specs (GladeWidgetClass *class);
LIBGLADEUI_API GladePropertyClass *glade_widget_class_get_property_class (GladeWidgetClass *class,
const gchar *name);
LIBGLADEUI_API GladeSupportedChild *glade_widget_class_get_child_support (GladeWidgetClass *class,
GType child_type);
void glade_widget_class_container_add (GladeWidgetClass *class,
GObject *container,
GObject *child);
void glade_widget_class_container_remove (GladeWidgetClass *class,
GObject *container,
GObject *child);
GList *glade_widget_class_container_get_children (GladeWidgetClass *class,
GObject *container);
GList *glade_widget_class_container_get_all_children (GladeWidgetClass *class,
GObject *container);
void glade_widget_class_container_set_property (GladeWidgetClass *class,
GObject *container,
GObject *child,
const gchar *property_name,
const GValue *value);
void glade_widget_class_container_get_property (GladeWidgetClass *class,
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value);
void glade_widget_class_container_fill_empty (GladeWidgetClass *class,
GObject *container);
void glade_widget_class_container_replace_child (GladeWidgetClass *class,
GObject *container,
GObject *old,
GObject *new);
gboolean glade_widget_class_contains_non_widgets (GladeWidgetClass *class);
LIBGLADEUI_API void glade_widget_class_container_add (GladeWidgetClass *class,
GObject *container,
GObject *child);
LIBGLADEUI_API void glade_widget_class_container_remove (GladeWidgetClass *class,
GObject *container,
GObject *child);
LIBGLADEUI_API GList *glade_widget_class_container_get_children (GladeWidgetClass *class,
GObject *container);
LIBGLADEUI_API GList *glade_widget_class_container_get_all_children (GladeWidgetClass *class,
GObject *container);
LIBGLADEUI_API void glade_widget_class_container_set_property (GladeWidgetClass *class,
GObject *container,
GObject *child,
const gchar *property_name,
const GValue *value);
LIBGLADEUI_API void glade_widget_class_container_get_property (GladeWidgetClass *class,
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value);
LIBGLADEUI_API void glade_widget_class_container_fill_empty (GladeWidgetClass *class,
GObject *container);
LIBGLADEUI_API void glade_widget_class_container_replace_child (GladeWidgetClass *class,
GObject *container,
GObject *old,
GObject *new);
LIBGLADEUI_API gboolean glade_widget_class_contains_non_widgets (GladeWidgetClass *class);
GladePackingDefault *glade_widget_class_get_packing_default (GladeWidgetClass *child_class,
GladeWidgetClass *container_class,
const gchar *propert_id);
LIBGLADEUI_API GladePackingDefault *glade_widget_class_get_packing_default (GladeWidgetClass *child_class,
GladeWidgetClass *container_class,
const gchar *propert_id);
G_END_DECLS

View File

@ -2319,7 +2319,7 @@ glade_widget_read (GladeProject *project, GladeWidgetInfo *info)
if ((widget = glade_widget_new_from_widget_info
(info, project, NULL)) != NULL)
{
if (verbose)
if (glade_verbose)
glade_widget_debug (widget);
}
return widget;

View File

@ -80,63 +80,63 @@ struct _GladeWidgetKlass
GladeSignal *new_signal_handler);
};
GType glade_widget_get_type (void);
GladeWidget * glade_widget_new (GladeWidget *widget,
GladeWidgetClass *klass,
GladeProject *project);
GladeWidget * glade_widget_new_for_internal_child (GladeWidgetClass *klass,
GladeWidget *parent,
GObject *internal_object,
const char *internal_name);
LIBGLADEUI_API GType glade_widget_get_type (void);
LIBGLADEUI_API GladeWidget * glade_widget_new (GladeWidget *widget,
GladeWidgetClass *klass,
GladeProject *project);
LIBGLADEUI_API GladeWidget * glade_widget_new_for_internal_child (GladeWidgetClass *klass,
GladeWidget *parent,
GObject *internal_object,
const char *internal_name);
void glade_widget_set_name (GladeWidget *widget,
const char *name);
void glade_widget_set_internal (GladeWidget *widget,
const char *internal);
void glade_widget_set_object (GladeWidget *widget,
GObject *new_object);
void glade_widget_set_project (GladeWidget *widget,
GladeProject *project);
LIBGLADEUI_API void glade_widget_set_name (GladeWidget *widget,
const char *name);
LIBGLADEUI_API void glade_widget_set_internal (GladeWidget *widget,
const char *internal);
LIBGLADEUI_API void glade_widget_set_object (GladeWidget *widget,
GObject *new_object);
LIBGLADEUI_API void glade_widget_set_project (GladeWidget *widget,
GladeProject *project);
const gchar *glade_widget_get_name (GladeWidget *widget);
const gchar *glade_widget_get_internal (GladeWidget *widget);
GladeWidgetClass *glade_widget_get_class (GladeWidget *widget);
GladeProject *glade_widget_get_project (GladeWidget *widget);
GObject *glade_widget_get_object (GladeWidget *widget);
GladeProperty *glade_widget_get_property (GladeWidget *widget,
const char *id_property);
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 GObject *glade_widget_get_object (GladeWidget *widget);
LIBGLADEUI_API GladeProperty *glade_widget_get_property (GladeWidget *widget,
const char *id_property);
void glade_widget_replace (GladeWidget *parent,
GObject *old_object,
GObject *new_object);
LIBGLADEUI_API void glade_widget_replace (GladeWidget *parent,
GObject *old_object,
GObject *new_object);
void glade_widget_rebuild (GladeWidget *widget);
GladeWidget *glade_widget_dup (GladeWidget *widget);
LIBGLADEUI_API void glade_widget_rebuild (GladeWidget *widget);
LIBGLADEUI_API GladeWidget *glade_widget_dup (GladeWidget *widget);
/* widget signals */
void glade_widget_add_signal_handler (GladeWidget *widget,
GladeSignal *signal_handler);
void glade_widget_remove_signal_handler (GladeWidget *widget,
GladeSignal *signal_handler);
void glade_widget_change_signal_handler (GladeWidget *widget,
GladeSignal *old_signal_handler,
GladeSignal *new_signal_handler);
LIBGLADEUI_API void glade_widget_add_signal_handler (GladeWidget *widget,
GladeSignal *signal_handler);
LIBGLADEUI_API void glade_widget_remove_signal_handler (GladeWidget *widget,
GladeSignal *signal_handler);
LIBGLADEUI_API void glade_widget_change_signal_handler (GladeWidget *widget,
GladeSignal *old_signal_handler,
GladeSignal *new_signal_handler);
/* array of GladeSignal* */
GPtrArray * glade_widget_list_signal_handlers (GladeWidget *widget,
const char *signal_name);
LIBGLADEUI_API GPtrArray * glade_widget_list_signal_handlers (GladeWidget *widget,
const char *signal_name);
/* serialization */
GladeWidgetInfo *glade_widget_write (GladeWidget *widget,
GladeInterface *interface);
GladeWidget *glade_widget_read (GladeProject *project,
GladeWidgetInfo *info);
LIBGLADEUI_API GladeWidgetInfo *glade_widget_write (GladeWidget *widget,
GladeInterface *interface);
LIBGLADEUI_API GladeWidget *glade_widget_read (GladeProject *project,
GladeWidgetInfo *info);
/* helper functions */
#define glade_widget_get_from_gobject(w) \
g_object_get_data (G_OBJECT (w), "GladeWidgetDataTag")
GladeWidget *glade_widget_get_parent (GladeWidget *widget);
void glade_widget_set_parent (GladeWidget *widget,
GladeWidget *parent);
LIBGLADEUI_API GladeWidget *glade_widget_get_parent (GladeWidget *widget);
LIBGLADEUI_API void glade_widget_set_parent (GladeWidget *widget,
GladeWidget *parent);
G_END_DECLS

View File

@ -30,6 +30,25 @@
#endif
#ifndef __GNUC__
# define __DLL_IMPORT__ __declspec(dllimport)
# define __DLL_EXPORT__ __declspec(dllexport)
#else
# define __DLL_IMPORT__ __attribute__((dllimport)) extern
# define __DLL_EXPORT__ __attribute__((dllexport)) extern
#endif
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32)
# ifdef INSIDE_LIBGLADEUI
# define LIBGLADEUI_API __DLL_EXPORT__
# else
# define LIBGLADEUI_API __DLL_IMPORT__
# endif
#else
# define LIBGLADEUI_API extern
#endif
#define g_ok_print g_print
/* I always grep for g_print to find left over debuging print's
* so for now, use g_ok_print on the code that is ment to do a g_print
@ -141,14 +160,12 @@
#define GLADE_TAG_PARENT_CLASS "parent-class"
#define GLADE_TAG_CHILD_PROPERTY "child-property"
extern gboolean verbose;
LIBGLADEUI_API gboolean glade_verbose;
extern gchar* glade_data_dir;
extern gchar* glade_pixmaps_dir;
extern gchar* glade_widgets_dir;
extern gchar* glade_catalogs_dir;
extern gchar* glade_modules_dir;
extern gchar* glade_locale_dir;
extern gchar* glade_icon_dir;
LIBGLADEUI_API gchar* glade_pixmaps_dir;
LIBGLADEUI_API gchar* glade_catalogs_dir;
LIBGLADEUI_API gchar* glade_modules_dir;
LIBGLADEUI_API gchar* glade_locale_dir;
LIBGLADEUI_API gchar* glade_icon_dir;
#endif /* __GLADE_H__ */

View File

@ -42,14 +42,13 @@
#endif
static gchar *widget_name = NULL;
gboolean verbose = FALSE;
#ifdef HAVE_LIBPOPT
static struct poptOption options[] = {
{ "dump", '\0', POPT_ARG_STRING, &widget_name, 0,
N_("dump the properties of a widget. --dump [gtk type] "
"where type can be GtkWindow, GtkLabel etc."), NULL },
{ "verbose", 'v', POPT_ARG_NONE, &verbose, 0,
{ "verbose", 'v', POPT_ARG_NONE, NULL, 0,
N_("be verbose."), NULL },
#ifndef USE_POPT_DLL
POPT_AUTOHELP
@ -118,9 +117,10 @@ main (int argc, char *argv[])
g_set_application_name (_("Glade-3 GUI Builder"));
#ifdef HAVE_LIBPOPT
# ifdef USE_POPT_DLL
# ifdef USE_POPT_DLL
options[sizeof (options) / sizeof (options[0]) - 2].arg = poptHelpOptions;
# endif
# endif
options[1].arg = &glade_verbose;
popt_context = poptGetContext ("Glade3", argc, (const char **) argv, options, 0);
files = parse_command_line (popt_context);
poptFreeContext (popt_context);
@ -164,17 +164,6 @@ main (int argc, char *argv[])
gtk_main ();
/* FIXME: Move this to glade-app.c */
#ifdef G_OS_WIN32
g_free (glade_data_dir);
g_free (glade_pixmaps_dir);
g_free (glade_widgets_dir);
g_free (glade_catalogs_dir);
g_free (glade_modules_dir);
g_free (glade_locale_dir);
g_free (glade_icon_dir);
#endif
return 0;
}

View File

@ -1,3 +1,5 @@
catalogsdir = $(glade_catalogsdir)
catalogs_DATA = \
gtk+.xml