Questions tagged [glib]

GLib is a general-purpose and cross-platform utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.

GLib is a general-purpose and cross-platform utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on.

For many applications, C with GLib and GObject is an alternative to C++ with STL. It works on many UNIX-like platforms, Windows, OS/2 and BeOS. GLib is released under the GNU Library General Public License (GNU LGPL).

The GLib reference manual can be found at the GNOME developer site.

1529 questions
0
votes
1 answer

gtk-vim-syntax with Janus

I recently fell in love with Janus, I can't live without it anymore. I decided to do some C programming and came across this: http://www.vim.org/scripts/script.php?script_id=1000. I have absolutely no idea how to get it to work with Janus, I've…
iridian
  • 669
  • 5
  • 13
0
votes
1 answer

ClutterActor properties

I just started playing around with clutter a bit, and I got a question in regards to setting properties on a ClutterActor. I want to set the pivot-point property, after searching though the reference, the function which seems the best fit is…
JustDanyul
  • 13,813
  • 7
  • 53
  • 71
0
votes
1 answer

How to correctly compile C app for 64 bits with CUDA 5 and Glib on Windows?

i'm trying to compile a project on VS2010 for 64 bits wrote in C and use CUDA 5.0 and GLib. I already had a working profile for 32 bits and everything goes ok. On configuration manager i created a new context for 64 bits with settings copied from…
Pedro Alves
  • 1,667
  • 4
  • 17
  • 37
0
votes
1 answer

g_spawn_async_with_pipes () and bash

I am testing the g_spawn_async_with_pipes () from glib with bash. I would like to know if it's possible to launch bash with this function as a child process, write commands from the parent to the child (bash) input and get the result from the bash…
cedlemo
  • 3,205
  • 3
  • 32
  • 50
0
votes
1 answer

How do I get g_print() to appear?

I've just inherited a library from someone who left the company. It's written in C++ and g_print() is used throughout the code. I know the library is running but I can't see any debug output. Is there something I need to do to get it to show up?…
parsley72
  • 8,449
  • 8
  • 65
  • 98
0
votes
1 answer

Debugging python gtk3 application

I'm writing a text editor in python and gtk3 and I keep getting vague warnings from somewhere within glib when I close a window: /usr/lib/python2.7/dist-packages/gi/types.py:47: Warning: invalid (NULL) pointer instance return info.invoke(*args,…
realh
  • 962
  • 2
  • 7
  • 22
0
votes
1 answer

Got "assertion `function != NULL' failed" while using GLib in Seed

I'm trying to call CLib API from Seed. In JS there is a setTimout API. But not in Seed. So I use GLib to make a delay function: delay = function(time, func) { return GLib.timeout_add(time, func); }; It gives error: (seed:26406): GLib-CRITICAL **:…
jiyinyiyong
  • 4,586
  • 7
  • 45
  • 88
0
votes
1 answer

What is the use of dbus_g_object_register_marshaller function

I am familiar to DBus and its Qt Binding. But I am very new to glib and related stuff. When I am going through the code of some project, I came across "dbus_g_object_register_marshaller" function. Can you please explain me about this briefly in…
snr
  • 599
  • 2
  • 6
  • 10
0
votes
1 answer

Get parent class in Gobject

I am new to GObject.I confused something about getting pointer to father of one class.For example , On Gobject Spec, we have a class: struct _MamanBarClass { GObjectClass parent; /* class members */ }; what is the difference between :…
0
votes
1 answer

g_hash_table and OpenMp

Are g_hash_table_lookup and g_hash_table_insert thread-safe? Can I use code like this: dict = g_hash_table_new(); for (i = 0; i < N; i++) { compute_A(); find_hash_of_A(); void *value = g_hash_table_lookup(dict, key); struct MyStruct…
aptypr
  • 417
  • 5
  • 15
0
votes
1 answer

GLib Hash Table - Unable to lookup key/value

I'm trying to add malloc'd strings as keys and structs as values. Each time is a new string but sometimes the text is the same so they should be treated as the same key. After adding the struct, I try to retrieve it but its not successful ("Failed…
user994165
  • 9,146
  • 30
  • 98
  • 165
0
votes
1 answer

GLib Hash Table: Invalid free()

I have a GLib Hash table I created with: GHashTable *gmem = g_hash_table_new_full(NULL, NULL, (GDestroyNotify) free_memoryaddresses, (GDestroyNotify)free_metadatarecords); In Valgrind I get the following error: ==19610== 1 errors in context 2 of…
user994165
  • 9,146
  • 30
  • 98
  • 165
0
votes
1 answer

GLib Hash Table not returning correct value

I added several key, value pairs to my GLib hash table, which is under my memory struct. The key is a (char *) pointer returned from a malloc. The value is the size malloc allocated. void addstomemstruct(struct memory *mem, char *key_address,…
user994165
  • 9,146
  • 30
  • 98
  • 165
0
votes
1 answer

Error building Maliit with glib and dbus dbus_g_value_build_g_variant

I am trying to build Maliit ( https://wiki.maliit.org/Documentation/Installing ) on Ubuntu 10.04 32-bit. I have an Ubuntu 12.04 machine as well and building Maliit works just fine out of the box on the newer Ubuntu but I need to have it build on…
PhilBot
  • 748
  • 18
  • 85
  • 173
0
votes
2 answers

Weird Behavior using gcc and glib?

It only prints the description when I print b again after the if statement, really weird behavior, when I remove the last line it doesn't print description is ...dos anyone know why this happens and how I can fix this? Thanks char * b; if (list!=…
mihajlv
  • 2,275
  • 4
  • 36
  • 59
1 2 3
99
100