|  |  |  | gedit Reference Manual | |
|---|---|---|---|---|
#define GBOOLEAN_TO_POINTER (i) #define GPOINTER_TO_BOOLEAN (i) #define IS_VALID_BOOLEAN (v) gboolean gedit_utils_uri_has_writable_scheme (const gchar *uri); gboolean gedit_utils_uri_has_file_scheme (const gchar *uri); void gedit_utils_menu_position_under_widget (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data); void gedit_utils_menu_position_under_tree_view (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data); GtkWidget* gedit_gtk_button_new_with_stock_icon (const gchar *label, const gchar *stock_id); GtkWidget* gedit_dialog_add_button (GtkDialog *dialog, const gchar *text, const gchar *stock_id, gint response_id); gchar* gedit_utils_escape_underscores (const gchar *text, gssize length); gchar* gedit_utils_escape_slashes (const gchar *text, gssize length); gchar* gedit_utils_str_middle_truncate (const gchar *string, guint truncate_length); gboolean g_utf8_caselessnmatch (const char *s1, const char *s2, gssize n1, gssize n2); void gedit_utils_set_atk_name_description (GtkWidget *widget, const gchar *name, const gchar *description); void gedit_utils_set_atk_relation (GtkWidget *obj1, GtkWidget *obj2, AtkRelationType rel_type); gboolean gedit_utils_uri_exists (const gchar *text_uri); gchar* gedit_utils_escape_search_text (const gchar *text); gchar* gedit_utils_unescape_search_text (const gchar *text); gchar* gedit_utils_get_stdin (void); void gedit_warning (GtkWindow *parent, const gchar *format, ...); gchar* gedit_utils_make_valid_utf8 (const char *name); gchar* gedit_utils_uri_get_dirname (const char *uri); gchar* gedit_utils_replace_home_dir_with_tilde (const gchar *uri); guint gedit_utils_get_current_workspace (GdkScreen *screen); guint gedit_utils_get_window_workspace (GtkWindow *gtkwindow); void gedit_utils_activate_url (GtkAboutDialog *about, const gchar *url, gpointer data); gboolean gedit_utils_is_valid_uri (const gchar *uri); gboolean gedit_utils_get_glade_widgets (const gchar *filename, const gchar *root_node, GtkWidget **error_widget, const gchar *widget_name, ...); gchar* gedit_utils_make_canonical_uri_from_shell_arg (const gchar *str); gchar* gedit_utils_format_uri_for_display (const gchar *uri);
#define GPOINTER_TO_BOOLEAN(i) ((gboolean) ((((gint)(i)) == 2) ? TRUE : FALSE))
| i: | 
gboolean gedit_utils_uri_has_writable_scheme (const gchar *uri);
| uri: | |
| Returns : | 
gboolean gedit_utils_uri_has_file_scheme (const gchar *uri);
| uri: | |
| Returns : | 
void                gedit_utils_menu_position_under_widget
                                                        (GtkMenu *menu,
                                                         gint *x,
                                                         gint *y,
                                                         gboolean *push_in,
                                                         gpointer user_data);
| menu: | |
| x: | |
| y: | |
| push_in: | |
| user_data: | 
void                gedit_utils_menu_position_under_tree_view
                                                        (GtkMenu *menu,
                                                         gint *x,
                                                         gint *y,
                                                         gboolean *push_in,
                                                         gpointer user_data);
| menu: | |
| x: | |
| y: | |
| push_in: | |
| user_data: | 
GtkWidget*          gedit_gtk_button_new_with_stock_icon
                                                        (const gchar *label,
                                                         const gchar *stock_id);
| label: | |
| stock_id: | |
| Returns : | 
GtkWidget*          gedit_dialog_add_button             (GtkDialog *dialog,
                                                         const gchar *text,
                                                         const gchar *stock_id,
                                                         gint response_id);
| dialog: | |
| text: | |
| stock_id: | |
| response_id: | |
| Returns : | 
gchar*              gedit_utils_escape_underscores      (const gchar *text,
                                                         gssize length);
| text: | |
| length: | |
| Returns : | 
gchar*              gedit_utils_escape_slashes          (const gchar *text,
                                                         gssize length);
| text: | |
| length: | |
| Returns : | 
gchar*              gedit_utils_str_middle_truncate     (const gchar *string,
                                                         guint truncate_length);
| string: | |
| truncate_length: | |
| Returns : | 
gboolean            g_utf8_caselessnmatch               (const char *s1,
                                                         const char *s2,
                                                         gssize n1,
                                                         gssize n2);
| s1: | |
| s2: | |
| n1: | |
| n2: | |
| Returns : | 
void                gedit_utils_set_atk_name_description
                                                        (GtkWidget *widget,
                                                         const gchar *name,
                                                         const gchar *description);
| widget: | The Gtk widget for which name/description to be set | 
| name: | Atk name string | 
| description: | Atk description string Description : This function sets up name and description for a specified gtk widget. | 
void                gedit_utils_set_atk_relation        (GtkWidget *obj1,
                                                         GtkWidget *obj2,
                                                         AtkRelationType rel_type);
| obj1: | |
| obj2: | |
| rel_type: | 
gboolean gedit_utils_uri_exists (const gchar *text_uri);
| text_uri: | |
| Returns : | 
gchar* gedit_utils_escape_search_text (const gchar *text);
| text: | |
| Returns : | 
gchar* gedit_utils_unescape_search_text (const gchar *text);
| text: | |
| Returns : | 
void                gedit_warning                       (GtkWindow *parent,
                                                         const gchar *format,
                                                         ...);
| parent: | |
| format: | |
| ...: | 
gchar* gedit_utils_make_valid_utf8 (const char *name);
| name: | |
| Returns : | 
gchar* gedit_utils_uri_get_dirname (const char *uri);
| uri: | |
| Returns : | 
gchar*              gedit_utils_replace_home_dir_with_tilde
                                                        (const gchar *uri);
| uri: | |
| Returns : | 
guint gedit_utils_get_current_workspace (GdkScreen *screen);
Get the currently visible workspace for the GdkScreen.
If the X11 window property isn't found, 0 (the first workspace) is returned.
| screen: | |
| Returns : | 
guint gedit_utils_get_window_workspace (GtkWindow *gtkwindow);
This function gets the workspace that the GtkWindow is visible on, it returns GEDIT_ALL_WORKSPACES if the window is sticky, or if the window manager doesn support this function
| gtkwindow: | |
| Returns : | 
void                gedit_utils_activate_url            (GtkAboutDialog *about,
                                                         const gchar *url,
                                                         gpointer data);
| about: | |
| url: | |
| data: | 
gboolean            gedit_utils_get_glade_widgets       (const gchar *filename,
                                                         const gchar *root_node,
                                                         GtkWidget **error_widget,
                                                         const gchar *widget_name,
                                                         ...);
This function gets the requested widgets from a glade file. In case of error it returns FALSE and sets error_widget to a GtkLabel containing the error message to display.
| filename: | the path to the glade file | 
| root_node: | the root node in the glade file | 
| error_widget: | a pointer were a GtkLabel | 
| widget_name: | the name of the first widget | 
| ...: | a pointer were the first widget is returned, followed by more name / widget pairs and terminated by NULL. | 
| Returns : | FALSE if an error occurs, TRUE on success. | 
gchar*              gedit_utils_make_canonical_uri_from_shell_arg
                                                        (const gchar *str);
| str: | |
| Returns : | 
gchar* gedit_utils_format_uri_for_display (const gchar *uri);
Filter, modify, unescape and change uri to make it appropriate
for display to users.
Rules: <ul> <li>file: uri without fragments should appear as local paths.</li> <li>file: uri with fragments should appear as file:uri.</li> <li>All other uri appear as expected.</li> </ul>
This function is very similar to gnome_vfs_format_uri_for_display but remove the password from the resulting string
| uri: | uri to be displayed. | 
| Returns : | a string which represents uriand can be displayed. |