Glib Namespace Reference

Namespaces

namespace Ascii
namespace Container_Helpers
namespace Markup
namespace Unicode

Classes

class Checksum
 Computes the checksum for data. More...
class ConvertError
 Exception class for charset conversion errors. More...
class IConv
 Thin iconv() wrapper. More...
class Date
 Julian calendar date. More...
class FileError
 Exception class for file-related errors. More...
class DirIterator
 The iterator type of Glib::Dir. More...
class Dir
 Utility class representing an open directory. More...
class IOChannelError
 Exception class for IOChannel errors. More...
class IOChannel
 IOChannel aims to provide portable I/O support for files, pipes and sockets, and to integrate them with the GLib main event loop. More...
class KeyFileError
 Exception class for KeyFile errors. More...
class KeyFile
 This class lets you parse, edit or create files containing groups of key-value pairs, which we call key files for lack of a better name. More...
class MarkupError
 Exception class for markup parsing errors. More...
class Module
 Dynamic Loading of Modules These functions provide a portable way to dynamically load object files (commonly known as 'plug-ins'). More...
class NodeTree
 N-ary Trees - trees of data with any number of branches The NodeTree class and its associated functions provide an N-ary tree data structure, in which nodes in the tree can contain arbitrary data. More...
class OptionError
 Exception class for options. More...
class OptionContext
 An OptionContext defines which options are accepted by the commandline option parser. More...
class OptionEntry
 An OptionEntry defines a single option. More...
class OptionGroup
 An OptionGroup defines the options in a single group. More...
class RegexError
 Exception class for Regex. More...
class Regex
 Perl-compatible regular expressions - matches strings against regular expressions. More...
class ShellError
 Exception class for shell utility errors. More...
class SpawnError
 Exception class for errors occuring when spawning processes. More...
class ThreadError
 Exception class for thread-related errors. More...
class Thread
 Represents a running thread. More...
struct StaticMutex
 Like Glib::Mutex, but can be defined at compile time. More...
class Mutex
 Represents a mutex (mutual exclusion). More...
struct StaticRecMutex
 Like Glib::RecMutex, but can be defined at compile time. More...
class RecMutex
struct StaticRWLock
 Like Glib::RWLock, but can be defined at compile time. More...
class RWLock
class Cond
 An opaque data structure to represent a condition. More...
struct StaticPrivate
class Private
class ValueArray
 A container structure to maintain an array of generic values. More...
class SignalProxyBase
class SignalProxyNormal
 The SignalProxy provides an API similar to sigc::signal that can be used to connect sigc::slots to glib signals. More...
class SignalProxy0
 Proxy for signals with 0 arguments. More...
class SignalProxy1
 Proxy for signals with 1 arguments. More...
class SignalProxy2
 Proxy for signals with 2 arguments. More...
class SignalProxy3
 Proxy for signals with 3 arguments. More...
class SignalProxy4
 Proxy for signals with 4 arguments. More...
class SignalProxy5
 Proxy for signals with 5 arguments. More...
class SignalProxy6
 Proxy for signals with 6 arguments. More...
class Value< bool >
class Value< char >
class Value< unsigned char >
class Value< int >
class Value< unsigned int >
class Value< long >
class Value< unsigned long >
class Value< long long >
class Value< unsigned long long >
class Value< float >
class Value< double >
class Value< void* >
class ArrayHandle
 If a method takes this as an argument, or has this as a return type, then you can use a standard container such as std::list or std::vector. More...
class Sequence
 Utility class holding an iterator sequence. More...
class Dispatcher
 Signal class for inter-thread communication. More...
class Error
class Exception
class HelperList
class Interface
class ListHandle
class PollFD
class SignalTimeout
class SignalIdle
class SignalIO
class SignalChildWatch
class MainContext
 Main context. More...
class MainLoop
class Source
class TimeoutSource
class IdleSource
class IOSource
class Object
class ObjectBase
 Glib::ObjectBase is a common base class for Objects and Interfaces. More...
class PatternSpec
class PropertyBase
class Property
class PropertyProxy
 A PropertyProxy can be used to get and set the value of an object's property. More...
class PropertyProxy_WriteOnly
 See PropertyProxy(). More...
class PropertyProxy_ReadOnly
 See PropertyProxy(). More...
class SignalProxyProperty
 Use the connect() method, with sigc::ptr_fun() or sig::mem_fun() to connect signals to signal handlers. More...
class PropertyProxy_Base
class QueryQuark
 Quarks are unique IDs in Glib for strings for use in hash table lookups. More...
class Quark
class Rand
class RefPtr
 RefPtr<> is a reference-counting shared smartpointer. More...
class SListHandle
class StreamIOChannel
 This whole class is deprecated in glibmm 2.2. More...
class ThreadPool
 A pool of threads to execute work concurrently. More...
class Timer
 Portable stop watch interface. More...
struct TimeVal
 Glib::TimeVal is a wrapper around the glib structure GTimeVal. More...
class ustring_Iterator
 The iterator type of Glib::ustring. More...
class ustring
 Glib::ustring has much the same interface as std::string, but contains Unicode characters encoded as UTF-8. More...
class ValueBase
class ValueBase_Boxed
class ValueBase_Object
class ValueBase_Enum
class ValueBase_Flags
class ValueBase_String
class Value_Boxed
class Value< std::string >
 Specialization for strings. More...
class Value< Glib::ustring >
 Specialization for UTF-8 strings. More...
class Value_Enum
 Base class of Glib::Value<T> specializations for enum types. More...
class Value_Flags
 Base class of Glib::Value<T> specializations for flags types. More...
class Value_Pointer
class Value
 Generic value implementation for custom types. More...
class Value< T* >
 Specialization for pointers to instances of any type. More...
class Value< const T* >
 Specialization for pointers to const instances of any type. More...

Typedefs

typedef GPid Pid
typedef ArrayHandle
< Glib::ustring
StringArrayHandle
 If a method takes this as an argument, or has this as a return type, then you can use a standard container such as std::list<Glib::ustring> or std::vector<Glib::ustring>.
typedef Glib::ArrayHandle
< Glib::ustring
SArray

Enumerations

enum FileTest {
  FILE_TEST_IS_REGULAR = 1 << 0,
  FILE_TEST_IS_SYMLINK = 1 << 1,
  FILE_TEST_IS_DIR = 1 << 2,
  FILE_TEST_IS_EXECUTABLE = 1 << 3,
  FILE_TEST_EXISTS = 1 << 4
}
enum SeekType {
  SEEK_TYPE_CUR,
  SEEK_TYPE_SET,
  SEEK_TYPE_END
}
enum IOStatus {
  IO_STATUS_ERROR,
  IO_STATUS_NORMAL,
  IO_STATUS_EOF,
  IO_STATUS_AGAIN
}
enum IOFlags {
  IO_FLAG_APPEND = 1 << 0,
  IO_FLAG_NONBLOCK = 1 << 1,
  IO_FLAG_IS_READABLE = 1 << 2,
  IO_FLAG_IS_WRITEABLE = 1 << 3,
  IO_FLAG_IS_SEEKABLE = 1 << 4,
  IO_FLAG_GET_MASK = 0x0,
  IO_FLAG_SET_MASK = 0x1
}
enum KeyFileFlags {
  KEY_FILE_NONE = 0,
  KEY_FILE_KEEP_COMMENTS = 1 << 0,
  KEY_FILE_KEEP_TRANSLATIONS = 1 << 1
}
enum ModuleFlags {
  MODULE_BIND_LAZY = 1 << 0,
  MODULE_BIND_LOCAL = 1 << 1,
  MODULE_BIND_MASK = 0x03
}
enum TraverseType {
  TRAVERSE_IN_ORDER = G_IN_ORDER,
  TRAVERSE_PRE_ORDER = G_PRE_ORDER,
  TRAVERSE_POST_ORDER = G_POST_ORDER,
  TRAVERSE_LEVEL_ORDER = G_LEVEL_ORDER
}
 

Specifies the type of traveral performed by methods such as NodeTree::_traverse() and NodeTree::find().

More...
enum RegexCompileFlags {
  REGEX_CASELESS = 1 << 0,
  REGEX_MULTILINE = 1 << 1,
  REGEX_DOTALL = 1 << 2,
  REGEX_EXTENDED = 1 << 3,
  REGEX_ANCHORED = 1 << 4,
  REGEX_DOLLAR_ENDONLY = 1 << 5,
  REGEX_UNGREEDY = 1 << 9,
  REGEX_RAW = 1 << 11,
  REGEX_NO_AUTO_CAPTURE = 1 << 12,
  REGEX_OPTIMIZE = 1 << 13,
  REGEX_DUPNAMES = 1 << 19,
  REGEX_NEWLINE_CR = 1 << 20,
  REGEX_NEWLINE_LF = 1 << 21,
  REGEX_NEWLINE_CRLF = 0x100000
}
enum RegexMatchFlags {
  REGEX_MATCH_ANCHORED = 1 << 4,
  REGEX_MATCH_NOTBOL = 1 << 7,
  REGEX_MATCH_NOTEOL = 1 << 8,
  REGEX_MATCH_NOTEMPTY = 1 << 10,
  REGEX_MATCH_PARTIAL = 1 << 15,
  REGEX_MATCH_NEWLINE_CR = 1 << 20,
  REGEX_MATCH_NEWLINE_LF = 1 << 21,
  REGEX_MATCH_NEWLINE_CRLF = 0x100000,
  REGEX_MATCH_NEWLINE_ANY = 1 << 22
}
enum SpawnFlags {
  SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0,
  SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
  SPAWN_SEARCH_PATH = 1 << 2,
  SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
  SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
  SPAWN_CHILD_INHERITS_STDIN = 1 << 5,
  SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
}
enum ThreadPriority {
  THREAD_PRIORITY_LOW,
  THREAD_PRIORITY_NORMAL,
  THREAD_PRIORITY_HIGH,
  THREAD_PRIORITY_URGENT
}
 

Specifies the priority of a thread.

More...
enum NotLock { NOT_LOCK }
enum TryLock { TRY_LOCK }
enum UnicodeType {
  UNICODE_CONTROL,
  UNICODE_FORMAT,
  UNICODE_UNASSIGNED,
  UNICODE_PRIVATE_USE,
  UNICODE_SURROGATE,
  UNICODE_LOWERCASE_LETTER,
  UNICODE_MODIFIER_LETTER,
  UNICODE_OTHER_LETTER,
  UNICODE_TITLECASE_LETTER,
  UNICODE_UPPERCASE_LETTER,
  UNICODE_COMBINING_MARK,
  UNICODE_ENCLOSING_MARK,
  UNICODE_NON_SPACING_MARK,
  UNICODE_DECIMAL_NUMBER,
  UNICODE_LETTER_NUMBER,
  UNICODE_OTHER_NUMBER,
  UNICODE_CONNECT_PUNCTUATION,
  UNICODE_DASH_PUNCTUATION,
  UNICODE_CLOSE_PUNCTUATION,
  UNICODE_FINAL_PUNCTUATION,
  UNICODE_INITIAL_PUNCTUATION,
  UNICODE_OTHER_PUNCTUATION,
  UNICODE_OPEN_PUNCTUATION,
  UNICODE_CURRENCY_SYMBOL,
  UNICODE_MODIFIER_SYMBOL,
  UNICODE_MATH_SYMBOL,
  UNICODE_OTHER_SYMBOL,
  UNICODE_LINE_SEPARATOR,
  UNICODE_PARAGRAPH_SEPARATOR,
  UNICODE_SPACE_SEPARATOR
}
enum UnicodeBreakType {
  UNICODE_BREAK_MANDATORY,
  UNICODE_BREAK_CARRIAGE_RETURN,
  UNICODE_BREAK_LINE_FEED,
  UNICODE_BREAK_COMBINING_MARK,
  UNICODE_BREAK_SURROGATE,
  UNICODE_BREAK_ZERO_WIDTH_SPACE,
  UNICODE_BREAK_INSEPARABLE,
  UNICODE_BREAK_NON_BREAKING_GLUE,
  UNICODE_BREAK_CONTINGENT,
  UNICODE_BREAK_SPACE,
  UNICODE_BREAK_AFTER,
  UNICODE_BREAK_BEFORE,
  UNICODE_BREAK_BEFORE_AND_AFTER,
  UNICODE_BREAK_HYPHEN,
  UNICODE_BREAK_NON_STARTER,
  UNICODE_BREAK_OPEN_PUNCTUATION,
  UNICODE_BREAK_CLOSE_PUNCTUATION,
  UNICODE_BREAK_QUOTATION,
  UNICODE_BREAK_EXCLAMATION,
  UNICODE_BREAK_IDEOGRAPHIC,
  UNICODE_BREAK_NUMERIC,
  UNICODE_BREAK_INFIX_SEPARATOR,
  UNICODE_BREAK_SYMBOL,
  UNICODE_BREAK_ALPHABETIC,
  UNICODE_BREAK_PREFIX,
  UNICODE_BREAK_POSTFIX,
  UNICODE_BREAK_COMPLEX_CONTEXT,
  UNICODE_BREAK_AMBIGUOUS,
  UNICODE_BREAK_UNKNOWN,
  UNICODE_BREAK_NEXT_LINE,
  UNICODE_BREAK_WORD_JOINER,
  UNICODE_BREAK_HANGUL_L_JAMO,
  UNICODE_BREAK_HANGUL_V_JAMO,
  UNICODE_BREAK_HANGUL_T_JAMO,
  UNICODE_BREAK_HANGUL_LV_SYLLABLE,
  UNICODE_BREAK_HANGUL_LVT_SYLLABLE
}
enum AsciiType {
  ASCII_ALNUM = 1 << 0,
  ASCII_ALPHA = 1 << 1,
  ASCII_CNTRL = 1 << 2,
  ASCII_DIGIT = 1 << 3,
  ASCII_GRAPH = 1 << 4,
  ASCII_LOWER = 1 << 5,
  ASCII_PRINT = 1 << 6,
  ASCII_PUNCT = 1 << 7,
  ASCII_SPACE = 1 << 8,
  ASCII_UPPER = 1 << 9,
  ASCII_XDIGIT = 1 << 10
}
enum NormalizeMode {
  NORMALIZE_DEFAULT,
  NORMALIZE_NFD,
  NORMALIZE_DEFAULT_COMPOSE,
  NORMALIZE_NFC = NORMALIZE_DEFAULT_COMPOSE,
  NORMALIZE_ALL,
  NORMALIZE_NFKD = NORMALIZE_ALL,
  NORMALIZE_ALL_COMPOSE,
  NORMALIZE_NFKC = NORMALIZE_ALL_COMPOSE
}
enum OwnershipType {
  OWNERSHIP_NONE = 0,
  OWNERSHIP_SHALLOW,
  OWNERSHIP_DEEP
}
enum IOCondition {
  IO_IN,
  IO_OUT,
  IO_PRI,
  IO_ERR,
  IO_HUP,
  IO_NVAL
}
 

A bitwise combination representing an I/O condition to watch for on an event source.

More...
enum {
  PRIORITY_HIGH = -100,
  PRIORITY_DEFAULT = 0,
  PRIORITY_HIGH_IDLE = 100,
  PRIORITY_DEFAULT_IDLE = 200,
  PRIORITY_LOW = 300
}

Functions

bool get_charset ()
 Get the charset used by the current locale.
bool get_charset (std::string& charset)
 Get the charset used by the current locale.
std::string convert (const std::string& str, const std::string& to_codeset, const std::string& from_codeset)
 Convert from one encoding to another.
std::string convert_with_fallback (const std::string& str, const std::string& to_codeset, const std::string& from_codeset)
 Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output.
std::string convert_with_fallback (const std::string& str, const std::string& to_codeset, const std::string& from_codeset, const Glib::ustring& fallback)
 Converts a string from one character set to another, possibly including fallback sequences for characters not representable in the output.
Glib::ustring locale_to_utf8 (const std::string& opsys_string)
 Convert from the current locale's encoding to UTF-8.
std::string locale_from_utf8 (const Glib::ustring& utf8_string)
 Convert from UTF-8 to the current locale's encoding.
Glib::ustring filename_to_utf8 (const std::string& opsys_string)
 Converts a string which is in the encoding used for filenames into a UTF-8 string.
std::string filename_from_utf8 (const Glib::ustring& utf8_string)
 Converts a string from UTF-8 to the encoding used for filenames.
std::string filename_from_uri (const Glib::ustring& uri, Glib::ustring& hostname)
 Converts an escaped UTF-8 encoded URI to a local filename in the encoding used for filenames.
std::string filename_from_uri (const Glib::ustring& uri)
 Converts an escaped UTF-8 encoded URI to a local filename in the encoding used for filenames.
Glib::ustring filename_to_uri (const std::string& filename, const Glib::ustring& hostname)
 Converts an absolute filename to an escaped UTF-8 encoded URI.
Glib::ustring filename_to_uri (const std::string& filename)
 Converts an absolute filename to an escaped UTF-8 encoded URI.
Glib::ustring filename_display_basename (const std::string& filename)
 Returns the display basename for the particular filename, guaranteed to be valid UTF-8.
Glib::ustring filename_display_name (const std::string& filename)
 Converts a filename into a valid UTF-8 string.
FileTest operator| (FileTest lhs, FileTest rhs)
FileTest operator& (FileTest lhs, FileTest rhs)
FileTest operator^ (FileTest lhs, FileTest rhs)
FileTest operator~ (FileTest flags)
FileTestoperator|= (FileTest& lhs, FileTest rhs)
FileTestoperator&= (FileTest& lhs, FileTest rhs)
FileTestoperator^= (FileTest& lhs, FileTest rhs)
bool file_test (const std::string& filename, FileTest test)
 Returns true if any of the tests in the bitfield test are true.
int mkstemp (std::string& filename_template)
 Opens a temporary file.
int file_open_tmp (std::string& name_used, const std::string& prefix)
 Opens a file for writing in the preferred directory for temporary files (as returned by Glib::get_tmp_dir()).
int file_open_tmp (std::string& name_used)
 Opens a file for writing in the preferred directory for temporary files (as returned by Glib::get_tmp_dir()).
std::string file_get_contents (const std::string& filename)
 Reads an entire file into a string, with good error checking.
void file_set_contents (const std::string& filename, const gchar* contents, gssize length)
 Writes all of contents to a file named filename, with good error checking.
void file_set_contents (const std::string& filename, const std::string& contents)
 A variant of file_set_contents which accepts a standard C++ string.
IOFlags operator| (IOFlags lhs, IOFlags rhs)
IOFlags operator& (IOFlags lhs, IOFlags rhs)
IOFlags operator^ (IOFlags lhs, IOFlags rhs)
IOFlags operator~ (IOFlags flags)
IOFlagsoperator|= (IOFlags& lhs, IOFlags rhs)
IOFlagsoperator&= (IOFlags& lhs, IOFlags rhs)
IOFlagsoperator^= (IOFlags& lhs, IOFlags rhs)
Glib::RefPtr< IOChannelwrap (GIOChannel* gobject, bool take_copy=false)
KeyFileFlags operator| (KeyFileFlags lhs, KeyFileFlags rhs)
KeyFileFlags operator& (KeyFileFlags lhs, KeyFileFlags rhs)
KeyFileFlags operator^ (KeyFileFlags lhs, KeyFileFlags rhs)
KeyFileFlags operator~ (KeyFileFlags flags)
KeyFileFlagsoperator|= (KeyFileFlags& lhs, KeyFileFlags rhs)
KeyFileFlagsoperator&= (KeyFileFlags& lhs, KeyFileFlags rhs)
KeyFileFlagsoperator^= (KeyFileFlags& lhs, KeyFileFlags rhs)
ModuleFlags operator| (ModuleFlags lhs, ModuleFlags rhs)
ModuleFlags operator& (ModuleFlags lhs, ModuleFlags rhs)
ModuleFlags operator^ (ModuleFlags lhs, ModuleFlags rhs)
ModuleFlags operator~ (ModuleFlags flags)
ModuleFlagsoperator|= (ModuleFlags& lhs, ModuleFlags rhs)
ModuleFlagsoperator&= (ModuleFlags& lhs, ModuleFlags rhs)
ModuleFlagsoperator^= (ModuleFlags& lhs, ModuleFlags rhs)
RegexCompileFlags operator| (RegexCompileFlags lhs, RegexCompileFlags rhs)
RegexCompileFlags operator& (RegexCompileFlags lhs, RegexCompileFlags rhs)
RegexCompileFlags operator^ (RegexCompileFlags lhs, RegexCompileFlags rhs)
RegexCompileFlags operator~ (RegexCompileFlags flags)
RegexCompileFlagsoperator|= (RegexCompileFlags& lhs, RegexCompileFlags rhs)
RegexCompileFlagsoperator&= (RegexCompileFlags& lhs, RegexCompileFlags rhs)
RegexCompileFlagsoperator^= (RegexCompileFlags& lhs, RegexCompileFlags rhs)
RegexMatchFlags operator| (RegexMatchFlags lhs, RegexMatchFlags rhs)
RegexMatchFlags operator& (RegexMatchFlags lhs, RegexMatchFlags rhs)
RegexMatchFlags operator^ (RegexMatchFlags lhs, RegexMatchFlags rhs)
RegexMatchFlags operator~ (RegexMatchFlags flags)
RegexMatchFlagsoperator|= (RegexMatchFlags& lhs, RegexMatchFlags rhs)
RegexMatchFlagsoperator&= (RegexMatchFlags& lhs, RegexMatchFlags rhs)
RegexMatchFlagsoperator^= (RegexMatchFlags& lhs, RegexMatchFlags rhs)
Glib::ArrayHandle< std::stringshell_parse_argv (const std::string& command_line)
 Parses a command line into an argument vector, in much the same way the shell would, but without many of the expansions the shell would perform (variable expansion, globs, operators, filename expansion, etc. are not supported).
std::string shell_quote (const std::string& unquoted_string)
 Quotes a string so that the shell (/bin/sh) will interpret the quoted string to mean unquoted_string.
std::string shell_unquote (const std::string& quoted_string)
 Unquotes a string as the shell (/bin/sh) would.
SpawnFlags operator| (SpawnFlags lhs, SpawnFlags rhs)
SpawnFlags operator& (SpawnFlags lhs, SpawnFlags rhs)
SpawnFlags operator^ (SpawnFlags lhs, SpawnFlags rhs)
SpawnFlags operator~ (SpawnFlags flags)
SpawnFlagsoperator|= (SpawnFlags& lhs, SpawnFlags rhs)
SpawnFlagsoperator&= (SpawnFlags& lhs, SpawnFlags rhs)
SpawnFlagsoperator^= (SpawnFlags& lhs, SpawnFlags rhs)
void spawn_async_with_pipes (const std::string& working_directory, const Glib::ArrayHandle< std::string >& argv, const Glib::ArrayHandle< std::string >& envp, SpawnFlags flags=SpawnFlags(0), const sigc::slot< void >& child_setup=sigc::slot< void >(), Pid* child_pid=0, int* standard_input=0, int* standard_output=0, int* standard_error=0)
 Executes a child program asynchronously (your program will not block waiting for the child to exit).
void spawn_async_with_pipes (const std::string& working_directory, const Glib::ArrayHandle< std::string >& argv, SpawnFlags flags=SpawnFlags(0), const sigc::slot< void >& child_setup=sigc::slot< void >(), Pid* child_pid=0, int* standard_input=0, int* standard_output=0, int* standard_error=0)
 Like the main spawn_async_with_pipes() method, but inheriting the parent's environment.
void spawn_async (const std::string& working_directory, const Glib::ArrayHandle< std::string >& argv, const Glib::ArrayHandle< std::string >& envp, SpawnFlags flags=SpawnFlags(0), const sigc::slot< void >& child_setup=sigc::slot< void >(), Pid* child_pid=0)
 See pawn_async_with_pipes() for a full description.
void spawn_async (const std::string& working_directory, const Glib::ArrayHandle< std::string >& argv, SpawnFlags flags=SpawnFlags(0), const sigc::slot< void >& child_setup=sigc::slot< void >(), Pid* child_pid=0)
 Like the main spawn_async() method, but inheriting the parent's environment.
void spawn_sync (const std::string& working_directory, const Glib::ArrayHandle< std::string >& argv, const Glib::ArrayHandle< std::string >& envp, SpawnFlags flags=SpawnFlags(0), const sigc::slot< void >& child_setup=sigc::slot< void >(), std::string* standard_output=0, std::string* standard_error=0, int* exit_status=0)
 Executes a child synchronously (waits for the child to exit before returning).
void spawn_sync (const std::string& working_directory, const Glib::ArrayHandle< std::string >& argv, SpawnFlags flags=SpawnFlags(0), const sigc::slot< void >& child_setup=sigc::slot< void >(), std::string* standard_output=0, std::string* standard_error=0, int* exit_status=0)
 Like the main spawn_sync() method, but inheriting the parent's environment.
void spawn_command_line_async (const std::string& command_line)
 A simple version of spawn_async() that parses a command line with shell_parse_argv() and passes it to spawn_async().
void spawn_command_line_sync (const std::string& command_line, std::string* standard_output=0, std::string* standard_error=0, int* exit_status=0)
 A simple version of spawn_sync() with little-used parameters removed, taking a command line instead of an argument vector.
void spawn_close_pid (Pid pid)
 On some platforms, notably WIN32, the Pid type represents a resource which must be closed to prevent resource leaking.
void thread_init (GThreadFunctions* vtable=0)
 Initializes the GLib thread system.
bool thread_supported ()
 Returns whether the thread system is initialized.
AsciiType operator| (AsciiType lhs, AsciiType rhs)
AsciiType operator& (AsciiType lhs, AsciiType rhs)
AsciiType operator^ (AsciiType lhs, AsciiType rhs)
AsciiType operator~ (AsciiType flags)
AsciiTypeoperator|= (AsciiType& lhs, AsciiType rhs)
AsciiTypeoperator&= (AsciiType& lhs, AsciiType rhs)
AsciiTypeoperator^= (AsciiType& lhs, AsciiType rhs)
std::string uri_unescape_string (const std::string& escaped_string, const std::string& illegal_characters=std::string())
 Unescapes a whole escaped string.
std::string uri_parse_scheme (const std::string& uri)
 Gets the scheme portion of a URI.
std::string uri_escape_string (const std::string& unescaped, const std::string& reserved_chars_allowed=std::string(), bool allow_utf8=true)
 Escapes a string for use in a URI.
template<class Iterator >
Sequence< Iterator > sequence (Iterator pbegin, Iterator pend)
 Helper function to create a Glib::Sequence<> object, which in turn can be used to initialize a container handle.
sigc::connection add_exception_handler (const sigc::slot< void >&slot)
 Specify a slot to be called when an exception is thrown by a signal handler.
void init ()
 Initialize glibmm.
RefPtr< ObjectBasewrap_interface (GObject* object, bool take_copy=false)
IOCondition operator| (IOCondition lhs, IOCondition rhs)
IOCondition operator& (IOCondition lhs, IOCondition rhs)
IOCondition operator^ (IOCondition lhs, IOCondition rhs)
IOCondition operator~ (IOCondition flags)
IOConditionoperator|= (IOCondition& lhs, IOCondition rhs)
IOConditionoperator&= (IOCondition& lhs, IOCondition rhs)
IOConditionoperator^= (IOCondition& lhs, IOCondition rhs)
SignalTimeout signal_timeout ()
 Convenience timeout signal.
SignalIdle signal_idle ()
 Convenience idle signal.
SignalIO signal_io ()
 Convenience I/O signal.
SignalChildWatch signal_child_watch ()
 Convenience child watch signal.
Glib::ustring get_application_name ()
 Gets a human-readable name for the application, as set by Glib::set_application_name().
void set_application_name (const Glib::ustring& application_name)
 Sets a human-readable name for the application.
std::string get_prgname ()
 Gets the name of the program.
void set_prgname (const std::string& prgname)
 Sets the name of the program.
std::string getenv (const std::string& variable, bool& found)
 Returns the value of an environment variable.
std::string getenv (const std::string& variable)
 Returns the value of an environment variable.
bool setenv (const std::string& variable, const std::string&value, bool overwrite=true)
 Sets an environment variable.
void unsetenv (const std::string& variable)
 Removes an environment variable from the environment.
std::string get_user_name ()
 Gets the user name of the current user.
std::string get_real_name ()
 Gets the real name of the user.
std::string get_home_dir ()
 Gets the current user's home directory.
std::string get_tmp_dir ()
 Gets the directory to use for temporary files.
std::string get_current_dir ()
 Gets the current directory.
std::string get_user_special_dir (GUserDirectory directory)
 Returns the full path of a special directory using its logical id.
std::string get_user_data_dir ()
 Returns a base directory in which to access application data such as icons that is customized for a particular user.
std::string get_user_config_dir ()
 Returns a base directory in which to store user-specific application configuration information such as user preferences and settings.
std::string get_user_cache_dir ()
 Returns a base directory in which to store non-essential, cached data specific to particular user.
bool path_is_absolute (const std::string& filename)
 Returns true if the given filename is an absolute file name, i.e. it contains a full path from the root directory such as "/usr/local" on UNIX or "C:\\windows" on Windows systems.
std::string path_skip_root (const std::string& filename)
 Returns the remaining part of filename after the root component, i.e. after the "/" on UNIX or "C:\\" on Windows.
std::string path_get_basename (const std::string& filename)
 Gets the name of the file without any leading directory components.
std::string path_get_dirname (const std::string& filename)
 Gets the directory components of a file name.
std::string build_filename (const Glib::ArrayHandle< std::string >& elements)
 Creates a filename from a series of elements using the correct separator for filenames.
std::string build_filename (const std::string& elem1, const std::string& elem2)
 Creates a filename from two elements using the correct separator for filenames.
std::string build_path (const std::string& separator, const Glib::ArrayHandle< std::string >& elements)
 Creates a path from a series of elements using separator as the separator between elements.
std::string find_program_in_path (const std::string& program)
 Locates the first executable named program in the user's path, in the same way that execvp() would locate it.
bool str_has_prefix (const std::string& str, const std::string& prefix)
 Looks whether the string str begins with prefix.
bool str_has_suffix (const std::string& str, const std::string& suffix)
 Looks whether the string str ends with suffix.
std::string strescape (const std::string& source)
 Escapes all special characters in the string.
std::string strescape (const std::string& source, const std::string& exceptions)
 Escapes all special characters in the string.
std::string strcompress (const std::string& source)
 Replaces all escaped characters with their one byte equivalent.
Glib::ustring strerror (int errnum)
 Returns a string corresponding to the given error code, e.g. "no such process".
Glib::ustring strsignal (int signum)
 Returns a string describing the given signal, e.g. "Segmentation fault".
void usleep (unsigned long microseconds)
gunichar get_unichar_from_std_iterator (std::string::const_iterator pos)
 Extract a UCS-4 character from UTF-8 data.
template<class T >
T::BaseObjectType* unwrap (T* ptr)
 Get the underlying C instance from the C++ instance.
template<class T >
const T::BaseObjectType* unwrap (const T* ptr)
 Get the underlying C instance from the C++ instance.
template<class T >
T::BaseObjectType* unwrap (const Glib::RefPtr< T >& ptr)
 Get the underlying C instance from the C++ instance.
template<class T >
const T::BaseObjectType* unwrap (const Glib::RefPtr< const T >& ptr)
 Get the underlying C instance from the C++ instance.
template<class T >
T::BaseObjectType* unwrap_copy (const Glib::RefPtr< T >& ptr)
 Get the underlying C instance from the C++ instance and acquire a reference.
template<class T >
const T::BaseObjectType* unwrap_copy (const Glib::RefPtr< const T >& ptr)
 Get the underlying C instance from the C++ instance and acquire a reference.
Glib::RefPtr< Gio::Drivewrap (GDrive* object, bool take_copy)
Glib::RefPtr< Gio::Mountwrap (GMount* object, bool take_copy)
Glib::RefPtr< Gio::Volumewrap (GVolume* object, bool take_copy)

Typedef Documentation

typedef GPid Glib::Pid

Enumeration Type Documentation

anonymous enum
Enumerator:
PRIORITY_HIGH 

Use this for high priority event sources. It is not used within GLib or GTK+.

PRIORITY_DEFAULT 

Use this for default priority event sources. In glibmm this priority is used by default when installing timeout handlers with SignalTimeout::connect(). In GDK this priority is used for events from the X server.

PRIORITY_HIGH_IDLE 

Use this for high priority idle functions. GTK+ uses PRIORITY_HIGH_IDLE + 10 for resizing operations, and PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is done to ensure that any pending resizes are processed before any pending redraws, so that widgets are not redrawn twice unnecessarily.)

PRIORITY_DEFAULT_IDLE 

Use this for default priority idle functions. In glibmm this priority is used by default when installing idle handlers with SignalIdle::connect().

PRIORITY_LOW 

Use this for very low priority background tasks. It is not used within GLib or GTK+.


Function Documentation

sigc::connection Glib::add_exception_handler ( const sigc::slot< void > &  slot  ) 

Specify a slot to be called when an exception is thrown by a signal handler.

void Glib::file_set_contents ( const std::string filename,
const std::string contents 
)

A variant of file_set_contents which accepts a standard C++ string.

Since glibmm 2.22:
void Glib::file_set_contents ( const std::string filename,
const gchar *  contents,
gssize  length 
)

Writes all of contents to a file named filename, with good error checking.

Parameters:
filename name of a file to write contents to, in the GLib file name encoding
contents string to write to the file
length length of contents, or -1 if contents is a nul-terminated string

If a file called filename already exists it will be overwritten.

This write is atomic in the sense that it is first written to a temporary file which is then renamed to the final name. Notes:

  1. On Unix, if filename already exists hard links to will break. Also since the file is recreated, existing permissions, access control lists, metadata etc. may be lost. If is a symbolic link, the link itself will be replaced, not the linked file.
  2. On Windows renaming a file will not remove an existing file with the new name, so on Windows there is a race condition between the existing file being removed and the temporary file being renamed.
  3. On Windows there is no way to remove a file that is open to some process, or mapped into memory. Thus, this function will fail if already exists and is open.

If the call was not successful, an exception is thrown. Possible error codes are those in the FileError enumeration.

Since glibmm 2.22:
gunichar Glib::get_unichar_from_std_iterator ( std::string::const_iterator  pos  ) 

Extract a UCS-4 character from UTF-8 data.

Convert a single UTF-8 (multibyte) character starting at pos to a UCS-4 wide character. This may read up to 6 bytes after the start position, depending on the UTF-8 character width. You have to make sure the source contains at least one valid UTF-8 character.

This is mainly used by the implementation of Glib::ustring::iterator, but it might be useful as utility function if you prefer using std::string even for UTF-8 encoding.

void Glib::init (  ) 

Initialize glibmm.

You may call this more than once. You do not need to call this if you are using Glib::MainLoop or Gtk::Main, because they call it for you.

template <class T >
const T::BaseObjectType* Glib::unwrap ( const Glib::RefPtr< const T >&  ptr  )  [inline]

Get the underlying C instance from the C++ instance.

This is just like calling gobj(), but it does its own check for a NULL pointer.

template <class T >
T::BaseObjectType* Glib::unwrap ( const Glib::RefPtr< T >&  ptr  )  [inline]

Get the underlying C instance from the C++ instance.

This is just like calling gobj(), but it does its own check for a NULL pointer.

template <class T >
const T::BaseObjectType* Glib::unwrap ( const T *  ptr  )  [inline]

Get the underlying C instance from the C++ instance.

This is just like calling gobj(), but it does its own check for a NULL pointer.

template <class T >
T::BaseObjectType* Glib::unwrap ( T *  ptr  )  [inline]

Get the underlying C instance from the C++ instance.

This is just like calling gobj(), but it does its own check for a NULL pointer.

template <class T >
const T::BaseObjectType* Glib::unwrap_copy ( const Glib::RefPtr< const T >&  ptr  )  [inline]

Get the underlying C instance from the C++ instance and acquire a reference.

This is just like calling gobj_copy(), but it does its own check for a NULL pointer.

template <class T >
T::BaseObjectType* Glib::unwrap_copy ( const Glib::RefPtr< T >&  ptr  )  [inline]

Get the underlying C instance from the C++ instance and acquire a reference.

This is just like calling gobj_copy(), but it does its own check for a NULL pointer.

void Glib::usleep ( unsigned long  microseconds  ) 
Glib::RefPtr<Gio::Volume> Glib::wrap ( GVolume *  object,
bool  take_copy 
) [related]
Glib::RefPtr<Gio::Mount> Glib::wrap ( GMount *  object,
bool  take_copy 
) [related]
Glib::RefPtr<Gio::Drive> Glib::wrap ( GDrive *  object,
bool  take_copy 
) [related]
Glib::RefPtr<IOChannel> Glib::wrap ( GIOChannel *  gobject,
bool  take_copy = false 
)
RefPtr<ObjectBase> Glib::wrap_interface ( GObject *  object,
bool  take_copy = false 
)

Generated on Sat Jan 2 23:07:00 2010 for glibmm by  doxygen 1.6.1