24#define ROOT_TGWin32cxx
27#include "gdk/win32/gdkwin32.h"
36#include "gdk/gdkkeysyms.h"
68#define XDND_PROTOCOL_VERSION 5
70#define IDC_HAND MAKEINTRESOURCE(32649)
74#define MAKELONGLONG(lo, hi) ((LONGLONG)lo + ((LONGLONG)hi << 32))
76#define MAKELONGLONG(lo, hi) MAKELONG(lo, hi)
173GdkAtom gClipboardAtom = GDK_NONE;
198 GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK
199 | GDK_LEAVE_NOTIFY_MASK | GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK
200 | GDK_KEY_RELEASE_MASK;
202 GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_ENTER_NOTIFY_MASK |
203 GDK_LEAVE_NOTIFY_MASK;
209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
215static bool gdk_initialized =
false;
219struct MWMHintsProperty_t {
238struct KeySymbolMap_t {
243static const char *keyCodeToString[] = {
297static KeySymbolMap_t
gKeyMap[] = {
300#ifndef GDK_ISO_Left_Tab
354 int n =
event->fUser[1];
356 for (i = 0; i <
n; i++) {
357 buf[i] =
event->fUser[2 + i];
363 if (
event->fCode <= 0x20) {
364 strncpy(buf, keyCodeToString[
event->fCode], buflen - 1);
396 conv.i[0] = (
Int_t)i1;
397 conv.i[1] = (
Int_t)i2;
404static BOOL
CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam)
406 ::ShowWindow(hwndChild, SW_SHOWNORMAL);
409 ((GdkWindowPrivate *)
child)->mapped = TRUE;
415static void _ChangeProperty(HWND
w,
char *
np,
char *dp,
int n,
Atom_t type)
420 hMem = ::GetProp(
w,
np);
424 hMem = ::GlobalAlloc(GHND,
n +
sizeof(
Atom_t));
425 p = (
char *) ::GlobalLock(hMem);
428 ::GlobalUnlock(hMem);
429 ::SetProp(
w,
np, hMem);
445 if (
mode == GDK_PROP_MODE_REPLACE ||
mode == GDK_PROP_MODE_PREPEND) {
446 len = (
int) ::GlobalGetAtomName(
property, buffer,
sizeof(buffer));
447 if ((atomName = (
char *) malloc(
len + 1)) == NULL) {
450 strcpy(atomName, buffer);
452 sprintf(propName,
"#0x%0.4tx", (
ULongptr_t) atomName);
453 _ChangeProperty(
w, propName, (
char *)
data, nelements,
type);
463 Atom_t * actual_type_return,
469 char *
data, *destPtr;
474 w = (HWND) GDK_DRAWABLE_XID(
id);
476 if (::IsClipboardFormatAvailable(CF_TEXT) && ::OpenClipboard(NULL)) {
477 handle = ::GetClipboardData(CF_TEXT);
478 if (handle != NULL) {
479 data = (
char *) ::GlobalLock(handle);
481 *prop_return = (
UChar_t *) malloc(*nitems_return + 1);
482 destPtr = (
char *) *prop_return;
483 while (*
data !=
'\0') {
491 ::GlobalUnlock(handle);
493 *bytes_after_return = 0;
499 ::RemoveProp(
w, propName);
514 if (image->depth == 1) {
515 pixel = (((
char *) image->mem)[
y * image->bpl + (
x >> 3)] & (1 << (7 - (
x & 0x7)))) != 0;
518 switch (image->bpp) {
524 pixel = pixelp[0] | (pixelp[1] << 8);
527 pixel = pixelp[0] | (pixelp[1] << 8) | (pixelp[2] << 16);
530 pixel = pixelp[0] | (pixelp[1] << 8) | (pixelp[2] << 16);
542 static char bfr[500];
547 if (evmask & k##x##Mask) \
548 p += sprintf (p, "%s" #x, (p > bfr ? " " : ""))
566class TGWin32MainThread {
571 static LPCRITICAL_SECTION fCritSec;
572 static LPCRITICAL_SECTION fMessageMutex;
575 ~TGWin32MainThread();
576 static void LockMSG();
577 static void UnlockMSG();
580TGWin32MainThread *gMainThread = 0;
581LPCRITICAL_SECTION TGWin32MainThread::fCritSec = 0;
582LPCRITICAL_SECTION TGWin32MainThread::fMessageMutex = 0;
588TGWin32MainThread::~TGWin32MainThread()
591 ::LeaveCriticalSection(fCritSec);
592 ::DeleteCriticalSection(fCritSec);
598 ::LeaveCriticalSection(fMessageMutex);
599 ::DeleteCriticalSection(fMessageMutex);
600 delete fMessageMutex;
605 ::PostThreadMessage(fId, WM_QUIT, 0, 0);
606 ::CloseHandle(fHandle);
614void TGWin32MainThread::LockMSG()
616 if (fMessageMutex) ::EnterCriticalSection(fMessageMutex);
622void TGWin32MainThread::UnlockMSG()
624 if (fMessageMutex) ::LeaveCriticalSection(fMessageMutex);
631VOID
CALLBACK MyTimerProc(HWND hwnd, UINT message, UINT idTimer,
DWORD dwTime)
642Bool_t GUIThreadMessageFunc(MSG *msg)
645 static Int_t m_timer = 0;
647 if ( (msg->message == WM_NCLBUTTONDOWN) ) {
649 m_timer = SetTimer(NULL, 1, 20, (TIMERPROC) MyTimerProc);
651 else if (msg->message == WM_NCMOUSELEAVE ) {
653 KillTimer(NULL, m_timer);
672 TGWin32MainThread::LockMSG();
673 TranslateMessage(msg);
674 DispatchMessage(msg);
675 TGWin32MainThread::UnlockMSG();
682class TGWin32RefreshTimer :
public TTimer {
692 while (::PeekMessage(&msg, NULL, NULL, NULL, PM_NOREMOVE)) {
693 ::PeekMessage(&msg, NULL, NULL, NULL, PM_REMOVE);
697 GUIThreadMessageFunc(&msg);
706static DWORD WINAPI MessageProcessingLoop(void *p)
710 Bool_t endLoop = kFALSE;
711 TGWin32RefreshTimer *refersh = 0;
713 // force to create message queue
714 ::PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
716 // periodically we refresh windows
717 // Don't create refresh timer if the application has been created inside PVSS
719 TString arg = gSystem->BaseName(gApplication->Argv(0));
720 if (!arg.Contains("PVSS"))
721 refersh = new TGWin32RefreshTimer();
725 erret = ::GetMessage(&msg, NULL, NULL, NULL);
726 if (erret <= 0) endLoop = kTRUE;
727 endLoop = MessageProcessingFunc(&msg);
730 TGWin32::Instance()->CloseDisplay();
736 erret = ::GetLastError();
737 Error("MsgLoop", "Error in GetMessage");
749TGWin32MainThread::TGWin32MainThread()
751 fCritSec =
new CRITICAL_SECTION;
752 ::InitializeCriticalSection(fCritSec);
753 fMessageMutex =
new CRITICAL_SECTION;
754 ::InitializeCriticalSection(fMessageMutex);
798 if (!
gROOT->IsBatch() && !gMainThread) {
799 gMainThread =
new TGWin32MainThread();
829#ifdef OLD_THREAD_IMPLEMENTATION
851 TGWin32MainThread *delThread = gMainThread;
878 if (gMainThread && gMainThread->fCritSec) ::EnterCriticalSection(gMainThread->fCritSec);
886 if (gMainThread && gMainThread->fCritSec) ::LeaveCriticalSection(gMainThread->fCritSec);
894 if (!gdk_initialized) {
895 if (!gdk_init_check(NULL, NULL))
return kFALSE;
896 gdk_initialized =
true;
899 if (!gClipboardAtom) {
900 gClipboardAtom = gdk_atom_intern(
"CLIPBOARD",
kFALSE);
911 GdkPixmap *pixmp1, *pixmp2;
915 HWND hDesktop = ::GetDesktopWindow();
916 if (!IsWindow(hDesktop) || !IsWindowVisible(hDesktop))
919 if (!
Init((
void*)dpyName)) {
934 fVisual = gdk_visual_get_best();
936 fDepth = gdk_visual_get_best_depth();
946 gdk_color_black(
fColormap, &echov.foreground);
947 gdk_color_white(
fColormap, &echov.background);
948 echov.function = GDK_INVERT;
949 echov.subwindow_mode = GDK_CLIP_BY_CHILDREN;
951 gdk_gc_new_with_values((
GdkWindow *) GDK_ROOT_PARENT(), &echov,
952 (GdkGCValuesMask) (GDK_GC_FOREGROUND |
957 pixmp1 = gdk_bitmap_create_from_data(GDK_ROOT_PARENT(),
960 pixmp2 = gdk_bitmap_create_from_data(GDK_ROOT_PARENT(),
1013 if (gdk_visual_get_best_type() == GDK_VISUAL_TRUE_COLOR) {
1018 if ((
fVisual->blue_mask >> i) == 1) {
1027 if ((
fVisual->green_mask >> i) == 1) {
1036 if ((
fVisual->red_mask >> i) == 1) {
1044 SetTitle(
"ROOT interface to Win32 with TrueType fonts");
1089 GdkColorContext *cc = gdk_color_context_new(gdk_visual_get_system(),
cmap);
1090 gdk_color_context_query_colors(cc, color, ncolors);
1091 gdk_color_context_free(cc);
1093 for (
Int_t i = 0; i < ncolors; i++) {
1117template<
typename CharType>
1156 GdkImage *xim = gdk_image_new(GDK_IMAGE_SHARED, gdk_visual_get_best(),
w,
h);
1166 gdk_gc_get_values(ctxt->fGClist[
kGCtext], &gcvals);
1173 Error(
"DrawTTFglyphsW",
"error getting background image");
1181 for (
int yp = 0; yp < (
int) bim->height; yp++) {
1182 for (
int xp = 0; xp < (
int) bim->width; xp++) {
1195 pixel = gcvals.background.pixel;
1202 for (
int yp = 0; yp <
h; yp++) {
1203 for (
int xp = 0; xp <
w; xp++) {
1217 Int_t bx = 0, by = 0;
1231 std::vector<GdkColor> bcol(ndots);
1235 for (
UInt_t y = 0, dotcnt = 0;
y < rows;
y++)
1240 for (
auto &bc : bcol) {
1250 col[0].
pixel = back;
1255 col[4].
pixel = gcvals.foreground.pixel;
1262 for (
int x = 3;
x > 0;
x--) {
1267 Warning(
"DrawImage",
"cannot allocate smoothing color");
1275 for (
unsigned y = 0;
y < rows;
y++) {
1277 for (
unsigned x = 0;
x <
width;
x++) {
1278 UChar_t d = (((*s++ & 0xff) + 10) * 5) / 256;
1289 for (
unsigned y = 0;
y < rows;
y++) {
1293 for (
unsigned x = 0;
x <
width;
x++) {
1307 gdk_draw_image(ctxt->drawing, ctxt->fGClist[
kGCpxmp], xim, 0, 0,
x1,
y1,
w,
h);
1309 gdk_image_unref(xim);
1369 return gdk_image_get(ctxt->drawing,
x,
y,
w,
h);
1397 Error(
"SetTextFont",
"Direct set of TTF font no longer supported");
1431 if (!ctxt->ispixmap && !ctxt->double_buffer) {
1432 gdk_window_set_background(ctxt->drawing, (
GdkColor *) &
GetColor(0).color);
1433 gdk_window_clear(ctxt->drawing);
1438 0, 0, ctxt->width, ctxt->height);
1479 for (
int i = 0; i <
kMAXGC; i++)
1486 if (iter->second.get() ==
gCws) {
1493 Fatal(
"CloseWindow",
"Not found gCws in list of windows");
1497 if (iter->second && iter->second->open) {
1498 gCws = iter->second.get();
1567 int current_icol = -1;
1572 for (
int i = 0; i < nx; i++) {
1574 for (
int j = 0; j < ny; j++) {
1575 int icol = ic[i + (nx * j)];
1576 if (icol != current_icol) {
1578 current_icol = icol;
1609 std::vector<GdkPoint>
xy(
n);
1610 for (
int i = 0; i <
n; i++) {
1611 xy[i].x = xyt[i].
fX;
1612 xy[i].y = xyt[i].
fY;
1615 if (ctxt->fillHollow) {
1643 if (ctxt->lineStyle == GDK_LINE_SOLID) {
1646 gdk_gc_set_dashes(ctxt->fGClist[
kGCdash], ctxt->dashOffset, ctxt->dashList.data(), ctxt->dashList.size());
1669 if (!ctxt || (
n < 1))
1672 std::vector<GdkPoint>
xy(
n);
1673 for (
int i = 0; i <
n; i++) {
1674 xy[i].x = xyt[i].
fX;
1675 xy[i].y = xyt[i].
fY;
1679 if (ctxt->lineStyle == GDK_LINE_SOLID) {
1682 gdk_gc_set_dashes(ctxt->fGClist[
kGCdash], ctxt->dashOffset, ctxt->dashList.data(), ctxt->dashList.size());
1686 for (
int i = 1; i <
n; i++) {
1687 int dx =
xy[i].x -
xy[i - 1].x;
1688 int dy =
xy[i].y -
xy[i - 1].y;
1690 if (dx < 0) dx = -dx;
1691 if (dy < 0) dy = -dy;
1692 ctxt->dashOffset += dx > dy ? dx : dy;
1694 ctxt->dashOffset %= ctxt->dashLength;
1698 ctxt->fGClist[ctxt->lineStyle == GDK_LINE_SOLID ?
kGCline :
kGCdash],
1710 for(
Int_t i = 0; i < 2*
n; i += 2)
1736 std::vector<GdkPoint>
xy(
n);
1737 for (
int i = 0; i <
n; i++) {
1738 xy[i].x = xyt[i].
fX;
1739 xy[i].y = xyt[i].
fY;
1745 int r = ctxt->markerSize / 2;
1746 auto &shape0 = ctxt->markerShape;
1747 std::vector<GdkPoint> shape(shape0.size());
1749 for (
int m = 0;
m <
n;
m++) {
1750 for (
size_t i = 0; i < shape.size(); i++) {
1751 shape[i].x = xyt[
m].
fX + shape0[i].fX;
1752 shape[i].y = xyt[
m].
fY + shape0[i].fY;
1754 switch(ctxt->markerType) {
1761 ctxt->markerSize, ctxt->markerSize, 0, 23040);
1766 ctxt->markerSize, ctxt->markerSize, 0, 23040);
1777 for (std::size_t i = 0; i < shape.size(); i += 2)
1778 gdk_draw_line(ctxt->drawing, ctxt->fGClist[
kGCmark],
1779 shape[i].x, shape[i].y, shape[i+1].x, shape[i+1].y);
1783 for (std::size_t t = 0; t < shape.size(); t += 3)
1827 if (which >=
kMAXGC || which < 0) {
1828 Error(
"GetGC",
"trying to get illegal GdkGC (which = %d)", which);
1833 Error(
"GetGC",
"No current window selected");
1870 w = gdk_screen_width();
1871 h = gdk_screen_height();
1906 nplanes = gdk_visual_get_best_depth();
1916 }
else if (
index == 1) {
1975 if (
x == 0 &&
y == 0) {
1989 if (pair.first > maxid)
1993 if (
fWindows.size() == (size_t) maxid) {
1997 for (
int id = 1;
id < maxid;
id++) {
2004 fWindows.emplace(maxid, std::make_unique<XWindow_t>());
2009 ctxt->drawing =
nullptr;
2010 ctxt->window =
nullptr;
2011 ctxt->buffer =
nullptr;
2016 for (
int i = 0; i <
kMAXGC; i++) {
2017 ctxt->fGClist[i] = gdk_gc_new(GDK_ROOT_PARENT());
2018 gdk_gc_set_foreground(ctxt->fGClist[i], &
GetColor(1).color);
2019 gdk_gc_set_background(ctxt->fGClist[i], &
GetColor(0).color);
2042 depth = gdk_visual_get_best_depth();
2043 gCws->
window = (GdkPixmap *) gdk_pixmap_new(GDK_ROOT_PARENT(),wval,hval,depth);
2046 for (
int i = 0; i <
kMAXGC; i++)
2071 unsigned long attr_mask = 0;
2073 int wval, hval, depth;
2082 gdk_window_get_geometry(wind, &xval, &yval, &wval, &hval, &depth);
2085 attributes.wclass = GDK_INPUT_OUTPUT;
2086 attributes.event_mask = 0L;
2087 attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK |
2088 GDK_PROPERTY_CHANGE_MASK;
2091 attributes.x = xval;
2093 attributes.x = -1.0 * xval;
2097 attributes.y = yval;
2099 attributes.y = -1.0 * yval;
2101 attributes.width = wval;
2102 attributes.height = hval;
2103 attributes.colormap = gdk_colormap_get_system();
2104 attributes.visual = gdk_window_get_visual(wind);
2105 attributes.override_redirect = TRUE;
2107 if ((attributes.y > 0) && (attributes.x > 0)) {
2108 attr_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_COLORMAP |
2109 GDK_WA_WMCLASS | GDK_WA_NOREDIR;
2111 attr_mask = GDK_WA_COLORMAP | GDK_WA_WMCLASS | GDK_WA_NOREDIR;
2114 if (attributes.visual != NULL) {
2115 attr_mask |= GDK_WA_VISUAL;
2117 attributes.window_type = GDK_WINDOW_CHILD;
2118 gCws->
window = gdk_window_new(wind, &attributes, attr_mask);
2120 ::ShowWindow(window, SW_SHOWNORMAL);
2121 ::ShowWindow(window, SW_RESTORE);
2122 ::BringWindowToTop(window);
2125 ::SetClassLongPtr(window, GCLP_HCURSOR,
2162 gdk_pixmap_unref((GdkPixmap *)
pix);
2193 static int xloc = 0;
2194 static int yloc = 0;
2195 static int xlocp = 0;
2196 static int ylocp = 0;
2213 cursor = gdk_cursor_new((GdkCursorType)GDK_CROSSHAIR);
2224 while (button_press == 0) {
2225 event = gdk_event_get();
2238 radius = (
int)
TMath::Sqrt((
double)((xloc - xlocp) * (xloc - xlocp) +
2239 (yloc - ylocp) * (yloc - ylocp)));
2242 xlocp - radius, ylocp - radius,
2243 2 * radius, 2 * radius, 0, 23040);
2260 xloc =
event->button.x;
2261 yloc =
event->button.y;
2263 switch (
event->type) {
2265 case GDK_LEAVE_NOTIFY:
2268 event = gdk_event_get();
2270 if (
event->type == GDK_ENTER_NOTIFY) {
2271 gdk_event_free(
event);
2274 gdk_event_free(
event);
2281 case GDK_BUTTON_PRESS:
2282 button_press =
event->button.button;
2283 xlocp =
event->button.x;
2284 ylocp =
event->button.y;
2285 gdk_cursor_unref(
cursor);
2289 case GDK_BUTTON_RELEASE:
2291 button_press = 10 +
event->button.button;
2292 xlocp =
event->button.x;
2293 ylocp =
event->button.y;
2299 button_press =
event->key.keyval;
2300 xlocp =
event->button.x;
2301 ylocp =
event->button.y;
2305 case GDK_KEY_RELEASE:
2307 button_press = -1 * (
int)(
event->key.keyval);
2308 xlocp =
event->button.x;
2309 ylocp =
event->button.y;
2317 xtmp =
event->button.x;
2318 ytmp =
event->button.y;
2320 gdk_event_free(
event);
2323 if (button_press == 0) {
2334 return button_press;
2355 size_t len_text = strlen(
text);
2365 cursor = gdk_cursor_new((GdkCursorType)GDK_QUESTION_ARROW);
2368 gdk_window_set_cursor(CurWnd,
cursor);
2370 for (nt = len_text; nt > 0 &&
text[nt - 1] ==
' '; nt--);
2373 focuswindow = ::SetFocus((HWND)GDK_DRAWABLE_XID(CurWnd));
2389 event = gdk_event_get();
2392 ::SleepEx(10,
kTRUE);
2403 char *stmp =
new char[
pt+1];
2411 if (
pt < len_text) {
2419 if (
event != NULL) {
2420 switch (
event->type) {
2421 case GDK_BUTTON_PRESS:
2422 case GDK_ENTER_NOTIFY:
2423 focuswindow = ::SetFocus((HWND)GDK_DRAWABLE_XID(CurWnd));
2426 case GDK_LEAVE_NOTIFY:
2427 ::SetFocus(focuswindow);
2430 nbytes =
event->key.length;
2431 for (i = 0; i < nbytes; i++) {
2432 keybuf[i] =
event->key.string[i];
2434 keysym =
event->key.keyval;
2470 if (isascii(keybuf[0]) && isprint(keybuf[0])) {
2472 if (nt < len_text) {
2475 for (i = nt - 1; i >
pt; i--) {
2478 if (
pt < len_text) {
2483 switch (keybuf[0]) {
2490 for (i =
pt; i < nt; i++) {
2511 for (i =
pt; i < nt; i++) {
2531 for (i =
pt; i < nt; i++)
2561 gdk_event_free(
event);
2565 ::SetFocus(focuswindow);
2570 gdk_cursor_unref(
cursor);
2601 gTws->
buffer = gdk_pixmap_new(GDK_ROOT_PARENT(),
2602 w,
h, gdk_visual_get_best_depth());
2604 for (
int i = 0; i <
kMAXGC; i++)
2605 gdk_gc_set_clip_mask(
gTws->
fGClist[i], (GdkBitmap *)None);
2645 depth = gdk_visual_get_best_depth();
2646 gTws->
window = gdk_pixmap_new(GDK_ROOT_PARENT(), wval, hval, depth);
2649 gdk_drawable_get_size(
gTws->
window, &ww, &hh);
2651 for (
int i = 0; i <
kMAXGC; i++)
2672 int xval = 0, yval = 0, wval = 0, hval = 0, depth = 0;
2677 gdk_window_get_geometry(
win, &xval, &yval,
2678 &wval, &hval, &depth);
2690 depth = gdk_visual_get_best_depth();
2691 gTws->
buffer = (GdkPixmap *) gdk_pixmap_new(GDK_ROOT_PARENT(),
2695 for (
int i = 0; i <
kMAXGC; i++)
2729 for (
int i = 0; i <
kMAXGC; i++)
2732 for (
int i = 0; i <
kMAXGC; i++)
2758 180.) / 3.14159) - 90;
2776 for (
int i = 0; i <
kMAXGC; i++)
2805 for (
int i = 0; i <
kMAXGC; i++)
2830 if (ci <= 0) ci = 10;
2839 }
else if (!
fColormap && (ci < 0 || ci > 1)) {
2844 gdk_gc_get_values(
gc, &gcvals);
2847 color.
red = GetRValue(color.
pixel);
2850 gdk_gc_set_foreground(
gc, &color);
2853 gdk_gc_set_foreground(
gc, &col.
color);
2856 gdk_gc_get_values(
gc, &gcvals);
2858 if (gcvals.foreground.pixel != gcvals.background.pixel) {
2859 gdk_gc_set_background(
gc, &
GetColor(!ci).color);
2903 gTws = pair.second.get();
2950 gTws->
buffer = gdk_pixmap_new(GDK_ROOT_PARENT(),
2952 gdk_visual_get_best_depth());
2958 for (
int i = 0; i <
kMAXGC; i++)
2959 gdk_gc_set_clip_mask(
gTws->
fGClist[i], (GdkBitmap *)None);
3042 ctxt->fAttFill.SetFillColor(
cindex);
3049 ctxt->fillHollow = 0;
3050 gdk_gc_set_fill(ctxt->fGClist[
kGCfill], GDK_SOLID);
3054 ctxt->fillHollow = 1;
3058 ctxt->fillHollow = 0;
3059 gdk_gc_set_fill(ctxt->fGClist[
kGCfill], GDK_STIPPLED);
3061 if (fasi != ctxt->fillFasi) {
3062 if (ctxt->fillPattern) {
3063 gdk_pixmap_unref(ctxt->fillPattern);
3064 ctxt->fillPattern =
nullptr;
3066 int stn = (fasi >= 1 && fasi <=25) ? fasi : 2;
3068 for (
int i = 0; i < 32; ++i)
3070 ctxt->fillPattern = gdk_bitmap_create_from_data(GDK_ROOT_PARENT(),
3071 (
const char *)&pattern, 16, 16);
3072 gdk_gc_set_stipple(ctxt->fGClist[
kGCfill], ctxt->fillPattern);
3073 ctxt->fillFasi = fasi;
3078 ctxt->fillHollow = 1;
3089 EnableWindow((HWND) GDK_DRAWABLE_XID(
gCws->
window), inp);
3119 Warning(
"SetLineType",
"DEPRECATED, use SetAttLine() instead");
3181 if (ctxt->fAttLine.GetLineStyle() != att.
GetLineStyle()) {
3183 ctxt->dashList.clear();
3185 ctxt->dashList = { 3, 3 };
3187 ctxt->dashList = { 1, 2 };
3189 ctxt->dashList = { 3, 4, 1, 4} ;
3193 Int_t nt = tokens->GetEntries();
3194 ctxt->dashList.resize(nt);
3195 for (
Int_t j = 0; j < nt; ++j) {
3197 sscanf(tokens->At(j)->GetName(),
"%d", &it);
3198 ctxt->dashList[j] = (
Int_t) (it/4);
3202 ctxt->dashLength = 0;
3203 for (
auto elem : ctxt->dashList)
3204 ctxt->dashLength += elem;
3205 ctxt->dashOffset = 0;
3206 ctxt->lineStyle = ctxt->dashList.size() == 0 ? GDK_LINE_SOLID : GDK_LINE_ON_OFF_DASH;
3210 if (ctxt->lineWidth == 1 && ctxt->lineStyle == GDK_LINE_SOLID)
3211 ctxt->lineWidth = 0;
3213 if (ctxt->lineStyle == GDK_LINE_SOLID) {
3214 gdk_gc_set_line_attributes(ctxt->fGClist[
kGCline], ctxt->lineWidth,
3219 gdk_gc_set_line_attributes(ctxt->fGClist[
kGCdash], ctxt->lineWidth,
3225 ctxt->fAttLine = att;
3291 ctxt->fAttMarker = att;
3301 gdk_gc_set_line_attributes(ctxt->fGClist[
kGCmark], ctxt->markerLineWidth, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER);
3303 gdk_gc_set_line_attributes(ctxt->fGClist[
kGCmark], ctxt->markerLineWidth,
3322 gdk_gc_get_values(ctxt->fGClist[
kGCtext], &values);
3323 gdk_gc_set_foreground(ctxt->fGClist[
kGCinvt], &values.background);
3324 gdk_gc_set_background(ctxt->fGClist[
kGCinvt], &values.foreground);
3327 ctxt->fAttText = att;
3443 if (ctxt && ctxt->double_buffer) {
3444 gdk_window_copy_area(ctxt->window, ctxt->fGClist[
kGCpxmp], 0, 0,
3445 ctxt->drawing, 0, 0, ctxt->width, ctxt->height);
3459 Int_t depth = gdk_visual_get_best_depth();
3461 if ((depth <= 8) || (
percent <= 0))
return;
3468 ctxt->width, ctxt->height);
3472 std::vector<ULong_t> orgcolors;
3475 for (
UInt_t y = 0;
y < ctxt->height;
y++) {
3476 for (
UInt_t x = 0;
x < ctxt->width;
x++) {
3478 if (std::find(orgcolors.begin(), orgcolors.end(),
pixel) == orgcolors.end())
3479 orgcolors.emplace_back(
pixel);
3482 if (orgcolors.empty()) {
3483 gdk_image_unref(image);
3487 if (!ctxt->new_colors.empty()) {
3488 gdk_colors_free((
GdkColormap *)
fColormap, ctxt->new_colors.data(), ctxt->new_colors.size(), 0);
3489 ctxt->new_colors.clear();
3492 std::vector<GdkColor> xcol(orgcolors.size());
3494 for (std::size_t i = 0; i < orgcolors.size(); i++) {
3495 xcol[i].pixel = orgcolors[i];
3496 xcol[i].red = xcol[i].green = xcol[i].blue = 0;
3499 GdkColorContext *cc = gdk_color_context_new(gdk_visual_get_system(), (
GdkColormap *)
fColormap);
3500 gdk_color_context_query_colors(cc, xcol.data(), orgcolors.size());
3501 gdk_color_context_free(cc);
3506 for (std::size_t i = 0; i < orgcolors.size(); i++) {
3515 "failed to allocate color %hd, %hd, %hd", xcol[i].red,
3516 xcol[i].green, xcol[i].blue);
3521 ctxt->new_colors.resize(orgcolors.size());
3523 for (std::size_t i = 0; i < orgcolors.size(); i++)
3524 ctxt->new_colors[i] = xcol[i].pixel;
3527 for (
UInt_t y = 0;
y < ctxt->height;
y++) {
3528 for (
UInt_t x = 0;
x < ctxt->width;
x++) {
3530 auto iter = std::find(orgcolors.begin(), orgcolors.end(),
pixel);
3531 if (iter != orgcolors.end()) {
3532 auto idx = iter - orgcolors.begin();
3539 gdk_draw_image(ctxt->drawing, ctxt->fGClist[
kGCpxmp], (
GdkImage *)image,
3540 0, 0, 0, 0, ctxt->width, ctxt->height);
3544 gdk_image_unref(image);
3582 tmp.x = ix > 0 ? ix : cpt.x;
3583 tmp.y = iy > 0 ? iy : cpt.y;
3584 ClientToScreen(dw, &tmp);
3585 SetCursorPos(tmp.x, tmp.y);
3621 buf[
x] = (
unsigned char) idx;
3650 ctxt->width, ctxt->height);
3652 Error(
"WriteGIFW",
"Cannot create image for writing GIF. Try in batch mode.");
3666 for (
UInt_t x = 0;
x < ctxt->width;
x++) {
3667 for (
UInt_t y = 0;
y < ctxt->height;
y++) {
3676 if (ncolors > 256) {
3677 Error(
"WriteGIFW",
"can not create GIF of image containing more than 256 colors");
3678 gdk_image_unref(image);
3683 std::vector<GdkColor> xcol(ncolors);
3685 for (std::size_t i = 0; i < ncolors; i++) {
3687 xcol[i].red = GetRValue(xcol[i].
pixel);
3688 xcol[i].green = GetGValue(xcol[i].
pixel);
3689 xcol[i].blue = GetBValue(xcol[i].
pixel);
3692 GdkColorContext *cc = gdk_color_context_new(gdk_visual_get_system(), (
GdkColormap *)
fColormap);
3693 gdk_color_context_query_colors(cc, xcol.data(), ncolors);
3694 gdk_color_context_free(cc);
3697 for (std::size_t i = 0; i < ncolors; i++) {
3705 std::vector<unsigned char>
r(ncolors),
b(ncolors),
g(ncolors);
3707 for (std::size_t i = 0; i < ncolors; i++) {
3708 r[i] = (
unsigned char) (xcol[i].red * 255 / maxcol);
3709 g[i] = (
unsigned char) (xcol[i].green * 255 / maxcol);
3710 b[i] = (
unsigned char) (xcol[i].blue * 255 / maxcol);
3715 if (gif.OpenFile(
name,
"wb")) {
3716 auto len = gif.GIFencode(ctxt->width, ctxt->height, ncolors,
r.data(),
g.data(),
b.data());
3721 Error(
"WriteGIFW",
"cannot write file: %s",
name);
3723 gdk_image_unref(image);
3735 const int MAX_SEGMENT = 20;
3737 unsigned char *jimg, *jbase, icol;
3739 GdkSegment lines[256][MAX_SEGMENT];
3745 lineGC = gdk_gc_new(GDK_ROOT_PARENT());
3751 for (i = 0; i < 256; i++) nlines[i] = 0;
3757 jbase = image + (
ymin - 1) * nx +
xmin;
3762 for (jimg = jbase, icol = *jimg++,
x =
x1 + 1;
x <=
x2; jimg++,
x++) {
3763 if (icol != *jimg) {
3764 if (icol != itran) {
3766 lines[icol][
n].x1 = xcur;
3767 lines[icol][
n].y1 =
y;
3768 lines[icol][
n].x2 =
x - 1;
3769 lines[icol][
n].y2 =
y;
3770 if (nlines[icol] == MAX_SEGMENT) {
3773 (GdkSegment *) &lines[icol][0], MAX_SEGMENT);
3781 if (icol != itran) {
3783 lines[icol][
n].x1 = xcur;
3784 lines[icol][
n].y1 =
y;
3785 lines[icol][
n].x2 =
x - 1;
3786 lines[icol][
n].y2 =
y;
3787 if (nlines[icol] == MAX_SEGMENT) {
3790 (GdkSegment *)&lines[icol][0], MAX_SEGMENT);
3796 for (i = 0; i < 256; i++) {
3797 if (nlines[i] != 0) {
3800 (GdkSegment *)&lines[icol][0], nlines[i]);
3805 gdk_gc_unref(lineGC);
3816 unsigned char *GIFarr, *PIXarr,
R[256], G[256], B[256], *j1, *j2, icol;
3821 FILE *fd = fopen(file,
"r+b");
3823 Error(
"ReadGIF",
"unable to open GIF file");
3828 filesize =
Seek_t(ftell(fd));
3831 if (!(GIFarr = (
unsigned char *) calloc(filesize + 256, 1))) {
3833 Error(
"ReadGIF",
"unable to allocate array for gif");
3837 if (fread(GIFarr, filesize, 1, fd) != 1) {
3839 Error(
"ReadGIF",
"GIF file read failed");
3845 irep = TGifDecode::GIFinfo(GIFarr, &
width, &
height, &ncolor);
3850 if (!(PIXarr = (
unsigned char *) calloc((
width *
height), 1))) {
3851 Error(
"ReadGIF",
"unable to allocate array for image");
3857 irep = gif.GIFdecode(GIFarr, PIXarr, &
width, &
height, &ncolor,
R, G, B);
3865 for (i = 0; i < ncolor; i++) {
3875 for (i = 1; i <=
height / 2; i++) {
3876 j1 = PIXarr + (i - 1) *
width;
3878 for (k = 0; k <
width; k++) {
3887 PutImage(
offset, -1, x0, y0,
width,
height, 0, 0,
width-1,
height-1, PIXarr, pic);
3905 if ((GDK_DRAWABLE_TYPE((
GdkWindow *)
id) != GDK_WINDOW_TEMP) &&
3907 HWND window = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id);
3908 ::SetForegroundWindow(window);
3919 EnumChildWindows((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id),
3920 EnumChildProc, (LPARAM) NULL);
3930 HWND hwnd = ::GetForegroundWindow();
3931 HWND window = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id);
3933 if (GDK_DRAWABLE_TYPE((
GdkWindow *)
id) != GDK_WINDOW_TEMP) {
3934 ::BringWindowToTop(window);
3935 if (GDK_DRAWABLE_TYPE((
GdkWindow *)
id) != GDK_WINDOW_CHILD)
3936 ::SetForegroundWindow(window);
3942 HWND fore = ::GetForegroundWindow();
3943 ::GetWindowRect(fore, &r2);
3944 if (!::IntersectRect(&r3, &r2, &r1)) {
3990 HWND window = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id);
3991 if (GDK_DRAWABLE_TYPE((
GdkWindow *)
id) == GDK_WINDOW_TEMP) {
3992 ::SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0,
3993 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
3996 ::BringWindowToTop(window);
3997 if (GDK_DRAWABLE_TYPE((
GdkWindow *)
id) != GDK_WINDOW_CHILD)
3998 ::SetForegroundWindow(window);
4009 HWND window = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id);
4010 ::SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0,
4011 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
4022 if (
x == 0 &&
y == 0) {
4037 if (
x == 0 &&
y == 0) {
4087 back.
red = GetRValue(color);
4088 back.
green = GetGValue(color);
4089 back.
blue = GetBValue(color);
4091 gdk_window_set_background((
GdkWindow *)
id, &back);
4101 gdk_window_set_back_pixmap((
GdkWindow *)
id, (GdkPixmap *)
pxm, 0);
4120 xattr.window_type = GDK_WINDOW_CHILD;
4122 xattr.window_type = GDK_WINDOW_TOPLEVEL;
4125 xattr.window_type = GDK_WINDOW_DIALOG;
4128 xattr.window_type = GDK_WINDOW_TEMP;
4130 newWin = gdk_window_new((
GdkWindow *) parent, &xattr, xmask);
4134 xattr.wclass = GDK_INPUT_OUTPUT;
4135 xattr.event_mask = 0L;
4136 xattr.event_mask |= GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK |
4137 GDK_PROPERTY_CHANGE_MASK;
4149 xattr.colormap = gdk_colormap_get_system();
4150 xattr.cursor = NULL;
4151 xattr.override_redirect = TRUE;
4152 if ((xattr.y > 0) && (xattr.x > 0)) {
4153 xmask = GDK_WA_X | GDK_WA_Y | GDK_WA_COLORMAP |
4154 GDK_WA_WMCLASS | GDK_WA_NOREDIR;
4156 xmask = GDK_WA_COLORMAP | GDK_WA_WMCLASS | GDK_WA_NOREDIR;
4158 if (visual != NULL) {
4160 xmask |= GDK_WA_VISUAL;
4162 xattr.visual = gdk_visual_get_system();
4163 xmask |= GDK_WA_VISUAL;
4165 xattr.window_type = GDK_WINDOW_CHILD;
4167 xattr.window_type = GDK_WINDOW_TOPLEVEL;
4170 xattr.window_type = GDK_WINDOW_DIALOG;
4173 xattr.window_type = GDK_WINDOW_TEMP;
4175 newWin = gdk_window_new((
GdkWindow *) parent, &xattr, xmask);
4176 gdk_window_set_events(newWin, (GdkEventMask) 0L);
4179 gdk_window_set_decorations(newWin,
4180 (GdkWMDecoration) GDK_DECOR_BORDER);
4185 gdk_window_set_back_pixmap(newWin, (GdkPixmap *) GDK_NONE, 0);
4187 gdk_window_set_back_pixmap(newWin, (GdkPixmap *) GDK_NONE, 1);
4189 gdk_window_set_back_pixmap(newWin,
4190 (GdkPixmap *)
attr->
4191 fBackgroundPixmap, 0);
4195 background_color.
pixel =
attr->fBackgroundPixel;
4196 background_color.
red = GetRValue(
attr->fBackgroundPixel);
4197 background_color.
green = GetGValue(
attr->fBackgroundPixel);
4198 background_color.
blue = GetBValue(
attr->fBackgroundPixel);
4199 gdk_window_set_background(newWin, &background_color);
4203 ::SetClassLongPtr((HWND)GDK_DRAWABLE_XID(newWin), GCLP_HCURSOR,
4217 lxemask |= GDK_KEY_PRESS_MASK;
4220 lxemask |= GDK_KEY_RELEASE_MASK;
4223 lxemask |= GDK_BUTTON_PRESS_MASK;
4226 lxemask |= GDK_BUTTON_RELEASE_MASK;
4229 lxemask |= GDK_POINTER_MOTION_MASK;
4232 lxemask |= GDK_BUTTON_MOTION_MASK;
4235 lxemask |= GDK_EXPOSURE_MASK;
4238 lxemask |= GDK_STRUCTURE_MASK;
4241 lxemask |= GDK_ENTER_NOTIFY_MASK;
4244 lxemask |= GDK_LEAVE_NOTIFY_MASK;
4247 lxemask |= GDK_FOCUS_CHANGE_MASK;
4249 xemask = (
UInt_t) lxemask;
4252 if ((xemask & GDK_KEY_PRESS_MASK)) {
4255 if ((xemask & GDK_KEY_RELEASE_MASK)) {
4258 if ((xemask & GDK_BUTTON_PRESS_MASK)) {
4261 if ((xemask & GDK_BUTTON_RELEASE_MASK)) {
4264 if ((xemask & GDK_POINTER_MOTION_MASK)) {
4267 if ((xemask & GDK_BUTTON_MOTION_MASK)) {
4270 if ((xemask & GDK_EXPOSURE_MASK)) {
4273 if ((xemask & GDK_STRUCTURE_MASK)) {
4276 if ((xemask & GDK_ENTER_NOTIFY_MASK)) {
4279 if ((xemask & GDK_LEAVE_NOTIFY_MASK)) {
4282 if ((xemask & GDK_FOCUS_CHANGE_MASK)) {
4299 xmask |= GDK_WA_NOREDIR;
4300 xattr.override_redirect =
attr->fOverrideRedirect;
4305 xattr.event_mask = xmsk;
4308 xmask |= GDK_WA_COLORMAP;
4312 xmask |= GDK_WA_CURSOR;
4317 xattr.wclass = GDK_INPUT_OUTPUT;
4333 xmask |= GDK_GC_FUNCTION;
4334 switch (
gval.fFunction) {
4336 xgval.function = GDK_CLEAR;
4339 xgval.function = GDK_AND;
4342 xgval.function = GDK_AND_REVERSE;
4345 xgval.function = GDK_COPY;
4348 xgval.function = GDK_AND_INVERT;
4351 xgval.function = GDK_NOOP;
4354 xgval.function = GDK_XOR;
4357 xgval.function = GDK_OR;
4360 xgval.function = GDK_EQUIV;
4363 xgval.function = GDK_INVERT;
4366 xgval.function = GDK_OR_REVERSE;
4369 xgval.function = GDK_COPY_INVERT;
4372 xgval.function = GDK_OR_INVERT;
4375 xgval.function = GDK_NAND;
4378 xgval.function = GDK_SET;
4383 xmask |= GDK_GC_SUBWINDOW;
4385 xgval.subwindow_mode = GDK_INCLUDE_INFERIORS;
4387 xgval.subwindow_mode = GDK_CLIP_BY_CHILDREN;
4391 xmask |= GDK_GC_FOREGROUND;
4392 xgval.foreground.pixel =
gval.fForeground;
4393 xgval.foreground.red = GetRValue(
gval.fForeground);
4394 xgval.foreground.green = GetGValue(
gval.fForeground);
4395 xgval.foreground.blue = GetBValue(
gval.fForeground);
4398 xmask |= GDK_GC_BACKGROUND;
4399 xgval.background.pixel =
gval.fBackground;
4400 xgval.background.red = GetRValue(
gval.fBackground);
4401 xgval.background.green = GetGValue(
gval.fBackground);
4402 xgval.background.blue = GetBValue(
gval.fBackground);
4405 xmask |= GDK_GC_LINE_WIDTH;
4406 xgval.line_width =
gval.fLineWidth;
4409 xmask |= GDK_GC_LINE_STYLE;
4410 xgval.line_style = (GdkLineStyle)
gval.fLineStyle;
4413 xmask |= GDK_GC_CAP_STYLE;
4414 xgval.cap_style = (GdkCapStyle)
gval.fCapStyle;
4417 xmask |= GDK_GC_JOIN_STYLE;
4418 xgval.join_style = (GdkJoinStyle)
gval.fJoinStyle;
4421 xmask |= GDK_GC_FILL;
4422 xgval.fill = (GdkFill)
gval.fFillStyle;
4425 xmask |= GDK_GC_TILE;
4426 xgval.tile = (GdkPixmap *)
gval.fTile;
4429 xmask |= GDK_GC_STIPPLE;
4430 xgval.stipple = (GdkPixmap *)
gval.fStipple;
4433 xmask |= GDK_GC_TS_X_ORIGIN;
4434 xgval.ts_x_origin =
gval.fTsXOrigin;
4437 xmask |= GDK_GC_TS_Y_ORIGIN;
4438 xgval.ts_y_origin =
gval.fTsYOrigin;
4441 xmask |= GDK_GC_FONT;
4442 xgval.font = (GdkFont *)
gval.fFont;
4445 xmask |= GDK_GC_EXPOSURES;
4446 xgval.graphics_exposures =
gval.fGraphicsExposures;
4449 xmask |= GDK_GC_CLIP_X_ORIGIN;
4450 xgval.clip_x_origin =
gval.fClipXOrigin;
4453 xmask |= GDK_GC_CLIP_Y_ORIGIN;
4454 xgval.clip_y_origin =
gval.fClipYOrigin;
4457 xmask |= GDK_GC_CLIP_MASK;
4458 xgval.clip_mask = (GdkPixmap *)
gval.fClipMask;
4464 if ((xmask & GDK_GC_FUNCTION)) {
4467 switch (xgval.function) {
4474 case GDK_AND_REVERSE:
4480 case GDK_AND_INVERT:
4498 case GDK_OR_REVERSE:
4501 case GDK_COPY_INVERT:
4515 if (xmask & GDK_GC_SUBWINDOW) {
4517 if (xgval.subwindow_mode == GDK_INCLUDE_INFERIORS)
4522 if ((xmask & GDK_GC_FOREGROUND)) {
4524 gval.fForeground = xgval.foreground.pixel;
4526 if ((xmask & GDK_GC_BACKGROUND)) {
4528 gval.fBackground = xgval.background.pixel;
4530 if ((xmask & GDK_GC_LINE_WIDTH)) {
4532 gval.fLineWidth = xgval.line_width;
4534 if ((xmask & GDK_GC_LINE_STYLE)) {
4536 gval.fLineStyle = xgval.line_style;
4538 if ((xmask & GDK_GC_CAP_STYLE)) {
4540 gval.fCapStyle = xgval.cap_style;
4542 if ((xmask & GDK_GC_JOIN_STYLE)) {
4544 gval.fJoinStyle = xgval.join_style;
4546 if ((xmask & GDK_GC_FILL)) {
4548 gval.fFillStyle = xgval.fill;
4550 if ((xmask & GDK_GC_TILE)) {
4554 if ((xmask & GDK_GC_STIPPLE)) {
4558 if ((xmask & GDK_GC_TS_X_ORIGIN)) {
4560 gval.fTsXOrigin = xgval.ts_x_origin;
4562 if ((xmask & GDK_GC_TS_Y_ORIGIN)) {
4564 gval.fTsYOrigin = xgval.ts_y_origin;
4566 if ((xmask & GDK_GC_FONT)) {
4570 if ((xmask & GDK_GC_EXPOSURES)) {
4572 gval.fGraphicsExposures = (
Bool_t) xgval.graphics_exposures;
4574 if ((xmask & GDK_GC_CLIP_X_ORIGIN)) {
4576 gval.fClipXOrigin = xgval.clip_x_origin;
4578 if ((xmask & GDK_GC_CLIP_Y_ORIGIN)) {
4580 gval.fClipYOrigin = xgval.clip_y_origin;
4582 if ((xmask & GDK_GC_CLIP_MASK)) {
4597 RECT rcClient, rcWind;
4598 ::GetClientRect((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id), &rcClient);
4599 ::GetWindowRect((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id), &rcWind);
4603 attr.
fX = ((rcWind.right - rcWind.left) - rcClient.right) / 2;
4604 attr.
fY = ((rcWind.bottom - rcWind.top) - rcClient.bottom) -
attr.
fX;
4608 attr.fBorderWidth = 0;
4616 if (!gdk_window_is_visible((
GdkWindow *)
id)) {
4618 }
else if (!gdk_window_is_viewable((
GdkWindow *)
id)) {
4644 return gdk_visual_get_best_depth();
4654 GdkAtom
a = gdk_atom_intern((
const gchar *)
atom_name, only_if_exist);
4656 if (
a == None)
return kNone;
4666 return (
Window_t) GDK_ROOT_PARENT();
4686 char family[100], weight[32], slant[32],
fontname[256];
4689 numfields = sscanf(font_name,
"%s -%d%n", family, &
pixel, &n1);
4690 if (numfields == 2) {
4691 sprintf(weight,
"medium");
4692 if (strstr(font_name,
"bold"))
4693 sprintf(weight,
"bold");
4695 if (strstr(font_name,
"italic"))
4697 sprintf(
fontname,
"-*-%s-%s-%s-*-*-%d-*-*-*-*-*-iso8859-1",
4698 family, weight, slant,
pixel);
4701 sprintf(
fontname,
"%s", font_name);
4711 return (
FontH_t)gdk_font_ref((GdkFont *)
fs);
4721 gdk_font_unref((GdkFont *)
fs);
4737 xgval.subwindow_mode = GDK_CLIP_BY_CHILDREN;
4740 &xgval, (GdkGCValuesMask)xmask);
4758 gdk_gc_set_foreground((
GdkGC *)
gc, &xgval.foreground);
4761 gdk_gc_set_background((
GdkGC *)
gc, &xgval.background);
4764 gdk_gc_set_font((
GdkGC *)
gc, xgval.font);
4767 gdk_gc_set_function((
GdkGC *)
gc, xgval.function);
4770 gdk_gc_set_fill((
GdkGC *)
gc, xgval.fill);
4773 gdk_gc_set_tile((
GdkGC *)
gc, xgval.tile);
4776 gdk_gc_set_stipple((
GdkGC *)
gc, xgval.stipple);
4779 gdk_gc_set_ts_origin((
GdkGC *)
gc, xgval.ts_x_origin,
4783 gdk_gc_set_clip_origin((
GdkGC *)
gc, xgval.clip_x_origin,
4784 xgval.clip_y_origin);
4787 gdk_gc_set_clip_mask((
GdkGC *)
gc, xgval.clip_mask);
4790 gdk_gc_set_exposures((
GdkGC *)
gc, xgval.graphics_exposures);
4793 gdk_gc_set_values((
GdkGC *)
gc, &xgval, GDK_GC_LINE_WIDTH);
4796 gdk_gc_set_values((
GdkGC *)
gc, &xgval, GDK_GC_LINE_STYLE);
4799 gdk_gc_set_values((
GdkGC *)
gc, &xgval, GDK_GC_CAP_STYLE);
4802 gdk_gc_set_values((
GdkGC *)
gc, &xgval, GDK_GC_JOIN_STYLE);
4805 gdk_gc_set_subwindow((
GdkGC *)
gc, xgval.subwindow_mode);
4853 if (!
id)
wid = GDK_ROOT_PARENT();
4855 return (
Pixmap_t) gdk_pixmap_new(
wid,
w,
h, gdk_visual_get_best_depth());
4879 if (!
id)
wid = GDK_ROOT_PARENT();
4882 height, depth, &fore, &back);
4892 if (!
id)
wid = GDK_ROOT_PARENT();
4904 gdk_pixmap_unref((GdkPixmap *) pmap);
4917 GdkBitmap *gdk_pixmap_mask;
4920 if (!
id)
wid = GDK_ROOT_PARENT();
4922 pict = (
Pixmap_t) gdk_pixmap_create_from_xpm(
wid, &gdk_pixmap_mask, 0,
4930 gdk_drawable_get_size((GdkPixmap *)
pict, (
int *) &
attr.fWidth,
4931 (
int *) &
attr.fHeight);
4951 GdkBitmap *gdk_pixmap_mask;
4953 if (!
id)
wid = GDK_ROOT_PARENT();
4955 pict = (
Pixmap_t) gdk_pixmap_create_from_xpm_d(
wid, &gdk_pixmap_mask, 0,
4975 GdkPixmap *
pxm = gdk_pixmap_create_from_xpm(NULL, NULL, NULL,
filename);
4980 HBITMAP hbm = (HBITMAP)GDK_DRAWABLE_XID(
pxm);
4983 ret = ::GetObject(hbm,
sizeof(HBITMAP), (LPVOID)&
bitmap);
4984 ret_data = (
char ***)&
bitmap.bmBits;
4985 gdk_pixmap_unref(
pxm);
5007 for (i = 0; i <
n; i++) {
5008 dashes[i] = (gint8) dash_list[i];
5010 for (i =
n; i < 32; i++) {
5011 dashes[i] = (gint8) 0;
5040 if (gdk_color_parse((
char *)
cname, &xc)) {
5064 status = gdk_colormap_alloc_color((
GdkColormap *)
cmap, &xc, FALSE, TRUE);
5080 GdkColorContext *cc = gdk_color_context_new(gdk_visual_get_system(),
fColormap);
5081 gdk_color_context_query_color(cc, &xc);
5082 gdk_color_context_free(cc);
5113 tev.
fX = tev.
fY = 0;
5124 TGWin32MainThread::LockMSG();
5129 TGWin32MainThread::UnlockMSG();
5139 if (!ev || !
id)
return;
5141 TGWin32MainThread::LockMSG();
5144 gdk_event_put(&xev);
5145 TGWin32MainThread::UnlockMSG();
5155 TGWin32MainThread::LockMSG();
5156 GList *list = gdk_event_queue_find_first();
5157 if (list !=
nullptr)
5158 ret = g_list_length(list);
5159 TGWin32MainThread::UnlockMSG();
5171 TGWin32MainThread::LockMSG();
5172 GdkEvent *xev = gdk_event_unqueue();
5177 TGWin32MainThread::UnlockMSG();
5181 gdk_event_free (xev);
5182 TGWin32MainThread::UnlockMSG();
5193 xstate = GDK_MODIFIER_MASK;
5204 switch (
event.type) {
5205 case GDK_MOTION_NOTIFY:
5206 event.motion.time = time;
5207 case GDK_BUTTON_PRESS:
5208 case GDK_2BUTTON_PRESS:
5209 case GDK_3BUTTON_PRESS:
5210 case GDK_BUTTON_RELEASE:
5212 event.button.time = time;
5214 case GDK_KEY_RELEASE:
5215 event.key.time = time;
5216 case GDK_ENTER_NOTIFY:
5217 case GDK_LEAVE_NOTIFY:
5218 event.crossing.time = time;
5219 case GDK_PROPERTY_NOTIFY:
5220 event.property.time = time;
5221 case GDK_SELECTION_CLEAR:
5222 case GDK_SELECTION_REQUEST:
5223 case GDK_SELECTION_NOTIFY:
5224 event.selection.time = time;
5225 case GDK_PROXIMITY_IN:
5226 case GDK_PROXIMITY_OUT:
5227 event.proximity.time = time;
5228 case GDK_DRAG_ENTER:
5229 case GDK_DRAG_LEAVE:
5230 case GDK_DRAG_MOTION:
5231 case GDK_DRAG_STATUS:
5232 case GDK_DROP_START:
5233 case GDK_DROP_FINISHED:
5234 event.dnd.time = time;
5248 xev.type = GDK_NOTHING;
5250 xev.type = GDK_KEY_PRESS;
5252 xev.type = GDK_KEY_RELEASE;
5254 xev.type = GDK_BUTTON_PRESS;
5256 xev.type = GDK_BUTTON_RELEASE;
5258 xev.type = GDK_MOTION_NOTIFY;
5260 xev.type = GDK_ENTER_NOTIFY;
5262 xev.type = GDK_LEAVE_NOTIFY;
5264 xev.type = GDK_EXPOSE;
5266 xev.type = GDK_CONFIGURE;
5270 xev.type = GDK_UNMAP;
5272 xev.type = GDK_DESTROY;
5274 xev.type = GDK_CLIENT_EVENT;
5276 xev.type = GDK_SELECTION_CLEAR;
5278 xev.type = GDK_SELECTION_REQUEST;
5280 xev.type = GDK_SELECTION_NOTIFY;
5282 xev.any.type = xev.type;
5288 xev.type = GDK_FOCUS_CHANGE;
5289 xev.focus_change.type = xev.type;
5291 xev.focus_change.in = TRUE;
5294 xev.type = GDK_FOCUS_CHANGE;
5295 xev.focus_change.type = xev.type;
5297 xev.focus_change.in = FALSE;
5301 xev.key.type = xev.type;
5303 xev.key.keyval = ev.
fCode;
5307 xev.button.type = xev.type;
5308 xev.button.x = ev.
fX;
5309 xev.button.y = ev.
fY;
5310 xev.button.x_root = ev.
fXRoot;
5311 xev.button.y_root = ev.
fYRoot;
5313 xev.button.button = ev.
fCode;
5318 xev.selection.selection = (GdkAtom) ev.
fUser[1];
5319 xev.selection.target = (GdkAtom) ev.
fUser[2];
5320 xev.selection.property = (GdkAtom) ev.
fUser[3];
5321 xev.selection.type = xev.type;
5325 xev.type = GDK_DELETE;
5326 xev.any.type = xev.type;
5330 xev.client.type = xev.type;
5331 xev.client.message_type = (GdkAtom) ev.
fHandle;
5332 xev.client.data_format = ev.
fFormat;
5333 xev.client.data.l[0] = ev.
fUser[0];
5334 if (
sizeof(ev.
fUser[0]) > 4) {
5335 SplitLong(ev.
fUser[1], xev.client.data.l[1], xev.client.data.l[3]);
5336 SplitLong(ev.
fUser[2], xev.client.data.l[2], xev.client.data.l[4]);
5338 xev.client.data.l[1] = ev.
fUser[1];
5339 xev.client.data.l[2] = ev.
fUser[2];
5340 xev.client.data.l[3] = ev.
fUser[3];
5341 xev.client.data.l[4] = ev.
fUser[4];
5347 xev.motion.type = xev.type;
5348 xev.motion.x = ev.
fX;
5349 xev.motion.y = ev.
fY;
5350 xev.motion.x_root = ev.
fXRoot;
5351 xev.motion.y_root = ev.
fYRoot;
5355 xev.crossing.type = xev.type;
5356 xev.crossing.x = ev.
fX;
5357 xev.crossing.y = ev.
fY;
5358 xev.crossing.x_root = ev.
fXRoot;
5359 xev.crossing.y_root = ev.
fYRoot;
5360 xev.crossing.mode = (GdkCrossingMode) ev.
fCode;
5365 xev.expose.type = xev.type;
5366 xev.expose.area.x = ev.
fX;
5367 xev.expose.area.y = ev.
fY;
5368 xev.expose.area.width = ev.
fWidth;
5369 xev.expose.area.height = ev.
fHeight;
5370 xev.expose.count = ev.
fCount;
5374 xev.configure.type = xev.type;
5375 xev.configure.x = ev.
fX;
5376 xev.configure.y = ev.
fY;
5377 xev.configure.width = ev.
fWidth;
5378 xev.configure.height = ev.
fHeight;
5382 xev.selection.type = xev.type;
5383 xev.selection.selection = ev.
fUser[0];
5387 xev.selection.type = xev.type;
5388 xev.selection.selection = ev.
fUser[1];
5389 xev.selection.target = ev.
fUser[2];
5390 xev.selection.property = ev.
fUser[3];
5395 if (xev.type != GDK_CLIENT_EVENT)
5400 if (xev.type == GDK_KEY_PRESS)
5402 if (xev.type == GDK_KEY_RELEASE)
5404 if (xev.type == GDK_BUTTON_PRESS)
5406 if (xev.type == GDK_BUTTON_RELEASE)
5408 if (xev.type == GDK_MOTION_NOTIFY)
5410 if (xev.type == GDK_ENTER_NOTIFY)
5412 if (xev.type == GDK_LEAVE_NOTIFY)
5414 if (xev.type == GDK_EXPOSE)
5416 if (xev.type == GDK_CONFIGURE)
5418 if (xev.type == GDK_MAP)
5420 if (xev.type == GDK_UNMAP)
5422 if (xev.type == GDK_DESTROY)
5424 if (xev.type == GDK_SELECTION_CLEAR)
5426 if (xev.type == GDK_SELECTION_REQUEST)
5428 if (xev.type == GDK_SELECTION_NOTIFY)
5435 if ((xev.type == GDK_MAP) || (xev.type == GDK_UNMAP)) {
5438 if (xev.type == GDK_DELETE) {
5444 if (
sizeof(ev.
fUser[0]) > 4) {
5445 AsmLong(xev.client.data.l[1], xev.client.data.l[3], ev.
fUser[1]);
5446 AsmLong(xev.client.data.l[2], xev.client.data.l[4], ev.
fUser[2]);
5454 if (xev.type == GDK_DESTROY) {
5459 if (xev.type == GDK_FOCUS_CHANGE) {
5463 if (xev.focus_change.in == TRUE) {
5472 ev.
fCode = xev.key.keyval;
5473 ev.
fUser[1] = xev.key.length;
5474 if (xev.key.length > 0) ev.
fUser[2] = xev.key.string[0];
5475 if (xev.key.length > 1) ev.
fUser[3] = xev.key.string[1];
5476 if (xev.key.length > 2) ev.
fUser[4] = xev.key.string[2];
5477 HWND tmpwin = (HWND) GetWindow((HWND) GDK_DRAWABLE_XID((
GdkWindow *)xev.key.window), GW_CHILD);
5486 ev.
fX = xev.button.x;
5487 ev.
fY = xev.button.y;
5488 ev.
fXRoot = xev.button.x_root;
5489 ev.
fYRoot = xev.button.y_root;
5491 ev.
fCode = xev.button.button;
5493 tpoint.x = xev.button.x;
5494 tpoint.y = xev.button.y;
5495 HWND tmpwin = ChildWindowFromPoint((HWND) GDK_DRAWABLE_XID((
GdkWindow *)xev.button.window), tpoint);
5504 ev.
fX = xev.motion.x;
5505 ev.
fY = xev.motion.y;
5506 ev.
fXRoot = xev.motion.x_root;
5507 ev.
fYRoot = xev.motion.y_root;
5511 tpoint.x = xev.button.x;
5512 tpoint.y = xev.button.y;
5513 HWND tmpwin = ChildWindowFromPoint((HWND) GDK_DRAWABLE_XID((
GdkWindow *)xev.motion.window), tpoint);
5522 ev.
fX = xev.crossing.x;
5523 ev.
fY = xev.crossing.y;
5524 ev.
fXRoot = xev.crossing.x_root;
5525 ev.
fYRoot = xev.crossing.y_root;
5526 ev.
fCode = xev.crossing.mode;
5531 ev.
fX = xev.expose.area.x;
5532 ev.
fY = xev.expose.area.y;
5533 ev.
fWidth = xev.expose.area.width;
5534 ev.
fHeight = xev.expose.area.height;
5535 ev.
fCount = xev.expose.count;
5539 ev.
fX = xev.configure.x;
5540 ev.
fY = xev.configure.y;
5541 ev.
fWidth = xev.configure.width;
5542 ev.
fHeight = xev.configure.height;
5544 if (xev.type == GDK_CLIENT_EVENT) {
5547 ev.
fHandle = xev.client.message_type;
5548 ev.
fFormat = xev.client.data_format;
5549 ev.
fUser[0] = xev.client.data.l[0];
5550 if (
sizeof(ev.
fUser[0]) > 4) {
5551 AsmLong(xev.client.data.l[1], xev.client.data.l[3], ev.
fUser[1]);
5552 AsmLong(xev.client.data.l[2], xev.client.data.l[4], ev.
fUser[2]);
5554 ev.
fUser[1] = xev.client.data.l[1];
5555 ev.
fUser[2] = xev.client.data.l[2];
5556 ev.
fUser[3] = xev.client.data.l[3];
5557 ev.
fUser[4] = xev.client.data.l[4];
5562 ev.
fUser[0] = xev.selection.selection;
5567 ev.
fUser[1] = xev.selection.selection;
5568 ev.
fUser[2] = xev.selection.target;
5569 ev.
fUser[3] = xev.selection.property;
5574 ev.
fUser[1] = xev.selection.selection;
5575 ev.
fUser[2] = xev.selection.target;
5576 ev.
fUser[3] = xev.selection.property;
5578 if (xev.type == GDK_SCROLL) {
5580 if (xev.scroll.direction == GDK_SCROLL_UP) {
5582 }
else if (xev.scroll.direction == GDK_SCROLL_DOWN) {
5586 ev.
fX = xev.scroll.x;
5587 ev.
fY = xev.scroll.y;
5588 ev.
fXRoot = xev.scroll.x_root;
5589 ev.
fYRoot = xev.scroll.y_root;
5591 tpoint.x = xev.scroll.x;
5592 tpoint.y = xev.scroll.y;
5593 HWND tmpwin = ChildWindowFromPoint((HWND) GDK_DRAWABLE_XID((
GdkWindow *)xev.scroll.window), tpoint);
5640 gdk_window_set_events((
GdkWindow *)
id, (GdkEventMask) xevmask);
5644 color.
red = GetRValue(
attr->fBackgroundPixel);
5645 color.
green = GetGValue(
attr->fBackgroundPixel);
5646 color.
blue = GetBValue(
attr->fBackgroundPixel);
5647 gdk_window_set_background((
GdkWindow *)
id, &color);
5652 gdk_window_set_back_pixmap((
GdkWindow *)
id,
5653 (GdkPixmap *)
attr->fBackgroundPixmap, 0);
5662 if (
attr->fBorderWidth > 0) {
5663 gdk_window_set_decorations((
GdkWindow *)
id,
5664 (GdkWMDecoration) GDK_DECOR_BORDER);
5680 (GdkAtom)
type, 8, GDK_PROP_MODE_REPLACE,
data,
len);
5712 prop = (
Atom_t) gdk_atom_intern(
"WM_DELETE_WINDOW", FALSE);
5714 W32ChangeProperty((HWND) GDK_DRAWABLE_XID((
GdkWindow *)
id),
5725 gdk_key_repeat_restore();
5727 gdk_key_repeat_disable();
5744 gdk_key_grab(keycode, (GdkEventMask)xmod, (
GdkWindow *)
id);
5746 gdk_key_ungrab(keycode, (GdkEventMask)xmod, (
GdkWindow *)
id);
5769 gdk_button_grab(
button, xmod, (
GdkWindow *)
id, 1, (GdkEventMask)xevmask,
5788 if(!::IsWindowVisible((HWND)GDK_DRAWABLE_XID(
id)))
return;
5789 gdk_pointer_grab((
GdkWindow *)
id, owner_events, (GdkEventMask) xevmask,
5793 gdk_pointer_ungrab(GDK_CURRENT_TIME);
5825 gdk_window_set_icon((
GdkWindow *)
id, NULL, (GdkPixmap *)pic, (GdkPixmap *)pic);
5828#define safestrlen(s) ((s) ? strlen(s) : 0)
5839 size_t len_nm, len_cl;
5847 if ((class_string = s =
5848 (
char *) malloc((
unsigned) (len_nm + len_cl + 2)))) {
5850 strcpy(s, resourceName);
5855 strcpy(s, className);
5860 W32ChangeProperty((HWND) GDK_DRAWABLE_XID((
GdkWindow *)
id),
5862 GDK_PROP_MODE_REPLACE,
5863 (
unsigned char *) class_string,
5864 (
Int_t)(len_nm + len_cl + 2));
5889 if (
x == 0 &&
y == 0) {
5916 GdkWindowHints flags;
5918 flags = (GdkWindowHints) (GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE |
5919 GDK_HINT_RESIZE_INC);
5927 gdk_window_set_geometry_hints((
GdkWindow *)
id, (GdkGeometry *) &hints,
5928 (GdkWindowHints) flags);
5940 Int_t xstate = NormalState;
5943 xstate = NormalState;
5945 xstate = IconicState;
5947 hints.flags = StateHint;
5948 hints.initial_state = xstate;
5973 gdk_gc_get_values((
GdkGC *)
gc, &values);
5983 return gdk_text_width((GdkFont *)font, s,
len);
5990 Int_t & max_descent)
5992 GdkFont *
f = (GdkFont *) font;
5993 max_ascent =
f->ascent;
5994 max_descent =
f->descent;
6007 gdk_gc_get_values((
GdkGC *)
gc, &xgval);
6025 gdk_font_unref((GdkFont *)
fs);
6095 gdk_window_set_events((
GdkWindow *)
id, (GdkEventMask)xevmask);
6103 HWND hwnd = ::GetFocus();
6104 return (
Window_t) gdk_xid_table_lookup(hwnd);
6114 HWND hwnd = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id);
6124 return (
Window_t)gdk_selection_owner_get(gClipboardAtom);
6135 gdk_selection_owner_set((
GdkWindow *)
id, gClipboardAtom, GDK_CURRENT_TIME, 0);
6154 gdk_atom_intern(
"GDK_TARGET_STRING", 0),
when);
6166 _lookup_string(
event, buf, buflen);
6169 keysym = (
Int_t) ks;
6179 xkeysym = GDK_VoidSymbol;
6185 for (
int i = 0;
gKeyMap[i].fKeySym; i++) {
6195 if (xkeysym < 127) {
6197 }
else if (xkeysym >= GDK_F1 && xkeysym <= GDK_F35) {
6198 keysym =
kKey_F1 + (xkeysym - GDK_F1);
6199 }
else if (xkeysym >= GDK_KP_0 && xkeysym <= GDK_KP_9) {
6200 keysym =
kKey_0 + (xkeysym - GDK_KP_0);
6202 for (
int i = 0;
gKeyMap[i].fXKeySym; i++) {
6203 if (xkeysym ==
gKeyMap[i].fXKeySym) {
6222 int nread, actual_format;
6224 nread = gdk_selection_property_get((
GdkWindow *)
id,
6225 (
unsigned char **) &
data,
6226 (GdkAtom *) &
atom, &actual_format);
6228 if ((nread == 0) || (
data == NULL)) {
6233 text.Insert(0, (
const char *)
data);
6239 gdk_atom_intern(
"GDK_SELECTION", FALSE));
6255 HWND sw, dw, ch = NULL;
6261 ::MapWindowPoints(sw,
6265 ch = ::ChildWindowFromPointEx(dw, point, CWP_SKIPDISABLED | CWP_SKIPINVISIBLE);
6285 if (GDK_DRAWABLE_TYPE(
id) == GDK_DRAWABLE_PIXMAP) {
6287 gdk_drawable_get_size((
GdkDrawable *)
id, (
int*)&
w, (
int*)&
h);
6333 rootw = (
Window_t)GDK_ROOT_PARENT();
6334 ::GetCursorPos(&currPt);
6335 chw = ::WindowFromPoint(currPt);
6336 childw = (
Window_t)gdk_xid_table_lookup(chw);
6340 ::ScreenToClient(window, &currPt);
6344 ::GetKeyboardState (kbd);
6346 if (kbd[VK_SHIFT] & 0x80) {
6347 umask |= GDK_SHIFT_MASK;
6349 if (kbd[VK_CAPITAL] & 0x80) {
6350 umask |= GDK_LOCK_MASK;
6352 if (kbd[VK_CONTROL] & 0x80) {
6353 umask |= GDK_CONTROL_MASK;
6355 if (kbd[VK_MENU] & 0x80) {
6356 umask |= GDK_MOD1_MASK;
6358 if (kbd[VK_LBUTTON] & 0x80) {
6359 umask |= GDK_BUTTON1_MASK;
6361 if (kbd[VK_MBUTTON] & 0x80) {
6362 umask |= GDK_BUTTON2_MASK;
6364 if (kbd[VK_RBUTTON] & 0x80) {
6365 umask |= GDK_BUTTON3_MASK;
6382 gdk_gc_set_foreground((
GdkGC *)
gc, &fore);
6396 for (i = 0; i <
n; i++) {
6399 grects[i].width =
recs[i].fWidth;
6400 grects[i].height =
recs[i].fHeight;
6403 for (i = 0; i <
n; i++) {
6424 return (
Region_t) gdk_region_new();
6432 gdk_region_destroy((GdkRegion *)
reg);
6443 r.width =
rect->fWidth;
6444 r.height =
rect->fHeight;
6455 winding ? GDK_WINDING_RULE : GDK_EVEN_ODD_RULE);
6499 return (
Bool_t) gdk_region_empty((GdkRegion *)
reg);
6507 return (
Bool_t) gdk_region_point_in((GdkRegion *)
reg,
x,
y);
6515 return (
Bool_t) gdk_region_equal((GdkRegion *)
rega, (GdkRegion *)
regb);
6524 gdk_region_get_clipbox((GdkRegion *)
reg, &
r);
6527 rect->fWidth =
r.width;
6528 rect->fHeight =
r.height;
6536 char foundry[32], family[100], weight[32], slant[32], font_name[256];
6538 Int_t n1, fontcount = 0;
6540 sscanf(
fontname,
"-%30[^-]-%100[^-]-%30[^-]-%30[^-]-%n",
6541 foundry, family, weight, slant, &n1);
6543 if(!stricmp(weight,
"medium")) {
6544 sprintf(weight,
"normal");
6547 sprintf(font_name,
"-%s-%s-%s-%s-*", foundry, family, weight, slant);
6548 fontlist = gdk_font_list_new(font_name, &fontcount);
6551 if (fontcount > 0)
return fontlist;
6560 gdk_font_list_free(fontlist);
6568 return (
Drawable_t) gdk_image_new(GDK_IMAGE_SHARED, gdk_visual_get_best(),
6589 if (image->depth == 1) {
6591 ((
UChar_t *) image->mem)[
y * image->bpl + (
x >> 3)] |= (1 << (7 - (
x & 0x7)));
6593 ((
UChar_t *) image->mem)[
y * image->bpl + (
x >> 3)] &= ~(1 << (7 - (
x & 0x7)));
6596 UChar_t *pixelp = (
UChar_t *) image->mem +
y * image->bpl +
x * image->bpp;
6598 switch (image->bpp) {
6602 pixelp[2] = ((
pixel >> 16) & 0xFF);
6604 pixelp[1] = ((
pixel >> 8) & 0xFF);
6606 pixelp[0] = (
pixel & 0xFF);
6620 x,
y, dx, dy,
w,
h);
6647 HGDIOBJ oldbitmap1, oldbitmap2;
6651 unsigned char *ret = 0;
6653 if (GDK_DRAWABLE_TYPE(
wid) == GDK_DRAWABLE_PIXMAP) {
6654 hdc = ::CreateCompatibleDC(NULL);
6655 oldbitmap1 = ::SelectObject(hdc, GDK_DRAWABLE_XID(
wid));
6656 ::GetObject(GDK_DRAWABLE_XID(
wid),
sizeof(BITMAP), &bm);
6658 hdc = ::GetDC((HWND)GDK_DRAWABLE_XID(
wid));
6660 memdc = ::CreateCompatibleDC(hdc);
6662 bmi.bmiHeader.biSize =
sizeof(BITMAPINFOHEADER);
6663 bmi.bmiHeader.biWidth =
width;
6664 bmi.bmiHeader.biHeight = -1 * (
int)(
height);
6665 bmi.bmiHeader.biPlanes = 1;
6666 bmi.bmiHeader.biBitCount = 32;
6667 bmi.bmiHeader.biCompression = BI_RGB;
6668 bmi.bmiHeader.biSizeImage = 0;
6669 bmi.bmiHeader.biXPelsPerMeter = bmi.bmiHeader.biYPelsPerMeter = 0;
6670 bmi.bmiHeader.biClrUsed = 0;
6671 bmi.bmiHeader.biClrImportant = 0;
6673 ximage = ::CreateDIBSection(hdc, (BITMAPINFO *) &bmi, DIB_RGB_COLORS, &bmbits, NULL, 0);
6675 if (ximage && bmbits) {
6676 oldbitmap2 = ::SelectObject(memdc, ximage);
6678 ::SelectObject(memdc, oldbitmap2);
6681 if (GDK_DRAWABLE_TYPE(
wid) == GDK_DRAWABLE_PIXMAP) {
6682 ::SelectObject(hdc, oldbitmap1);
6685 ::ReleaseDC((HWND)GDK_DRAWABLE_XID(
wid), hdc);
6687 if (ximage && bmbits) {
6689 ret =
new unsigned char[sz];
6690 memcpy(ret, bmbits, sz);
6691 ::DeleteObject(ximage);
6705 BITMAPINFO bmp_info;
6706 bmp_info.bmiHeader.biSize =
sizeof(BITMAPINFOHEADER);
6707 bmp_info.bmiHeader.biWidth =
width;
6708 bmp_info.bmiHeader.biHeight = -1 * (
int)(
height);
6709 bmp_info.bmiHeader.biPlanes = 1;
6710 bmp_info.bmiHeader.biBitCount = 32;
6711 bmp_info.bmiHeader.biCompression = BI_RGB;
6712 bmp_info.bmiHeader.biSizeImage = 0;
6713 bmp_info.bmiHeader.biClrUsed = 0;
6714 bmp_info.bmiHeader.biXPelsPerMeter = 0L;
6715 bmp_info.bmiHeader.biYPelsPerMeter = 0L;
6716 bmp_info.bmiHeader.biClrImportant = 0;
6717 bmp_info.bmiColors[0].rgbRed = 0;
6718 bmp_info.bmiColors[0].rgbGreen = 0;
6719 bmp_info.bmiColors[0].rgbBlue = 0;
6720 bmp_info.bmiColors[0].rgbReserved = 0;
6722 HDC hdc = ::GetDC(NULL);
6723 HBITMAP hbitmap = ::CreateDIBitmap(hdc, &bmp_info.bmiHeader, CBM_INIT,
6724 (
void *)bits, &bmp_info, DIB_RGB_COLORS);
6725 ::ReleaseDC(NULL, hdc);
6741 HBITMAP hBmp =
reinterpret_cast<HBITMAP
>(
pix);
6744 SetBitmapDimensionEx(hBmp,
w,
h, &sz);
6745 GdkPixmap *newPix = gdk_pixmap_foreign_new(
reinterpret_cast<ULongptr_t>(hBmp));
6810 gdk_window_shape_combine_mask((
GdkWindow *)
id, (GdkBitmap *)
mask,
x,
y);
6818 return (
UInt_t)gdk_screen_width_mm();
6831 GlobalDeleteAtom(
atom);
6843 unsigned char **prop_list)
6856 if (
prop == dndproxy)
6858 if (
prop == dndtypelist) {
6860 *prop_list = (
unsigned char *)GetProp(hWnd, (LPCTSTR)
MAKELONGLONG(
prop,0));
6861 for (
n = 0; prop_list[
n];
n++);
6866 if (!OpenClipboard((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
win))) {
6869 hdata = GetClipboardData(CF_PRIVATEFIRST);
6870 ptr = (
UChar_t *)GlobalLock(hdata);
6871 length = GlobalSize(hdata);
6873 for (i = 0; i <
length; i++) {
6876 GlobalUnlock(hdata);
6906 static UINT gdk_selection_notify_msg =
6907 RegisterWindowMessage(
"gdk-selection-notify");
6909 if (!OpenClipboard((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
win))) {
6912 hdata = GetClipboardData(CF_PRIVATEFIRST);
6919 PostMessage(hWnd, gdk_selection_notify_msg,
sel,
target);
6927 static UINT gdk_selection_request_msg =
6928 RegisterWindowMessage(
"gdk-selection-request");
6929 HWND hWnd = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)owner);
6930 OpenClipboard(hWnd);
6934 ::PostMessage(hWnd, gdk_selection_request_msg,
sel, 0);
6951 if (!OpenClipboard((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id))) {
6954 hdata = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE,
len + 1);
6955 ptr = (
UChar_t *)GlobalLock(hdata);
6956 for (i = 0; i <
len; i++) {
6959 GlobalUnlock(hdata);
6960 SetClipboardData(CF_PRIVATEFIRST, hdata);
6980 int x,
int y,
int maxd)
6993 hwnd = ::ChildWindowFromPointEx((HWND)GDK_DRAWABLE_XID((
GdkWindow *)root),
6996 GetWindowRect(hwnd, &
rect);
6997 if (PtInRect(&
rect, cpt)) {
7007 ::MapWindowPoints(NULL, hwndt, &point, 1);
7008 hwndc = ChildWindowFromPoint (hwndt, point);
7016 else if (hwndc == hwndt)
7020 if (GetProp(hwndt,(LPCTSTR)
MAKELONGLONG(dndaware,0))) {
7027 hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
7042 HWND window = (HWND)GDK_DRAWABLE_XID((
GdkWindow *)
win);
7045 if (version)
return kTRUE;
7060 DWORD dwStyle = GetWindowLong((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id),
7062 SetWindowLong((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id), GWL_EXSTYLE,
7063 dwStyle | WS_EX_ACCEPTFILES);
7065 SetProp((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id),
7073 SetProp((HWND)GDK_DRAWABLE_XID((
GdkWindow *)
id),
7105 GdkFunction func = GDK_COPY;
7111 for (
int i = 0; i <
kMAXGC; i++) {
7112 if (ctxt->fGClist[i])
7113 gdk_gc_set_function(ctxt->fGClist[i], func);
7116 ctxt->drawMode =
mode;
7125 return ctxt ? ctxt->drawMode :
kCopy;
const Int_t kPropMotifWMHintsElements
static KeySymbolMap_t gKeyMap[]
const ULong_t kMWMHintsInputMode
const ULong_t kMWMHintsDecorations
const Int_t kPropMWMHintElements
const ULong_t kMWMHintsFunctions
void AsmLong(Long_t i1, Long_t i2, Long_t &ll)
void SplitLong(Long_t ll, Long_t &i1, Long_t &i2)
Handle_t Region_t
Region handle.
Handle_t WinContext_t
Window drawing context.
const Mask_t kWAOverrideRedirect
const Mask_t kGCBackground
const Mask_t kGCForeground
const Mask_t kGCLineStyle
const Mask_t kGCSubwindowMode
const Mask_t kGCLineWidth
Handle_t Pixmap_t
Pixmap handle.
const Mask_t kButtonMotionMask
const Mask_t kGCClipXOrigin
const Mask_t kFocusChangeMask
const Mask_t kButtonPressMask
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
const Mask_t kExposureMask
const Mask_t kWAEventMask
const Mask_t kGCFillStyle
Handle_t Window_t
Window handle.
const Mask_t kGCJoinStyle
const Mask_t kKeyReleaseMask
const Mask_t kWABackPixel
Handle_t Display_t
Display handle.
const Mask_t kAnyModifier
@ kGXorReverse
src OR NOT dst
@ kGXnand
NOT src OR NOT dst.
@ kGXandReverse
src AND NOT dst
@ kGXorInverted
NOT src OR dst.
@ kGXandInverted
NOT src AND dst.
@ kGXequiv
NOT src XOR dst.
@ kGXcopyInverted
NOT src.
const Mask_t kKeyPressMask
ULong_t Time_t
Event time.
Handle_t GContext_t
Graphics context handle.
EInitialState
Initial window mapping state.
const Mask_t kGCTileStipXOrigin
Handle_t Drawable_t
Drawable handle.
const Mask_t kPointerMotionMask
Handle_t Cursor_t
Cursor handle.
const Mask_t kLeaveWindowMask
const Mask_t kStructureNotifyMask
const Handle_t kParentRelative
UInt_t Mask_t
Structure mask type.
const Mask_t kButtonReleaseMask
const Mask_t kGCGraphicsExposures
const Mask_t kGCClipYOrigin
const Mask_t kEnterWindowMask
const Mask_t kGCTileStipYOrigin
EMouseButton
Button names.
Handle_t Colormap_t
Colormap handle.
const Mask_t kWABackPixmap
const Mask_t kWABorderWidth
ULongptr_t Handle_t
Generic resource handle.
Handle_t FontStruct_t
Pointer to font structure.
const unsigned char gStipples[26][32]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Style number (short)
bool Bool_t
Boolean (0=false, 1=true) (bool)
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short)
int Int_t
Signed integer 4 bytes (int)
short Color_t
Color number (short)
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
constexpr ULong_t kBitsPerByte
int Seek_t
File pointer (int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
unsigned long ULongptr_t
Unsigned integer large enough to hold a pointer (platform-dependent)
short Width_t
Line width (short)
float Float_t
Float 4 bytes (float)
short Font_t
Font number (short)
short Short_t
Signed Short integer 2 bytes (short)
long long Long64_t
Portable signed long integer 8 bytes.
R__EXTERN TApplication * gApplication
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void chupy
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t stamp
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg InternAtom
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t GetWindowSize
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t regb
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t pict_mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest_x
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void cmap
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t atom
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t act_type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t pict
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t del
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmax
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pixel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void clipboard
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t act_format
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height qwid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t rect
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t recs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h prop
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t fontnumber
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void curid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t markerstyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void chupx
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text CreatePixmap
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char pxname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void foreground
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char PutPixel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char bitmap
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t nitems
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char forecolor
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h req_type
Option_t Option_t textsize
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void funcs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src_y
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t win
Option_t Option_t TPoint xy
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t dest_y
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t winc
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t modifier
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t org
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char backcolor
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetInputFocus
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t npnt
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetCursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t nchar
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char fontname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src_x
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t Atom_t typelist
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void main_id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t grab
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void ypos
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void when
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t bytes
Option_t Option_t TPoint TPoint percent
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t evmask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t gval
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t rega
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void reg
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint DrawText
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pxm
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hinc
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t confine
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char atom_name
Option_t Option_t TPoint TPoint const char y1
void gdk_win32_draw_segments(GdkDrawable *drawable, GdkGC *gc, GdkSegment *segs, gint nsegs)
#define XDND_PROTOCOL_VERSION
static void _set_event_time(GdkEvent &event, UInt_t time)
void gdk_win32_draw_text(GdkDrawable *drawable, GdkFont *font, GdkGC *gc, gint x, gint y, const gchar *text, gint text_length)
void gdk_win32_draw_polygon(GdkDrawable *drawable, GdkGC *gc, gint filled, GdkPoint *points, gint npoints)
void gdk_win32_draw_lines(GdkDrawable *drawable, GdkGC *gc, GdkPoint *points, gint npoints)
void gdk_win32_draw_points(GdkDrawable *drawable, GdkGC *gc, GdkPoint *points, gint npoints)
void gdk_win32_draw_arc(GdkDrawable *drawable, GdkGC *gc, gint filled, gint x, gint y, gint width, gint height, gint angle1, gint angle2)
void gdk_win32_draw_rectangle(GdkDrawable *drawable, GdkGC *gc, gint filled, gint x, gint y, gint width, gint height)
#define MAKELONGLONG(lo, hi)
struct _GdkVisual GdkVisual
struct _GdkRectangle GdkRectangle
struct _GdkWindowAttr GdkWindowAttr
struct _GdkWindow GdkWindow
struct _GdkPoint GdkPoint
struct _GdkColormap GdkColormap
struct _GdkCursor GdkCursor
struct _GdkImage GdkImage
struct _GdkGCValues GdkGCValues
struct _GdkDrawable GdkDrawable
static int gMarkerJoinStyle
static int gMarkerLineStyle
static ULong_t gKeybdMask
static Cursor gNullCursor
const char null_cursor_bits[]
const Int_t kBIGGEST_RGB_VALUE
static ULong_t gMouseMask
static int gMarkerCapStyle
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
R__EXTERN TVirtualX *(* gPtr2VirtualX)()
R__EXTERN Atom_t gWM_DELETE_WINDOW
R__EXTERN TWin32SplashThread * gSplash
R__EXTERN ULongptr_t gConsoleWindow
Fill Area Attributes class.
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
EMarkerShape GetMarkerShape(Int_t &sz, std::vector< TPoint > &points, Float_t scale=1., UInt_t flags=0) const
Return marker shape.
static Width_t GetMarkerLineWidth(Style_t style)
Internal helper function that returns the line width of the given marker style (0 = filled marker)
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Float_t GetTextSize() const
Return the text size.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
Float_t fTextAngle
Text angle.
virtual Color_t GetTextColor() const
Return the text color.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value)
Get next entry from TExMap. Returns kFALSE at end of map.
This class stores a (key,value) pair using an external hash.
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
Proxy classes provide thread-safe interface to global objects.
static ULong_t fgPingMessageId
ping message ID
static void GlobalUnlock()
unlock any proxy (client thread)
static UInt_t fMaxResponseTime
max period for waiting response from server thread
static void GlobalLock()
lock any proxy (client thread)
static ULong_t fgUserThreadId
user (e.g. python) thread ID
static ULong_t fgPostMessageId
post message ID
static ULong_t fgMainThreadId
main thread ID
virtual void ExecuteCallBack(Bool_t sync)
Executes all batched callbacks and the latest callback This method is executed by server thread.
static TVirtualX * fgRealObject
static TVirtualX * ProxyObject()
static TVirtualX * RealObject()
void DrawFillAreaW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Fill area described by polygon in a specified window.
Cursor_t CreateCursor(ECursor cursor) override
Create cursor handle (just return cursor from cursor pool fCursors).
void SetWMSizeHints(Window_t id, UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc) override
Give the window manager minimum and maximum size hints.
void SetDoubleBuffer(Int_t wid, Int_t mode) override
Set the double buffer on/off on window wid.
void DrawText(Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw text using TrueType fonts.
Int_t GetDoubleBuffer(Int_t wid) override
Query the double buffer value for the window wid.
void DrawSegments(Drawable_t id, GContext_t gc, Segment_t *seg, Int_t nseg) override
Draws multiple line segments. Each line is specified by a pair of points.
void MapModifierState(UInt_t &state, UInt_t &xstate, Bool_t tox=kTRUE)
Map modifier key state to or from X.
GdkImage * GetBackground(WinContext_t wctxt, Int_t x, Int_t y, UInt_t w, UInt_t h)
Get the background of the current window in an XImage.
void SetFillColor(Color_t cindex) override
Set color index for fill areas.
void DestroyRegion(Region_t reg) override
Destroy region.
void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b) override
Get rgb values for color "index".
void SetColor(XWindow_t *ctxt, GdkGC *gc, Int_t ci)
Set the foreground color in GdkGC.
void DeleteGC(GContext_t gc) override
Explicitely delete a graphics context.
void ClearWindow() override
Clear current window.
void MapSetWindowAttributes(SetWindowAttributes_t *attr, ULong_t &xmask, GdkWindowAttr &xattr)
Map a SetWindowAttributes_t to a GdkWindowAttr structure.
Window_t GetInputFocus() override
Returns the window id of the window having the input focus.
void GetTextExtent(UInt_t &w, UInt_t &h, char *mess) override
Return the size of a character string - no longer used iw : text width ih : text height mess : messag...
void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b) override
Set color intensities for given color index.
void SetFillStyle(Style_t style) override
Set fill area style.
void SetDoubleBufferON() override
Turn double buffer mode on.
void ShapeCombineMask(Window_t id, Int_t x, Int_t y, Pixmap_t mask) override
The Nonrectangular Window Shape Extension adds nonrectangular windows to the System.
void SetOpacity(Int_t percent) override
Set opacity of a current window.
char ** ListFonts(const char *fontname, Int_t max, Int_t &count) override
Return list of font names matching "fontname".
void GetFontProperties(FontStruct_t font, Int_t &max_ascent, Int_t &max_descent) override
Return some font properties.
FontStruct_t LoadQueryFont(const char *font_name) override
Load font and query font.
void ChangeProperties(Window_t id, Atom_t property, Atom_t type, Int_t format, UChar_t *data, Int_t len) override
Put data into Clipboard.
void SetDrawMode(EDrawMode mode) override
Set the drawing mode.
void CloseWindow() override
Delete current window.
void TranslateCoordinates(Window_t src, Window_t dest, Int_t src_x, Int_t src_y, Int_t &dest_x, Int_t &dest_y, Window_t &child) override
TranslateCoordinates translates coordinates from the frame of reference of one window to another.
void RaiseWindow(Window_t id) override
Put window on top of window stack.
Bool_t ParseColor(Colormap_t cmap, const char *cname, ColorStruct_t &color) override
Parse string cname containing color name, like "green" or "#00FF00".
Float_t fCharacterUpY
Character Up vector along Y.
Int_t KeysymToKeycode(UInt_t keysym) override
Convert a keysym to the appropriate keycode.
Int_t InitWindow(ULongptr_t window) override
Open window and return window number.
void SetTextFont(Font_t fontnumber) override
Set specified font.
void SetAttLine(WinContext_t wctxt, const TAttLine &att) override
Set line attributes for specified window.
Int_t fDepth
Number of color planes.
void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line.
void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return position and size of window wid.
void GetPlanes(Int_t &nplanes) override
Get maximum number of planes.
Float_t fTextMagnitude
Text Magnitude.
void RescaleWindow(Int_t wid, UInt_t w, UInt_t h) override
Rescale the window wid.
void ChangeWindowAttributes(Window_t id, SetWindowAttributes_t *attr) override
Change window attributes.
void SetIconPixmap(Window_t id, Pixmap_t pic) override
Set pixmap the WM can use when the window is iconized.
void UnionRectWithRegion(Rectangle_t *rect, Region_t src, Region_t dest) override
Union of rectangle with a region.
Int_t RequestLocator(Int_t mode, Int_t ctyp, Int_t &x, Int_t &y) override
Request Locator position.
void SetClassHints(Window_t id, char *className, char *resourceName) override
Set the windows class and resource name.
WinContext_t GetWindowContext(Int_t wid) override
Returns window context for specified win id.
void ClearArea(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Clear a window area to the bakcground color.
void DeleteProperty(Window_t, Atom_t &) override
Deletes the specified property on the specified window.
Window_t GetParent(Window_t id) const override
Return the parent of the window.
void DrawLineW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2) override
Draw a line on specified window.
void GetImageSize(Drawable_t id, UInt_t &width, UInt_t &height) override
Returns the width and height of the image id.
void Update(Int_t mode=0) override
Flush (mode = 0, default) or synchronize (mode = 1) X output buffer.
TGWin32()
Default constructor.
void SetCharacterUp(Float_t chupx, Float_t chupy) override
Set character up vector.
void SetOpacityW(WinContext_t wctxt, Int_t percent) override
Set opacity of a specified window.
GdkColormap * fColormap
Default colormap, 0 if b/w.
ULong_t GetPixel(Color_t cindex) override
Return pixel value associated to specified ROOT color number.
void DrawTextHelper(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, const CharType *text, ETextMode mode)
void SendEvent(Window_t id, Event_t *ev) override
Send event ev to window id.
Int_t RequestString(Int_t x, Int_t y, char *text) override
Request a string.
Int_t AddWindowHandle()
Add new window handle Only for private usage.
void SetUserThreadId(ULong_t id)
Set user thread id.
Int_t fBlueDiv
Blue value divider.
Bool_t CheckEvent(Window_t id, EGEventType type, Event_t &ev) override
Check if there is for window "id" an event of type "type".
void GrabButton(Window_t id, EMouseButton button, UInt_t modifier, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE) override
Establish passive grab on a certain mouse button.
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, Int_t *ic) override
Draw a cell array.
GContext_t CreateGC(Drawable_t id, GCValues_t *gval) override
Create a graphics context using the values set in gval (but only for those entries that are in the ma...
Int_t fGreenShift
Bits to left shift green.
Bool_t ReadPictureDataFromFile(const char *filename, char ***ret_data) override
Read picture data from file and store in ret_data.
void DrawBoxW(WinContext_t wctxt, Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box on specified window.
void UpdateWindowW(WinContext_t wctxt, Int_t mode) override
Update current window mode : (1) update (0) sync.
void MapSubwindows(Window_t id) override
Maps all subwindows for the specified window "id" in top-to-bottom stacking order.
void Bell(Int_t percent) override
Sets the sound bell. Percent is loudness from -100% to 100%.
void SetCursor(Int_t wid, ECursor cursor) override
Set the cursor.
Bool_t IsDNDAware(Window_t win, Atom_t *typelist) override
Checks if Window win is DND aware, and knows any of the DND formats passed in argument.
void LowerWindow(Window_t id) override
Lower window so it lays below all its siblings.
void ReparentWindow(Window_t id, Window_t pid, Int_t x, Int_t y) override
Reparent window, make pid the new parent and position the window at position (x,y) in new parent.
void UnmapWindow(Window_t id) override
Unmap window from screen.
void CloseDisplay() override
close display (terminate server/gMainThread thread)
void SetWMTransientHint(Window_t id, Window_t main_id) override
Tell window manager that window is a transient window of gdk_parent_root.
void SetWMPosition(Window_t id, Int_t x, Int_t y) override
Tells the window manager the desired position [x,y] of window "id".
void DrawTextW(WinContext_t wctxt, Int_t x, Int_t y, Float_t angle, Float_t mgn, const char *text, ETextMode mode) override
Draw text using TrueType fonts on specified window.
void DestroySubwindows(Window_t id) override
Destroy all internal subwindows.
unsigned char * GetColorBits(Drawable_t wid, Int_t x, Int_t y, UInt_t width, UInt_t height) override
Gets DIB bits x, y, width, height - position of bitmap returns a pointer on bitmap bits array in form...
Int_t TextWidth(FontStruct_t font, const char *s, Int_t len) override
Return length of string in pixels. Size depends on font.
void Sync(Int_t mode) override
Set synchronisation on or off.
void Warp(Int_t ix, Int_t iy, Window_t id=0) override
Set pointer position.
void WritePixmap(Int_t wid, UInt_t w, UInt_t h, char *pxname) override
Write the pixmap wid in the bitmap file pxname.
void MapEventMask(UInt_t &emask, UInt_t &xemask, Bool_t tox=kTRUE)
Map event mask to or from gdk.
Float_t fCharacterUpX
Character Up vector along X.
void GetGCValues(GContext_t gc, GCValues_t &gval) override
Get current values from graphics context gc.
void SetMarkerSize(Float_t markersize) override
Set marker size index.
Window_t GetWindowID(Int_t wid) override
Return the X11 window identifier.
Window_t FindRWindow(Window_t win, Window_t dragwin, Window_t input, int x, int y, int maxd) override
Recursively search in the children of Window for a Window which is at location x, y and is DND aware,...
void XorRegion(Region_t rega, Region_t regb, Region_t result) override
Calculate the difference between the union and intersection of two regions.
Bool_t fHasTTFonts
True when TrueType fonts are used.
void MapEvent(Event_t &ev, GdkEvent &xev, Bool_t tox=kTRUE)
Map Event_t structure to gdk_event structure.
void IconifyWindow(Window_t id) override
Iconify the window.
Int_t fRedShift
Bits to left shift red, -1 if no TrueColor visual.
Pixmap_t CreateBitmap(Drawable_t id, const char *bitmap, UInt_t width, UInt_t height) override
Create a bitmap (i.e. pixmap with depth 1) from the bitmap data.
void FreeFontStruct(FontStruct_t fs) override
Free font structure returned by GetFontStruct().
void CopyPixmapW(WinContext_t wctxt, Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the specified window.
Bool_t EqualRegion(Region_t rega, Region_t regb) override
Returns true if two regions are equal.
void FillRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draw a filled rectangle. Filling is done according to the gc.
FontStruct_t GetFontStruct(FontH_t fh) override
Retrieve associated font structure once we have the font handle.
void GetCharacterUp(Float_t &chupx, Float_t &chupy) override
Return character up vector.
void DrawString(Drawable_t id, GContext_t gc, Int_t x, Int_t y, const char *s, Int_t len) override
Draw a string using a specific graphics context in position (x,y).
void DrawTTFglyphsW(WinContext_t wctxt, Int_t x1, Int_t y1, TTFhandle &ttf, ETextMode mode) override
Draw TTF glyphs on the specified window context.
void SetAttText(WinContext_t wctxt, const TAttText &att) override
Set text attributes for speicfied window.
Bool_t PointInRegion(Int_t x, Int_t y, Region_t reg) override
Returns true if the point x,y is in the region.
std::unordered_map< Int_t, std::unique_ptr< XWindow_t > > fWindows
void FillPolygon(Window_t id, GContext_t gc, Point_t *points, Int_t npnt) override
FillPolygon fills the region closed by the specified path.
void SetWMState(Window_t id, EInitialState state) override
Set the initial state of the window. Either kNormalState or kIconicState.
void DrawPolyLineW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw a line through all points in specified window.
void DeleteFont(FontStruct_t fs) override
Explicitely delete font structure obtained with LoadQueryFont().
void GrabPointer(Window_t id, UInt_t evmask, Window_t confine, Cursor_t cursor, Bool_t grab=kTRUE, Bool_t owner_events=kTRUE) override
Establish an active pointer grab.
Int_t fScreenNumber
Screen number.
void ConvertPrimarySelection(Window_t id, Atom_t clipboard, Time_t when) override
XConvertSelection() causes a SelectionRequest event to be sent to the current primary selection owner...
Region_t PolygonRegion(Point_t *points, Int_t np, Bool_t winding) override
Create region for the polygon defined by the points array.
void MapGCValues(GCValues_t &gval, ULong_t &xmask, GdkGCValues &xgval, Bool_t tox=kTRUE)
Map a GCValues_t to a XCGValues structure if tox is true.
void SetClipRectangles(GContext_t gc, Int_t x, Int_t y, Rectangle_t *recs, Int_t n) override
Set clipping rectangles in graphics context.
void SetTextColor(Color_t cindex) override
Set color index for text.
void SetWindowName(Window_t id, char *name) override
Set window name.
Window_t CreateWindow(Window_t parent, Int_t x, Int_t y, UInt_t w, UInt_t h, UInt_t border, Int_t depth, UInt_t clss, void *visual, SetWindowAttributes_t *attr, UInt_t wtype) override
Return handle to newly created gdk window.
void ChangeActivePointerGrab(Window_t, UInt_t, Cursor_t) override
Changes the active cursor of the specified window.
void MoveWindow(Int_t wid, Int_t x, Int_t y) override
Move the window wid.
void WMDeleteNotify(Window_t id) override
Tell WM to send message when window is closed via WM.
Style_t GetLineStyle() const override
Return current line style.
void SetForeground(GContext_t gc, ULong_t foreground) override
Set foreground color in graphics context (shortcut for ChangeGC with only foreground mask set).
void DestroyWindow(Window_t id) override
Destroy window.
Int_t GetProperty(Window_t, Atom_t, Long_t, Long_t, Bool_t, Atom_t, Atom_t *, Int_t *, ULong_t *, ULong_t *, unsigned char **) override
Returns the actual type of the property, the actual format of the property, and a pointer to the data...
Int_t EventsPending() override
Returns number of pending events.
void SetPrimarySelectionOwner(Window_t id) override
Makes the window id the current owner of the primary selection.
void SetLineStyle(Style_t linestyle) override
Set line style.
void FreeColor(Colormap_t cmap, ULong_t pixel) override
Free color cell with specified pixel value.
TObject * fRefreshTimer
TGWin32RefreshTimer for GUI thread message handler.
void SetMWMHints(Window_t id, UInt_t value, UInt_t funcs, UInt_t input) override
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
void QueryColor(Colormap_t cmap, ColorStruct_t &color) override
Fill in the primary color components for a specific pixel value.
void IntersectRegion(Region_t rega, Region_t regb, Region_t result) override
Compute the intersection of rega and regb and return result region.
void QueryColors(GdkColormap *cmap, GdkColor *colors, Int_t ncolors)
Returns the current RGB value for the pixel in the XColor structure.
void LookupString(Event_t *event, char *buf, Int_t buflen, UInt_t &keysym) override
Convert the keycode from the event structure to a key symbol (according to the modifiers specified in...
void MoveResizeWindow(Window_t id, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Move and resize a window.
void SetAttFill(WinContext_t wctxt, const TAttFill &att) override
Set fill attributes for specified window.
Bool_t EmptyRegion(Region_t reg) override
Return true if the region is empty.
void MapColorStruct(ColorStruct_t *color, GdkColor &xcolor)
Map a ColorStruct_t to a XColor structure.
Int_t ResizePixmap(Int_t wid, UInt_t w, UInt_t h) override
Resize a pixmap.
void SetWMSize(Window_t id, UInt_t w, UInt_t h) override
Tells window manager the desired size of window "id".
void ClosePixmap() override
Delete current pixmap.
Handle_t fXEvent
Current native (GDK) event.
void RemovePixmap(GdkDrawable *pix)
Remove the pixmap pix.
void SelectWindow(Int_t wid) override
Select window to which subsequent output is directed.
Int_t fRedDiv
Red value divider, -1 if no TrueColor visual.
void SetLineType(Int_t n, Int_t *dash) override
Set line type.
void SetTextAlign(Short_t talign=11) override
Set text alignment.
void ChangeProperty(Window_t id, Atom_t property, Atom_t type, UChar_t *data, Int_t len) override
This function alters the property for the specified window and causes the X server to generate a Prop...
Region_t CreateRegion() override
Create a new empty region.
const char * DisplayName(const char *dpyName=0) override
Return hostname on which the display is opened.
void PutImage(Int_t offset, Int_t itran, Int_t x0, Int_t y0, Int_t nx, Int_t ny, Int_t xmin, Int_t ymin, Int_t xmax, Int_t ymax, UChar_t *image, Drawable_t id)
Draw image.
void SetTextSize(Float_t textsize) override
Set current text size.
void DrawPolyMarker(Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y.
Display_t GetDisplay() const override
Returns handle to display (might be useful in some cases where direct X11 manipulation outside of TVi...
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMode mode) override
Draw a box.
GdkGC * GetGC(Int_t which) const
Return desired Graphics Context ("which" maps directly on gGCList[]).
void ChangeGC(GContext_t gc, GCValues_t *gval) override
Change entries in an existing graphics context, gc, by values from gval.
void SetMarkerColor(Color_t cindex) override
Set color index for markers.
void GrabKey(Window_t id, Int_t keycode, UInt_t modifier, Bool_t grab=kTRUE) override
Establish passive grab on a certain key.
void SubtractRegion(Region_t rega, Region_t regb, Region_t result) override
Subtract rega from regb.
XColor_t & GetColor(Int_t cid)
Return reference to internal color structure associated to color index cid.
void DrawLinesSegmentsW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw N segments on specified window n : number of segments xy : list of points, 2*N size.
void DrawRectangle(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Draw a rectangle outline.
void SetDashes(GContext_t gc, Int_t offset, const char *dash_list, Int_t n) override
Specify a dash pattertn.
void DeletePixmap(Pixmap_t pmap) override
Explicitely delete pixmap resource.
void FreeFontNames(char **fontlist) override
Frees the specified the array of strings "fontlist".
void MapWindow(Window_t id) override
Map window on screen.
Int_t WriteGIF(char *name) override
Writes the current window into GIF file.
void DeleteImage(Drawable_t img) override
Deallocates the memory associated with the image img.
void PutPixel(Drawable_t id, Int_t x, Int_t y, ULong_t pixel) override
Overwrites the pixel in the image with the specified pixel value.
void ConvertSelection(Window_t, Atom_t &, Atom_t &, Atom_t &, Time_t &) override
Get Clipboard data.
void SetIconName(Window_t id, char *name) override
Set window icon name.
Bool_t SetSelectionOwner(Window_t, Atom_t &) override
Assigns owner of Clipboard.
Window_t GetPrimarySelectionOwner() override
Returns the window id of the current owner of the primary selection.
Width_t GetLineWidth() const override
Return current line width.
void SetMarkerStyle(Style_t markerstyle) override
Set marker style.
void DeletePictureData(void *data) override
Delete picture data created by the function ReadPictureDataFromFile.
void DrawFillArea(Int_t n, TPoint *xy) override
Fill area described by polygon.
void GetWindowAttributes(Window_t id, WindowAttributes_t &attr) override
Get window attributes and return filled in attributes structure.
void GetWindowSize(Drawable_t id, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Return geometry of window (should be called GetGeometry but signature already used).
void SetTypeList(Window_t win, Atom_t prop, Atom_t *typelist) override
Add the list of drag and drop types to the Window win.
Bool_t CreatePictureFromData(Drawable_t id, char **data, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Create a pixture pixmap from data.
Int_t OpenPixmap(UInt_t w, UInt_t h) override
Open a new pixmap.
Pixmap_t ReadGIF(Int_t x0, Int_t y0, const char *file, Window_t id=0) override
If id is NULL - loads the specified gif file at position [x0,y0] in the current window.
Pixmap_t CreatePixmapFromData(unsigned char *bits, UInt_t width, UInt_t height) override
create an image from RGB data.
Int_t WriteGIFW(WinContext_t wctxt, const char *name) override
Writes the specified window into GIF file.
void NextEvent(Event_t &event) override
Copies first pending event from event queue to Event_t structure and removes event from queue.
void MapKeySym(UInt_t &keysym, UInt_t &xkeysym, Bool_t tox=kTRUE)
Map to and from X key symbols.
Bool_t AllocColor(GdkColormap *cmap, GdkColor *color)
Allocate color in colormap.
void SetAttMarker(WinContext_t wctxt, const TAttMarker &att) override
Set marker attributes for speicfied window.
Bool_t IsCmdThread() const override
returns kTRUE if we are inside cmd/server thread
void SetClipOFF(Int_t wid) override
Turn off the clipping for the window wid.
void SetLineWidth(Width_t width) override
Set line width.
void SetInputFocus(Window_t id) override
Set keyboard input focus to window id.
void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos) override
Copy the pixmap wid at the position xpos, ypos in the current window.
Window_t GetCurrentWindow() const override
Return current window pointer. Protected method used by TGWin32TTF.
void MapRaised(Window_t id) override
Map window on screen and put on top of all windows.
Style_t GetFillStyle() const override
Return current fill style.
void ClearWindowW(WinContext_t wctxt) override
Clear specified window.
void CopyArea(Drawable_t src, Drawable_t dest, GContext_t gc, Int_t src_x, Int_t src_y, UInt_t width, UInt_t height, Int_t dest_x, Int_t dest_y) override
Copy a drawable (i.e.
void SelectInput(Window_t id, UInt_t evmask) override
Defines which input events the window is interested in.
Atom_t InternAtom(const char *atom_name, Bool_t only_if_exist) override
Return atom handle for atom_name.
void ResizeWindow(Int_t wid) override
Resize the current window if necessary.
Int_t OpenDisplay(const char *dpyName=0) override
Open the display. Return -1 if the opening fails, 0 when ok.
void SetDNDAware(Window_t win, Atom_t *typelist) override
Add XdndAware property and the list of drag and drop types to the Window win.
void UnionRegion(Region_t rega, Region_t regb, Region_t result) override
Compute the union of rega and regb and return result region.
void SetWindowBackgroundPixmap(Window_t id, Pixmap_t pxm) override
Set pixmap as window background.
void SetClipRegion(Int_t wid, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Set clipping region for the window wid.
Color_t GetFillColor() const override
Return current fill color.
void GetPasteBuffer(Window_t id, Atom_t atom, TString &text, Int_t &nchar, Bool_t del) override
Get contents of paste buffer atom into string.
void SetKeyAutoRepeat(Bool_t on=kTRUE) override
Turn key auto repeat on or off.
void DrawPolyLine(Int_t n, TPoint *xy) override
Draw a line through all points.
void CopyGC(GContext_t org, GContext_t dest, Mask_t mask) override
Copies graphics context from org to dest.
Int_t fBlueShift
Bits to left shift blue.
GdkCursor * fCursors[kNumCursors]
List of cursors.
void SetLineColor(Color_t cindex) override
Set color index for lines.
Bool_t Init(void *display=0) override
Initialize Win32 system. Returns kFALSE in case of failure.
void QueryPointer(Int_t &ix, Int_t &iy) override
Query pointer position.
void SetDrawModeW(WinContext_t wctxt, EDrawMode mode) override
Set window draw mode.
void UpdateWindow(Int_t mode) override
Update display.
void GetRegionBox(Region_t reg, Rectangle_t *) override
Return smallest enclosing rectangle.
virtual ~TGWin32()
destructor.
Int_t AddWindow(ULongptr_t qwid, UInt_t w, UInt_t h) override
Register a window created by Qt as a ROOT window (like InitWindow()).
Bool_t CreatePictureFromFile(Drawable_t id, const char *filename, Pixmap_t &pict, Pixmap_t &pict_mask, PictureAttributes_t &attr) override
Create a picture pixmap from data on file.
void DrawPolyMarkerW(WinContext_t wctxt, Int_t n, TPoint *xy) override
Draw n markers with the current attributes at position x, y in specified window.
Bool_t fUseSysPointers
True when using system mouse pointers.
void SetDoubleBufferOFF() override
Turn double buffer mode off.
Int_t fGreenDiv
Green value divider.
UInt_t ScreenWidthMM() const override
Returns the width of the screen in millimeters.
Int_t AddPixmap(ULongptr_t pix, UInt_t w, UInt_t h) override
register pixmap created by TGWin32GLManager
Window_t GetDefaultRootWindow() const override
Return handle to the default root window created when calling XOpenDisplay().
Int_t GetDepth() const override
Get maximum number of planes.
void SetWindowBackground(Window_t id, ULong_t color) override
Set the window background color.
FontH_t GetFontHandle(FontStruct_t fs) override
Return handle to font described by font structure.
EDrawMode GetDrawModeW(WinContext_t wctxt) override
Returns window draw mode.
void SetInput(Int_t inp)
Set input on or off.
void RemoveWindow(ULongptr_t qwid) override
Remove a window created by Qt.
TExMap * fColors
Hash list of colors.
Drawable_t CreateImage(UInt_t width, UInt_t height) override
Allocates the memory needed for an drawable.
Pixmap_t CreatePixmap(Drawable_t id, UInt_t w, UInt_t h) override
Creates a pixmap of the width and height you specified and returns a pixmap ID that identifies it.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE)
Beep for duration milliseconds with a tone of frequency freq.
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual TTimer * RemoveTimer(TTimer *t)
Remove timer from list of system timers.
Dynamic handle to work with freetype 2 library.
void GetTextExtent(UInt_t &w, UInt_t &h, const char *text)
Get width (w) and height (h) when text is horizontal.
Bool_t SetTextSize(Float_t textsize)
Set current text size.
void SetRotationMatrix(Float_t angle)
Set the rotation matrix used to rotate the font outlines.
void PrepareString(const char *string)
Put the characters in "string" in the "glyphs" array.
UInt_t GetNumGlyphs() const
return number of glyphs
Int_t GetGlyphsHeight() const
Returns height of all glyphs.
void SetTextFont(Font_t fontnumber)
Set specified font.
Int_t GetGlyphsWidth() const
Returns width of all glyphs.
void LayoutGlyphs()
Compute the glyphs positions, fgAscent and fgWidth (needed for alignment).
Bool_t GetSmoothing() const
void SetSmoothing(Bool_t state)
Bool_t GetGlyphData(UInt_t n, Int_t &offx, Int_t &offy, UChar_t *&buffer, UInt_t &width, UInt_t &rows, UInt_t &pitch)
Returns data for glyph bitmap Instead direct access to FT_BitmapGlyph one can obtain all relevant fie...
Bool_t ApplyAlignRotate(Int_t &px, Int_t &py, Int_t align, Int_t pad_width, Int_t pad_height)
Apply align and configured rotation matrix to text position px and py will be shifted to the place wh...
Handles synchronous and a-synchronous timer events.
Semi-Abstract base class defining a generic interface to the underlying, low level,...
std::vector< ULong_t > orgcolors
void get_scline(int y, int width, unsigned char *buf) override
TWin32GifEncode(GdkImage *image)
Class providing an interface to the Windows NT Operating System.
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
ULong_t fPixel
color pixel value (index in color table)
UShort_t fRed
red component (0..65535)
UShort_t fGreen
green component (0..65535)
UShort_t fBlue
blue component (0..65535)
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
Bool_t fSendEvent
true if event came from SendEvent
Handle_t fHandle
general resource handle (used for atoms or windows)
Int_t fFormat
Next fields only used by kClientMessageEvent.
UInt_t fHeight
width and height of exposed area
Int_t fCount
if non-zero, at least this many more exposes
Window_t fWindow
window reported event is relative to
UInt_t fState
key or button mask
Int_t fYRoot
coordinates relative to root
Time_t fTime
time event event occurred in ms
UInt_t fCode
key or button code
Longptr_t fUser[5]
5 longs can be used by client message events NOTE: only [0], [1] and [2] may be used.
Graphics context structure.
Point structure (maps to the X11 XPoint structure)
Rectangle structure (maps to the X11 XRectangle structure)
Used for drawing line segments (maps to the X11 XSegments structure)
Attributes that can be used when creating or changing a window.
Window attributes that can be inquired.
Description of a X11 color.
Bool_t fDefined
true if pixel value is defined
Description of a X11 window.
TAttText fAttText
current text attributes
Int_t yclip
y coordinate of the clipping rectangle
Int_t shared
1 if Qt window
GdkDrawable * window
win32 window
std::vector< gint8 > dashList
Gtk array for dashes.
UInt_t hclip
height of the clipping rectangle
Int_t double_buffer
1 if the double buffer is on, 0 if not
Int_t ispixmap
1 if pixmap, 0 if not
Int_t open
1 if the window is open, 0 if not
Int_t lineWidth
current line width
Int_t dashOffset
current dash offset
Int_t fillFasi
fasi parameter for fill pattern
Int_t markerLineWidth
line width used for marker
GdkDrawable * buffer
pixmap used for double buffer
Int_t xclip
x coordinate of the clipping rectangle
Int_t fillHollow
Flag if fill style is hollow.
TVirtualX::EDrawMode drawMode
current draw mode
Int_t dashLength
total length of dashes
UInt_t height
height of the window
GdkDrawable * drawing
drawing area, equal to window or buffer
TAttMarker::EMarkerShape markerType
5 differen kinds of marker
GdkGC * fGClist[kMAXGC]
array of GC objects for concrete window
Int_t markerSize
size of simple markers
UInt_t width
width of the window
GdkLineStyle lineStyle
current line style
TAttLine fAttLine
current line attributes
TAttMarker fAttMarker
current marker attribute
GdkPixmap * fillPattern
current fill pattern
TAttFill fAttFill
current fill attributes
std::vector< TPoint > markerShape
marker shape points
Int_t clip
1 if the clipping is on
std::vector< ULong_t > new_colors
new image colors for transparency (after processing)
UInt_t wclip
width of the clipping rectangle