Yahoo India Web Search

Search results

  1. Dictionary
    opaque
    /ə(ʊ)ˈpeɪk/

    adjective

    noun

    • 1. an opaque thing.

    More definitions, origin and scrabble points

  2. I've seen both of the following two styles of declaring opaque types in C APIs. What are the various ways to declare opaque structs/pointers in C? Is there any clear advantage to using one style ov...

  3. Jun 24, 2019 · @ChrisW I don't think any of the other branded type questions reference opaque so it might be useful to add an answer to improve search-ability ... I'll add one once I'm out of a meeting – Titian Cernicova-Dragomir

  4. In my understanding, opaque types are those which allow you to hold a handle (i.e., a pointer) to an structure, but not modify or view its contents directly (if you are allowed to at all, you do so through helper functions which understand the internal structure). Opaque types are, in part, a way to make C more object-oriented.

  5. Oct 10, 2009 · Not knowing anything about the structure is the name of the game so you're probably going to have to define some functions to manipulate them. Most C libraries that declare opaque structures often has accessor and modification functions. One example is from Lua (obviously a Lua state is an single use structure but it's the idea):

  6. Apr 16, 2019 · The problem working with opaque type is needed. Opaque struct is declared in header file with some other functions. But each function is supposed to have its own .c file and here comes the question. What should I do or where should I define the opaque struct so my functions can work with that? I have files like:

  7. Dec 31, 2021 · If more than one file needs access to the internals of the opaque type, then you can have a public header which declares the opaque type and a private header which defines the structure. Privileged code includes the private header; unprivileged code uses the facilities declared in the public header, which must provide whatever access general users need to the actual data in the opaque type.

  8. Sep 13, 2015 · EDIT: Based on additional research, I've opted to use void * pointers instead to provide an opaque interface to the library. This question is ok to close. Additionally, the linked question, although similar, is not the same as I was trying to define an opaque type in one header file, and then fill out the definition in a different header file because it is used in more than one file.

  9. Dec 29, 2015 · For most rendering method, you don't strictly have to separate the opaque from the transparent objects. If you think about it, transparency (or opacity) is a continuous quality. In OpenGL, the alpha component is typically used to define opacity. Opaque objects have an alpha value of 1.0, but this is just one value in a continuous spectrum.

  10. Opaque values are sequences of bytes. These are distinguished from Strings since they begin with the sequence "\FF". This, unescaped, is an illegal UTF-8 encoding, indicating that what follows is a sequence of bytes expressed in escape notation which constitute the binary value. For example, a '0' byte is encoded "\FF\00".

  11. Jul 28, 2014 · From what I can make out, this looks something typical of the C to C++ and vice-versa API mapping. Given that you can't change the C header file, the definition of Opaque is constrained and essentially can't be typed to any C++ constructs contained in C++ header file.