summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-04-28 04:38:31 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-04-28 04:38:31 +0000
commitd94d7b5e7fa0f8476ca5dd454c25f4ef78fdfd48 (patch)
tree66737fbaa9ac01f61ca021948492d0c0af4b765d /gtk
parentb3b08d948989895a46bf17a4e7faec8ea0f8229e (diff)
downloadpygtk-d94d7b5e7fa0f8476ca5dd454c25f4ef78fdfd48.tar.gz
remove buttons that called set_space_size method.
2001-04-28 James Henstridge <james@daa.com.au> * examples/pygtk-demo/demos/toolbar.py (main): remove buttons that called set_space_size method. * gtk/__init__.py: remove __all__ definition. It causes problems with python 2.1. * gtk/gtk.override: updated GtkColorSelection method overrides (ignore): remove gtk_entry_new from ignore list, as other entry constructor is gone. * gtk/gtk.defs: updates to make it work with current gtk+
Diffstat (limited to 'gtk')
-rw-r--r--gtk/__init__.py3
-rw-r--r--gtk/gtk.defs123
-rw-r--r--gtk/gtk.override59
3 files changed, 94 insertions, 91 deletions
diff --git a/gtk/__init__.py b/gtk/__init__.py
index 146db8b6..995b7cfd 100644
--- a/gtk/__init__.py
+++ b/gtk/__init__.py
@@ -31,6 +31,3 @@ create_pixmap = GtkPixmap
create_pixmap_from_xpm = pixmap_create_from_xpm
create_pixmap_from_xpm_d = pixmap_create_from_xpm_d
-# for importing ...
-__all__ = ['_gtk', 'GTK', 'GDK' ]#, 'imlib', 'libglade', 'gl' ]
-
diff --git a/gtk/gtk.defs b/gtk/gtk.defs
index dbd0e140..ac022e42 100644
--- a/gtk/gtk.defs
+++ b/gtk/gtk.defs
@@ -3186,84 +3186,113 @@
(parameter (type-and-name GtkUpdateType policy))
)
-(method get_use_opacity
+(method get_has_opacity_control
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_get_use_opacity)
+ (c-name gtk_color_selection_get_has_opacity_control)
(return-type gboolean)
)
-(method set_use_opacity
+(method set_has_opacity_control
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_set_use_opacity)
+ (c-name gtk_color_selection_set_has_opacity_control)
(return-type none)
(parameter (type-and-name gboolean use_opacity))
)
-(method get_use_palette
+(method get_has_palette
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_get_use_palette)
+ (c-name gtk_color_selection_get_has_palette)
(return-type gboolean)
)
-(method set_use_palette
+(method set_has_palette
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_set_use_palette)
+ (c-name gtk_color_selection_set_has_palette)
(return-type none)
(parameter (type-and-name gboolean use_palette))
)
-(method set_color
+(method set_current_color
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_set_color)
+ (c-name gtk_color_selection_set_current_color)
(return-type none)
- (parameter (type-and-name gdouble* color))
+ (parameter (type-and-name GdkColor* color))
)
-(method get_color
+(method set_current_alpha
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_get_color)
+ (c-name gtk_color_selection_set_current_alpha)
(return-type none)
- (parameter (type-and-name gdouble* color))
+ (parameter (type-and-name guint16 alpha))
)
-(method set_old_color
+(method get_current_color
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_set_old_color)
+ (c-name gtk_color_selection_get_current_color)
(return-type none)
- (parameter (type-and-name gdouble* color))
+ (parameter (type-and-name GdkColor* color))
+)
+
+(method get_current_alpha
+ (of-object ColorSelection (Gtk))
+ (c-name gtk_color_selection_get_current_alpha)
+ (return-type guint16)
)
-(method get_old_color
+(method set_previous_color
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_get_old_color)
+ (c-name gtk_color_selection_set_previous_color)
(return-type none)
- (parameter (type-and-name gdouble* color))
+ (parameter (type-and-name GdkColor* color))
)
-(method set_palette_color
+(method set_previous_alpha
(of-object ColorSelection (Gtk))
- (c-name gtk_color_selection_set_palette_color)
+ (c-name gtk_color_selection_set_previous_alpha)
(return-type none)
- (parameter (type-and-name gint x))
- (parameter (type-and-name gint y))
- (parameter (type-and-name gdouble* color))
+ (parameter (type-and-name guint16 alpha))
+)
+
+(method get_previous_color
+ (of-object ColorSelection (Gtk))
+ (c-name gtk_color_selection_get_previous_color)
+ (return-type none)
+ (parameter (type-and-name GdkColor* color))
+)
+
+(method get_previous_alpha
+ (of-object ColorSelection (Gtk))
+ (c-name gtk_color_selection_get_previous_alpha)
+ (return-type guint16)
+)
+
+(method get_palette_size
+ (of-object ColorSelection (Gtk))
+ (c-name gtk_color_selection_get_palette_size)
+ (return-type gint)
)
(method get_palette_color
(of-object ColorSelection (Gtk))
(c-name gtk_color_selection_get_palette_color)
(return-type gboolean)
- (parameter (type-and-name gint x))
- (parameter (type-and-name gint y))
- (parameter (type-and-name gdouble* color))
+ (parameter (type-and-name gint index))
+ (parameter (type-and-name GdkColor* color))
+)
+
+(method set_palette_color
+ (of-object ColorSelection (Gtk))
+ (c-name gtk_color_selection_set_palette_color)
+ (return-type none)
+ (parameter (type-and-name gint index))
+ (parameter (type-and-name GdkColor* color))
)
(method unset_palette_color
(of-object ColorSelection (Gtk))
(c-name gtk_color_selection_unset_palette_color)
(return-type none)
- (parameter (type-and-name gint x))
- (parameter (type-and-name gint y))
+ (parameter (type-and-name gint index))
)
(method is_adjusting
@@ -6921,13 +6950,6 @@
(parameter (type-and-name gint position))
)
-(method set_shadow_type
- (of-object MenuBar (Gtk))
- (c-name gtk_menu_bar_set_shadow_type)
- (return-type none)
- (parameter (type-and-name GtkShadowType type))
-)
-
;; From /opt/pango/include/gtk-2.0/gtk/gtkmenuitem.h
@@ -11505,20 +11527,6 @@
(parameter (type-and-name GtkToolbarStyle style))
)
-(method set_space_size
- (of-object Toolbar (Gtk))
- (c-name gtk_toolbar_set_space_size)
- (return-type none)
- (parameter (type-and-name gint space_size))
-)
-
-(method set_space_style
- (of-object Toolbar (Gtk))
- (c-name gtk_toolbar_set_space_style)
- (return-type none)
- (parameter (type-and-name GtkToolbarSpaceStyle space_style))
-)
-
(method set_tooltips
(of-object Toolbar (Gtk))
(c-name gtk_toolbar_set_tooltips)
@@ -11526,19 +11534,6 @@
(parameter (type-and-name gint enable))
)
-(method set_button_relief
- (of-object Toolbar (Gtk))
- (c-name gtk_toolbar_set_button_relief)
- (return-type none)
- (parameter (type-and-name GtkReliefStyle relief))
-)
-
-(method get_button_relief
- (of-object Toolbar (Gtk))
- (c-name gtk_toolbar_get_button_relief)
- (return-type GtkReliefStyle)
-)
-
;; From /opt/pango/include/gtk-2.0/gtk/gtktooltips.h
diff --git a/gtk/gtk.override b/gtk/gtk.override
index 4bfa0bc0..80d6f0c6 100644
--- a/gtk/gtk.override
+++ b/gtk/gtk.override
@@ -2244,7 +2244,6 @@ ignore
gtk_radio_menu_item_set_group
gtk_radio_button_group
gtk_radio_button_set_group
- gtk_entry_new
%%
ignore gtk_object_new gtk_object_newv gtk_object_query_args
gtk_object_add_arg_type gtk_object_args_collect gtk_object_arg_get_info
@@ -3640,38 +3639,50 @@ _wrap_gtk_list_remove_items(PyGObject *self, PyObject *args,
%%
ignore gtk_list_remove_items_no_unref
%%
-override gtk_color_selection_set_color kwargs
+override gtk_color_selection_get_current_color
static PyObject *
-_wrap_gtk_color_selection_set_color(PyGObject *self, PyObject *args,
- PyObject *kwargs)
+_wrap_gtk_color_selection_get_current_color(PyGObject *self, PyObject *args)
{
- static char *kwlist[] = { "red", "green", "blue", "alpha", NULL };
- double value[4];
+ GdkColor colour = { 0, };
- value[3] = 1.0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "ddd|d:GtkColorSelection.set_color",
- kwlist, &value[0], &value[1], &value[2],
- &value[3]))
- return NULL;
- gtk_color_selection_set_color(GTK_COLOR_SELECTION(self->obj), value);
- Py_INCREF(Py_None);
- return Py_None;
+ if (!PyArg_ParseTuple(args, ":GtkColorSelection.get_current_color"))
+ return NULL;
+ gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(self->obj),
+ &colour);
+ return PyGdkColor_New(&colour);
}
%%
-override gtk_color_selection_get_color
+override gtk_color_selection_get_previous_color
static PyObject *
-_wrap_gtk_color_selection_get_color(PyGObject *self, PyObject *args)
+_wrap_gtk_color_selection_get_previous_color(PyGObject *self, PyObject *args)
{
- double value[4];
+ GdkColor colour = { 0, };
- if (!PyArg_ParseTuple(args, ":GtkColorSelection.get_color"))
+ if (!PyArg_ParseTuple(args, ":GtkColorSelection.get_previous_color"))
return NULL;
- gtk_color_selection_get_color(GTK_COLOR_SELECTION(self->obj), value);
- if (gtk_color_selection_get_use_opacity(GTK_COLOR_SELECTION(self->obj)))
- return Py_BuildValue("(dddd)", value[0],value[1],value[2],value[3]);
- else
- return Py_BuildValue("(ddd)", value[0], value[1], value[2]);
+ gtk_color_selection_get_previous_color(GTK_COLOR_SELECTION(self->obj),
+ &colour);
+ return PyGdkColor_New(&colour);
+}
+%%
+override gtk_color_selection_get_palette_color kwargs
+static PyObject *
+_wrap_gtk_color_selection_get_palette_color(PyGObject *self, PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "index", NULL };
+ gint index;
+ GdkColor colour = { 0, };
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "i:GdkColorSelection.get_palette_color",
+ kwlist, &index))
+ return NULL;
+ if (gtk_color_selection_get_palette_color(GTK_COLOR_SELECTION(self->obj),
+ index, &colour))
+ return PyGdkColor_New(&colour);
+ Py_INCREF(Py_None);
+ return Py_None;
}
%%
override gtk_calendar_get_date