sokoke

sokoke

Functions

Includes

#include <midori/midori.h>

Description

Functions

sokoke_js_script_eval ()

gchar *
sokoke_js_script_eval (JSContextRef js_context,
                       const gchar *script,
                       gchar **exception);

sokoke_message_dialog ()

void
sokoke_message_dialog (GtkMessageType message_type,
                       const gchar *short_message,
                       const gchar *detailed_message,
                       gboolean modal);

sokoke_prepare_command ()

gchar *
sokoke_prepare_command (const gchar *command,
                        gboolean quote_command,
                        const 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 .

Parameters

command

the command, properly quoted

 

argument

any arguments, properly quoted

 

quote_command

if TRUE, command will be quoted

 

quote_argument

if TRUE, argument will be quoted, ie. a URI or filename

 

Returns

the command prepared for spawning


sokoke_spawn_program ()

gboolean
sokoke_spawn_program (const gchar *command,
                      gboolean quote_command,
                      const 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 .

Parameters

command

the command, properly quoted

 

argument

any arguments, properly quoted

 

quote_command

if TRUE, command will be quoted

 

quote_argument

if TRUE, argument will be quoted, ie. a URI or filename

 

sync

spawn synchronously and wait for command to exit

 

Returns

TRUE on success, FALSE if an error occurred


sokoke_spawn_gdb ()

void
sokoke_spawn_gdb (const gchar *gdb,
                  gboolean sync);

sokoke_spawn_app ()

void
sokoke_spawn_app (const gchar *uri,
                  gboolean inherit_config);

sokoke_external_uri ()

gboolean
sokoke_external_uri (const gchar *uri);

sokoke_magic_uri ()

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 will be returned.

Parameters

uri

a string typed by a user

 

Returns

a newly allocated URI, or NULL


sokoke_widget_set_visible ()

void
sokoke_widget_set_visible (GtkWidget *widget,
                           gboolean visible);

sokoke_xfce_header_new ()

GtkWidget *
sokoke_xfce_header_new (const gchar *icon,
                        const gchar *title);

Creates an Xfce style header *if* Xfce is running.

Parameters

icon

an icon name

 

title

the title of the header

 

Returns

A GtkWidget or NULL

Since 0.1.2 icon may be NULL, and a default is used.


sokoke_key_file_save_to_file ()

gboolean
sokoke_key_file_save_to_file (GKeyFile *key_file,
                              const gchar *filename,
                              GError **error);

sokoke_widget_get_text_size ()

void
sokoke_widget_get_text_size (GtkWidget *widget,
                             const gchar *text,
                             gint *width,
                             gint *height);

sokoke_time_t_to_julian ()

gint64
sokoke_time_t_to_julian (const time_t *timestamp);

Calculates a unix timestamp to a julian day value.

Parameters

timestamp

a time_t timestamp value

 

Returns

an integer.


sokoke_replace_variables ()

gchar *
sokoke_replace_variables (const gchar *template,
                          const gchar *variable_first,
                          ...);

sokoke_window_activate_key ()

gboolean
sokoke_window_activate_key (GtkWindow *window,
                            GdkEventKey *event);

Attempts to activate they key from the event, much like gtk_window_activate_key(), including keys that gtk_accelerator_valid() considers invalid.

Parameters

window

a GtkWindow

 

event

a GdkEventKey

 

Returns

TRUE on success


sokoke_gtk_action_count_modifiers ()

guint
sokoke_gtk_action_count_modifiers (GtkAction *action);

Counts the number of modifiers in the accelerator belonging to the action.

Parameters

action

a GtkAction

 

Returns

the number of modifiers


sokoke_prefetch_uri ()

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.

Parameters

settings

a MidoriWebSettings instance, or NULL

 

uri

an URI string

 

Returns

TRUE on success


sokoke_resolve_hostname ()

gboolean
sokoke_resolve_hostname (const gchar *hostname);

Takes a string that was typed by a user, resolves the hostname, and returns the status.

Parameters

hostname

a string typed by a user

 

Returns

TRUE if is a valid host, else FALSE


sokoke_widget_copy_clipboard ()

void
sokoke_widget_copy_clipboard (GtkWidget *widget,
                              const gchar *text,
                              GtkClipboardGetFunc get_cb,
                              gpointer owner);

sokoke_search_entry_new ()

GtkWidget *
sokoke_search_entry_new (const gchar *placeholder_text);

sokoke_get_win32_appdata_dir ()

const gchar *
sokoke_get_win32_appdata_dir ();

sokoke_get_win32_desktop_lnk_path_for_filename ()

gchar *
sokoke_get_win32_desktop_lnk_path_for_filename
                               (gchar *filename);

sokoke_create_win32_desktop_lnk ()

void
sokoke_create_win32_desktop_lnk (gchar *prefix,
                                 gchar *filename,
                                 gchar *uri);

Types and Values