![]() |
![]() |
![]() |
midori Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <midori/midori.h>gchar * sokoke_js_script_eval (,
JSContextRef js_contextconst
,gchar *script);
gchar **exceptionvoid sokoke_message_dialog (,
GtkMessageType message_typeconst
,gchar *short_messageconst
,gchar *detailed_message);
gboolean modalgboolean sokoke_show_uri_with_mime_type (,
GdkScreen *screenconst
,gchar *uriconst
,gchar *mime_type,
guint32 timestamp);
GError **errorgboolean sokoke_show_uri (,
GdkScreen *screenconst
,gchar *uri,
guint32 timestamp);
GError **errorgchar * sokoke_prepare_command (const
,gchar *command,
gboolean quote_commandconst
,gchar *argument);
gboolean quote_argumentgboolean sokoke_spawn_program (const
,gchar *command,
gboolean quote_commandconst
,gchar *argument,
gboolean quote_argument);
gboolean syncvoid sokoke_spawn_gdb (const
,gchar *gdb);
gboolean syncvoid sokoke_spawn_app (const
,gchar *uri);
gboolean inherit_configgboolean sokoke_external_uri (const
);gchar *urigchar * sokoke_magic_uri (const
,gchar *uri,
gboolean allow_search);
gboolean allow_realtivevoid sokoke_widget_set_visible (,
GtkWidget *widget);
gboolean visibleGtkWidget * sokoke_xfce_header_new (const
,gchar *iconconst
);gchar *titlegboolean sokoke_key_file_save_to_file (,
GKeyFile *key_fileconst
,gchar *filename);
GError **errorvoid sokoke_widget_get_text_size (,
GtkWidget *widgetconst
,gchar *text,
gint *width);
gint *heightgint64 sokoke_time_t_to_julian (const
);time_t *timestampgchar * sokoke_replace_variables (const
,gchar *templateconst
,gchar *variable_first...
);gboolean sokoke_window_activate_key (,
GtkWindow *window);
GdkEventKey *eventguint sokoke_gtk_action_count_modifiers ();
GtkAction *actiongboolean sokoke_prefetch_uri (MidoriWebSettings *settings
,const
,char *uri,
GCallback callback);
gpointer user_datagboolean sokoke_resolve_hostname (const
);gchar *hostnamegboolean sokoke_recursive_fork_protection (const
,gchar *uri);
gboolean set_urivoid sokoke_widget_copy_clipboard (,
GtkWidget *widgetconst
,gchar *text,
GtkClipboardGetFunc get_cb);
gpointer ownerGtkWidget * sokoke_search_entry_new (const
);gchar *placeholder_textgchar * sokoke_get_win32_desktop_lnk_path_for_filename ();
gchar *filenamevoid sokoke_create_win32_desktop_lnk (,
gchar *prefix,
gchar *filename);
gchar *uri
gchar * sokoke_js_script_eval (,
JSContextRef js_contextconst
,gchar *script);
gchar **exception
void sokoke_message_dialog (,
GtkMessageType message_typeconst
,gchar *short_messageconst
,gchar *detailed_message);
gboolean modal
gboolean sokoke_show_uri_with_mime_type (,
GdkScreen *screenconst
,gchar *uriconst
,gchar *mime_type,
guint32 timestamp);
GError **error
gboolean sokoke_show_uri (,
GdkScreen *screenconst
,gchar *uri,
guint32 timestamp);
GError **error
Shows the specified URI with an application or xdg-open. x-scheme-handler is supported for GLib < 2.28 as of 0.3.3.
|
a NULL |
|
the URI to show |
|
the timestamp of the event |
|
the location of a NULL |
Returns : |
TRUE FALSE |
gchar * sokoke_prepare_command (const
,gchar *command,
gboolean quote_commandconst
,gchar *argument);
gboolean quote_argument
If command
contains s
argument
will be quoted and inserted into
command
, which is left unquoted regardless of quote_command
.
|
the command, properly quoted |
|
any arguments, properly quoted |
|
if TRUE command will be quoted |
|
if TRUE argument will be quoted, ie. a URI or filename |
Returns : |
the command prepared for spawning |
gboolean sokoke_spawn_program (const
,gchar *command,
gboolean quote_commandconst
,gchar *argument,
gboolean quote_argument);
gboolean sync
If command
contains s
argument
will be quoted and inserted into
command
, which is left unquoted regardless of quote_command
.
|
the command, properly quoted |
|
any arguments, properly quoted |
|
if TRUE command will be quoted |
|
if TRUE argument will be quoted, ie. a URI or filename |
|
spawn synchronously and wait for command to exit |
Returns : |
TRUE FALSE |
gchar * sokoke_magic_uri (const
,gchar *uri,
gboolean allow_search);
gboolean allow_realtive
Takes a string that was typed by a user, guesses what it is, and returns an URI.
If it was a search, NULL
|
a string typed by a user |
Returns : |
a newly allocated URI, or NULL |
GtkWidget * sokoke_xfce_header_new (const
,gchar *iconconst
);gchar *title
Creates an Xfce style header *if* Xfce is running.
|
an icon name |
|
the title of the header |
Returns : |
A NULL icon may be NULL, and a default is used. |
gboolean sokoke_key_file_save_to_file (,
GKeyFile *key_fileconst
,gchar *filename);
GError **error
void sokoke_widget_get_text_size (,
GtkWidget *widgetconst
,gchar *text,
gint *width);
gint *height
gint64 sokoke_time_t_to_julian (const
);time_t *timestamp
Calculates a unix timestamp to a julian day value.
|
a time_t timestamp value |
Returns : |
an integer. |
gchar * sokoke_replace_variables (const
,gchar *templateconst
,gchar *variable_first...
);
gboolean sokoke_window_activate_key (,
GtkWindow *window);
GdkEventKey *event
Attempts to activate they key from the event, much
like gtk_window_activate_key()
gtk_accelerator_valid()
|
a |
|
a |
Returns : |
TRUE |
guint sokoke_gtk_action_count_modifiers ();
GtkAction *action
Counts the number of modifiers in the accelerator belonging to the action.
|
a |
Returns : |
the number of modifiers |
gboolean sokoke_prefetch_uri (MidoriWebSettings *settings
,const
,char *uri,
GCallback callback);
gpointer user_data
Attempts to prefetch the specified URI, that is it tries to resolve the hostname in advance.
|
a MidoriWebSettings instance, or NULL |
|
an URI string |
Returns : |
TRUE |
gboolean sokoke_resolve_hostname (const
);gchar *hostname
Takes a string that was typed by a user, resolves the hostname, and returns the status.
|
a string typed by a user |
Returns : |
TRUE FALSE |
gboolean sokoke_recursive_fork_protection (const
,gchar *uri);
gboolean set_uri
Protects against recursive invokations of the Midori executable with the same URI.
As an example, consider having an URI starting with 'tel://'. You could attempt to open it with sokoke_show_uri. In turn, 'exo-open' might be called. Now quite possibly 'exo-open' is unable to handle 'tel://' and might well fall back to 'midori' as default browser.
To protect against this scenario, call this function with the
URI and TRUE
sokoke_recursive_fork_protection()
with FALSE
FALSE
|
the URI to check |
|
if TRUE the URI will be saved |
Returns : |
TRUE uri is new, FALSE |
void sokoke_widget_copy_clipboard (,
GtkWidget *widgetconst
,gchar *text,
GtkClipboardGetFunc get_cb);
gpointer owner
gchar * sokoke_get_win32_desktop_lnk_path_for_filename ();
gchar *filename