ui/motif/toolkit.h

branch
newapi
changeset 406
0ebf9d7b23e8
parent 119
d7a7fb79b5f7
child 420
28a5920bebe0
equal deleted inserted replaced
405:a7f18dda6baf 406:0ebf9d7b23e8
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2014 Olaf Wintermann. All rights reserved. 4 * Copyright 2024 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
36 36
37 #ifdef __cplusplus 37 #ifdef __cplusplus
38 extern "C" { 38 extern "C" {
39 #endif 39 #endif
40 40
41 Display* ui_get_display();
42
43 typedef struct UiEventData { 41 typedef struct UiEventData {
44 UiObject *obj; 42 UiObject *obj;
45 ui_callback callback; 43 ui_callback callback;
46 void *userdata; 44 void *userdata;
47 int value; 45 int value;
48 } UiEventData; 46 } UiEventData;
47
48 typedef struct UiEventDataExt {
49 UiObject *obj;
50 ui_callback callback;
51 void *userdata;
52 ui_callback callback2;
53 void *userdata2;
54 int value0;
55 int value1;
56 int value2;
57 int value3;
58 void *customdata0;
59 void *customdata1;
60 void *customdata2;
61 void *customdata3;
62 } UiEventDataExt;
63
64 typedef struct UiVarEventData {
65 UiObject *obj;
66 UiVar *var;
67 UiObserver **observers;
68 ui_callback callback;
69 void *userdata;
70 int value;
71 } UiVarEventData;
49 72
50 typedef struct UiJob { 73 typedef struct UiJob {
51 UiObject *obj; 74 UiObject *obj;
52 ui_threadfunc job_func; 75 ui_threadfunc job_func;
53 void *job_data; 76 void *job_data;
58 typedef enum UiOrientation UiOrientation; 81 typedef enum UiOrientation UiOrientation;
59 enum UiOrientation { UI_HORIZONTAL = 0, UI_VERTICAL }; 82 enum UiOrientation { UI_HORIZONTAL = 0, UI_VERTICAL };
60 83
61 void ui_exit_mainloop(); 84 void ui_exit_mainloop();
62 85
86 Display* ui_motif_get_display(void);
87
63 void ui_set_active_window(Widget w); 88 void ui_set_active_window(Widget w);
64 Widget ui_get_active_window(); 89 Widget ui_get_active_window();
65 90
66 void ui_secondary_event_loop(int *loop); 91 void ui_secondary_event_loop(int *loop);
67 void ui_window_dark_theme(Display *dp, Window window); 92 void ui_window_dark_theme(Display *dp, Window window);
93
94 void ui_destroy_eventdata(Widget w, XtPointer *data, XtPointer d);
95
96 void ui_set_widget_groups(UiContext *ctx, Widget widget, const int *groups) ;
97 void ui_set_widget_ngroups(UiContext *ctx, Widget widget, const int *groups, size_t ngroups);
68 98
69 #ifdef __cplusplus 99 #ifdef __cplusplus
70 } 100 }
71 #endif 101 #endif
72 102

mercurial