diff options
author | James Henstridge <james@daa.com.au> | 2000-11-16 15:20:02 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2000-11-16 15:20:02 +0000 |
commit | ffcc526ecfc03de11287b242ed4db0f792967b47 (patch) | |
tree | a114b011791cc977f13ed0331952e0a733c50a43 | |
parent | d08ccd4aeb8112787fddef409f7633cd5acc4c78 (diff) | |
download | pygtk-ffcc526ecfc03de11287b242ed4db0f792967b47.tar.gz |
make changes to make GtkEditable into an interface.
2000-11-16 James Henstridge <james@daa.com.au>
* gtk/gtk.defs: make changes to make GtkEditable into an
interface.
* examples/testgtk/demos/__init__.py (demos): create the list of
example modules on the fly, rather than having them hard coded
into a list.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | examples/testgtk/demos/__init__.py | 22 | ||||
-rwxr-xr-x | examples/testgtk/demos/dnd.py | 2 | ||||
-rw-r--r-- | examples/testgtk/demos/menu.py | 2 | ||||
-rw-r--r-- | gtk/gtk.defs | 63 |
5 files changed, 75 insertions, 23 deletions
@@ -1,3 +1,12 @@ +2000-11-16 James Henstridge <james@daa.com.au> + + * gtk/gtk.defs: make changes to make GtkEditable into an + interface. + + * examples/testgtk/demos/__init__.py (demos): create the list of + example modules on the fly, rather than having them hard coded + into a list. + 2000-11-11 James Henstridge <james@daa.com.au> * examples/testgtk/testgtk.py: start of a revamped testgtk diff --git a/examples/testgtk/demos/__init__.py b/examples/testgtk/demos/__init__.py index b09e6e84..ee3fc5e7 100644 --- a/examples/testgtk/demos/__init__.py +++ b/examples/testgtk/demos/__init__.py @@ -1,8 +1,18 @@ -import menu -import dnd +import os + +_modlist = filter(lambda x: len(x) > 3 and x[-3:] == '.py', + os.listdir(os.path.dirname(__file__))) + +demos = [] +for _mod in _modlist: + if _mod[0] != '_': + _mod = _mod[:-3] + try: + exec 'import ' + _mod + '\n' + \ + '_description = ' + _mod + '.description' + demos.append((_description, _mod)) + except: + pass +demos.sort() -demos = [ - ('Menus', 'menu'), - ('Drag and Drop', 'dnd'), -] diff --git a/examples/testgtk/demos/dnd.py b/examples/testgtk/demos/dnd.py index 8c135733..a46cc935 100755 --- a/examples/testgtk/demos/dnd.py +++ b/examples/testgtk/demos/dnd.py @@ -7,6 +7,8 @@ fairly straight forward port of the example distributed with gtk. FIXME: there are still a few things missing since I converted the GdkDragContext wrapper to being a GObject.''' +description = 'Drag and Drop' + import gtk from dndpixmap import * diff --git a/examples/testgtk/demos/menu.py b/examples/testgtk/demos/menu.py index b58c0d9a..e91df441 100644 --- a/examples/testgtk/demos/menu.py +++ b/examples/testgtk/demos/menu.py @@ -5,6 +5,8 @@ This example demonstrates the use of various menu types in gtk. It demonstrates the new submenu navigation and scrolling menu features of gtk 2.0.''' +description = 'Menus' + import gtk def create_menu(depth, length=5): diff --git a/gtk/gtk.defs b/gtk/gtk.defs index ac9802cf..5a2c0053 100644 --- a/gtk/gtk.defs +++ b/gtk/gtk.defs @@ -309,15 +309,22 @@ (c-name GtkInvisible) ) -(object Editable +(interface Editable (in-module Gtk) (parent Widget (Gtk)) (c-name GtkEditable) ) +(object OldEditable + (in-module Gtk) + (parent Widget (Gtk)) + (implements GtkEditable) + (c-name GtkOldEditable) +) + (object Text (in-module Gtk) - (parent Editable (Gtk)) + (parent OldEditable (Gtk)) (c-name GtkText) (field (type-and-name GtkAdjustment* hadj)) (field (type-and-name GtkAdjustment* vadj)) @@ -325,7 +332,8 @@ (object Entry (in-module Gtk) - (parent Editable (Gtk)) + (parent Widget (Gtk)) + (implements GtkEditable) (c-name GtkEntry) ) @@ -4631,6 +4639,14 @@ (parameter (type-and-name gint end)) ) +(method get_selection_bounds + (of-object Editable (Gtk)) + (c-name gtk_editable_get_selection_bounds) + (return-type gboolean) + (parameter (type-and-name gint* start)) + (parameter (type-and-name gint* end)) +) + (method insert_text (of-object Editable (Gtk)) (c-name gtk_editable_insert_text) @@ -4674,26 +4690,12 @@ (return-type none) ) -(method claim_selection - (of-object Editable (Gtk)) - (c-name gtk_editable_claim_selection) - (return-type none) - (parameter (type-and-name gboolean claim)) - (parameter (type-and-name guint32 time) (default "GDK_CURRENT_TIME")) -) - (method delete_selection (of-object Editable (Gtk)) (c-name gtk_editable_delete_selection) (return-type none) ) -(method changed - (of-object Editable (Gtk)) - (c-name gtk_editable_changed) - (return-type none) -) - (method set_position (of-object Editable (Gtk)) (c-name gtk_editable_set_position) @@ -4716,6 +4718,28 @@ +;; From /opt/pango/include/gtk-2.0/gtk/gtkoldeditable.h + +(function gtk_old_editable_get_type + (c-name gtk_old_editable_get_type) + (return-type none) +) + +(method claim_selection + (of-object OldEditable (Gtk)) + (c-name gtk_old_editable_claim_selection) + (return-type none) + (parameter (type-and-name gboolean claim)) + (parameter (type-and-name guint time) (default "GDK_CURRENT_TIME")) +) + +(method changed + (of-object OldEditable (Gtk)) + (c-name gtk_old_editable_changed) + (return-type none) +) + + ;; From /opt/pango/include/gtk-2.0/gtk/gtkentry.h (function gtk_entry_get_type @@ -5563,6 +5587,11 @@ (return-type none) ) +(method reset + (of-object IMContext (Gtk)) + (c-name gtk_im_context_reset) + (return-type none) +) ;; From /opt/pango/include/gtk-2.0/gtk/gtkimmulticontext.h |