FLTK 1.4.0
platform_types.h File Reference

Definitions of platform-dependent types. More...

Go to the source code of this file.

Macros

#define FL_COMMAND   opaque
 An alias for FL_CTRL on Windows and X11, or FL_META on MacOS X.
 
#define FL_CONTROL   opaque
 An alias for FL_META on Windows and X11, or FL_CTRL on MacOS X.
 

Typedefs

typedef opaque fl_intptr_t
 An integral type large enough to store a pointer or a long value. More...
 
typedef opaque Fl_Offscreen
 Platform-specific value representing an offscreen drawing buffer. More...
 
typedef struct opaque * Fl_Region
 Pointer to a platform-specific structure representing a collection of rectangles. More...
 
typedef opaque FL_SOCKET
 socket or file descriptor
 
typedef opaque Fl_Timestamp
 Platform-specific point in time, used for delta time calculation. More...
 
typedef opaque fl_uintptr_t
 An unsigned integral type large enough to store a pointer or an unsigned long value. More...
 
typedef struct opaque * GLContext
 Pointer to a platform-specific structure representing the window's OpenGL rendering context. More...
 

Detailed Description

Definitions of platform-dependent types.

The exact nature of these types varies with the platform. Therefore, portable FLTK applications should not assume these types have a specific size, or that they are pointers.

Typedef Documentation

◆ fl_intptr_t

typedef opaque fl_intptr_t

An integral type large enough to store a pointer or a long value.

A pointer value can be safely cast to fl_intptr_t, and later cast back to its initial pointer type without change to the pointer value. A variable of type fl_intptr_t can also store a long int value.

◆ Fl_Offscreen

typedef opaque Fl_Offscreen

Platform-specific value representing an offscreen drawing buffer.

Note
This value can be safely cast to these types on each platform:
  • X11: Pixmap
  • Wayland: cairo_t *
  • Windows: HBITMAP
  • macOS: CGContextRef

◆ Fl_Region

typedef struct opaque* Fl_Region

Pointer to a platform-specific structure representing a collection of rectangles.

Note
This pointer can be safely cast to these types on each platform:
  • X11: Region as defined by X11
  • Wayland: cairo_region_t *
  • Windows: HRGN
  • macOS: struct flCocoaRegion *

◆ Fl_Timestamp

typedef opaque Fl_Timestamp

Platform-specific point in time, used for delta time calculation.

Note
This type may be a struct. sizeof(Fl_Timestamp) may be different on different platforms. Fl_Timestamp may change with future ABI changes.

◆ fl_uintptr_t

typedef opaque fl_uintptr_t

An unsigned integral type large enough to store a pointer or an unsigned long value.

A pointer value can be safely cast to fl_uintptr_t, and later cast back to its initial pointer type without change to the pointer value. A variable of type fl_uintptr_t can also store an unsigned long int value.

◆ GLContext

typedef struct opaque* GLContext

Pointer to a platform-specific structure representing the window's OpenGL rendering context.

Note
This pointer can be safely cast to these types on each platform:
  • X11: GLXContext
  • Wayland: EGLContext
  • Windows: HGLRC
  • macOS: NSOpenGLContext *