Find the answer to your Linux question:
Results 1 to 4 of 4
Hello, I am new to programming in Xlib or any kind of windowing enviroment for that matter. I am writing an application that may be used on a wide variaty ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2

    XVisualInfo class member


    Hello, I am new to programming in Xlib or any kind of windowing enviroment for that matter. I am writing an application that may be used on a wide variaty of displays. It loads true color bitmaps into windows as part of a GUI; however there may be times when the display is only capable of handeling 256 colors. I need to create a colormap that can be loaded so that it will look the same on every computer that runs it, and I am trying to figure out what the class of my default visual is. XVisualInfo has a member named "class" that will tell me this information, but I can't access it because class is technically a keyword. Do anyone have a way around this?

  2. #2
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    I take it this is C++. Have you tried using it and compiling it, or is this just a suspicion?
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    2
    Yes.. this is in C++, sorry for not listing that earlier. I have tryed to compile it, and it gives a compile error.

    FDrawBitmap.cxx:1200: error: expected unqualified-id before 'class'
    FDrawBitmap.cxx:1200: error: expected `;' before 'class'

  4. #4
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Could you wrap it's access in a C file, compile that into an object file and link to it? That sounds like it might work.
    Flies of a particular kind, i.e. time-flies, are fond of an arrow.

    Registered Linux User #408794

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •