diff options
-rw-r--r-- | ChangeLog | 37 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 37 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 37 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 37 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 37 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 37 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 37 | ||||
-rw-r--r-- | docs/reference/gtk/gtk.hierarchy | 4 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtk-unused.sgml | 1672 | ||||
-rw-r--r-- | docs/reference/gtk/tmpl/gtkdialog.sgml | 9 | ||||
-rw-r--r-- | gtk/gtkcolorseldialog.c | 38 | ||||
-rw-r--r-- | gtk/gtkdialog.c | 30 | ||||
-rw-r--r-- | gtk/gtkdialog.h | 46 | ||||
-rw-r--r-- | gtk/gtkfilesel.c | 37 | ||||
-rw-r--r-- | gtk/gtkfilesel.h | 6 | ||||
-rw-r--r-- | gtk/gtkfontsel.c | 61 | ||||
-rw-r--r-- | gtk/gtkfontsel.h | 7 | ||||
-rw-r--r-- | gtk/gtkmessagedialog.c | 22 | ||||
-rw-r--r-- | gtk/gtktexttagtable.c | 1 | ||||
-rw-r--r-- | gtk/gtktextview.c | 1 |
20 files changed, 1233 insertions, 960 deletions
@@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index a1d0f47ebb..96c995d9b7 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index a1d0f47ebb..96c995d9b7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index a1d0f47ebb..96c995d9b7 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index a1d0f47ebb..96c995d9b7 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index a1d0f47ebb..96c995d9b7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index a1d0f47ebb..96c995d9b7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,40 @@ +2000-11-02 Havoc Pennington <hp@redhat.com> + + * gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and + use stock buttons. Should be 100% source compatible, appropriate + filesel fields now point to dialog->vbox and dialog->action_area. + On the bizarre side, dialog->action_area and filesel->action_area + are not the same widget. + (gtk_file_selection_init): Put some padding around the selection + entry, so it isn't touching the GtkDialog separator. + + * gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog, + use stock buttons, etc. Should also be source compatible. + Set the dialog default title in _init not _new(). + + * gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init): + Use stock buttons; don't put a button box inside the existing + dialog button box. Don't bother with push/pop colormap anymore. + + * gtk/gtkdialog.h (GtkResponseType): Add a bunch of more + specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT + for message dialog, and necessary for the font selection and color + selection with help and apply buttons. + + * gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer + to the created button widget. Set GTK_CAN_DEFAULT on the button. + (gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing + between buttons, put less padding around the action area. + (gtk_dialog_run): Exit on unmap rather than on destroy. + This will also exit the loop if the widget is hidden. + (gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT + instead of GTK_RESPONSE_NONE; since we're already adding a bunch + of GTK_RESPONSE_* stuff, this seems cleaner, and lets you + special-case delete event. + + * gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment + formatting + Sun Nov 5 05:32:39 2000 Tim Janik <timj@gtk.org> * gtk/testgtk.c (uposition_stop_configure): provide a toggle diff --git a/docs/reference/gtk/gtk.hierarchy b/docs/reference/gtk/gtk.hierarchy index 9f808f4bce..8c2379d4a3 100644 --- a/docs/reference/gtk/gtk.hierarchy +++ b/docs/reference/gtk/gtk.hierarchy @@ -27,9 +27,9 @@ GtkObject GtkWindow GtkDialog GtkColorSelectionDialog + GtkFileSelection + GtkFontSelectionDialog GtkInputDialog - GtkFileSelection - GtkFontSelectionDialog GtkPlug GtkEventBox GtkHandleBox diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index f4234a59cc..d3873e1341 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -1,304 +1,329 @@ -<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Title ##### --> -Menu Factory +<!-- ##### SECTION ./tmpl/gtkdebug.sgml:Title ##### --> +Debugging -<!-- ##### MACRO GTK_WIDGET_IN_REPARENT ##### --> -<para> +<!-- ##### SECTION ./tmpl/gtkdebug.sgml:Short_Description ##### --> -</para> -@obj: -<!-- ##### FUNCTION gtk_marshal_NONE__INT_POINTER ##### --> +<!-- ##### MACRO gtk_marshal_NONE__BOXED ##### --> <para> </para> -@object: -@func: -@func_data: -@args: -<!-- ##### FUNCTION gtk_text_buffer_paste_primary_selection ##### --> +<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Long_Description ##### --> +<refsect2> +<title>What are Signal Marshallers?</title> <para> - +Marshals are functions which all have the same prototype: +they take a #GtkObject, a #GtkSignalFunc, a #gpointer, +and an array of argument values. +The functions are names gtk_marshall_RETURNTYPE__PARAMTYPE1_PARAMTYPE2.... </para> - -@buffer: -@override_location: -@time: -@interactive: -@default_editable: - -<!-- ##### ENUM GtkTextViewScrollType ##### --> <para> - +They then call a native function: the GtkObject is the first +parameter passed in. The arguments are passed in the native +calling convention: chars, shorts, ints, longs may be packed +on the stack, or tucked in registers: it doesn't matter +because the same calling convention will be generated +inside the gtkmarshal code as is expected where you define +your handlers. </para> - -@GTK_TEXT_SCROLL_TO_TOP: -@GTK_TEXT_SCROLL_TO_BOTTOM: -@GTK_TEXT_SCROLL_PAGE_DOWN: -@GTK_TEXT_SCROLL_PAGE_UP: - -<!-- ##### MACRO gtk_widget_pop_visual ##### --> <para> +So the function named: +<programlisting> +gtk_marshal_BOOL__POINTER_INT_INT_UINT(GtkObject*, GtkSignalFunc, gpointer, GtkArg*); +</programlisting> +will call the #GtkSignalFunc assuming it was a function with signature: +<programlisting> +gboolean sigfunc(gpointer,gint,gint,guint); +</programlisting> +</para> +</refsect2> +<refsect2> +<title>Writing Custom Marshals</title> +<para> +Marshals are primarily used as arguments to gtk_signal_new(). +Sometimes, you may find that a marshaller you need isn't available +in the standard list. Then you have to write your own. +</para> +<para> +If you wish to define a signal with a new type of argument list. +Suppose you want 2 pointers and 2 integers. +You would write: +<programlisting> +typedef int (*GtkSignal_INT__POINTER_POINTER_INT_INT)( + gpointer, gpointer, gint, gint +); +void marshal_INT__POINTER_POINTER_INT_INT(GtkObject* object, + GtkSignalFunc func, + gpointer func_data, + GtkArg* args) +{ + GtkSignal_NONE__POINTER_POINTER_INT_INT rfunc; + gint* return_val; + return_val = GTK_RETLOC_INT(args[4]); + rfunc = (GtkSignal_INT__POINTER_POINTER_INT_INT)func; + *return_val = (*rfunc)(object, + GTK_VALUE_POINTER(args[0]), + GTK_VALUE_POINTER(args[1]), + GTK_VALUE_INT(args[2]), + GTK_VALUE_INT(args[3]), + func_data); +} +</programlisting> </para> +</refsect2> -@v: -<!-- ##### STRUCT GtkMenuFactory ##### --> -<para> +<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Short_Description ##### --> -</para> -@path: -@type: -@accel_group: -@widget: -@subfactories: -<!-- ##### FUNCTION gtk_selection_clear_targets ##### --> +<!-- ##### MACRO gtk_marshal_NONE__UINT_STRING ##### --> <para> </para> -@widget: -@selection: -<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_INT_INT ##### --> +<!-- ##### MACRO GTK_PRIVATE_UNSET_FLAG ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@wid: +@flag: -<!-- ##### FUNCTION gtk_text_buffer_find_regexp ##### --> +<!-- ##### MACRO GTK_WIDGET_REDRAW_PENDING ##### --> <para> </para> -@buffer: -@regexp: -@start: -@end: -@Returns: +@obj: -<!-- ##### FUNCTION gtk_text_buffer_find_string ##### --> +<!-- ##### FUNCTION gtk_icon_factory_get_type ##### --> <para> </para> -@buffer: -@iter: -@str: -@start: -@end: @Returns: -<!-- ##### FUNCTION gtk_text_buffer_spew ##### --> +<!-- ##### MACRO gtk_marshal_NONE__ENUM_FLOAT ##### --> <para> </para> -@buffer: -<!-- ##### MACRO gtk_marshal_NONE__UINT_STRING ##### --> +<!-- ##### SIGNAL GtkTextView::insert ##### --> <para> </para> +@textview: the object which received the signal. +@arg1: -<!-- ##### FUNCTION gtk_container_register_toplevel ##### --> +<!-- ##### MACRO gtk_widget_set_default_visual ##### --> <para> </para> -@container: +@v: +@visual: -<!-- ##### FUNCTION gtk_marshal_NONE__INT_FLOAT ##### --> +<!-- ##### FUNCTION gtk_window_set_focus ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@window: +@focus: -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT_POINTER ##### --> +<!-- ##### SECTION ./tmpl/gtkprivate.sgml:See_Also ##### --> <para> </para> -@object: -@func: -@func_data: -@args: -<!-- ##### FUNCTION gtk_marshal_INT__POINTER ##### --> +<!-- ##### MACRO gtk_marshal_NONE__POINTER_UINT_ENUM ##### --> <para> </para> -@object: -@func: -@func_data: -@args: -<!-- ##### SECTION ./tmpl/gtkprivate.sgml:Long_Description ##### --> +<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:See_Also ##### --> <para> </para> -<!-- ##### ENUM GtkFontType ##### --> +<!-- ##### FUNCTION gtk_font_selection_set_filter ##### --> <para> -A set of bit flags used to specify the type of fonts shown -when calling gtk_font_selection_dialog_set_filter() or -gtk_font_selection_set_filter(). +Sets one of the two font filters, to limit the fonts shown. </para> -@GTK_FONT_BITMAP: bitmap fonts. -@GTK_FONT_SCALABLE: scalable fonts. -@GTK_FONT_SCALABLE_BITMAP: scaled bitmap fonts. -@GTK_FONT_ALL: a bitwise combination of all of the above. +@fontsel: a #GtkFontSelection. +@filter_type: which of the two font filters to set, either +#GTK_FONT_FILTER_BASE or #GTK_FONT_FILTER_USER. The user filter +can be changed by the user, but the base filter is permanent. +@font_type: the types of font to be shown. This is a bitwise combination of +#GTK_FONT_BITMAP, #GTK_FONT_SCALABLE and #GTK_FONT_SCALABLE_BITMAP, +or #GTK_FONT_ALL to show all three font types. +@foundries: a NULL-terminated array of strings containing foundry names which +will be shown, or NULL to show all foundries. +@weights: a NULL-terminated array of strings containing weight names which +will be shown, or NULL to show all weights. +@slants: a NULL-terminated array of strings containing slant names which +will be shown, or NULL to show all slants. +@setwidths: a NULL-terminated array of strings containing setwidth names which +will be shown, or NULL to show all setwidths. +@spacings: a NULL-terminated array of strings containing spacings which +will be shown, or NULL to show all spacings. +@charsets: a NULL-terminated array of strings containing charset names which +will be shown, or NULL to show all charsets. -<!-- ##### MACRO GTK_TYPE_MAKE ##### --> +<!-- ##### FUNCTION gtk_container_unregister_toplevel ##### --> <para> -Combine a fundemantal type and a sequence number to create a gtk type. + </para> -@parent_t: -@seqno: +@container: -<!-- ##### FUNCTION gtk_menu_factory_find ##### --> -<para> +<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Title ##### --> +Signal Marshallers -</para> -@factory: -@path: -@Returns: +<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:Long_Description ##### --> +<para> -<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Title ##### --> -GtkIMContextSimple +</para> -<!-- ##### FUNCTION gtk_paned_compute_position ##### --> +<!-- ##### STRUCT GtkTypeQuery ##### --> <para> -Internal function used by #GtkHPaned and #GtkVPaned +A structure used to return values from @gtk_type_query. </para> -@paned: -@allocation: -@child1_req: -@child2_req: +@type: +@type_name: +@object_size: +@class_size: -<!-- ##### SIGNAL GtkTextView::move-insert ##### --> +<!-- ##### MACRO gtk_widget_pop_visual ##### --> <para> </para> -@textview: the object which received the signal. -@arg1: -@arg2: -@arg3: +@v: -<!-- ##### ARG GtkTextTag:overstrike_set ##### --> +<!-- ##### FUNCTION gtk_text_buffer_get_clipboard_contents ##### --> <para> </para> +@buffer: +@Returns: -<!-- ##### FUNCTION gtk_trace_referencing ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__C_CALLBACK ##### --> <para> -Private: print debugging information while doing a gtk_object_ref() or -a gtk_object_unref(). + </para> -@object: object to reference or unreference. -@func: name of caller's function to print (used within macros). -@dummy: unused. -@line: line number (used within macros). -@do_ref: whether to reference or unreference. +@object: +@func: +@func_data: +@args: -<!-- ##### MACRO gtk_marshal_NONE__ENUM_FLOAT_BOOL ##### --> +<!-- ##### USER_FUNCTION GtkSignalMarshal ##### --> <para> - +This is currently a hack left in for a scheme wrapper library. +It may be removed. +</para> +<para> +Don't use it. </para> +@object: The object which emits the signal. +@data: The user data associated with the hook. +@nparams: The number of parameters to the function. +@args: The actual values of the arguments. +@arg_types: The types of the arguments. +@return_type: The type of the return value from the function +or #GTK_TYPE_NONE for no return value. -<!-- ##### MACRO GTK_TYPE_STRUCTURED_FIRST ##### --> +<!-- ##### FUNCTION gtk_signal_add_emission_hook_full ##### --> <para> -The first structured enumerated type value. +Add an emission hook for a type of signal, for any object. +(with control of what happens when the hook is +destroyed). </para> +@signal_id: the type of signal add the hook for. +@hook_func: the function to invoke to handle the hook. +@data: the user data passed in to hook_func. +@destroy: a function to invoke when the hook is destroyed, +to clean up any allocation done just for this +signal handler. +@Returns: the id (that you may pass as a parameter +to gtk_signal_remove_emission_hook()). -<!-- ##### FUNCTION gtk_text_mark_ref ##### --> +<!-- ##### FUNCTION gtk_text_buffer_paste_primary_selection ##### --> <para> </para> -@mark: -@Returns: - -<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Title ##### --> -Signal Marshallers - +@buffer: +@override_location: +@time: +@interactive: +@default_editable: -<!-- ##### MACRO gtk_marshal_NONE__POINTER_STRING_STRING ##### --> +<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_INT_INT ##### --> <para> </para> +@object: +@func: +@func_data: +@args: -<!-- ##### SIGNAL GtkTextView::scroll-text ##### --> +<!-- ##### SIGNAL GtkTextView::copy-text ##### --> <para> </para> @textview: the object which received the signal. -@arg1: -<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Long_Description ##### --> +<!-- ##### FUNCTION gtk_text_view_get_iter_at_pixel ##### --> <para> </para> +@text_view: +@iter: +@x: +@y: + +<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:Short_Description ##### --> -<!-- ##### SECTION ./tmpl/gtkprivate.sgml:Title ##### --> -Private Information -<!-- ##### SIGNAL GtkTextView::insert ##### --> +<!-- ##### FUNCTION gtk_identifier_get_type ##### --> <para> - +Get the type of GtkIdentifier. </para> -@textview: the object which received the signal. -@arg1: +@Returns: GtkType -- the enumerated type of something. -<!-- ##### FUNCTION gtk_signal_add_emission_hook_full ##### --> +<!-- ##### MACRO gtk_marshal_BOOL__POINTER_INT_INT_UINT ##### --> <para> -Add an emission hook for a type of signal, for any object. -(with control of what happens when the hook is -destroyed). + </para> -@signal_id: the type of signal add the hook for. -@hook_func: the function to invoke to handle the hook. -@data: the user data passed in to hook_func. -@destroy: a function to invoke when the hook is destroyed, -to clean up any allocation done just for this -signal handler. -@Returns: the id (that you may pass as a parameter -to gtk_signal_remove_emission_hook()). -<!-- ##### FUNCTION gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_POINTER ##### --> <para> </para> @@ -308,11 +333,17 @@ to gtk_signal_remove_emission_hook()). @func_data: @args: -<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:Title ##### --> -gtkenums.sgml +<!-- ##### FUNCTION gtk_marshal_NONE__INT_INT ##### --> +<para> +</para> -<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER ##### --> +@object: +@func: +@func_data: +@args: + +<!-- ##### FUNCTION gtk_marshal_NONE__NONE ##### --> <para> </para> @@ -322,126 +353,145 @@ gtkenums.sgml @func_data: @args: -<!-- ##### FUNCTION gtk_type_set_varargs_type ##### --> +<!-- ##### FUNCTION gtk_text_mark_deleted ##### --> <para> -Set the varargs type for a fundamental type @foreign_type. + </para> -@foreign_type: Must be a GtkType with a sequence number of zero. Must not be a -fundamental type. -@varargs_type: Must be a GtkType which is either structured or flag, or NONE. +@mark: +@Returns: -<!-- ##### MACRO GTK_PRIVATE_SET_FLAG ##### --> +<!-- ##### MACRO gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER ##### --> <para> </para> -@wid: -@flag: -<!-- ##### MACRO gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER ##### --> +<!-- ##### FUNCTION gtk_ruler_draw_ticks ##### --> <para> </para> +@ruler: the gtkruler -<!-- ##### FUNCTION gtk_im_context_simple_new ##### --> +<!-- ##### FUNCTION gtk_selection_data_set_text ##### --> <para> </para> +@selection_data: +@str: @Returns: -<!-- ##### STRUCT GtkTextTabArray ##### --> +<!-- ##### FUNCTION gtk_themes_init ##### --> <para> </para> +@argc: +@argv: + +<!-- ##### FUNCTION gtk_type_register_enum ##### --> +<para> +Register a new set of enum @values and give them the name in +@type_name. +</para> + +@type_name: must not be null. +@values: GtkEnumValue* +@Returns: -<!-- ##### ENUM GtkMenuFactoryType ##### --> +<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Title ##### --> +Menu Factory + + +<!-- ##### VARIABLE gtk_debug_flags ##### --> <para> </para> -@GTK_MENU_FACTORY_MENU: -@GTK_MENU_FACTORY_MENU_BAR: -@GTK_MENU_FACTORY_OPTION_MENU: -<!-- ##### FUNCTION gtk_font_selection_set_filter ##### --> +<!-- ##### MACRO gtk_widget_set_visual ##### --> <para> -Sets one of the two font filters, to limit the fonts shown. + </para> -@fontsel: a #GtkFontSelection. -@filter_type: which of the two font filters to set, either -#GTK_FONT_FILTER_BASE or #GTK_FONT_FILTER_USER. The user filter -can be changed by the user, but the base filter is permanent. -@font_type: the types of font to be shown. This is a bitwise combination of -#GTK_FONT_BITMAP, #GTK_FONT_SCALABLE and #GTK_FONT_SCALABLE_BITMAP, -or #GTK_FONT_ALL to show all three font types. -@foundries: a NULL-terminated array of strings containing foundry names which -will be shown, or NULL to show all foundries. -@weights: a NULL-terminated array of strings containing weight names which -will be shown, or NULL to show all weights. -@slants: a NULL-terminated array of strings containing slant names which -will be shown, or NULL to show all slants. -@setwidths: a NULL-terminated array of strings containing setwidth names which -will be shown, or NULL to show all setwidths. -@spacings: a NULL-terminated array of strings containing spacings which -will be shown, or NULL to show all spacings. -@charsets: a NULL-terminated array of strings containing charset names which -will be shown, or NULL to show all charsets. +@w: +@v: +@widget: +@visual: -<!-- ##### MACRO GTK_WIDGET_LEAVE_PENDING ##### --> +<!-- ##### MACRO gtk_marshal_NONE__UINT_POINTER_UINT_ENUM_ENUM_POINTER ##### --> <para> </para> -@obj: -<!-- ##### MACRO GTK_TYPE_NUM_BUILTINS ##### --> +<!-- ##### MACRO GTK_TYPE_SEQNO ##### --> <para> -No idea. +Convert a gtk type into its sequence number </para> +@type: -<!-- ##### SIGNAL GtkTextView::cut-text ##### --> +<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:See_Also ##### --> <para> </para> -@textview: the object which received the signal. -<!-- ##### FUNCTION gtk_marshal_INT__POINTER_CHAR_CHAR ##### --> +<!-- ##### ENUM GtkMenuFactoryType ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@GTK_MENU_FACTORY_MENU: +@GTK_MENU_FACTORY_MENU_BAR: +@GTK_MENU_FACTORY_OPTION_MENU: -<!-- ##### ARG GtkTextTag:overstrike ##### --> +<!-- ##### MACRO gtk_marshal_NONE__STRING ##### --> <para> </para> -<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:See_Also ##### --> +<!-- ##### MACRO gtk_marshal_NONE__POINTER_POINTER_UINT_UINT ##### --> <para> </para> -<!-- ##### SIGNAL GtkTextView::copy-text ##### --> +<!-- ##### MACRO GTK_WIDGET_IS_OFFSCREEN ##### --> +<para> + +</para> + +@obj: + +<!-- ##### MACRO GTK_MAX_COMPOSE_LEN ##### --> +<para> + +</para> + + +<!-- ##### SECTION ./tmpl/gtkprivate.sgml:Short_Description ##### --> + + + +<!-- ##### SIGNAL GtkTextView::cut-text ##### --> <para> </para> @textview: the object which received the signal. -<!-- ##### FUNCTION gtk_accel_group_marshal_remove ##### --> +<!-- ##### STRUCT GtkDialogButton ##### --> +<para> +Deprecated. +</para> + + +<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER ##### --> <para> </para> @@ -451,61 +501,80 @@ No idea. @func_data: @args: -<!-- ##### SIGNAL GtkTextView::delete ##### --> +<!-- ##### ARG GtkTextTag:overstrike_set ##### --> <para> </para> -@textview: the object which received the signal. -@arg1: -@arg2: -<!-- ##### MACRO gtk_widget_push_visual ##### --> +<!-- ##### FUNCTION gtk_text_buffer_cut ##### --> <para> </para> -@v: -@visual: +@buffer: +@time: +@interactive: +@default_editable: -<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:Short_Description ##### --> +<!-- ##### ENUM GtkTextViewMovementStep ##### --> +<para> +</para> +@GTK_TEXT_MOVEMENT_CHAR: +@GTK_TEXT_MOVEMENT_POSITIONS: +@GTK_TEXT_MOVEMENT_WORD: +@GTK_TEXT_MOVEMENT_WRAPPED_LINE: +@GTK_TEXT_MOVEMENT_LINE: +@GTK_TEXT_MOVEMENT_LINE_ENDS: +@GTK_TEXT_MOVEMENT_BUFFER_ENDS: -<!-- ##### MACRO GTK_TYPE_IDENTIFIER ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_POINTER_INT_INT ##### --> <para> -Hide the name of gtk_identifier_get_type + </para> +@object: +@func: +@func_data: +@args: -<!-- ##### FUNCTION gtk_themes_exit ##### --> +<!-- ##### SECTION ./tmpl/gtkdebug.sgml:See_Also ##### --> <para> </para> -@error_code: -<!-- ##### STRUCT GtkTypeQuery ##### --> +<!-- ##### MACRO GTK_CONTAINER_RESIZE_PENDING ##### --> <para> -A structure used to return values from @gtk_type_query. + </para> -@type: -@type_name: -@object_size: -@class_size: +@obj: -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT ##### --> +<!-- ##### FUNCTION gtk_menu_factory_remove_entries ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@factory: +@entries: +@nentries: -<!-- ##### FUNCTION gtk_marshal_NONE__INT_FLOAT_BOOL ##### --> +<!-- ##### FUNCTION gtk_text_buffer_find_string ##### --> +<para> + +</para> + +@buffer: +@iter: +@str: +@start: +@end: +@Returns: + +<!-- ##### FUNCTION gtk_marshal_NONE__INT_POINTER_INT_INT_INT_POINTER ##### --> <para> </para> @@ -515,7 +584,7 @@ A structure used to return values from @gtk_type_query. @func_data: @args: -<!-- ##### FUNCTION gtk_marshal_NONE__INT ##### --> +<!-- ##### FUNCTION gtk_marshal_INT__INT ##### --> <para> </para> @@ -525,13 +594,17 @@ A structure used to return values from @gtk_type_query. @func_data: @args: -<!-- ##### MACRO GTK_TYPE_FLAT_FIRST ##### --> +<!-- ##### FUNCTION gtk_paned_compute_position ##### --> <para> -The first "flat" (no struct) enumerated type value. +Internal function used by #GtkHPaned and #GtkVPaned </para> +@paned: +@allocation: +@child1_req: +@child2_req: -<!-- ##### FUNCTION gtk_accel_group_marshal_add ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__INT_FLOAT_BOOL ##### --> <para> </para> @@ -541,136 +614,159 @@ The first "flat" (no struct) enumerated type value. @func_data: @args: -<!-- ##### FUNCTION gtk_window_set_focus ##### --> +<!-- ##### MACRO gtk_marshal_NONE__POINTER_STRING_STRING ##### --> <para> </para> -@window: -@focus: -<!-- ##### MACRO GTK_PRIVATE_UNSET_FLAG ##### --> +<!-- ##### FUNCTION gtk_trace_referencing ##### --> <para> - +Private: print debugging information while doing a gtk_object_ref() or +a gtk_object_unref(). </para> -@wid: -@flag: +@object: object to reference or unreference. +@func: name of caller's function to print (used within macros). +@dummy: unused. +@line: line number (used within macros). +@do_ref: whether to reference or unreference. -<!-- ##### MACRO gtk_marshal_NONE__BOXED ##### --> +<!-- ##### MACRO GTK_VALUE_CALLBACK ##### --> <para> - +Use to get the value of a GtkArg whose GtkType is GTK_TYPE_CALLBACK </para> +@a: -<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:Long_Description ##### --> +<!-- ##### MACRO gtk_marshal_NONE__ENUM_FLOAT_BOOL ##### --> <para> </para> -<!-- ##### MACRO GTK_VALUE_C_CALLBACK ##### --> +<!-- ##### ENUM GtkFontType ##### --> <para> -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_CALLBACK +A set of bit flags used to specify the type of fonts shown +when calling gtk_font_selection_dialog_set_filter() or +gtk_font_selection_set_filter(). </para> -@a: +@GTK_FONT_BITMAP: bitmap fonts. +@GTK_FONT_SCALABLE: scalable fonts. +@GTK_FONT_SCALABLE_BITMAP: scaled bitmap fonts. +@GTK_FONT_ALL: a bitwise combination of all of the above. -<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:See_Also ##### --> +<!-- ##### MACRO GTK_TYPE_STRUCTURED_LAST ##### --> <para> - +The last structured enumerated type value. </para> -<!-- ##### FUNCTION gtk_type_children_types ##### --> +<!-- ##### MACRO GTK_OBJECT_NSIGNALS ##### --> <para> -Return the pointer to the type's children's types. +Get the number of signals defined by this object. </para> -@type: GtkType -@Returns: pointer to a GList +@obj: the object to query. -<!-- ##### MACRO GTK_PRIVATE_FLAGS ##### --> +<!-- ##### FUNCTION gtk_menu_factory_remove_subfactory ##### --> <para> </para> -@wid: +@factory: +@subfactory: +@path: -<!-- ##### FUNCTION gtk_menu_factory_add_entries ##### --> +<!-- ##### FUNCTION gtk_type_children_types ##### --> <para> - +Return the pointer to the type's children's types. </para> -@factory: -@entries: -@nentries: +@type: GtkType +@Returns: pointer to a GList -<!-- ##### MACRO GTK_WIDGET_IS_OFFSCREEN ##### --> +<!-- ##### FUNCTION gtk_type_register_flags ##### --> <para> - +Register a new set of flags @values and give them the name in +@type_name. </para> -@obj: +@type_name: must not be null. +@values: GtkFlagValue* +@Returns: -<!-- ##### FUNCTION gtk_identifier_get_type ##### --> +<!-- ##### SIGNAL GtkTextView::scroll-text ##### --> <para> -Get the type of GtkIdentifier. + </para> -@Returns: GtkType -- the enumerated type of something. +@textview: the object which received the signal. +@arg1: -<!-- ##### FUNCTION gtk_type_describe_tree ##### --> +<!-- ##### FUNCTION gtk_selection_clear_targets ##### --> <para> -Given a @type, describe all of its children, and their children. Only -show the size if @show_size is true. + </para> -@type: GtkType -@show_size: gboolean +@widget: +@selection: -<!-- ##### STRUCT GtkMenuPath ##### --> +<!-- ##### ENUM GtkPrivateFlags ##### --> <para> </para> -@path: -@widget: +@PRIVATE_GTK_USER_STYLE: +@PRIVATE_GTK_RESIZE_PENDING: +@PRIVATE_GTK_RESIZE_NEEDED: +@PRIVATE_GTK_LEAVE_PENDING: +@PRIVATE_GTK_HAS_SHAPE_MASK: +@PRIVATE_GTK_IN_REPARENT: +@PRIVATE_GTK_DIRECTION_SET: +@PRIVATE_GTK_DIRECTION_LTR: -<!-- ##### FUNCTION gtk_signal_handler_pending_by_id ##### --> +<!-- ##### FUNCTION gtk_type_set_chunk_alloc ##### --> <para> -Returns whether a connection id is valid (and optionally not blocked). +Set the mem_chunk size so it will hold @n_chunks of the objects of that @type. </para> -@object: the object to search for the desired handler. -@handler_id: the connection id. -@may_be_blocked: whether it is acceptable to return a blocked -handler. -@Returns: TRUE if the signal exists and wasn't blocked, -unless #may_be_blocked was specified. FALSE otherwise. +@type: There must be an unlocked TypeNode associated with this type otherwise nothing happens. +@n_chunks: -<!-- ##### MACRO GTK_TYPE_SEQNO ##### --> +<!-- ##### MACRO GTK_TYPE_STRUCTURED_FIRST ##### --> <para> -Convert a gtk type into its sequence number +The first structured enumerated type value. </para> -@type: -<!-- ##### MACRO GTK_VALUE_CALLBACK ##### --> +<!-- ##### STRUCT GtkSignalQuery ##### --> <para> -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_CALLBACK +This structure contains all the information about a particular +signal: its name, the type it affects, the signature of the handlers, +and its unique identifying integer. </para> -@a: +@object_type: +@signal_id: +@signal_name: +@is_user_signal: +@signal_flags: +@return_val: +@nparams: +@params: -<!-- ##### MACRO GTK_WIDGET_HAS_SHAPE_MASK ##### --> +<!-- ##### FUNCTION gtk_type_describe_tree ##### --> <para> - +Given a @type, describe all of its children, and their children. Only +show the size if @show_size is true. </para> -@obj: +@type: GtkType +@show_size: gboolean -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT ##### --> +<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_INT_INT_INT ##### --> <para> </para> @@ -680,43 +776,45 @@ Use to get the value of a GtkArg whose GtkType is GTK_TYPE_CALLBACK @func_data: @args: -<!-- ##### MACRO gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM ##### --> +<!-- ##### SECTION ./tmpl/gtkdebug.sgml:Long_Description ##### --> <para> </para> -<!-- ##### MACRO gtk_marshal_NONE__STRING_INT_POINTER ##### --> +<!-- ##### FUNCTION gtk_window_remove_embedded_xid ##### --> <para> </para> +@window: +@xid: -<!-- ##### FUNCTION gtk_type_register_enum ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__INT_FLOAT ##### --> <para> -Register a new set of enum @values and give them the name in -@type_name. + </para> -@type_name: must not be null. -@values: GtkEnumValue* -@Returns: +@object: +@func: +@func_data: +@args: -<!-- ##### MACRO gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT ##### --> +<!-- ##### FUNCTION gtk_text_iter_get_pixmap ##### --> <para> </para> +@iter: +@pixmap: +@mask: +@Returns: -<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_INT_INT_INT ##### --> +<!-- ##### MACRO gtk_marshal_NONE__POINTER_UINT_UINT ##### --> <para> </para> -@object: -@func: -@func_data: -@args: <!-- ##### FUNCTION gtk_font_selection_dialog_set_filter ##### --> <para> @@ -743,202 +841,199 @@ will be shown, or NULL to show all spacings. @charsets: a NULL-terminated array of strings containing charset names which will be shown, or NULL to show all charsets. -<!-- ##### MACRO GTK_VALUE_FOREIGN ##### --> +<!-- ##### SIGNAL GtkTextView::delete-text ##### --> <para> -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_FOREIGN + </para> -@a: +@textview: the object which received the signal. +@arg1: +@arg2: -<!-- ##### MACRO gtk_widget_set_default_visual ##### --> +<!-- ##### FUNCTION gtk_container_get_toplevels ##### --> <para> </para> -@v: -@visual: +@Returns: -<!-- ##### ENUM GtkPrivateFlags ##### --> +<!-- ##### MACRO GTK_TYPE_NUM_BUILTINS ##### --> <para> - +No idea. </para> -@PRIVATE_GTK_USER_STYLE: -@PRIVATE_GTK_RESIZE_PENDING: -@PRIVATE_GTK_RESIZE_NEEDED: -@PRIVATE_GTK_LEAVE_PENDING: -@PRIVATE_GTK_HAS_SHAPE_MASK: -@PRIVATE_GTK_IN_REPARENT: -@PRIVATE_GTK_DIRECTION_SET: -@PRIVATE_GTK_DIRECTION_LTR: -<!-- ##### FUNCTION gtk_text_mark_unref ##### --> +<!-- ##### MACRO GTK_TYPE_MAKE ##### --> <para> - +Combine a fundemantal type and a sequence number to create a gtk type. </para> -@mark: +@parent_t: +@seqno: -<!-- ##### FUNCTION gtk_signal_query ##### --> -<para> -Obtain information about a signal. -</para> +<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Short_Description ##### --> +Functions to adapt C structures to native calling convention. -@signal_id: the signal type identifier. -@Returns: a pointer to a GtkSignalQuery structure -which contains all the information, or NULL. -The pointer is allocated just for you: you must g_free() it. -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER ##### --> +<!-- ##### MACRO GTK_TYPE_FLAT_LAST ##### --> <para> - +The last "flat" (no struct) enumerated type value. </para> -@object: -@func: -@func_data: -@args: - -<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Short_Description ##### --> - - -<!-- ##### FUNCTION gtk_text_mark_deleted ##### --> +<!-- ##### FUNCTION gtk_text_mark_unref ##### --> <para> </para> @mark: -@Returns: -<!-- ##### FUNCTION gtk_text_buffer_cut ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER ##### --> <para> </para> -@buffer: -@time: -@interactive: -@default_editable: +@object: +@func: +@func_data: +@args: -<!-- ##### MACRO gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT_POINTER ##### --> <para> </para> +@object: +@func: +@func_data: +@args: -<!-- ##### FUNCTION gtk_type_free ##### --> +<!-- ##### FUNCTION gtk_signal_handlers_destroy ##### --> <para> -Given the type of an object and a pointer to it, the object is freed. +Destroy all the signal handlers connected to an object. +This is done automatically when the object is destroyed. +</para> +<para> +This function is labeled private. </para> -@type: GtkType -@mem: gpointer to the object +@object: the object whose signal handlers should be destroyed. -<!-- ##### FUNCTION gtk_text_buffer_copy ##### --> +<!-- ##### FUNCTION gtk_text_iter_in_region ##### --> <para> </para> -@buffer: -@time: +@iter: +@start: +@end: +@Returns: -<!-- ##### STRUCT GtkTextBTree ##### --> +<!-- ##### FUNCTION gtk_type_get_varargs_type ##### --> <para> - +Get the varargs type associated with @foreign_type </para> +@foreign_type: GtkType +@Returns: GtkType -<!-- ##### MACRO gtk_marshal_NONE__ENUM_FLOAT ##### --> +<!-- ##### STRUCT GtkMenuFactory ##### --> <para> </para> +@path: +@type: +@accel_group: +@widget: +@subfactories: -<!-- ##### FUNCTION gtk_marshal_NONE__INT_INT ##### --> +<!-- ##### SIGNAL GtkTextView::delete-at-cursor ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@textview: the object which received the signal. +@arg1: +@arg2: -<!-- ##### MACRO gtk_marshal_NONE__POINTER_POINTER_UINT_UINT ##### --> +<!-- ##### MACRO GTK_VALUE_FOREIGN ##### --> <para> - +Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_FOREIGN </para> +@a: -<!-- ##### FUNCTION gtk_menu_factory_remove_paths ##### --> +<!-- ##### SIGNAL GtkTextView::paste-text ##### --> <para> </para> -@factory: -@paths: -@npaths: +@textview: the object which received the signal. -<!-- ##### FUNCTION gtk_menu_factory_destroy ##### --> +<!-- ##### MACRO GTK_PRIVATE_SET_FLAG ##### --> <para> </para> -@factory: +@wid: +@flag: -<!-- ##### MACRO GTK_TYPE_STRUCTURED_LAST ##### --> +<!-- ##### FUNCTION gtk_ruler_draw_pos ##### --> <para> -The last structured enumerated type value. + </para> +@ruler: the gtkruler -<!-- ##### MACRO gtk_marshal_BOOL__POINTER_INT_INT_UINT ##### --> +<!-- ##### MACRO GTK_WIDGET_USER_STYLE ##### --> <para> </para> +@obj: -<!-- ##### FUNCTION gtk_type_describe_heritage ##### --> +<!-- ##### ENUM GtkDebugFlag ##### --> <para> -Print the types @type inherits from. + </para> -@type: GtkType +@GTK_DEBUG_OBJECTS: +@GTK_DEBUG_MISC: +@GTK_DEBUG_SIGNALS: +@GTK_DEBUG_DND: +@GTK_DEBUG_PLUGSOCKET: -<!-- ##### FUNCTION gtk_selection_data_set_text ##### --> +<!-- ##### FUNCTION gtk_menu_factory_remove_paths ##### --> <para> </para> -@selection_data: -@str: -@Returns: +@factory: +@paths: +@npaths: -<!-- ##### SIGNAL GtkTextView::delete-text ##### --> +<!-- ##### FUNCTION gtk_type_query ##### --> <para> - +Given a type, return various interesting parameters of the type. </para> -@textview: the object which received the signal. -@arg1: -@arg2: +@type: GtkType +@Returns: GtkTypeQuery* -<!-- ##### FUNCTION gtk_container_get_toplevels ##### --> +<!-- ##### SECTION ./tmpl/gtkprivate.sgml:Long_Description ##### --> <para> </para> -@Returns: -<!-- ##### MACRO GTK_WIDGET_RESIZE_NEEDED ##### --> +<!-- ##### MACRO GTK_TYPE_IDENTIFIER ##### --> <para> - +Hide the name of gtk_identifier_get_type </para> -@obj: -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_POINTER ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__INT_POINTER_INT_INT_INT ##### --> <para> </para> @@ -948,31 +1043,40 @@ Print the types @type inherits from. @func_data: @args: -<!-- ##### FUNCTION gtk_marshal_INT__INT ##### --> +<!-- ##### MACRO gtk_marshal_NONE__ENUM ##### --> <para> </para> -@object: -@func: -@func_data: -@args: -<!-- ##### MACRO gtk_marshal_ENUM__ENUM ##### --> +<!-- ##### FUNCTION gtk_signal_handler_pending_by_id ##### --> +<para> +Returns whether a connection id is valid (and optionally not blocked). +</para> + +@object: the object to search for the desired handler. +@handler_id: the connection id. +@may_be_blocked: whether it is acceptable to return a blocked +handler. +@Returns: TRUE if the signal exists and wasn't blocked, +unless #may_be_blocked was specified. FALSE otherwise. + +<!-- ##### MACRO GTK_PRIVATE_FLAGS ##### --> <para> </para> +@wid: -<!-- ##### FUNCTION gtk_window_remove_embedded_xid ##### --> +<!-- ##### FUNCTION gtk_selection_data_get_text ##### --> <para> </para> -@window: -@xid: +@selection_data: +@Returns: -<!-- ##### FUNCTION gtk_marshal_NONE__INT_POINTER_INT_INT_INT ##### --> +<!-- ##### FUNCTION gtk_marshal_BOOL__NONE ##### --> <para> </para> @@ -982,34 +1086,19 @@ Print the types @type inherits from. @func_data: @args: -<!-- ##### FUNCTION gtk_signal_n_emissions ##### --> +<!-- ##### FUNCTION gtk_type_free ##### --> <para> -Find out the recursion depth of emissions for a particular type -of signal and object. (So it will -always return 0 or 1 if #GTK_RUN_NO_RECURSE is specified) -This is a way to avoid recursion: you can see if -you are currently running in that signal handler and emit it only -if you are. -</para> -<para>Another way to look at it is that this number increases -by one when #gtk_signal_emit(), et al, are called, -and decreases by one when #gtk_signal_emit() returns. +Given the type of an object and a pointer to it, the object is freed. </para> -@object: the object with the signal handler. -@signal_id: the signal id. -@Returns: the recursion depth of emissions of this signal for this -object. +@type: GtkType +@mem: gpointer to the object -<!-- ##### MACRO GTK_NOTE ##### --> -<para> +<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Short_Description ##### --> -</para> -@type: -@action: -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT_INT ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_POINTER_POINTER ##### --> <para> </para> @@ -1019,11 +1108,13 @@ object. @func_data: @args: -<!-- ##### STRUCT GtkDialogButton ##### --> +<!-- ##### STRUCT GtkMenuPath ##### --> <para> -Deprecated. + </para> +@path: +@widget: <!-- ##### MACRO gtk_marshal_NONE__POINTER_UINT ##### --> <para> @@ -1031,63 +1122,39 @@ Deprecated. </para> -<!-- ##### FUNCTION gtk_type_query ##### --> -<para> -Given a type, return various interesting parameters of the type. -</para> +<!-- ##### SECTION ./tmpl/gtkprivate.sgml:Title ##### --> +Private Information -@type: GtkType -@Returns: GtkTypeQuery* -<!-- ##### SIGNAL GtkTextView::paste-text ##### --> +<!-- ##### FUNCTION gtk_menu_factory_find ##### --> <para> </para> -@textview: the object which received the signal. +@factory: +@path: +@Returns: -<!-- ##### FUNCTION gtk_color_selection_set_opacity ##### --> +<!-- ##### STRUCT GtkMenuEntry ##### --> <para> -Controls whether opacity can be set with the #GtkColorSelection. -If this functionality is enabled, the necessary additional widgets -are added to the #GtkColorSelection and the opacity value can be -retrieved via the fourth value in the color array returned by -the gtk_color_selection_get_color() function. -</para> -@colorsel: a #GtkColorSelection. -@use_opacity: a boolean indicating whether the opacity selection -is enabled. - -<!-- ##### USER_FUNCTION GtkSignalMarshal ##### --> -<para> -This is currently a hack left in for a scheme wrapper library. -It may be removed. -</para> -<para> -Don't use it. </para> -@object: The object which emits the signal. -@data: The user data associated with the hook. -@nparams: The number of parameters to the function. -@args: The actual values of the arguments. -@arg_types: The types of the arguments. -@return_type: The type of the return value from the function -or #GTK_TYPE_NONE for no return value. +@path: +@accelerator: +@callback: +@callback_data: +@widget: -<!-- ##### MACRO GTK_WIDGET_USER_STYLE ##### --> +<!-- ##### FUNCTION gtk_window_add_embedded_xid ##### --> <para> </para> -@obj: - -<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Short_Description ##### --> -Functions to adapt C structures to native calling convention. - +@window: +@xid: -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_POINTER_POINTER ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__BOOL ##### --> <para> </para> @@ -1097,20 +1164,20 @@ Functions to adapt C structures to native calling convention. @func_data: @args: -<!-- ##### MACRO GTK_CONTAINER_RESIZE_PENDING ##### --> -<para> - -</para> - -@obj: - -<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:See_Also ##### --> +<!-- ##### FUNCTION gtk_color_selection_set_opacity ##### --> <para> - +Controls whether opacity can be set with the #GtkColorSelection. +If this functionality is enabled, the necessary additional widgets +are added to the #GtkColorSelection and the opacity value can be +retrieved via the fourth value in the color array returned by +the gtk_color_selection_get_color() function. </para> +@colorsel: a #GtkColorSelection. +@use_opacity: a boolean indicating whether the opacity selection +is enabled. -<!-- ##### FUNCTION gtk_marshal_NONE__BOOL ##### --> +<!-- ##### FUNCTION gtk_marshal_INT__POINTER ##### --> <para> </para> @@ -1120,47 +1187,6 @@ Functions to adapt C structures to native calling convention. @func_data: @args: -<!-- ##### FUNCTION gtk_signal_set_funcs ##### --> -<para> -These set default functions to call when the user didn't -supply a function when connecting. (These are rarely -used, and probably only for language bindings) -</para> -<para> -By default, there are no such functions. -</para> - -@marshal_func: the function to invoke on every handlers for which there -isn't a function pointer. May be NULL. -@destroy_func: the function to invoke when each hook is destroyed. -May be NULL. - -<!-- ##### USER_FUNCTION GtkSignalDestroy ##### --> -<para> -A function which you can use to clean up when the -signal handler is destroyed. -</para> -<para> -For example, if your handler requires a few variables -that you made into a struct and allocated (using g_new() -or something), then you will probably want to free -it as soon as the hook is destroyed. This will -allow you to do that. (For this in particular -it is convenient to pass g_free() as a #GtkSignalDestroy -function). -</para> - -@data: The user data associated with the hook that is being -destroyed. - -<!-- ##### FUNCTION gtk_type_set_chunk_alloc ##### --> -<para> -Set the mem_chunk size so it will hold @n_chunks of the objects of that @type. -</para> - -@type: There must be an unlocked TypeNode associated with this type otherwise nothing happens. -@n_chunks: - <!-- ##### SECTION ./tmpl/gtkmarshal.sgml:See_Also ##### --> <para> <variablelist> @@ -1175,131 +1201,112 @@ really an implementation detail).</para></listitem> </para> -<!-- ##### FUNCTION gtk_text_buffer_insert_pixmap ##### --> +<!-- ##### STRUCT GtkTreeViewPrivate ##### --> <para> </para> -@buffer: -@iter: -@pixmap: -@mask: +@model: +@flags: +@tree: +@tab_offset: +@button_pressed_node: +@button_pressed_tree: +@children: +@width: +@height: +@hadjustment: +@vadjustment: +@bin_window: +@header_window: +@anchor: +@cursor: +@cursor_drag: +@xor_gc: +@drag_pos: +@x_drag: +@prelight_node: +@prelight_tree: +@prelight_offset: +@selection: +@columns: +@column: +@header_height: -<!-- ##### ENUM GtkTextViewMovementStep ##### --> +<!-- ##### MACRO GTK_WIDGET_RESIZE_NEEDED ##### --> <para> </para> -@GTK_TEXT_MOVEMENT_CHAR: -@GTK_TEXT_MOVEMENT_POSITIONS: -@GTK_TEXT_MOVEMENT_WORD: -@GTK_TEXT_MOVEMENT_WRAPPED_LINE: -@GTK_TEXT_MOVEMENT_LINE: -@GTK_TEXT_MOVEMENT_LINE_ENDS: -@GTK_TEXT_MOVEMENT_BUFFER_ENDS: +@obj: -<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_POINTER_INT_INT ##### --> +<!-- ##### MACRO GTK_NOTE ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@type: +@action: -<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER ##### --> +<!-- ##### ENUM GtkTextViewDeleteType ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@GTK_TEXT_DELETE_CHAR: +@GTK_TEXT_DELETE_HALF_WORD: +@GTK_TEXT_DELETE_WHOLE_WORD: +@GTK_TEXT_DELETE_HALF_WRAPPED_LINE: +@GTK_TEXT_DELETE_WHOLE_WRAPPED_LINE: +@GTK_TEXT_DELETE_HALF_LINE: +@GTK_TEXT_DELETE_WHOLE_LINE: +@GTK_TEXT_DELETE_WHITESPACE: +@GTK_TEXT_DELETE_WHITESPACE_LEAVE_ONE: -<!-- ##### MACRO gtk_marshal_NONE__OBJECT ##### --> +<!-- ##### MACRO GTK_TYPE_FLAT_FIRST ##### --> <para> - +The first "flat" (no struct) enumerated type value. </para> -<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Long_Description ##### --> -<refsect2> -<title>What are Signal Marshallers?</title> +<!-- ##### FUNCTION gtk_menu_factory_new ##### --> <para> -Marshals are functions which all have the same prototype: -they take a #GtkObject, a #GtkSignalFunc, a #gpointer, -and an array of argument values. -The functions are names gtk_marshall_RETURNTYPE__PARAMTYPE1_PARAMTYPE2.... + </para> + +@type: +@Returns: + +<!-- ##### MACRO gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM ##### --> <para> -They then call a native function: the GtkObject is the first -parameter passed in. The arguments are passed in the native -calling convention: chars, shorts, ints, longs may be packed -on the stack, or tucked in registers: it doesn't matter -because the same calling convention will be generated -inside the gtkmarshal code as is expected where you define -your handlers. + </para> + + +<!-- ##### FUNCTION gtk_text_buffer_spew ##### --> <para> -So the function named: -<programlisting> -gtk_marshal_BOOL__POINTER_INT_INT_UINT(GtkObject*, GtkSignalFunc, gpointer, GtkArg*); -</programlisting> -will call the #GtkSignalFunc assuming it was a function with signature: -<programlisting> -gboolean sigfunc(gpointer,gint,gint,guint); -</programlisting> + </para> -</refsect2> -<refsect2> -<title>Writing Custom Marshals</title> + +@buffer: + +<!-- ##### MACRO gtk_signal_default_marshaller ##### --> <para> -Marshals are primarily used as arguments to gtk_signal_new(). -Sometimes, you may find that a marshaller you need isn't available -in the standard list. Then you have to write your own. +A marshaller that returns void and takes no extra parameters. </para> + + +<!-- ##### STRUCT GtkTextTabArray ##### --> <para> -If you wish to define a signal with a new type of argument list. -Suppose you want 2 pointers and 2 integers. -You would write: -<programlisting> -typedef int (*GtkSignal_INT__POINTER_POINTER_INT_INT)( - gpointer, gpointer, gint, gint -); -void marshal_INT__POINTER_POINTER_INT_INT(GtkObject* object, - GtkSignalFunc func, - gpointer func_data, - GtkArg* args) -{ - GtkSignal_NONE__POINTER_POINTER_INT_INT rfunc; - gint* return_val; - return_val = GTK_RETLOC_INT(args[4]); - rfunc = (GtkSignal_INT__POINTER_POINTER_INT_INT)func; - *return_val = (*rfunc)(object, - GTK_VALUE_POINTER(args[0]), - GTK_VALUE_POINTER(args[1]), - GTK_VALUE_INT(args[2]), - GTK_VALUE_INT(args[3]), - func_data); -} -</programlisting> </para> -</refsect2> -<!-- ##### ENUM GtkFontFilterType ##### --> +<!-- ##### ARG GtkTextTag:overstrike ##### --> <para> -A set of bit flags used to specify the filter being set -when calling gtk_font_selection_dialog_set_filter() or -gtk_font_selection_set_filter(). + </para> -@GTK_FONT_FILTER_BASE: the base filter, which can't be changed by the user. -@GTK_FONT_FILTER_USER: the user filter, which can be changed from within the -'Filter' page of the #GtkFontSelection widget. <!-- ##### SIGNAL GtkTextView::move ##### --> <para> @@ -1311,143 +1318,161 @@ gtk_font_selection_set_filter(). @arg2: @arg3: -<!-- ##### MACRO GTK_OBJECT_NSIGNALS ##### --> +<!-- ##### MACRO GTK_WIDGET_HAS_SHAPE_MASK ##### --> <para> -Get the number of signals defined by this object. + </para> -@obj: the object to query. +@obj: -<!-- ##### STRUCT GtkSignalQuery ##### --> +<!-- ##### FUNCTION gtk_text_buffer_copy ##### --> <para> -This structure contains all the information about a particular -signal: its name, the type it affects, the signature of the handlers, -and its unique identifying integer. + </para> -@object_type: -@signal_id: -@signal_name: -@is_user_signal: -@signal_flags: -@return_val: -@nparams: -@params: +@buffer: +@time: -<!-- ##### FUNCTION gtk_icon_factory_get_type ##### --> +<!-- ##### FUNCTION gtk_text_mark_ref ##### --> <para> </para> +@mark: @Returns: -<!-- ##### ENUM GtkDebugFlag ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT ##### --> <para> </para> -@GTK_DEBUG_OBJECTS: -@GTK_DEBUG_MISC: -@GTK_DEBUG_SIGNALS: -@GTK_DEBUG_DND: -@GTK_DEBUG_PLUGSOCKET: +@object: +@func: +@func_data: +@args: -<!-- ##### FUNCTION gtk_themes_init ##### --> +<!-- ##### MACRO GTK_OBJECT_SIGNALS ##### --> <para> - +Get the array of signals defined for this object. </para> -@argc: -@argv: +@obj: the object to fetch the signals from. -<!-- ##### MACRO GTK_MAX_COMPOSE_LEN ##### --> +<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:Title ##### --> +gtkenums.sgml + + +<!-- ##### FUNCTION gtk_marshal_NONE__INT_INT_POINTER ##### --> <para> </para> +@object: +@func: +@func_data: +@args: -<!-- ##### FUNCTION gtk_window_set_default ##### --> +<!-- ##### FUNCTION gtk_type_check_object_cast ##### --> <para> - +Given a pointer to a GtkTypeObject @type_object, and a GtkType @cast_type, +make sure that it's okay to cast @type_object into a @cast_type. </para> -@window: -@defaultw: +@type_object: GtkTypeObject* +@cast_type: GtkType +@Returns: the same GtkTypeObject* as @type_object -<!-- ##### MACRO gtk_marshal_NONE__STRING ##### --> +<!-- ##### USER_FUNCTION GtkMenuCallback ##### --> <para> </para> +@widget: +@user_data: -<!-- ##### MACRO gtk_marshal_NONE__UINT ##### --> +<!-- ##### FUNCTION gtk_themes_exit ##### --> <para> </para> +@error_code: -<!-- ##### MACRO gtk_marshal_NONE__ENUM ##### --> +<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER ##### --> <para> </para> +@object: +@func: +@func_data: +@args: -<!-- ##### FUNCTION gtk_type_get_varargs_type ##### --> +<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Long_Description ##### --> <para> -Get the varargs type associated with @foreign_type + </para> -@foreign_type: GtkType -@Returns: GtkType -<!-- ##### FUNCTION gtk_text_view_get_iter_at_pixel ##### --> +<!-- ##### MACRO gtk_marshal_NONE__OBJECT ##### --> <para> </para> -@text_view: -@iter: -@x: -@y: -<!-- ##### FUNCTION gtk_signal_n_emissions_by_name ##### --> +<!-- ##### FUNCTION gtk_type_set_varargs_type ##### --> <para> -Find out the recursion depth of emissions for a particular type -of signal and object. Just like gtk_signal_n_emissions() -except it will lookup the signal id for you. +Set the varargs type for a fundamental type @foreign_type. </para> -@object: the object with the signal handler. -@name: the signal name. -@Returns: the recursion depth of emissions of this signal for this -object. +@foreign_type: Must be a GtkType with a sequence number of zero. Must not be a +fundamental type. +@varargs_type: Must be a GtkType which is either structured or flag, or NONE. -<!-- ##### FUNCTION gtk_container_unregister_toplevel ##### --> +<!-- ##### FUNCTION gtk_type_check_class_cast ##### --> <para> - +Given a GtkTypeClass pointer @klass, and a GtkType @cast_type, make +sure that it's okay to cast something of that @klass into a @cast_type. </para> -@container: +@klass: GtkTypeClass* +@cast_type: GtkType +@Returns: Always return @klass. -<!-- ##### FUNCTION gtk_rc_init ##### --> +<!-- ##### FUNCTION gtk_menu_factory_destroy ##### --> <para> -Internal function. + </para> +@factory: -<!-- ##### MACRO GTK_TYPE_FLAT_LAST ##### --> +<!-- ##### FUNCTION gtk_signal_n_emissions ##### --> <para> -The last "flat" (no struct) enumerated type value. +Find out the recursion depth of emissions for a particular type +of signal and object. (So it will +always return 0 or 1 if #GTK_RUN_NO_RECURSE is specified) +This is a way to avoid recursion: you can see if +you are currently running in that signal handler and emit it only +if you are. +</para> +<para>Another way to look at it is that this number increases +by one when #gtk_signal_emit(), et al, are called, +and decreases by one when #gtk_signal_emit() returns. </para> +@object: the object with the signal handler. +@signal_id: the signal id. +@Returns: the recursion depth of emissions of this signal for this +object. -<!-- ##### FUNCTION gtk_window_add_embedded_xid ##### --> +<!-- ##### FUNCTION gtk_text_buffer_insert_pixmap ##### --> <para> </para> -@window: -@xid: +@buffer: +@iter: +@pixmap: +@mask: <!-- ##### FUNCTION gtk_marshal_NONE__C_CALLBACK_C_CALLBACK ##### --> <para> @@ -1459,56 +1484,60 @@ The last "flat" (no struct) enumerated type value. @func_data: @args: -<!-- ##### FUNCTION gtk_type_register_flags ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT_INT_POINTER_INT_INT ##### --> <para> -Register a new set of flags @values and give them the name in -@type_name. + </para> -@type_name: must not be null. -@values: GtkFlagValue* -@Returns: +@object: +@func: +@func_data: +@args: -<!-- ##### SIGNAL GtkTextView::delete-at-cursor ##### --> +<!-- ##### MACRO GTK_VALUE_ARGS ##### --> <para> - +Use to get the value of a GtkArg whose GtkType is GTK_TYPE_ARGS </para> -@textview: the object which received the signal. -@arg1: -@arg2: +@a: -<!-- ##### FUNCTION gtk_menu_factory_new ##### --> +<!-- ##### FUNCTION gtk_menu_factory_add_entries ##### --> <para> </para> -@type: -@Returns: - -<!-- ##### SECTION ./tmpl/gtkdebug.sgml:Short_Description ##### --> +@factory: +@entries: +@nentries: +<!-- ##### FUNCTION gtk_signal_set_funcs ##### --> +<para> +These set default functions to call when the user didn't +supply a function when connecting. (These are rarely +used, and probably only for language bindings) +</para> +<para> +By default, there are no such functions. +</para> +@marshal_func: the function to invoke on every handlers for which there +isn't a function pointer. May be NULL. +@destroy_func: the function to invoke when each hook is destroyed. +May be NULL. -<!-- ##### MACRO gtk_widget_set_visual ##### --> +<!-- ##### FUNCTION gtk_im_context_simple_new ##### --> <para> </para> -@w: -@v: -@widget: -@visual: +@Returns: -<!-- ##### MACRO gtk_signal_default_marshaller ##### --> +<!-- ##### FUNCTION gtk_type_describe_heritage ##### --> <para> -A marshaller that returns void and takes no extra parameters. +Print the types @type inherits from. </para> - -<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Short_Description ##### --> - - +@type: GtkType <!-- ##### FUNCTION gtk_text_buffer_set_clipboard_contents ##### --> <para> @@ -1518,15 +1547,16 @@ A marshaller that returns void and takes no extra parameters. @buffer: @text: -<!-- ##### FUNCTION gtk_marshal_NONE__INT_INT_POINTER ##### --> +<!-- ##### ENUM GtkFontFilterType ##### --> <para> - +A set of bit flags used to specify the filter being set +when calling gtk_font_selection_dialog_set_filter() or +gtk_font_selection_set_filter(). </para> -@object: -@func: -@func_data: -@args: +@GTK_FONT_FILTER_BASE: the base filter, which can't be changed by the user. +@GTK_FONT_FILTER_USER: the user filter, which can be changed from within the +'Filter' page of the #GtkFontSelection widget. <!-- ##### FUNCTION gtk_type_parent_class ##### --> <para> @@ -1537,37 +1567,33 @@ Return NULL if anything goes wrong. @type: GtkType @Returns: gpointer to the klass. -<!-- ##### MACRO GTK_WIDGET_REDRAW_PENDING ##### --> +<!-- ##### USER_FUNCTION GtkSignalDestroy ##### --> <para> - +A function which you can use to clean up when the +signal handler is destroyed. </para> - -@obj: - -<!-- ##### ENUM GtkTextViewDeleteType ##### --> <para> - +For example, if your handler requires a few variables +that you made into a struct and allocated (using g_new() +or something), then you will probably want to free +it as soon as the hook is destroyed. This will +allow you to do that. (For this in particular +it is convenient to pass g_free() as a #GtkSignalDestroy +function). </para> -@GTK_TEXT_DELETE_CHAR: -@GTK_TEXT_DELETE_HALF_WORD: -@GTK_TEXT_DELETE_WHOLE_WORD: -@GTK_TEXT_DELETE_HALF_WRAPPED_LINE: -@GTK_TEXT_DELETE_WHOLE_WRAPPED_LINE: -@GTK_TEXT_DELETE_HALF_LINE: -@GTK_TEXT_DELETE_WHOLE_LINE: -@GTK_TEXT_DELETE_WHITESPACE: -@GTK_TEXT_DELETE_WHITESPACE_LEAVE_ONE: +@data: The user data associated with the hook that is being +destroyed. -<!-- ##### FUNCTION gtk_text_buffer_get_clipboard_contents ##### --> +<!-- ##### FUNCTION gtk_window_set_default ##### --> <para> </para> -@buffer: -@Returns: +@window: +@defaultw: -<!-- ##### FUNCTION gtk_marshal_NONE__C_CALLBACK ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__INT ##### --> <para> </para> @@ -1577,192 +1603,164 @@ Return NULL if anything goes wrong. @func_data: @args: -<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_POINTER_INT_INT ##### --> +<!-- ##### MACRO GTK_WIDGET_LEAVE_PENDING ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@obj: -<!-- ##### FUNCTION gtk_menu_factory_remove_entries ##### --> +<!-- ##### MACRO gtk_marshal_NONE__UINT ##### --> <para> </para> -@factory: -@entries: -@nentries: -<!-- ##### FUNCTION gtk_type_check_class_cast ##### --> +<!-- ##### MACRO GTK_WIDGET_IN_REPARENT ##### --> <para> -Given a GtkTypeClass pointer @klass, and a GtkType @cast_type, make -sure that it's okay to cast something of that @klass into a @cast_type. + </para> -@klass: GtkTypeClass* -@cast_type: GtkType -@Returns: Always return @klass. +@obj: -<!-- ##### SECTION ./tmpl/gtkdebug.sgml:Long_Description ##### --> +<!-- ##### FUNCTION gtk_accel_group_marshal_add ##### --> <para> </para> +@object: +@func: +@func_data: +@args: -<!-- ##### FUNCTION gtk_selection_data_get_text ##### --> +<!-- ##### FUNCTION gtk_marshal_INT__POINTER_CHAR_CHAR ##### --> <para> </para> -@selection_data: -@Returns: +@object: +@func: +@func_data: +@args: -<!-- ##### USER_FUNCTION GtkMenuCallback ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__POINTER_INT_INT ##### --> <para> </para> -@widget: -@user_data: +@object: +@func: +@func_data: +@args: -<!-- ##### VARIABLE gtk_debug_flags ##### --> +<!-- ##### FUNCTION gtk_accel_group_marshal_remove ##### --> <para> </para> +@object: +@func: +@func_data: +@args: -<!-- ##### SECTION ./tmpl/gtkprivate.sgml:See_Also ##### --> +<!-- ##### MACRO gtk_marshal_NONE__STRING_INT_POINTER ##### --> <para> </para> -<!-- ##### FUNCTION gtk_menu_factory_remove_subfactory ##### --> +<!-- ##### FUNCTION gtk_marshal_NONE__INT_POINTER ##### --> <para> </para> -@factory: -@subfactory: -@path: +@object: +@func: +@func_data: +@args: -<!-- ##### SECTION ./tmpl/gtkdebug.sgml:Title ##### --> -Debugging +<!-- ##### FUNCTION gtk_rc_init ##### --> +<para> +Internal function. +</para> -<!-- ##### FUNCTION gtk_type_check_object_cast ##### --> +<!-- ##### FUNCTION gtk_signal_query ##### --> <para> -Given a pointer to a GtkTypeObject @type_object, and a GtkType @cast_type, -make sure that it's okay to cast @type_object into a @cast_type. +Obtain information about a signal. </para> -@type_object: GtkTypeObject* -@cast_type: GtkType -@Returns: the same GtkTypeObject* as @type_object +@signal_id: the signal type identifier. +@Returns: a pointer to a GtkSignalQuery structure +which contains all the information, or NULL. +The pointer is allocated just for you: you must g_free() it. -<!-- ##### FUNCTION gtk_ruler_draw_pos ##### --> +<!-- ##### FUNCTION gtk_signal_n_emissions_by_name ##### --> <para> - +Find out the recursion depth of emissions for a particular type +of signal and object. Just like gtk_signal_n_emissions() +except it will lookup the signal id for you. </para> -@ruler: the gtkruler +@object: the object with the signal handler. +@name: the signal name. +@Returns: the recursion depth of emissions of this signal for this +object. -<!-- ##### STRUCT GtkTreeViewPrivate ##### --> +<!-- ##### SECTION ./tmpl/gtkenums.sgml.sgml:See_Also ##### --> <para> </para> -@model: -@flags: -@tree: -@tab_offset: -@button_pressed_node: -@button_pressed_tree: -@children: -@width: -@height: -@hadjustment: -@vadjustment: -@bin_window: -@header_window: -@anchor: -@cursor: -@cursor_drag: -@xor_gc: -@drag_pos: -@x_drag: -@prelight_node: -@prelight_tree: -@prelight_offset: -@selection: -@columns: -@column: -@header_height: -<!-- ##### MACRO gtk_marshal_NONE__POINTER_UINT_UINT ##### --> +<!-- ##### SIGNAL GtkTextView::delete ##### --> <para> </para> +@textview: the object which received the signal. +@arg1: +@arg2: -<!-- ##### SECTION ./tmpl/gtkdebug.sgml:See_Also ##### --> +<!-- ##### MACRO gtk_marshal_ENUM__ENUM ##### --> <para> </para> -<!-- ##### MACRO gtk_marshal_NONE__POINTER_UINT_ENUM ##### --> +<!-- ##### MACRO gtk_widget_push_visual ##### --> <para> </para> +@v: +@visual: -<!-- ##### FUNCTION gtk_marshal_NONE__NONE ##### --> +<!-- ##### FUNCTION gtk_container_register_toplevel ##### --> <para> </para> -@object: -@func: -@func_data: -@args: +@container: -<!-- ##### FUNCTION gtk_signal_handlers_destroy ##### --> -<para> -Destroy all the signal handlers connected to an object. -This is done automatically when the object is destroyed. -</para> -<para> -This function is labeled private. -</para> +<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Title ##### --> +GtkIMContextSimple -@object: the object whose signal handlers should be destroyed. -<!-- ##### FUNCTION gtk_text_iter_get_pixmap ##### --> +<!-- ##### MACRO gtk_marshal_NONE__POINTER_INT_INT_POINTER_UINT_UINT ##### --> <para> </para> -@iter: -@pixmap: -@mask: -@Returns: - -<!-- ##### SECTION ./tmpl/gtkprivate.sgml:Short_Description ##### --> - - -<!-- ##### MACRO GTK_OBJECT_SIGNALS ##### --> +<!-- ##### MACRO GTK_VALUE_C_CALLBACK ##### --> <para> -Get the array of signals defined for this object. +Use to get the value of a GtkArg whose GtkType is GTK_TYPE_C_CALLBACK </para> -@obj: the object to fetch the signals from. +@a: -<!-- ##### FUNCTION gtk_marshal_BOOL__NONE ##### --> +<!-- ##### FUNCTION gtk_marshal_BOOL__POINTER_POINTER_INT_INT ##### --> <para> </para> @@ -1772,53 +1770,55 @@ Get the array of signals defined for this object. @func_data: @args: -<!-- ##### FUNCTION gtk_text_iter_in_region ##### --> +<!-- ##### SIGNAL GtkTextView::move-insert ##### --> <para> </para> -@iter: -@start: -@end: -@Returns: +@textview: the object which received the signal. +@arg1: +@arg2: +@arg3: -<!-- ##### FUNCTION gtk_menu_factory_add_subfactory ##### --> +<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Long_Description ##### --> <para> </para> -@factory: -@subfactory: -@path: -<!-- ##### STRUCT GtkMenuEntry ##### --> +<!-- ##### FUNCTION gtk_text_buffer_find_regexp ##### --> <para> </para> -@path: -@accelerator: -@callback: -@callback_data: -@widget: +@buffer: +@regexp: +@start: +@end: +@Returns: -<!-- ##### FUNCTION gtk_ruler_draw_ticks ##### --> +<!-- ##### FUNCTION gtk_menu_factory_add_subfactory ##### --> <para> </para> -@ruler: the gtkruler +@factory: +@subfactory: +@path: -<!-- ##### SECTION ./tmpl/gtkmenufactory.sgml:Long_Description ##### --> +<!-- ##### ENUM GtkTextViewScrollType ##### --> <para> </para> +@GTK_TEXT_SCROLL_TO_TOP: +@GTK_TEXT_SCROLL_TO_BOTTOM: +@GTK_TEXT_SCROLL_PAGE_DOWN: +@GTK_TEXT_SCROLL_PAGE_UP: -<!-- ##### MACRO GTK_VALUE_ARGS ##### --> +<!-- ##### STRUCT GtkTextBTree ##### --> <para> -Use to get the value of a GtkArg whose GtkType is GTK_TYPE_ARGS + </para> -@a: diff --git a/docs/reference/gtk/tmpl/gtkdialog.sgml b/docs/reference/gtk/tmpl/gtkdialog.sgml index 2e835e982f..65968c1bfa 100644 --- a/docs/reference/gtk/tmpl/gtkdialog.sgml +++ b/docs/reference/gtk/tmpl/gtkdialog.sgml @@ -153,6 +153,14 @@ gtk_window_set_title(). See the #GtkWindow section for more). @GTK_RESPONSE_NONE: @GTK_RESPONSE_REJECT: @GTK_RESPONSE_ACCEPT: +@GTK_RESPONSE_DELETE_EVENT: +@GTK_RESPONSE_OK: +@GTK_RESPONSE_CANCEL: +@GTK_RESPONSE_CLOSE: +@GTK_RESPONSE_YES: +@GTK_RESPONSE_NO: +@GTK_RESPONSE_APPLY: +@GTK_RESPONSE_HELP: <!-- ##### FUNCTION gtk_dialog_new ##### --> <para> @@ -202,6 +210,7 @@ directly, but into the vbox and action_area, as described above. @dialog: @button_text: @response_id: +@Returns: <!-- ##### FUNCTION gtk_dialog_add_buttons ##### --> diff --git a/gtk/gtkcolorseldialog.c b/gtk/gtkcolorseldialog.c index 6effba012e..3b1322c947 100644 --- a/gtk/gtkcolorseldialog.c +++ b/gtk/gtkcolorseldialog.c @@ -28,6 +28,7 @@ #include "gtkframe.h" #include "gtkhbbox.h" #include "gtkbutton.h" +#include "gtkstock.h" #include "gtkintl.h" @@ -79,10 +80,7 @@ gtk_color_selection_dialog_class_init (GtkColorSelectionDialogClass *klass) static void gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag) { - GtkWidget *action_area_button_box, *frame; - - gtk_widget_set_colormap (GTK_WIDGET (colorseldiag), gdk_rgb_get_cmap ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); + GtkWidget *action_area_button_box, *frame; frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE); @@ -96,29 +94,21 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag) gtk_container_add (GTK_CONTAINER (frame), colorseldiag->colorsel); gtk_widget_show (colorseldiag->colorsel); - action_area_button_box = gtk_hbutton_box_new (); - gtk_button_box_set_layout (GTK_BUTTON_BOX(action_area_button_box), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing (GTK_BUTTON_BOX(action_area_button_box), 5); - gtk_box_pack_end (GTK_BOX (GTK_DIALOG (colorseldiag)->action_area), action_area_button_box, TRUE, TRUE, 0); - gtk_widget_show (action_area_button_box); - - colorseldiag->ok_button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (colorseldiag->ok_button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (action_area_button_box), colorseldiag->ok_button, TRUE, TRUE, 0); + action_area_button_box = GTK_DIALOG (colorseldiag)->action_area; + + colorseldiag->ok_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag), + GTK_STOCK_BUTTON_OK, + GTK_RESPONSE_OK); + gtk_widget_grab_default (colorseldiag->ok_button); - gtk_widget_show (colorseldiag->ok_button); - - colorseldiag->cancel_button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (colorseldiag->cancel_button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (action_area_button_box), colorseldiag->cancel_button, TRUE, TRUE, 0); - gtk_widget_show (colorseldiag->cancel_button); - colorseldiag->help_button = gtk_button_new_with_label (_("Help")); - GTK_WIDGET_SET_FLAGS (colorseldiag->help_button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (action_area_button_box), colorseldiag->help_button, TRUE, TRUE, 0); - gtk_widget_show (colorseldiag->help_button); + colorseldiag->cancel_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag), + GTK_STOCK_BUTTON_CANCEL, + GTK_RESPONSE_CANCEL); - gtk_widget_pop_colormap (); + colorseldiag->help_button = gtk_dialog_add_button (GTK_DIALOG (colorseldiag), + GTK_STOCK_HELP, + GTK_RESPONSE_HELP); } GtkWidget* diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index d21be69c24..2b7ef73078 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -129,9 +129,11 @@ gtk_dialog_init (GtkDialog *dialog) dialog->action_area = gtk_hbutton_box_new (); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog->action_area), - GTK_BUTTONBOX_SPREAD); + GTK_BUTTONBOX_END); + + gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog->action_area), 5); - gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 10); + gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5); gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->action_area, FALSE, TRUE, 0); gtk_widget_show (dialog->action_area); @@ -147,7 +149,7 @@ gtk_dialog_delete_event_handler (GtkWidget *widget, gpointer user_data) { /* emit response signal */ - gtk_dialog_response (GTK_DIALOG (widget), GTK_RESPONSE_NONE); + gtk_dialog_response (GTK_DIALOG (widget), GTK_RESPONSE_DELETE_EVENT); /* Do the destroy by default */ return FALSE; @@ -244,7 +246,7 @@ gtk_dialog_new_empty (const gchar *title, * GTK_STOCK_BUTTON_OK, * GTK_RESPONSE_ACCEPT, * GTK_STOCK_BUTTON_CANCEL, - * GTK_RESPONSE_NONE, + * GTK_RESPONSE_REJECT, * NULL); * </programlisting> * @@ -373,10 +375,12 @@ gtk_dialog_add_action_widget (GtkDialog *dialog, * Adds a button with the given text (or a stock button, if @button_text is a * stock ID) and sets things up so that clicking the button will emit the * "response" signal with the given @response_id. The button is appended to the - * end of the dialog's action area. - * + * end of the dialog's action area. The button widget is returned, but usually + * you don't need it. + * + * Return value: the button widget that was added **/ -void +GtkWidget* gtk_dialog_add_button (GtkDialog *dialog, const gchar *button_text, gint response_id) @@ -389,11 +393,15 @@ gtk_dialog_add_button (GtkDialog *dialog, button = gtk_button_new_stock (button_text, gtk_window_get_default_accel_group (GTK_WINDOW (dialog))); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_show (button); gtk_dialog_add_action_widget (dialog, button, response_id); + + return button; } static void @@ -491,7 +499,7 @@ shutdown_loop (RunInfo *ri) } static void -run_destroy_handler (GtkDialog *dialog, gpointer data) +run_unmap_handler (GtkDialog *dialog, gpointer data) { RunInfo *ri = data; @@ -542,7 +550,7 @@ run_delete_handler (GtkDialog *dialog, * During gtk_dialog_run(), the default behavior of "delete_event" is * disabled; if the dialog receives "delete_event", it will not be * destroyed as windows usually are, and gtk_dialog_run() will return - * GTK_RESPONSE_NONE. Also, during gtk_dialog_run() the dialog will be + * GTK_RESPONSE_DELETE_EVENT. Also, during gtk_dialog_run() the dialog will be * modal. You can force gtk_dialog_run() to return at any time by * calling gtk_dialog_response() to emit the "response" * signal. Destroying the dialog during gtk_dialog_run() is a very bad @@ -597,8 +605,8 @@ gtk_dialog_run (GtkDialog *dialog) destroy_handler = gtk_signal_connect (GTK_OBJECT (dialog), - "destroy", - GTK_SIGNAL_FUNC (run_destroy_handler), + "unmap", + GTK_SIGNAL_FUNC (run_unmap_handler), &ri); delete_handler = diff --git a/gtk/gtkdialog.h b/gtk/gtkdialog.h index fb8d10cf6c..6135908d05 100644 --- a/gtk/gtkdialog.h +++ b/gtk/gtkdialog.h @@ -46,23 +46,39 @@ typedef enum /* Convenience enum to use for action_id's. Positive values are * totally user-interpreted. GTK will sometimes return - * GTK_ACTION_NONE if no action_id is available. + * GTK_RESPONSE_NONE if no response_id is available. * * Typical usage is: - * if (gtk_dialog_run(dialog) == GTK_ACTION_ACCEPT) + * if (gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) * blah(); */ typedef enum { /* GTK returns this if a response widget has no response_id, - * or the dialog gets destroyed with no response + * or if the dialog gets programmatically hidden or destroyed. */ GTK_RESPONSE_NONE = -1, + /* GTK won't return these unless you pass them in - * as the response for an action widget + * as the response for an action widget. They are + * for your convenience. */ GTK_RESPONSE_REJECT = -2, - GTK_RESPONSE_ACCEPT = -3 + GTK_RESPONSE_ACCEPT = -3, + + /* If the dialog is deleted. */ + GTK_RESPONSE_DELETE_EVENT = -4, + + /* These are returned from GTK dialogs, and you can also use them + * yourself if you like. + */ + GTK_RESPONSE_OK = -5, + GTK_RESPONSE_CANCEL = -6, + GTK_RESPONSE_CLOSE = -7, + GTK_RESPONSE_YES = -8, + GTK_RESPONSE_NO = -9, + GTK_RESPONSE_APPLY = -10, + GTK_RESPONSE_HELP = -11 } GtkResponseType; @@ -102,17 +118,15 @@ GtkWidget* gtk_dialog_new_with_buttons (const gchar *title, const gchar *first_button_text, ...); -void gtk_dialog_add_action_widget (GtkDialog *dialog, - GtkWidget *child, - gint response_id); - -void gtk_dialog_add_button (GtkDialog *dialog, - const gchar *button_text, - gint response_id); - -void gtk_dialog_add_buttons (GtkDialog *dialog, - const gchar *first_button_text, - ...); +void gtk_dialog_add_action_widget (GtkDialog *dialog, + GtkWidget *child, + gint response_id); +GtkWidget* gtk_dialog_add_button (GtkDialog *dialog, + const gchar *button_text, + gint response_id); +void gtk_dialog_add_buttons (GtkDialog *dialog, + const gchar *first_button_text, + ...); /* Emit response signal */ void gtk_dialog_response (GtkDialog *dialog, diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index 70cc81aadb..ae80fbf0d6 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -58,6 +58,7 @@ #include "gtklistitem.h" #include "gtkmain.h" #include "gtkscrolledwindow.h" +#include "gtkstock.h" #include "gtksignal.h" #include "gtkvbox.h" #include "gtkmenu.h" @@ -443,7 +444,7 @@ gtk_file_selection_get_type (void) (GtkClassInitFunc) NULL, }; - file_selection_type = gtk_type_unique (GTK_TYPE_WINDOW, &filesel_info); + file_selection_type = gtk_type_unique (GTK_TYPE_DIALOG, &filesel_info); } return file_selection_type; @@ -456,7 +457,7 @@ gtk_file_selection_class_init (GtkFileSelectionClass *class) object_class = (GtkObjectClass*) class; - parent_class = gtk_type_class (GTK_TYPE_WINDOW); + parent_class = gtk_type_class (GTK_TYPE_DIALOG); object_class->destroy = gtk_file_selection_destroy; } @@ -470,17 +471,18 @@ gtk_file_selection_init (GtkFileSelection *filesel) GtkWidget *confirm_area; GtkWidget *pulldown_hbox; GtkWidget *scrolled_win; - + GtkDialog *dialog; + char *dir_title [2]; char *file_title [2]; + + dialog = GTK_DIALOG (filesel); filesel->cmpl_state = cmpl_init_state (); /* The dialog-sized vertical box */ - filesel->main_vbox = gtk_vbox_new (FALSE, 10); + filesel->main_vbox = dialog->vbox; gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); - gtk_container_add (GTK_CONTAINER (filesel), filesel->main_vbox); - gtk_widget_show (filesel->main_vbox); /* The horizontal box containing create, rename etc. buttons */ filesel->button_area = gtk_hbutton_box_new (); @@ -555,28 +557,23 @@ gtk_file_selection_init (GtkFileSelection *filesel) gtk_widget_show (filesel->action_area); /* The OK/Cancel button area */ - confirm_area = gtk_hbutton_box_new (); - gtk_button_box_set_layout (GTK_BUTTON_BOX (confirm_area), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (confirm_area), 5); - gtk_box_pack_end (GTK_BOX (filesel->main_vbox), confirm_area, FALSE, FALSE, 0); - gtk_widget_show (confirm_area); + confirm_area = dialog->action_area; /* The OK button */ - filesel->ok_button = gtk_button_new_with_label (_("OK")); - GTK_WIDGET_SET_FLAGS (filesel->ok_button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (confirm_area), filesel->ok_button, TRUE, TRUE, 0); + filesel->ok_button = gtk_dialog_add_button (dialog, + GTK_STOCK_BUTTON_OK, + GTK_RESPONSE_OK); + gtk_widget_grab_default (filesel->ok_button); - gtk_widget_show (filesel->ok_button); /* The Cancel button */ - filesel->cancel_button = gtk_button_new_with_label (_("Cancel")); - GTK_WIDGET_SET_FLAGS (filesel->cancel_button, GTK_CAN_DEFAULT); - gtk_box_pack_start (GTK_BOX (confirm_area), filesel->cancel_button, TRUE, TRUE, 0); - gtk_widget_show (filesel->cancel_button); + filesel->cancel_button = gtk_dialog_add_button (dialog, + GTK_STOCK_BUTTON_CANCEL, + GTK_RESPONSE_CANCEL); /* The selection entry widget */ entry_vbox = gtk_vbox_new (FALSE, 2); - gtk_box_pack_end (GTK_BOX (filesel->main_vbox), entry_vbox, FALSE, FALSE, 0); + gtk_box_pack_end (GTK_BOX (filesel->main_vbox), entry_vbox, FALSE, FALSE, 2); gtk_widget_show (entry_vbox); filesel->selection_text = label = gtk_label_new (""); diff --git a/gtk/gtkfilesel.h b/gtk/gtkfilesel.h index 9fb4e8fb46..0132982d16 100644 --- a/gtk/gtkfilesel.h +++ b/gtk/gtkfilesel.h @@ -29,7 +29,7 @@ #include <gdk/gdk.h> -#include <gtk/gtkwindow.h> +#include <gtk/gtkdialog.h> #ifdef __cplusplus @@ -50,7 +50,7 @@ typedef struct _GtkFileSelectionClass GtkFileSelectionClass; struct _GtkFileSelection { - GtkWindow window; + GtkDialog parent_instance; GtkWidget *dir_list; GtkWidget *file_list; @@ -79,7 +79,7 @@ struct _GtkFileSelection struct _GtkFileSelectionClass { - GtkWindowClass parent_class; + GtkDialogClass parent_class; }; diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index 973bd59f6b..fa50c68a6c 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -48,6 +48,7 @@ #include "gtklabel.h" #include "gtkrc.h" #include "gtksignal.h" +#include "gtkstock.h" #include "gtktable.h" #include "gtkvbox.h" #include "gtkscrolledwindow.h" @@ -900,7 +901,8 @@ gtk_font_selection_dialog_get_type (void) (GtkClassInitFunc) NULL, }; - font_selection_dialog_type = gtk_type_unique (GTK_TYPE_WINDOW, &fontsel_diag_info); + font_selection_dialog_type = gtk_type_unique (GTK_TYPE_DIALOG, + &fontsel_diag_info); } return font_selection_dialog_type; @@ -913,12 +915,16 @@ gtk_font_selection_dialog_class_init (GtkFontSelectionDialogClass *klass) object_class = (GtkObjectClass*) klass; - font_selection_dialog_parent_class = gtk_type_class (GTK_TYPE_WINDOW); + font_selection_dialog_parent_class = gtk_type_class (GTK_TYPE_DIALOG); } static void gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag) { + GtkDialog *dialog; + + dialog = GTK_DIALOG (fontseldiag); + fontseldiag->dialog_width = -1; fontseldiag->auto_resize = TRUE; @@ -930,9 +936,7 @@ gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag) gtk_container_set_border_width (GTK_CONTAINER (fontseldiag), 4); gtk_window_set_policy(GTK_WINDOW(fontseldiag), FALSE, TRUE, TRUE); - fontseldiag->main_vbox = gtk_vbox_new (FALSE, 4); - gtk_widget_show (fontseldiag->main_vbox); - gtk_container_add (GTK_CONTAINER (fontseldiag), fontseldiag->main_vbox); + fontseldiag->main_vbox = dialog->vbox; fontseldiag->fontsel = gtk_font_selection_new(); gtk_container_set_border_width (GTK_CONTAINER (fontseldiag->fontsel), 4); @@ -941,34 +945,26 @@ gtk_font_selection_dialog_init (GtkFontSelectionDialog *fontseldiag) fontseldiag->fontsel, TRUE, TRUE, 0); /* Create the action area */ - fontseldiag->action_area = gtk_hbutton_box_new (); - gtk_button_box_set_layout(GTK_BUTTON_BOX(fontseldiag->action_area), - GTK_BUTTONBOX_END); - gtk_button_box_set_spacing(GTK_BUTTON_BOX(fontseldiag->action_area), 5); - gtk_box_pack_start (GTK_BOX (fontseldiag->main_vbox), - fontseldiag->action_area, FALSE, FALSE, 0); - gtk_widget_show (fontseldiag->action_area); - - fontseldiag->ok_button = gtk_button_new_with_label(_("OK")); - GTK_WIDGET_SET_FLAGS (fontseldiag->ok_button, GTK_CAN_DEFAULT); - gtk_widget_show(fontseldiag->ok_button); - gtk_box_pack_start (GTK_BOX (fontseldiag->action_area), - fontseldiag->ok_button, TRUE, TRUE, 0); - gtk_widget_grab_default (fontseldiag->ok_button); - - fontseldiag->apply_button = gtk_button_new_with_label(_("Apply")); - GTK_WIDGET_SET_FLAGS (fontseldiag->apply_button, GTK_CAN_DEFAULT); - /*gtk_widget_show(fontseldiag->apply_button);*/ - gtk_box_pack_start (GTK_BOX(fontseldiag->action_area), - fontseldiag->apply_button, TRUE, TRUE, 0); + fontseldiag->action_area = dialog->action_area; - fontseldiag->cancel_button = gtk_button_new_with_label(_("Cancel")); - GTK_WIDGET_SET_FLAGS (fontseldiag->cancel_button, GTK_CAN_DEFAULT); - gtk_widget_show(fontseldiag->cancel_button); - gtk_box_pack_start (GTK_BOX(fontseldiag->action_area), - fontseldiag->cancel_button, TRUE, TRUE, 0); + fontseldiag->ok_button = gtk_dialog_add_button (dialog, + GTK_STOCK_BUTTON_OK, + GTK_RESPONSE_OK); + gtk_widget_grab_default (fontseldiag->ok_button); + fontseldiag->apply_button = gtk_dialog_add_button (dialog, + GTK_STOCK_BUTTON_APPLY, + GTK_RESPONSE_APPLY); + gtk_widget_hide (fontseldiag->apply_button); + + fontseldiag->cancel_button = gtk_dialog_add_button (dialog, + GTK_STOCK_BUTTON_CANCEL, + GTK_RESPONSE_CANCEL); + + gtk_window_set_title (GTK_WINDOW (fontseldiag), + _("Font Selection")); + } GtkWidget* @@ -977,8 +973,9 @@ gtk_font_selection_dialog_new (const gchar *title) GtkFontSelectionDialog *fontseldiag; fontseldiag = gtk_type_new (GTK_TYPE_FONT_SELECTION_DIALOG); - gtk_window_set_title (GTK_WINDOW (fontseldiag), - title ? title : _("Font Selection")); + + if (title) + gtk_window_set_title (GTK_WINDOW (fontseldiag), title); return GTK_WIDGET (fontseldiag); } diff --git a/gtk/gtkfontsel.h b/gtk/gtkfontsel.h index 1cc0c8653b..a35ebd12fc 100644 --- a/gtk/gtkfontsel.h +++ b/gtk/gtkfontsel.h @@ -33,10 +33,9 @@ #include <gdk/gdk.h> -#include <gtk/gtkwindow.h> +#include <gtk/gtkdialog.h> #include <gtk/gtkvbox.h> - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -93,7 +92,7 @@ struct _GtkFontSelectionClass struct _GtkFontSelectionDialog { - GtkWindow window; + GtkDialog parent_instance; GtkWidget *fontsel; @@ -111,7 +110,7 @@ struct _GtkFontSelectionDialog struct _GtkFontSelectionDialogClass { - GtkWindowClass parent_class; + GtkDialogClass parent_class; }; diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 6ecb161c0b..6a74193cf2 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -150,11 +150,9 @@ setup_type(GtkMessageDialog *dialog, GtkMessageType type) * * Creates a new message dialog, which is a simple dialog with an icon * indicating the dialog type (error, warning, etc.) and some text the - * user may want to see. If the button set you select with the @buttons - * argument has positive buttons (OK, Yes) they will result in a response ID - * of GTK_RESPONSE_ACCEPT. If it has negative buttons (Cancel, No) they will - * result in a response ID of GTK_RESPONSE_REJECT. See #GtkDialog for more - * details. + * user may want to see. When the user clicks a button a "response" + * signal is emitted with response IDs from #GtkResponseType. See + * #GtkDialog for more details. * * Return value: a new #GtkMessageDialog **/ @@ -209,37 +207,37 @@ gtk_message_dialog_new (GtkWindow *parent, case GTK_BUTTONS_OK: gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_OK, - GTK_RESPONSE_ACCEPT); + GTK_RESPONSE_OK); break; case GTK_BUTTONS_CLOSE: gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_CLOSE, - GTK_RESPONSE_ACCEPT); + GTK_RESPONSE_CLOSE); break; case GTK_BUTTONS_CANCEL: gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_CANCEL, - GTK_RESPONSE_REJECT); + GTK_RESPONSE_CANCEL); break; case GTK_BUTTONS_YES_NO: gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_YES, - GTK_RESPONSE_ACCEPT); + GTK_RESPONSE_YES); gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_NO, - GTK_RESPONSE_REJECT); + GTK_RESPONSE_NO); break; case GTK_BUTTONS_OK_CANCEL: gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_OK, - GTK_RESPONSE_ACCEPT); + GTK_RESPONSE_OK); gtk_dialog_add_button (dialog, GTK_STOCK_BUTTON_CANCEL, - GTK_RESPONSE_REJECT); + GTK_RESPONSE_CANCEL); break; default: diff --git a/gtk/gtktexttagtable.c b/gtk/gtktexttagtable.c index 1e60c2f861..9386fd1571 100644 --- a/gtk/gtktexttagtable.c +++ b/gtk/gtktexttagtable.c @@ -107,6 +107,7 @@ gtk_text_tag_table_init (GtkTextTagTable *table) /** * gtk_text_tag_table_new: + * * Creates a new #GtkTextTagTable. The table contains no tags by * default. * diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index ee0354d9d8..bc054fb173 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -691,6 +691,7 @@ gtk_text_view_init (GtkTextView *text_view) /** * gtk_text_view_new: + * * Creates a new #GtkTextView. If you don't call gtk_text_view_set_buffer() * before using the text view, an empty default buffer will be created * for you. Get the buffer with gtk_text_view_get_buffer(). If you want |