gtk

Hosting Flash won't load swf ressources (xml, image, etc.)

馋奶兔 提交于 2019-12-30 05:11:26
问题 I tried to achieve at first a swf reader with gtk2 on my unix machine. Worked, I could render simple swf files. Now, I'm trying to add a configuration to my flash file with xml configuration, add image, etc. Failed, won't get pass geturlnotify(). Here's my code: #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <string.h> #include <unistd.h> #include <ctype.h> #include <gtk/gtk.h> #include <gdk/gdkx.h> #include "npupp.h" #define FLASH_PLUGIN_SO "./libflashplayer.so" void

customizing completion of GtkComboBoxText

僤鯓⒐⒋嵵緔 提交于 2019-12-29 08:30:14
问题 How can I customize the completion of a GtkComboBoxText with both a "static" aspect and a "dynamic" one? The static aspect is because some entries are known and added to the combo-box-text at construction time with gtk_combo_box_text_append_text . The dynamic aspect is because I also need to complete thru some callback function(s), that is to complete dynamically -after creation of the GtkComboBoxText widget- once several characters has been typed. My application uses Boehm's GC (except for

Getting keyboard modifiers state using Gnome libs (GDK) fetches initial state only

佐手、 提交于 2019-12-29 08:06:43
问题 I'm trying to get the current keyboard modifiers state through gnome GDK or GTK library in aim to implement an accessibility gnome shell extension that shows that state. I know how to get thier state using xlib, but there is not full binding for gnome gjs. The code below get only the initial state. It does not update state. /* * compiling: gcc `pkg-config --cflags gdk-3.0` -o gdk_mod gdk_mod.c `pkg-config --libs gdk-3.0` */ #include <gdk/gdk.h> int main (int argc, char **argv) { gdk_init(

Gtk+ and OpenGL bindings

折月煮酒 提交于 2019-12-29 07:04:30
问题 Simple and short: What is the most advanced OpenGL binding for GTK+? I would prefer a widget which allows me to use it similar to QGLWidget. Note: I stumbled upon gtkglext, gtkglarea and clutter. I read the first two have shortcomings/ serious issues. 回答1: Update: Since Gtk+-3.16 any beyond do not use any of the below! If you want to use the current state of the art, vertex/pixel shaders you should use the latest gnome and rely on its caps: Extensively covered in https://www.bassi.io/articles

How to display an image from web?

若如初见. 提交于 2019-12-29 04:54:06
问题 I have written this simple script in python: import gtk window = gtk.Window() window.set_size_request(800, 700) window.show() gtk.main() now I want to load in this window an image from web ( and not from my PC ) like this: http://www.dailygalaxy.com/photos/uncategorized/2007/05/05/planet_x.jpg How can I do that ? P.S. I don't want download the image ! I just want load the image from the URL. 回答1: This downloads the image from a url, but writes the data into a gtk.gdk.Pixbuf instead of to a

What's the equivalent of gcc's -mwindows option in cmake?

喜你入骨 提交于 2019-12-29 01:36:20
问题 I'm following the tuto: http://zetcode.com/tutorials/gtktutorial/firstprograms/ It works but each time I double click on the executable,there is a console which I don't want it there. How do I get rid of that console? I tried this: add_executable(Cmd WIN32 cmd.c) But got this fatal error: MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup Cmd.exe : fatal error LNK1120: 1 unresolved externals While using gcc directly works

GLib-GIO-ERROR**: No GSettings schemas are installed on the system

时光总嘲笑我的痴心妄想 提交于 2019-12-28 22:07:52
问题 Unfortunately, I am using Windows (Windows7 x64). With MinGW compiler in Code::Blocks and GTK+3.6.4. I compiled manually all the schemas from glib. When I use File Chooser dialogue / colorpicker - it doesn't matter, I am getting the following error: GLib-GIO-ERROR**: No GSettings schemas are installed on the system and the program terminates. What do I have to do to fix this? 回答1: GSettings looks at the compiled schemas in the directories pointed by the $XDG_DATA_DIR environment variable. You

How to use debug libraries on ubuntu

蓝咒 提交于 2019-12-28 12:51:30
问题 My current problem is with libwebkitgtk-3.0-0, but I guess this problem is generic enough. My application is crashing somewhere in the webkit code. My assumption is we are doing something stupid and want to find out what. Easiest thing will be to set a breakpoint or use debug version of library. How do I get exact source code with which library was built? I am getting stack trace after it dumps the core, but line number gdb is saying do not match with those I see in the code. In other words

How to use debug libraries on ubuntu

六月ゝ 毕业季﹏ 提交于 2019-12-28 12:49:53
问题 My current problem is with libwebkitgtk-3.0-0, but I guess this problem is generic enough. My application is crashing somewhere in the webkit code. My assumption is we are doing something stupid and want to find out what. Easiest thing will be to set a breakpoint or use debug version of library. How do I get exact source code with which library was built? I am getting stack trace after it dumps the core, but line number gdb is saying do not match with those I see in the code. In other words

Statically linking GTK+ libraries in windows

↘锁芯ラ 提交于 2019-12-28 06:32:13
问题 I have installed GCC and GTK+. Its working fine, but i need to statically link GTK+ libraries with my application (it's a small application) so that there exist only one '.exe'. 回答1: It is supported with a few minor issues (like having trouble finding configuration files), but you will have to compile GTK+ yourself! (the default binaries do not include static libraries) See this mailing-list thread for more information on this issue. 回答2: mingw-cross-env has fixes to build gtk and all related