config.status
libtool
stamp-h1
-`
+gtkmathview-bonobo.pc
GNOME_GtkMathView.server
Makefile
Makefile.in
-gtkmathview-bonobo.lo
libgtkmathview-bonobo.la
+control-factory.lo
libgtkmathview_bonobo_la_LDFLAGS = -version-info @GTKMATHVIEW_BONOBO_VERSION_INFO@
libgtkmathview_bonobo_la_SOURCES = \
- gtkmathview-bonobo.c
+ control-factory.c
pkginclude_HEADERS = \
- gtkmathview-bonobo.h
+ control-factory.h
INCLUDES = \
$(BONOBOUI_CFLAGS) \
--- /dev/null
+
+#include <bonobo.h>
+
+#if 1
+#include <gtkmathview.h>
+#endif
+
+enum {
+ MATH_VIEW_WIDTH,
+ MATH_VIEW_HEIGHT,
+ MATH_VIEW_TOP_X,
+ MATH_VIEW_TOP_Y,
+ MATH_VIEW_TOP,
+ MATH_VIEW_FONT_SIZE,
+ MATH_VIEW_ANTI_ALIASING,
+ MATH_VIEW_TRANSPARENCY,
+ MATH_VIEW_VERBOSITY,
+ MATH_VIEW_FONT_MANAGER
+} math_args;
+
+
+/*static char *
+make_reg_id(const char *iid)
+{
+ char *id;
+ id = bonobo_activation_make_registration_id(iid,Display_String(gdk_display));
+ return id;
+}*/
+
+static void
+get_prop(BonoboPropertyBag *bag,
+ BonoboArg *arg,
+ guint arg_id,
+ CORBA_Environment *ev,
+ gpointer user_data)
+{
+ GtkMathView *math_view;
+
+ g_return_if_fail(GTK_IS_MATH_VIEW(user_data));
+
+ math_view = GTK_MATH_VIEW(user_data);
+
+ switch(arg_id)
+ {
+ case MATH_VIEW_WIDTH:
+ {
+ gint i = gtk_math_view_get_width(math_view);
+ g_assert(arg->_type == BONOBO_ARG_INT);
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ case MATH_VIEW_HEIGHT:
+ {
+ guint i = gtk_math_view_get_height(math_view);
+
+ g_assert(arg->_type == BONOBO_ARG_INT);
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ case MATH_VIEW_TOP_X:
+ {
+ guint new_top_y,new_top_x;
+
+ g_assert(arg->_type == BONOBO_ARG_INT);
+ gtk_math_view_get_top(math_view,&new_top_x, &new_top_y);
+ BONOBO_ARG_SET_INT(arg,new_top_x);
+ }
+ break;
+ case MATH_VIEW_TOP_Y:
+ {
+ guint new_top_y,new_top_x;
+
+ g_assert(arg->_type == BONOBO_ARG_INT);
+ gtk_math_view_get_top(math_view,&new_top_x,&new_top_y);
+ BONOBO_ARG_SET_INT(arg,new_top_y);
+ }
+ break;
+ case MATH_VIEW_FONT_SIZE:
+ {
+ guint i = gtk_math_view_get_font_size(math_view);
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ case MATH_VIEW_ANTI_ALIASING:
+ {
+ gboolean i = gtk_math_view_get_anti_aliasing(math_view);
+ g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
+
+ BONOBO_ARG_SET_BOOLEAN(arg,i);
+ }
+ break;
+ case MATH_VIEW_TRANSPARENCY:
+ {
+ gboolean i = gtk_math_view_get_transparency(math_view);
+ g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
+
+ BONOBO_ARG_SET_BOOLEAN(arg,i);
+ }
+ break;
+ case MATH_VIEW_VERBOSITY:
+ {
+ gint i = gtk_math_view_get_log_verbosity(math_view);
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ case MATH_VIEW_FONT_MANAGER:
+ {gint i = (gint) gtk_math_view_get_font_manager_type(math_view);
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ default:
+ g_assert(FALSE);
+ }
+}
+
+static void
+set_prop(BonoboPropertyBag *bag,
+ const BonoboArg *arg,
+ guint arg_id,
+ CORBA_Environment *ev,
+ gpointer user_data)
+{
+ GtkMathView *math_view;
+
+ g_return_if_fail(GTK_IS_MATH_VIEW(user_data));
+
+ math_view = GTK_MATH_VIEW(user_data);
+
+ switch(arg_id)
+ {
+ /*case MATH_VIEW_WIDTH:
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ guint i = gtk_math_view_set_width(math_view);
+ BONOBO_ARG_SET_INT(arg,i);
+ break;
+ case MATH_VIEW_HEIGHT:
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ guint i = gtk_math_view_get_height(math_view);
+ BONOBO_ARG_SET_INT(arg,i);
+ break;*/
+ case MATH_VIEW_TOP_X:
+ {
+ guint old_top_y;
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ gtk_math_view_get_top(math_view, NULL, &old_top_y);
+ gtk_math_view_set_top(math_view, BONOBO_ARG_GET_INT(arg), old_top_y);
+ }
+ break;
+ case MATH_VIEW_TOP_Y:
+ {
+ guint old_top_x;
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ gtk_math_view_get_top(math_view, &old_top_x, NULL);
+ gtk_math_view_set_top(math_view, BONOBO_ARG_GET_INT(arg), old_top_x);
+ }
+ break;
+ case MATH_VIEW_FONT_SIZE:
+ {
+ guint i = gtk_math_view_get_font_size(math_view);
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ case MATH_VIEW_ANTI_ALIASING:
+ {
+ gboolean i = gtk_math_view_get_anti_aliasing(math_view);
+ g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
+
+ BONOBO_ARG_SET_BOOLEAN(arg,i);
+ }
+ break;
+ case MATH_VIEW_TRANSPARENCY:
+ {
+ gboolean i = gtk_math_view_get_transparency(math_view);
+ g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
+
+ BONOBO_ARG_SET_BOOLEAN(arg,i);
+ }
+ break;
+ case MATH_VIEW_VERBOSITY:
+ {
+ gint i = gtk_math_view_get_log_verbosity(math_view);
+ g_assert(arg->_type == BONOBO_ARG_INT);
+
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ case MATH_VIEW_FONT_MANAGER:
+ {
+ gint i = (gint) gtk_math_view_get_font_manager_type(math_view);
+ BONOBO_ARG_SET_INT(arg,i);
+ }
+ break;
+ default:
+ g_assert(FALSE);
+ }
+}
+
+static BonoboControl*
+instantiate_func(void)
+{
+ BonoboControl *control;
+ GtkWidget *math_view;
+ BonoboPropertyBag *prop_bag;
+
+ math_view = gtk_math_view_new(NULL,NULL);
+
+ gtk_widget_show(math_view);
+
+ control = bonobo_control_new(math_view);
+
+ prop_bag = bonobo_property_bag_new(get_prop, set_prop, math_view);
+
+ bonobo_control_set_properties(control,BONOBO_OBJREF(prop_bag), NULL);
+
+ bonobo_property_bag_add(prop_bag,"width",MATH_VIEW_WIDTH,BONOBO_ARG_INT,
+ NULL,"width",0);
+
+ bonobo_property_bag_add(prop_bag,"height",MATH_VIEW_HEIGHT,BONOBO_ARG_INT,
+ NULL,"height",0);
+
+ bonobo_property_bag_add(prop_bag,"top_x",MATH_VIEW_TOP_X,BONOBO_ARG_INT,
+ NULL,"top_x",0);
+
+ bonobo_property_bag_add(prop_bag,"top_y",MATH_VIEW_TOP_Y,BONOBO_ARG_INT,
+ NULL,"top_y",0);
+
+ bonobo_property_bag_add(prop_bag,"font_size",MATH_VIEW_FONT_SIZE,BONOBO_ARG_INT,
+ NULL,"font_size",0);
+
+ bonobo_property_bag_add(prop_bag,"anti_aliasing",MATH_VIEW_ANTI_ALIASING,BONOBO_ARG_BOOLEAN,
+ NULL,"anti_aliasing",0);
+
+ bonobo_property_bag_add(prop_bag,"transparency",MATH_VIEW_TRANSPARENCY,BONOBO_ARG_BOOLEAN,
+ NULL,"transparency",0);
+
+ bonobo_property_bag_add(prop_bag,"verbosity",MATH_VIEW_VERBOSITY,BONOBO_ARG_INT,
+ NULL,"verbosity",0);
+
+ bonobo_property_bag_add(prop_bag,"font_manager",MATH_VIEW_FONT_MANAGER,BONOBO_ARG_NULL,
+ NULL,"font_manager",0);
+ return control;
+}
+
+static void
+notify_property_bag(GtkMathView *math_view,gpointer data)
+{
+ BonoboPropertyBag *prop_bag;
+ BonoboArg *arg;
+
+ g_return_if_fail(BONOBO_IS_PROPERTY_BAG(data));
+ prop_bag = BONOBO_PROPERTY_BAG(data);
+
+ //we use arg to notify the container that somthing has changed
+
+ arg = bonobo_arg_new(BONOBO_ARG_INT);
+ BONOBO_ARG_SET_INT(arg,0);
+
+ //bonobo_property_bag_notify_listeners(prop_bag,);
+}
--- /dev/null
+/*
+ * gtk_math_view_bonobo.c
+ * This file is part of gedit
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+#include <bonobo.h>
+#include <glib.h>
+#include <bonobo/bonobo-control.h>
+
+#include <gtkmathview.h>
+
+
+enum math_args;
+
+static void get_prop(BonoboPropertyBag*, BonoboArg *, guint , CorbaEnvironment*, gpointer);
+static void set_prop(BonoboPropertyBag*, BonoboArg *, guint , CorbaEnvironment*, gpointer);
+
+static BonoboControl* instantiate_func(void);
+
+static void notify_property_bag(GtkMathView* ,gpointer);
+
+
+++ /dev/null
-
-#include <bonobo.h>
-
-#if 1
-#include <gtkmathview.h>
-#endif
-
-enum {
- MATH_VIEW_WIDTH,
- MATH_VIEW_HEIGHT,
- MATH_VIEW_TOP_X,
- MATH_VIEW_TOP_Y,
- MATH_VIEW_TOP,
- MATH_VIEW_FONT_SIZE,
- MATH_VIEW_ANTI_ALIASING,
- MATH_VIEW_TRANSPARENCY,
- MATH_VIEW_VERBOSITY,
- MATH_VIEW_FONT_MANAGER
-} math_args;
-
-
-/*static char *
-make_reg_id(const char *iid)
-{
- char *id;
- id = bonobo_activation_make_registration_id(iid,Display_String(gdk_display));
- return id;
-}*/
-
-static void
-get_prop(BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GtkMathView *math_view;
-
- g_return_if_fail(GTK_IS_MATH_VIEW(user_data));
-
- math_view = GTK_MATH_VIEW(user_data);
-
- switch(arg_id)
- {
- case MATH_VIEW_WIDTH:
- {
- gint i = gtk_math_view_get_width(math_view);
- g_assert(arg->_type == BONOBO_ARG_INT);
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- case MATH_VIEW_HEIGHT:
- {
- guint i = gtk_math_view_get_height(math_view);
-
- g_assert(arg->_type == BONOBO_ARG_INT);
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- case MATH_VIEW_TOP_X:
- {
- guint new_top_y,new_top_x;
-
- g_assert(arg->_type == BONOBO_ARG_INT);
- gtk_math_view_get_top(math_view,&new_top_x, &new_top_y);
- BONOBO_ARG_SET_INT(arg,new_top_x);
- }
- break;
- case MATH_VIEW_TOP_Y:
- {
- guint new_top_y,new_top_x;
-
- g_assert(arg->_type == BONOBO_ARG_INT);
- gtk_math_view_get_top(math_view,&new_top_x,&new_top_y);
- BONOBO_ARG_SET_INT(arg,new_top_y);
- }
- break;
- case MATH_VIEW_FONT_SIZE:
- {
- guint i = gtk_math_view_get_font_size(math_view);
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- case MATH_VIEW_ANTI_ALIASING:
- {
- gboolean i = gtk_math_view_get_anti_aliasing(math_view);
- g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-
- BONOBO_ARG_SET_BOOLEAN(arg,i);
- }
- break;
- case MATH_VIEW_TRANSPARENCY:
- {
- gboolean i = gtk_math_view_get_transparency(math_view);
- g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-
- BONOBO_ARG_SET_BOOLEAN(arg,i);
- }
- break;
- case MATH_VIEW_VERBOSITY:
- {
- gint i = gtk_math_view_get_log_verbosity(math_view);
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- case MATH_VIEW_FONT_MANAGER:
- {gint i = (gint) gtk_math_view_get_font_manager_type(math_view);
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- default:
- g_assert(FALSE);
- }
-}
-
-static void
-set_prop(BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GtkMathView *math_view;
-
- g_return_if_fail(GTK_IS_MATH_VIEW(user_data));
-
- math_view = GTK_MATH_VIEW(user_data);
-
- switch(arg_id)
- {
- /*case MATH_VIEW_WIDTH:
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- guint i = gtk_math_view_set_width(math_view);
- BONOBO_ARG_SET_INT(arg,i);
- break;
- case MATH_VIEW_HEIGHT:
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- guint i = gtk_math_view_get_height(math_view);
- BONOBO_ARG_SET_INT(arg,i);
- break;*/
- case MATH_VIEW_TOP_X:
- {
- guint old_top_y;
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- gtk_math_view_get_top(math_view, NULL, &old_top_y);
- gtk_math_view_set_top(math_view, BONOBO_ARG_GET_INT(arg), old_top_y);
- }
- break;
- case MATH_VIEW_TOP_Y:
- {
- guint old_top_x;
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- gtk_math_view_get_top(math_view, &old_top_x, NULL);
- gtk_math_view_set_top(math_view, BONOBO_ARG_GET_INT(arg), old_top_x);
- }
- break;
- case MATH_VIEW_FONT_SIZE:
- {
- guint i = gtk_math_view_get_font_size(math_view);
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- case MATH_VIEW_ANTI_ALIASING:
- {
- gboolean i = gtk_math_view_get_anti_aliasing(math_view);
- g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-
- BONOBO_ARG_SET_BOOLEAN(arg,i);
- }
- break;
- case MATH_VIEW_TRANSPARENCY:
- {
- gboolean i = gtk_math_view_get_transparency(math_view);
- g_assert(arg->_type == BONOBO_ARG_BOOLEAN);
-
- BONOBO_ARG_SET_BOOLEAN(arg,i);
- }
- break;
- case MATH_VIEW_VERBOSITY:
- {
- gint i = gtk_math_view_get_log_verbosity(math_view);
- g_assert(arg->_type == BONOBO_ARG_INT);
-
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- case MATH_VIEW_FONT_MANAGER:
- {
- gint i = (gint) gtk_math_view_get_font_manager_type(math_view);
- BONOBO_ARG_SET_INT(arg,i);
- }
- break;
- default:
- g_assert(FALSE);
- }
-}
-
-static BonoboControl*
-instantiate_func(void)
-{
- BonoboControl *control;
- GtkWidget *math_view;
- BonoboPropertyBag *prop_bag;
-
- math_view = gtk_math_view_new(NULL,NULL);
-
- gtk_widget_show(math_view);
-
- control = bonobo_control_new(math_view);
-
- prop_bag = bonobo_property_bag_new(get_prop, set_prop, math_view);
-
- bonobo_control_set_properties(control,BONOBO_OBJREF(prop_bag), NULL);
-
- bonobo_property_bag_add(prop_bag,"width",MATH_VIEW_WIDTH,BONOBO_ARG_INT,
- NULL,"width",0);
-
- bonobo_property_bag_add(prop_bag,"height",MATH_VIEW_HEIGHT,BONOBO_ARG_INT,
- NULL,"height",0);
-
- bonobo_property_bag_add(prop_bag,"top_x",MATH_VIEW_TOP_X,BONOBO_ARG_INT,
- NULL,"top_x",0);
-
- bonobo_property_bag_add(prop_bag,"top_y",MATH_VIEW_TOP_Y,BONOBO_ARG_INT,
- NULL,"top_y",0);
-
- bonobo_property_bag_add(prop_bag,"font_size",MATH_VIEW_FONT_SIZE,BONOBO_ARG_INT,
- NULL,"font_size",0);
-
- bonobo_property_bag_add(prop_bag,"anti_aliasing",MATH_VIEW_ANTI_ALIASING,BONOBO_ARG_BOOLEAN,
- NULL,"anti_aliasing",0);
-
- bonobo_property_bag_add(prop_bag,"transparency",MATH_VIEW_TRANSPARENCY,BONOBO_ARG_BOOLEAN,
- NULL,"transparency",0);
-
- bonobo_property_bag_add(prop_bag,"verbosity",MATH_VIEW_VERBOSITY,BONOBO_ARG_INT,
- NULL,"verbosity",0);
-
- bonobo_property_bag_add(prop_bag,"font_manager",MATH_VIEW_FONT_MANAGER,BONOBO_ARG_NULL,
- NULL,"font_manager",0);
- return control;
-}
-
-static void
-notify_property_bag(GtkMathView *math_view,gpointer data)
-{
- BonoboPropertyBag *prop_bag;
- BonoboArg *arg;
-
- g_return_if_fail(BONOBO_IS_PROPERTY_BAG(data));
- prop_bag = BONOBO_PROPERTY_BAG(data);
-
- //we use arg to notify the container that somthing has changed
-
- arg = bonobo_arg_new(BONOBO_ARG_INT);
- BONOBO_ARG_SET_INT(arg,0);
-
- //bonobo_property_bag_notify_listeners(prop_bag,);
-}
+++ /dev/null
-/*
- * gtk_math_view_bonobo.c
- * This file is part of gedit
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#include <bonobo.h>
-#include <glib.h>
-#include <bonobo/bonobo-control.h>
-
-#include <gtkmathview.h>
-
-
-enum math_args;
-
-static void get_prop(BonoboPropertyBag*, BonoboArg *, guint , CorbaEnvironment*, gpointer);
-static void set_prop(BonoboPropertyBag*, BonoboArg *, guint , CorbaEnvironment*, gpointer);
-
-static BonoboControl* instantiate_func(void);
-
-static void notify_property_bag(GtkMathView* ,gpointer);
-
-