Programming :: Implementing Scrollbar Using Xlib ?
Oct 17, 2010
I am working on xlib project to develop text editor without using help from any of toolkit/widgets.I get stuck in scrollbar.I have no idea how they work and developed.It become more difficult as I am using low-level C library - xlib.
View 1 Replies
ADVERTISEMENT
Jun 12, 2011
I'm trying to build a program called Obpager, but I'm getting an error saying I don't have xlib.h. From what I understand, that file is included in libx11-dev, which I have installed. Any idea?
Code:
dagoss@MAGIC-PORT:~/Downloads/obpager-1.8$ make
Compiling src/main.cc
In file included from src/main.cc:33:0:
[code]....
View 2 Replies
View Related
Mar 12, 2009
I am having trouble writing an Xlib application that displays a window. The most frustrating thing is that I've written applications like this before, and never had any problems. For some reason I cannot get this program to work properly. I'm running KDE and when I launch the program, a "button" for the application will appear on the application panel, however, no window will display. It is possible to right click on the panel button and select the Close item which will successfully close the window.
The following is source code that when built will exhibit the behaviour described above code...
View 10 Replies
View Related
Jan 15, 2011
Suppose i have an XID of a window. How can i wrap QPainter to draw on this window? I need something like cairo_xlib_surface_create(), but Qt-based.
View 3 Replies
View Related
Mar 3, 2009
The code below seems to do a right mouse click (firefox 2.0.0.7) IF I pass it 3, but I cant get it to do a left mouse click?
View 4 Replies
View Related
Dec 6, 2008
I am starting to learn Linux graphical programming. Most of codes in my hands were written based on xlib, which is a kind of old graphic lib. I see some developers more interested in openGL. Then what's the difference between xlib and openGL? And which one is more popular used in which industry area?
View 2 Replies
View Related
Aug 27, 2009
I'm interested in writing a generational garbage collector in C++. This is for a Python-like programming language project. I have used Boehm's garbage collector before, but I'm worried that it will have noticeable pause times (unacceptable for interactive programs). Since I can't really find any other C++ established GCs out there, I have been thinking of simply writing my own.
However, there are two essential ingredients I need for this:
- Some kind of write barrier mechanism that will notify my collector when something is written to a part of the heap
- A way for me to know the addresses and sizes of the stack, heap and global storage (the root sets)
how to implement write barriers (and how to get the stack, heap and global storage information) on the Linux platform? As an alternative, if you know of C++ GCs other than Boehm, I would also be interested.
View 14 Replies
View Related
Aug 3, 2009
I'm trying to get the width of a string in pixels this way:
Display *disp;
int len;
disp = XOpenDisplay(0);
font = XLoadQueryFont(disp, desc );
[code]....
I'm getting negative numbers as the the pixel length, eg -7275
View 3 Replies
View Related
Nov 17, 2010
I'm working on an application which generates random shapes when clicking on a window. I designed the window using Motif. I want to invoke the ButtonPress Event .
View 1 Replies
View Related
Oct 8, 2010
i want to get the state of a particular window by using the _NET_WM_STATE atom. i dont know how to use it with XGetProperty.
View 6 Replies
View Related
Dec 11, 2009
I'm making a game with the xlib library. What I want to do is to know if the character is standing on a trap or something else.
So far I've solved that using the coordinates but when I draw circles or stuff not shaped like a rectangle it gets to hard to make the game exact.
So what I'm asking for is if there is some kind of function in the xlib that tells you which color a pixel has. Because then it'd be much easier.
I've searched but I haven't been able to find anything good. I found XGetPixel() but that appears to work only with images, maybe I can make my window to be an "image"?
View 7 Replies
View Related
Apr 27, 2010
I'm trying to understand how to use colors in Xlib programming. What I think I understand so far is that modern displays use 24 or 32-bit TrueColor. And TrueColor uses three colormaps, one for each primary color, and a single pixel value is composed of three indices.
Now the part i'm confused about is how to get my programs to use a 32-bit TrueColor visual. I thought I could inheret the visual from the root window to get color but it seems no matter what pixel value I use it's either black or white.
I guess my question is, how can I setup my programs so that I can specify a pixel value that is a combination of RGB values to get the color I want?
I come from windows where I simply used RGB(r,g,b) macro to specify colors and never had to worry about depth and colormaps and visuals, so I'm a bit overwhelmed by all of these concepts.
View 1 Replies
View Related
Dec 14, 2008
I want to do some experimentation with GUI programming. What mostly interests me is how the toolkits actually work (what are the drawing mechanisms, how it communicates with X, etc.) and how the window managers work. I know it's quite a lot but I don't plan on developing the next best DE/Toolkit/Window Manager, just to play with API, mostly to learn. It seems that there is a shortage of documentation on this topics, I'm trying to find anything for 2 days now with no result.
View 7 Replies
View Related
Jul 24, 2010
I tried to draw two lines with xlib.h in C. If I start this compiled program it show me in most cases a window with two lines as it should be.
But sometimes the two lines are not drawn.If I insert XFlush() before the second XSync() it worked better but not every time.Why?How can I solve the problem?How works the X-Server buffer in detail?
Code:
View 1 Replies
View Related
Mar 31, 2011
Though I have developed some web applications (automation tools) using PHP which have been primarily meant for Intranet (within the organizations I have worked for), I have paid little attention to SEO (it was not required until now). But now I want to understand how do we go about implementing SEO and where do we fit this mechanism in a system / website?
Do we need any other tools or learn some specific programming /scripting language to achieve it?Will implementing a good SEO yield identical results irrespective of what search engine (be it Google or Yahoo!) is being used by users?
View 1 Replies
View Related
Sep 12, 2010
implementing hamming code in c: Calculating the Hamming Code The key to the Hamming Code is the use of extra parity bits to allow the identification of a single error. Create the code word as follows:
Mark all bit positions that are powers of two as parity bits. (positions 1, 2, 4, 8, 16, 32, 64, etc.)
All other bit positions are for the data to be encoded. (positions 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, etc.)
[code]....
View 2 Replies
View Related
May 13, 2011
i am running linux kernel 2.6.32-30 and my aim is to do packet aggregation in linux,so i created a qdisc simple one like sch_fifo.c and i wanted to put upon the dequeue function but when i attach my qdisct with tc qdisc add dev wlan0 root aggregate my screen just go black and in var/log/messages it says 31 m of stolen memory.graphic perfomance may suffer. can you somebody pls help me. Below is my dequeue function.
static struct sk_buff *aggregate_dequeue(struct Qdisc *sch)
{
struct sk_buff *skb;
struct packet_buffer *packet_buffer = {0};
packet_buffer->size=0;
skb = __skb_dequeue(&sch->q);
[Code]...
View 1 Replies
View Related
Sep 12, 2013
I run Wheezy Xfce 64-bit. I went through the Synaptic listings and added Python 3.3.2 and Tkinter for it, and that works fine; but for some reason PyGtk is available only for Python 2.7, not for Python 3.3, unless I'm just using the wrong way to try to find it. Is there a PyGtk available for Python 3.3 in Wheezy, and, if so, how do I install it and then import it once it's installed?
View 1 Replies
View Related
Nov 15, 2010
Options:A double linked list with fixed size character arrays. New nodes will be added when previous ones get filled. Dynamic arrays using realloc(). Linked list has the disadvantage of not having an O(1) search like an array but I think using realloc() will be more dangerous since it moves the whole block to a new location and if the new location is not big enough to hold the whole block, realloc fails !! this case will not occur with the linked list since its nodes are scattered.
View 14 Replies
View Related
Aug 22, 2010
I need to implement AIDE on my client machines. The builds on these machine are different, so each workstation will have its own specific db generated through running AIDE initially. It is not good practice to just leave the db on the machine, since an "attacker" would be able to view this information. However, at the same time I do not want to pull back over 100 different aide db's to the ftp server and have an update pull each specifically every time I need to run the check. The plan is to leave the db on the client machine, but encrypt it (using public/private keys). I need to be able to encrypt the file on the client machine. I will use a cron on the client to pull an update (from my ftp server) that runs AIDE. This update needs to be able to decrypt the file, use it running AIDE, then re-encrypt the file on the client.
View 1 Replies
View Related
Mar 21, 2011
I seek a GNU Common LISP package which implements forkpty(); openpty() would also be a big plus, and login_tty() would be a luxury I could live with.
View 3 Replies
View Related
Oct 11, 2010
I'm working on a problem in which i have to implement the regular sleeping barber problem with multiple (say n) barbers. The code i'm using is this :
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<pthread.h>
#include<errno.h>
#include<sys/ipc.h>
#include<semaphore.h>
[Code]...
how to implement the modification? (there are many more such modifications where i'm stuck , but will ask about those later)
View 6 Replies
View Related
Feb 5, 2010
I need to control matrix 5x4 keypad, on a processor
i am doing by making one row low at a time, and keeping all other rows high,
by scaning coloums, the corresponding key value becomes low.
my problems is that it is taking much time to respond, like to make gpio
low to high and high to low...
View 1 Replies
View Related
Nov 13, 2010
How do I change the default scrollbar width in ubuntu 10.10? I tried this but it doesn't seem to work on 10.10: [URL]
Should it work on 10.10?
View 3 Replies
View Related
Jul 8, 2010
I'm enjoying the default 10.04 theme, but the one thing that doesn't work for me is the scrollbar. I can hardly see it. Where I can edit just the scrollbar color without changing themes completely?
View 3 Replies
View Related
Sep 12, 2010
I'm using the Human-Clearlooks theme on Lucid (Gnome) with compiz/nvidia driver.
I'd like to have the scrollbar sliders a bit (only) more visible. Ideally, it would switch orange when I hover it with the mouse, and stay gray otherwise. This is because my screen is quite large, and when the slider is small I find it difficult to find its position.
1. I opened the gtkrc file and set colorize_scrollbar = TRUE in the engine "clearlooks" block. Now the scrollbar sliders are always orange. I'd really like to have them orange only on hover.
2. There is a "clearlooks-scrollbar" style. I tried adding (fg|bg|base|text)[] in it. I found that:A. fg[] is for the arrow within the top and bottom square boxes
B. bg[NORMAL] and bg[INSENSITIVE] define the color of the box containing the arrow (or if colorize_scrollbar = FALSE, the color of the whole scrollbar, including the square boxes and the slider itself)
C. bg[PRELIGHT] is the color of the box containing the arrow when hovered
D. bg[SELECTED] is the color of the slider (permanent)As it was most unsuccessful, I tried to force the murrine engine for the scrollbars only. Now with bg[PRELIGHT] = @selected_bg_color I get something fairly close to my expectations.
Only I'd like the bar to be pre-lighted not only when the mouse is over the slider, but as soon as it is over the scrollbar. Here I must say I'm at loss, and I really can't find how to do it.
how to change the slider color on scrollbar hover?
View 6 Replies
View Related
Jun 29, 2011
The scrollbar in the default Ambience theme is hardly visible. I want to change it to orange.
View 2 Replies
View Related
Aug 20, 2010
I'd like to widen the width of the standard vertical scrollbar in firefox 3.6 or above. I know now that it is not an edit in about:config and appears that you have to edit in user.js, prefs.js, or in the Profile folder but I 3 prefs.js in my profile folder -
prefs.js
prefs-1.js and
prefs-2.js
Secondly, I cannot find the user.js file. its location if it is still a viable file to edit. which (or what) prefs file I should concentrate on for this edit.
Plainly, it shouldn't be this tough to adjust the vertical scrollbar width, in a perfect world it would be adjustable though Windows. Anyway, this old fart's having difficulty grabbing that scrollbar.
View 3 Replies
View Related
Mar 16, 2011
I am seeing a weird error in a font display. I see a small question mark next to a font that I am using as a simple graphic. Does this mean that some function call in xlib is being passed an invalid paramter?
View 1 Replies
View Related
Mar 5, 2010
i am trying to implement DSR algo by tcl in ns2.but the problem i am facing is that i cannot make out how to circulate the ROUTE-REQUEST & ROUTE-REPLY packet in the established network.
View 2 Replies
View Related