gdk

Signal ::expose-event is invalid for GdkWindow and GdkX11Window

微笑、不失礼 提交于 2021-02-10 18:00:41
问题 I had this following code pull from one of the tutorials on line. When I use gtk+-2.0, the following code works fine. But when I try compile with gtk+-3.0, the code gives this error: signal 'expose-event' is invalid for instance of type 'GtkWindow' So I try to do the following, but still doesn't help. And it gives another error: signal 'expose-event' is invalid for instance of type 'GdkX11Window' gtk_widget_realize(window); GdkWindow *gdkwin = gtk_widget_get_window(Gwindow); int main(int argc

IA__gdk_drawable_get_size: assertion 'GDK_IS_DRAWABLE (drawable)' failed

Deadly 提交于 2020-10-25 21:56:05
vim关闭时终端报错: ``` IA__gdk_drawable_get_size: assertion 'GDK_IS_DRAWABLE (drawable)' failed ``` 原因:   输入法冲突 解决办法:   apt-get remove fcitx-frontend-gtk2 未解决 原文: https://www.cnblogs.com/moonwolf009/archive/2013/01/04/2853418.html 来源: oschina 链接: https://my.oschina.net/u/4283164/blog/4284963

Docker容器运行GUI程序的配置方法

隐身守侯 提交于 2020-10-02 10:29:46
https://www.cnblogs.com/lijinze-tsinghua/p/8686264.html Docker容器运行GUI程序的配置方法 0.环境说明 Ubuntu 16.04 docker 1.35 1.Docker的“可视化” Docker 本身的工作模式是命令行的 ,因为 主要的使用场景可能是做服务器后端 方面的比较多。 但有时候我们会有 在docker容器里运行一些图形界面的软件 ,或者要调用摄像头,输出图像等等一些需求,这个时候需要解决这个 Docker “可视化”的问题 。 (这里的“可视化”不是很容易搜到的可视化管理的方法) 2.解决方案1—启动容器时添加配置选项 林帆:Docker运行GUI软件的方法 这篇文章里介绍了Docker公司的程序员杰西·弗莱泽尔(Jessie Frazelle)展示的使用了图形界面的镜像的例子,Jessie也开源了她展示的 docker 运行libreoffice软件 的代码和使用方法。 2.1 原理简介 原文中讲的比较详细,原理并不复杂,我按照自己理解很浅显地讲一下。 原理上可以 把docker镜像看做一台没配显示器的电脑,程序可以运行,但是没地方显示 。 而 linux目前的主流图像界面服务X11又支持 客户端/服务端(Client/Server)的工作模式 只要在容器启动的时候,将 『unix:端口』或『主机名:端口

How to use gdk_device_get_position()?

允我心安 提交于 2020-08-04 05:40:05
问题 I am trying to get the pointer position on screen in Gdk and found gdk_display_get_pointer() , which works fine, but it's marked as deprecated and refers to gdk_device_get_position() now. But how do I use this function? I cannot get a GdkDevice , since there is no factory, nor is there a constructor. 回答1: use Gdk.DeviceManager. ..... ..... GdkDisplay *display = gdk_display_get_default (); GdkDeviceManager *device_manager = gdk_display_get_device_manager (display); GdkDevice *device = gdk

Linux draw pixel buffer

匆匆过客 提交于 2020-06-17 13:36:07
问题 The problem is simple enough, i have a code that generates a pixel buffer. Now i need to present this pixel buffer instead of saving image and then analyzing it after. What would be the solution to: Open window Replace all pixels in this window with my pixels RGB888 So far suggestion were: To use opengl, create a vertex buffer for a rect covering a window, and use pixel shader to draw your pixels. Which clearly is not the best way to swap pixel buffers in window. Platform: Ubuntu 18 回答1: You

起享受安息的美好时光而

让人想犯罪 __ 提交于 2020-05-02 09:40:45
sdfsdf 服务网格作为一个改善服务到服务通信的专用基础设施层,是云原生范畴中最热门的话题。随着容器愈加流行,服务拓扑也频繁变动,这就需要更好的网络性能。服务网格能够通过服务发现、路由、负载均衡、心跳检测和支持可观测性,帮助我们管理网络流量。服务网格试图为无规则的复杂的容器问题提供规范化的解决方案 将供应链搬出中国,似乎成了过去两三个月新冠肺炎疫情衍生出的热门话题。 年初新冠肺炎疫情爆发,让中国供应链的生产活动几乎完全停顿,影响席卷全球:苹果的新 5G 有可能因疫情而延期推出,特斯拉新款芯片无法及时交付、陷入“芯片门”纠纷。其余像三星、小米、索尼等著名跨国企业,均受到供应链停摆的影响。 因此,bmpidmixcloud.com/XOo0s3nmG0yoiS0/ mixcloud.com/u4B19lmO9plC5G4/ mixcloud.com/0yRwhx3dM881s97/ mixcloud.com/Q8yjKh6DJMshG6g/ mixcloud.com/AAL8Q9fCuwW9jtd/ mixcloud.com/7e78H8dYKPz370d/ mixcloud.com/tbpWejKR9P938Op/ mixcloud.com/1uoNTe0ZI5iP5d7/ mixcloud.com/5095NG903LdoE8d/ mixcloud.com

Groovy GDK equivalent of Apache Commons StringUtils.capitalize(str) or Perl's ucfirst(str)

烂漫一生 提交于 2020-01-12 16:06:13
问题 Yes/no-question: Is there a Groovy GDK function to capitalize the first character of a string? I'm looking for a Groovy equivalent of Perl's ucfirst(..) or Apache Commons StringUtils.capitalize(str) (the latter capitalizes the first letter of all words in the input string). I'm currently coding this by hand using .. str = str[0].toUpperCase() + str[1 .. str.size() - 1] .. which works, but I assume there is a more Groovy way to do it. I'd imagine ucfirst(..) being a more common operation than

Groovy GDK equivalent of Apache Commons StringUtils.capitalize(str) or Perl's ucfirst(str)

杀马特。学长 韩版系。学妹 提交于 2020-01-12 16:06:04
问题 Yes/no-question: Is there a Groovy GDK function to capitalize the first character of a string? I'm looking for a Groovy equivalent of Perl's ucfirst(..) or Apache Commons StringUtils.capitalize(str) (the latter capitalizes the first letter of all words in the input string). I'm currently coding this by hand using .. str = str[0].toUpperCase() + str[1 .. str.size() - 1] .. which works, but I assume there is a more Groovy way to do it. I'd imagine ucfirst(..) being a more common operation than

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(

GDK signal, keypress, and key masks

青春壹個敷衍的年華 提交于 2019-12-24 17:19:10
问题 I am trying to catch user key press Ctrl+d on a GUI window to quit. My code looks like this: static gboolean callback(GtkWidget *widget, GdkEventKey *event, gpointer data) { if(event->state == GDK_CONTROL_MASK && event->keyval == 'd') gtk_main_quit(); return FASLE; } This works on my laptop(Ubuntu 11.04, gcc 4.5.2, libgtk 2.24.4). But when I do the same thing on a newer system(Ubuntu 12.10, gcc 4.7.2, libgtk 2.24.13), it doesn't work. I added g_print("%u\n", event->state); before the if