summaryrefslogtreecommitdiff
path: root/src/Fl_Private.H
blob: c4cfdcef524a8a76898979017cecebe4a1163351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//
// Private header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 2025 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file.  If this
// file is missing or damaged, see the license at:
//
//     https://www.fltk.org/COPYING.php
//
// Please see the following page on how to report bugs and issues:
//
//     https://www.fltk.org/bugs.php
//

/** \file src/Fl_Private.H
  \brief FLTK private global variables and functions.
*/

#ifndef Fl_Private_H
#define Fl_Private_H

#include <FL/fl_config.h> // build configuration
#include <FL/Fl.H>

/*
 FLTK private global variables and functions.
 All prefixed with Fl_Private_ instead of using namespace.
 */

FL_EXPORT extern int Fl_Private_use_high_res_GL_;
FL_EXPORT extern int Fl_Private_draw_GL_text_with_textures_;
FL_EXPORT extern int Fl_Private_box_shadow_width_;
FL_EXPORT extern int Fl_Private_box_border_radius_max_;
FL_EXPORT extern int Fl_Private_selection_to_clipboard_;

FL_EXPORT extern unsigned char Fl_Private_options_[Fl::OPTION_LAST];
FL_EXPORT extern unsigned char Fl_Private_options_read_;
FL_EXPORT extern int Fl_Private_program_should_quit_; // non-zero means the program was asked to cleanly terminate

/**
  The currently executing idle callback function: DO NOT USE THIS DIRECTLY!

  This is now used as part of a higher level system allowing multiple
  idle callback functions to be called.
  \see add_idle(), remove_idle()
*/
FL_EXPORT extern void (*Fl_Private_idle_)();

FL_EXPORT extern void Fl_Private_run_idle();
FL_EXPORT extern void Fl_Private_run_checks();

/**
  Sets an idle callback (internal use only).

  This method is now private and is used to store the idle callback.
  The old, public set_idle() method was deprecated since 1.3.x and
  is no longer available in FLTK 1.5.

  See documentation: use Fl::add_idle() instead.
*/
FL_EXPORT inline void Fl_Private_set_idle_(Fl_Old_Idle_Handler cb) { Fl_Private_idle_ = cb; }

#if FLTK_HAVE_CAIRO

FL_EXPORT extern cairo_t *Fl_Private_cairo_make_current(void *gc, int W, int H);
FL_EXPORT extern Fl_Cairo_State Fl_Private_cairo_state_;

#endif // FLTK_HAVE_CAIRO

#endif // !Fl_Private_H